From fc74a07e977207611492b6de92be56a1b3ad6042 Mon Sep 17 00:00:00 2001 From: Valentyn Berezin Date: Tue, 27 Aug 2019 18:45:24 +0300 Subject: [PATCH 001/255] CLI-initial layout --- datasafe-cli/pom.xml | 123 ++++++++++++++++++ .../java/de/adorsys/datasafe/cli/Cli.java | 61 +++++++++ .../de.adorsys/datasafe-cli/GENERATE.md | 1 + .../datasafe-cli/native-image.properties | 5 + .../keystore/generator/ProviderUtils.java | 13 +- pom.xml | 2 + 6 files changed, 196 insertions(+), 9 deletions(-) create mode 100644 datasafe-cli/pom.xml create mode 100644 datasafe-cli/src/main/java/de/adorsys/datasafe/cli/Cli.java create mode 100644 datasafe-cli/src/main/resources/META-INF/native-image/de.adorsys/datasafe-cli/GENERATE.md create mode 100644 datasafe-cli/src/main/resources/META-INF/native-image/de.adorsys/datasafe-cli/native-image.properties diff --git a/datasafe-cli/pom.xml b/datasafe-cli/pom.xml new file mode 100644 index 000000000..20d46abf7 --- /dev/null +++ b/datasafe-cli/pom.xml @@ -0,0 +1,123 @@ + + 4.0.0 + + de.adorsys + datasafe + 0.6.1-SNAPSHOT + + + datasafe-cli + + + de.adorsys.datasafe.cli.Cli + + + + + + de.adorsys + datasafe-business + ${project.version} + + + de.adorsys + datasafe-storage-impl-fs + ${project.version} + + + org.slf4j + slf4j-api + + + org.slf4j + slf4j-simple + + + + + org.junit.jupiter + junit-jupiter-api + test + + + org.assertj + assertj-core + test + + + org.mockito + mockito-core + test + + + + + + + com.oracle.substratevm + native-image-maven-plugin + ${graal.version} + + + + native-image + + package + + + + datasafe-cli + + --no-server + --no-fallback + + + --rerun-class-initialization-at-runtime=org.bouncycastle.crypto.prng.SP800SecureRandom + --rerun-class-initialization-at-runtime=org.bouncycastle.jcajce.provider.drbg.DRBG$Default + --rerun-class-initialization-at-runtime=org.bouncycastle.jcajce.provider.drbg.DRBG$NonceAndIV + + + + + + + org.apache.maven.plugins + maven-jar-plugin + ${maven.jar.plugin} + + + + ${cli.main.class} + + + + + + + de.ntcomputer + executable-packer-maven-plugin + 1.0.1 + + ${cli.main.class} + + + + + pack-executable-jar + + + + + + + + maven-dependency-plugin + + true + + + + + diff --git a/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/Cli.java b/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/Cli.java new file mode 100644 index 000000000..96993fb8c --- /dev/null +++ b/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/Cli.java @@ -0,0 +1,61 @@ +package de.adorsys.datasafe.cli; + +import com.google.common.io.ByteStreams; +import de.adorsys.datasafe.business.impl.service.DaggerDefaultDatasafeServices; +import de.adorsys.datasafe.business.impl.service.DefaultDatasafeServices; +import de.adorsys.datasafe.directory.impl.profile.config.DefaultDFSConfig; +import de.adorsys.datasafe.encrypiton.api.types.UserIDAuth; +import de.adorsys.datasafe.storage.impl.fs.FileSystemStorageService; +import de.adorsys.datasafe.types.api.actions.ListRequest; +import de.adorsys.datasafe.types.api.actions.ReadRequest; +import de.adorsys.datasafe.types.api.actions.WriteRequest; +import lombok.SneakyThrows; +import org.bouncycastle.jce.provider.BouncyCastleProvider; + +import java.io.OutputStream; +import java.nio.file.Path; +import java.nio.file.Paths; +import java.security.Security; + +public class Cli { + + @SneakyThrows + public static void main(String[] args) { + Path root = Paths.get("/Users/valentyn.berezin/IdeaProjects/datasafe/datasafe-cli/target/datasafe/"); + + Security.addProvider(new BouncyCastleProvider()); + // To register provider you need to: + /* + Copy the JCE provider JAR file to java-home/jre/lib/ext/. + Stop the Application Server. + If the Application Server is not stopped and then restarted later in this process, the JCE provider will not be recognized by the Application Server. + Edit the java-home/jre/lib/security/java.security properties file in any text editor. Add the JCE provider you’ve just downloaded to this file. + The java.security file contains detailed instructions for adding this provider. Basically, you need to add a line of the following format in a location with similar properties: + security.provider.n=provider-class-name + */ + + // this will create all Datasafe files and user documents under + DefaultDatasafeServices defaultDatasafeServices = DaggerDefaultDatasafeServices.builder() + .config(new DefaultDFSConfig(root.toAbsolutePath().toUri(), "secret")) + .storage(new FileSystemStorageService(root)) + .build(); + + UserIDAuth user = new UserIDAuth("me", "mememe"); + defaultDatasafeServices.userProfile().registerUsingDefaults(user); + try (OutputStream os = + defaultDatasafeServices.privateService().write(WriteRequest.forDefaultPrivate(user, "my-file")) + ) { + os.write("Hello from Datasafe".getBytes()); + } + + + long sz = defaultDatasafeServices.privateService().list(ListRequest.forDefaultPrivate(user, "./")).count(); + System.out.println("User has " + sz + " files"); + + System.out.println(new String( + ByteStreams.toByteArray( + defaultDatasafeServices.privateService().read(ReadRequest.forDefaultPrivate(user, "my-file")) + ) + )); + } +} diff --git a/datasafe-cli/src/main/resources/META-INF/native-image/de.adorsys/datasafe-cli/GENERATE.md b/datasafe-cli/src/main/resources/META-INF/native-image/de.adorsys/datasafe-cli/GENERATE.md new file mode 100644 index 000000000..ea51cb553 --- /dev/null +++ b/datasafe-cli/src/main/resources/META-INF/native-image/de.adorsys/datasafe-cli/GENERATE.md @@ -0,0 +1 @@ +java -agentlib:native-image-agent=config-output-dir=src/main/resources/META-INF/native-image/de.adorsys/datasafe-cli -jar target/datasafe-cli-pkg.jar diff --git a/datasafe-cli/src/main/resources/META-INF/native-image/de.adorsys/datasafe-cli/native-image.properties b/datasafe-cli/src/main/resources/META-INF/native-image/de.adorsys/datasafe-cli/native-image.properties new file mode 100644 index 000000000..38c2e5664 --- /dev/null +++ b/datasafe-cli/src/main/resources/META-INF/native-image/de.adorsys/datasafe-cli/native-image.properties @@ -0,0 +1,5 @@ +Args = \ + -H:+ReportUnsupportedElementsAtRuntime \ + -H:ResourceConfigurationResources=${.}/resource-config.json \ + -H:ReflectionConfigurationResources=${.}/reflect-config.json \ + -H:DynamicProxyConfigurationResources=${.}/proxy-config.json diff --git a/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/keystore/generator/ProviderUtils.java b/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/keystore/generator/ProviderUtils.java index 9614d6b1d..8309dcd2b 100644 --- a/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/keystore/generator/ProviderUtils.java +++ b/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/keystore/generator/ProviderUtils.java @@ -1,18 +1,13 @@ package de.adorsys.datasafe.encrypiton.impl.keystore.generator; +import lombok.experimental.UtilityClass; import org.bouncycastle.jce.provider.BouncyCastleProvider; -import javax.crypto.NoSuchPaddingException; import java.security.Provider; import java.security.Security; -public class ProviderUtils { +@UtilityClass +class ProviderUtils { - public static final Provider bcProvider; - - static { - Security.addProvider(new BouncyCastleProvider()); - bcProvider = Security.getProvider("BC"); - if (bcProvider == null) throw new IllegalStateException(new NoSuchPaddingException("BC")); - } + static final Provider bcProvider = Security.getProvider(BouncyCastleProvider.PROVIDER_NAME); } diff --git a/pom.xml b/pom.xml index a54ead1ef..8614037a3 100644 --- a/pom.xml +++ b/pom.xml @@ -19,6 +19,7 @@ datasafe-simple-adapter datasafe-test-storages datasafe-long-run-tests + datasafe-cli last-module-codecoverage-check @@ -78,6 +79,7 @@ ${basedir}/../target/jacoco-e2e.exec 1.8 + 19.2.0 3.7.0 3.1.1 1.18.6 From c937ee82ab88930ce38e0d9eaa989dfea196230a Mon Sep 17 00:00:00 2001 From: Valentyn Berezin Date: Tue, 27 Aug 2019 18:48:26 +0300 Subject: [PATCH 002/255] CLI-initial layout --- .../de.adorsys/datasafe-cli/jni-config.json | 2 + .../de.adorsys/datasafe-cli/proxy-config.json | 2 + .../datasafe-cli/reflect-config.json | 407 ++++++++++++++++++ .../datasafe-cli/resource-config.json | 404 +++++++++++++++++ 4 files changed, 815 insertions(+) create mode 100644 datasafe-cli/src/main/resources/META-INF/native-image/de.adorsys/datasafe-cli/jni-config.json create mode 100644 datasafe-cli/src/main/resources/META-INF/native-image/de.adorsys/datasafe-cli/proxy-config.json create mode 100644 datasafe-cli/src/main/resources/META-INF/native-image/de.adorsys/datasafe-cli/reflect-config.json create mode 100644 datasafe-cli/src/main/resources/META-INF/native-image/de.adorsys/datasafe-cli/resource-config.json diff --git a/datasafe-cli/src/main/resources/META-INF/native-image/de.adorsys/datasafe-cli/jni-config.json b/datasafe-cli/src/main/resources/META-INF/native-image/de.adorsys/datasafe-cli/jni-config.json new file mode 100644 index 000000000..0d4f101c7 --- /dev/null +++ b/datasafe-cli/src/main/resources/META-INF/native-image/de.adorsys/datasafe-cli/jni-config.json @@ -0,0 +1,2 @@ +[ +] diff --git a/datasafe-cli/src/main/resources/META-INF/native-image/de.adorsys/datasafe-cli/proxy-config.json b/datasafe-cli/src/main/resources/META-INF/native-image/de.adorsys/datasafe-cli/proxy-config.json new file mode 100644 index 000000000..0d4f101c7 --- /dev/null +++ b/datasafe-cli/src/main/resources/META-INF/native-image/de.adorsys/datasafe-cli/proxy-config.json @@ -0,0 +1,2 @@ +[ +] diff --git a/datasafe-cli/src/main/resources/META-INF/native-image/de.adorsys/datasafe-cli/reflect-config.json b/datasafe-cli/src/main/resources/META-INF/native-image/de.adorsys/datasafe-cli/reflect-config.json new file mode 100644 index 000000000..c11c2fae0 --- /dev/null +++ b/datasafe-cli/src/main/resources/META-INF/native-image/de.adorsys/datasafe-cli/reflect-config.json @@ -0,0 +1,407 @@ +[ +{ + "name":"com.google.common.util.concurrent.AbstractFuture", + "fields":[ + {"name":"listeners", "allowUnsafeAccess":true}, + {"name":"value", "allowUnsafeAccess":true}, + {"name":"waiters", "allowUnsafeAccess":true} + ] +}, +{ + "name":"com.google.common.util.concurrent.AbstractFuture$Waiter", + "fields":[ + {"name":"next", "allowUnsafeAccess":true}, + {"name":"thread", "allowUnsafeAccess":true} + ] +}, +{ + "name":"de.adorsys.datasafe.cli.Cli", + "methods":[{"name":"main","parameterTypes":["java.lang.String[]"] }] +}, +{ + "name":"de.adorsys.datasafe.directory.api.types.UserPrivateProfile", + "allDeclaredFields":true +}, +{ + "name":"de.adorsys.datasafe.directory.api.types.UserPublicProfile", + "allDeclaredFields":true +}, +{ + "name":"de.adorsys.datasafe.encrypiton.api.types.BaseTypeString", + "allDeclaredFields":true +}, +{ + "name":"de.adorsys.datasafe.encrypiton.api.types.keystore.KeyID", + "allDeclaredFields":true +}, +{ + "name":"de.adorsys.datasafe.encrypiton.api.types.keystore.PublicKeyIDWithPublicKey", + "allDeclaredFields":true +}, +{ + "name":"de.adorsys.datasafe.types.api.resource.AbsoluteLocation", + "allDeclaredFields":true +}, +{ + "name":"de.adorsys.datasafe.types.api.resource.BasePrivateResource", + "allDeclaredFields":true, + "methods":[{"name":"","parameterTypes":[] }] +}, +{ + "name":"de.adorsys.datasafe.types.api.resource.BasePublicResource", + "allDeclaredFields":true +}, +{ + "name":"de.adorsys.datasafe.types.api.resource.StorageIdentifier", + "allDeclaredFields":true +}, +{ + "name":"de.adorsys.datasafe.types.api.resource.Uri", + "allDeclaredFields":true +}, +{ + "name":"java.util.ArrayList", + "methods":[{"name":"","parameterTypes":[] }] +}, +{ + "name":"javax.crypto.AEADBadTagException", + "methods":[{"name":"","parameterTypes":["java.lang.String"] }] +}, +{ + "name":"javax.crypto.spec.GCMParameterSpec", + "methods":[ + {"name":"","parameterTypes":["int","byte[]"] }, + {"name":"getIV","parameterTypes":[] }, + {"name":"getTLen","parameterTypes":[] } + ] +}, +{ + "name":"org.bouncycastle.jcajce.provider.asymmetric.DH$Mappings", + "methods":[{"name":"","parameterTypes":[] }] +}, +{ + "name":"org.bouncycastle.jcajce.provider.asymmetric.DSA$Mappings", + "methods":[{"name":"","parameterTypes":[] }] +}, +{ + "name":"org.bouncycastle.jcajce.provider.asymmetric.DSTU4145$Mappings", + "methods":[{"name":"","parameterTypes":[] }] +}, +{ + "name":"org.bouncycastle.jcajce.provider.asymmetric.EC$Mappings", + "methods":[{"name":"","parameterTypes":[] }] +}, +{ + "name":"org.bouncycastle.jcajce.provider.asymmetric.ECGOST$Mappings", + "methods":[{"name":"","parameterTypes":[] }] +}, +{ + "name":"org.bouncycastle.jcajce.provider.asymmetric.ElGamal$Mappings", + "methods":[{"name":"","parameterTypes":[] }] +}, +{ + "name":"org.bouncycastle.jcajce.provider.asymmetric.GM$Mappings", + "methods":[{"name":"","parameterTypes":[] }] +}, +{ + "name":"org.bouncycastle.jcajce.provider.asymmetric.GOST$Mappings", + "methods":[{"name":"","parameterTypes":[] }] +}, +{ + "name":"org.bouncycastle.jcajce.provider.asymmetric.IES$Mappings", + "methods":[{"name":"","parameterTypes":[] }] +}, +{ + "name":"org.bouncycastle.jcajce.provider.asymmetric.RSA$Mappings", + "methods":[{"name":"","parameterTypes":[] }] +}, +{ + "name":"org.bouncycastle.jcajce.provider.asymmetric.X509$Mappings", + "methods":[{"name":"","parameterTypes":[] }] +}, +{ + "name":"org.bouncycastle.jcajce.provider.asymmetric.rsa.BCRSAPublicKey", + "allDeclaredFields":true +}, +{ + "name":"org.bouncycastle.jcajce.provider.digest.Blake2b$Mappings", + "methods":[{"name":"","parameterTypes":[] }] +}, +{ + "name":"org.bouncycastle.jcajce.provider.digest.DSTU7564$Mappings", + "methods":[{"name":"","parameterTypes":[] }] +}, +{ + "name":"org.bouncycastle.jcajce.provider.digest.GOST3411$Mappings", + "methods":[{"name":"","parameterTypes":[] }] +}, +{ + "name":"org.bouncycastle.jcajce.provider.digest.Keccak$Mappings", + "methods":[{"name":"","parameterTypes":[] }] +}, +{ + "name":"org.bouncycastle.jcajce.provider.digest.MD2$Mappings", + "methods":[{"name":"","parameterTypes":[] }] +}, +{ + "name":"org.bouncycastle.jcajce.provider.digest.MD4$Mappings", + "methods":[{"name":"","parameterTypes":[] }] +}, +{ + "name":"org.bouncycastle.jcajce.provider.digest.MD5$Mappings", + "methods":[{"name":"","parameterTypes":[] }] +}, +{ + "name":"org.bouncycastle.jcajce.provider.digest.RIPEMD128$Mappings", + "methods":[{"name":"","parameterTypes":[] }] +}, +{ + "name":"org.bouncycastle.jcajce.provider.digest.RIPEMD160$Mappings", + "methods":[{"name":"","parameterTypes":[] }] +}, +{ + "name":"org.bouncycastle.jcajce.provider.digest.RIPEMD256$Mappings", + "methods":[{"name":"","parameterTypes":[] }] +}, +{ + "name":"org.bouncycastle.jcajce.provider.digest.RIPEMD320$Mappings", + "methods":[{"name":"","parameterTypes":[] }] +}, +{ + "name":"org.bouncycastle.jcajce.provider.digest.SHA1$Mappings", + "methods":[{"name":"","parameterTypes":[] }] +}, +{ + "name":"org.bouncycastle.jcajce.provider.digest.SHA224$Mappings", + "methods":[{"name":"","parameterTypes":[] }] +}, +{ + "name":"org.bouncycastle.jcajce.provider.digest.SHA256$Mappings", + "methods":[{"name":"","parameterTypes":[] }] +}, +{ + "name":"org.bouncycastle.jcajce.provider.digest.SHA3$Mappings", + "methods":[{"name":"","parameterTypes":[] }] +}, +{ + "name":"org.bouncycastle.jcajce.provider.digest.SHA384$Mappings", + "methods":[{"name":"","parameterTypes":[] }] +}, +{ + "name":"org.bouncycastle.jcajce.provider.digest.SHA512$Mappings", + "methods":[{"name":"","parameterTypes":[] }] +}, +{ + "name":"org.bouncycastle.jcajce.provider.digest.SM3$Mappings", + "methods":[{"name":"","parameterTypes":[] }] +}, +{ + "name":"org.bouncycastle.jcajce.provider.digest.Skein$Mappings", + "methods":[{"name":"","parameterTypes":[] }] +}, +{ + "name":"org.bouncycastle.jcajce.provider.digest.Tiger$Mappings", + "methods":[{"name":"","parameterTypes":[] }] +}, +{ + "name":"org.bouncycastle.jcajce.provider.digest.Whirlpool$Mappings", + "methods":[{"name":"","parameterTypes":[] }] +}, +{ + "name":"org.bouncycastle.jcajce.provider.drbg.DRBG$Mappings", + "methods":[{"name":"","parameterTypes":[] }] +}, +{ + "name":"org.bouncycastle.jcajce.provider.keystore.BC$Mappings", + "methods":[{"name":"","parameterTypes":[] }] +}, +{ + "name":"org.bouncycastle.jcajce.provider.keystore.BCFKS$Mappings", + "methods":[{"name":"","parameterTypes":[] }] +}, +{ + "name":"org.bouncycastle.jcajce.provider.keystore.PKCS12$Mappings", + "methods":[{"name":"","parameterTypes":[] }] +}, +{ + "name":"org.bouncycastle.jcajce.provider.symmetric.AES$Mappings", + "methods":[{"name":"","parameterTypes":[] }] +}, +{ + "name":"org.bouncycastle.jcajce.provider.symmetric.ARC4$Mappings", + "methods":[{"name":"","parameterTypes":[] }] +}, +{ + "name":"org.bouncycastle.jcajce.provider.symmetric.ARIA$Mappings", + "methods":[{"name":"","parameterTypes":[] }] +}, +{ + "name":"org.bouncycastle.jcajce.provider.symmetric.Blowfish$Mappings", + "methods":[{"name":"","parameterTypes":[] }] +}, +{ + "name":"org.bouncycastle.jcajce.provider.symmetric.CAST5$Mappings", + "methods":[{"name":"","parameterTypes":[] }] +}, +{ + "name":"org.bouncycastle.jcajce.provider.symmetric.CAST6$Mappings", + "methods":[{"name":"","parameterTypes":[] }] +}, +{ + "name":"org.bouncycastle.jcajce.provider.symmetric.Camellia$Mappings", + "methods":[{"name":"","parameterTypes":[] }] +}, +{ + "name":"org.bouncycastle.jcajce.provider.symmetric.ChaCha$Mappings", + "methods":[{"name":"","parameterTypes":[] }] +}, +{ + "name":"org.bouncycastle.jcajce.provider.symmetric.DES$Mappings", + "methods":[{"name":"","parameterTypes":[] }] +}, +{ + "name":"org.bouncycastle.jcajce.provider.symmetric.DESede$Mappings", + "methods":[{"name":"","parameterTypes":[] }] +}, +{ + "name":"org.bouncycastle.jcajce.provider.symmetric.DSTU7624$Mappings", + "methods":[{"name":"","parameterTypes":[] }] +}, +{ + "name":"org.bouncycastle.jcajce.provider.symmetric.GOST28147$Mappings", + "methods":[{"name":"","parameterTypes":[] }] +}, +{ + "name":"org.bouncycastle.jcajce.provider.symmetric.Grain128$Mappings", + "methods":[{"name":"","parameterTypes":[] }] +}, +{ + "name":"org.bouncycastle.jcajce.provider.symmetric.Grainv1$Mappings", + "methods":[{"name":"","parameterTypes":[] }] +}, +{ + "name":"org.bouncycastle.jcajce.provider.symmetric.HC128$Mappings", + "methods":[{"name":"","parameterTypes":[] }] +}, +{ + "name":"org.bouncycastle.jcajce.provider.symmetric.HC256$Mappings", + "methods":[{"name":"","parameterTypes":[] }] +}, +{ + "name":"org.bouncycastle.jcajce.provider.symmetric.IDEA$Mappings", + "methods":[{"name":"","parameterTypes":[] }] +}, +{ + "name":"org.bouncycastle.jcajce.provider.symmetric.Noekeon$Mappings", + "methods":[{"name":"","parameterTypes":[] }] +}, +{ + "name":"org.bouncycastle.jcajce.provider.symmetric.OpenSSLPBKDF$Mappings", + "methods":[{"name":"","parameterTypes":[] }] +}, +{ + "name":"org.bouncycastle.jcajce.provider.symmetric.PBEPBKDF1$Mappings", + "methods":[{"name":"","parameterTypes":[] }] +}, +{ + "name":"org.bouncycastle.jcajce.provider.symmetric.PBEPBKDF2$Mappings", + "methods":[{"name":"","parameterTypes":[] }] +}, +{ + "name":"org.bouncycastle.jcajce.provider.symmetric.PBEPKCS12$Mappings", + "methods":[{"name":"","parameterTypes":[] }] +}, +{ + "name":"org.bouncycastle.jcajce.provider.symmetric.Poly1305$Mappings", + "methods":[{"name":"","parameterTypes":[] }] +}, +{ + "name":"org.bouncycastle.jcajce.provider.symmetric.RC2$Mappings", + "methods":[{"name":"","parameterTypes":[] }] +}, +{ + "name":"org.bouncycastle.jcajce.provider.symmetric.RC5$Mappings", + "methods":[{"name":"","parameterTypes":[] }] +}, +{ + "name":"org.bouncycastle.jcajce.provider.symmetric.RC6$Mappings", + "methods":[{"name":"","parameterTypes":[] }] +}, +{ + "name":"org.bouncycastle.jcajce.provider.symmetric.Rijndael$Mappings", + "methods":[{"name":"","parameterTypes":[] }] +}, +{ + "name":"org.bouncycastle.jcajce.provider.symmetric.SEED$Mappings", + "methods":[{"name":"","parameterTypes":[] }] +}, +{ + "name":"org.bouncycastle.jcajce.provider.symmetric.SM4$Mappings", + "methods":[{"name":"","parameterTypes":[] }] +}, +{ + "name":"org.bouncycastle.jcajce.provider.symmetric.Salsa20$Mappings", + "methods":[{"name":"","parameterTypes":[] }] +}, +{ + "name":"org.bouncycastle.jcajce.provider.symmetric.Serpent$Mappings", + "methods":[{"name":"","parameterTypes":[] }] +}, +{ + "name":"org.bouncycastle.jcajce.provider.symmetric.Shacal2$Mappings", + "methods":[{"name":"","parameterTypes":[] }] +}, +{ + "name":"org.bouncycastle.jcajce.provider.symmetric.SipHash$Mappings", + "methods":[{"name":"","parameterTypes":[] }] +}, +{ + "name":"org.bouncycastle.jcajce.provider.symmetric.Skipjack$Mappings", + "methods":[{"name":"","parameterTypes":[] }] +}, +{ + "name":"org.bouncycastle.jcajce.provider.symmetric.TEA$Mappings", + "methods":[{"name":"","parameterTypes":[] }] +}, +{ + "name":"org.bouncycastle.jcajce.provider.symmetric.TLSKDF$Mappings", + "methods":[{"name":"","parameterTypes":[] }] +}, +{ + "name":"org.bouncycastle.jcajce.provider.symmetric.Threefish$Mappings", + "methods":[{"name":"","parameterTypes":[] }] +}, +{ + "name":"org.bouncycastle.jcajce.provider.symmetric.Twofish$Mappings", + "methods":[{"name":"","parameterTypes":[] }] +}, +{ + "name":"org.bouncycastle.jcajce.provider.symmetric.VMPC$Mappings", + "methods":[{"name":"","parameterTypes":[] }] +}, +{ + "name":"org.bouncycastle.jcajce.provider.symmetric.VMPCKSA3$Mappings", + "methods":[{"name":"","parameterTypes":[] }] +}, +{ + "name":"org.bouncycastle.jcajce.provider.symmetric.XSalsa20$Mappings", + "methods":[{"name":"","parameterTypes":[] }] +}, +{ + "name":"org.bouncycastle.jcajce.provider.symmetric.XTEA$Mappings", + "methods":[{"name":"","parameterTypes":[] }] +}, +{ + "name":"sun.misc.Unsafe", + "allDeclaredFields":true, + "methods":[{"name":"allocateInstance","parameterTypes":["java.lang.Class"] }] +}, +{ + "name":"sun.security.provider.SecureRandom", + "methods":[{"name":"","parameterTypes":[] }] +}, +{ + "name":"sun.security.provider.Sun", + "methods":[{"name":"","parameterTypes":[] }] +} +] diff --git a/datasafe-cli/src/main/resources/META-INF/native-image/de.adorsys/datasafe-cli/resource-config.json b/datasafe-cli/src/main/resources/META-INF/native-image/de.adorsys/datasafe-cli/resource-config.json new file mode 100644 index 000000000..42c3c3a3b --- /dev/null +++ b/datasafe-cli/src/main/resources/META-INF/native-image/de.adorsys/datasafe-cli/resource-config.json @@ -0,0 +1,404 @@ +{ + "resources":[ + {"pattern":"META-INF/MANIFEST.MF"}, + {"pattern":"javax/crypto/Cipher.class"}, + {"pattern":"lib/animal-sniffer-annotations-1.17.jar"}, + {"pattern":"lib/bcpkix-jdk15on-1.58.jar"}, + {"pattern":"lib/bcprov-jdk15on-1.58.jar"}, + {"pattern":"lib/checker-qual-2.5.2.jar"}, + {"pattern":"lib/commons-lang3-3.5.jar"}, + {"pattern":"lib/dagger-2.17.jar"}, + {"pattern":"lib/datasafe-business-0.6.1-SNAPSHOT.jar"}, + {"pattern":"lib/datasafe-directory-api-0.6.1-SNAPSHOT.jar"}, + {"pattern":"lib/datasafe-directory-impl-0.6.1-SNAPSHOT.jar"}, + {"pattern":"lib/datasafe-encryption-api-0.6.1-SNAPSHOT.jar"}, + {"pattern":"lib/datasafe-encryption-impl-0.6.1-SNAPSHOT.jar"}, + {"pattern":"lib/datasafe-inbox-api-0.6.1-SNAPSHOT.jar"}, + {"pattern":"lib/datasafe-inbox-impl-0.6.1-SNAPSHOT.jar"}, + {"pattern":"lib/datasafe-metainfo-version-api-0.6.1-SNAPSHOT.jar"}, + {"pattern":"lib/datasafe-metainfo-version-impl-0.6.1-SNAPSHOT.jar"}, + {"pattern":"lib/datasafe-privatestore-api-0.6.1-SNAPSHOT.jar"}, + {"pattern":"lib/datasafe-privatestore-impl-0.6.1-SNAPSHOT.jar"}, + {"pattern":"lib/datasafe-storage-api-0.6.1-SNAPSHOT.jar"}, + {"pattern":"lib/datasafe-storage-impl-fs-0.6.1-SNAPSHOT.jar"}, + {"pattern":"lib/datasafe-types-api-0.6.1-SNAPSHOT.jar"}, + {"pattern":"lib/error_prone_annotations-2.2.0.jar"}, + {"pattern":"lib/failureaccess-1.0.1.jar"}, + {"pattern":"lib/gson-2.8.5.jar"}, + {"pattern":"lib/guava-27.0.1-jre.jar"}, + {"pattern":"lib/j2objc-annotations-1.1.jar"}, + {"pattern":"lib/javax.inject-1.jar"}, + {"pattern":"lib/jsr305-3.0.0.jar"}, + {"pattern":"lib/listenablefuture-9999.0-empty-to-avoid-conflict-with-guava.jar"}, + {"pattern":"lib/lombok-1.18.6.jar"}, + {"pattern":"lib/slf4j-api-1.7.25.jar"}, + {"pattern":"lib/slf4j-simple-1.7.25.jar"}, + {"pattern":"org/bouncycastle/asn1/ASN1ApplicationSpecific.class"}, + {"pattern":"org/bouncycastle/asn1/ASN1BitString.class"}, + {"pattern":"org/bouncycastle/asn1/ASN1Boolean.class"}, + {"pattern":"org/bouncycastle/asn1/ASN1Choice.class"}, + {"pattern":"org/bouncycastle/asn1/ASN1Encodable.class"}, + {"pattern":"org/bouncycastle/asn1/ASN1EncodableVector.class"}, + {"pattern":"org/bouncycastle/asn1/ASN1Enumerated.class"}, + {"pattern":"org/bouncycastle/asn1/ASN1Exception.class"}, + {"pattern":"org/bouncycastle/asn1/ASN1GeneralizedTime.class"}, + {"pattern":"org/bouncycastle/asn1/ASN1Generator.class"}, + {"pattern":"org/bouncycastle/asn1/ASN1InputStream.class"}, + {"pattern":"org/bouncycastle/asn1/ASN1Integer.class"}, + {"pattern":"org/bouncycastle/asn1/ASN1Null.class"}, + {"pattern":"org/bouncycastle/asn1/ASN1Object.class"}, + {"pattern":"org/bouncycastle/asn1/ASN1ObjectIdentifier$OidHandle.class"}, + {"pattern":"org/bouncycastle/asn1/ASN1ObjectIdentifier.class"}, + {"pattern":"org/bouncycastle/asn1/ASN1OctetString.class"}, + {"pattern":"org/bouncycastle/asn1/ASN1OctetStringParser.class"}, + {"pattern":"org/bouncycastle/asn1/ASN1OutputStream$ImplicitOutputStream.class"}, + {"pattern":"org/bouncycastle/asn1/ASN1OutputStream.class"}, + {"pattern":"org/bouncycastle/asn1/ASN1ParsingException.class"}, + {"pattern":"org/bouncycastle/asn1/ASN1Primitive.class"}, + {"pattern":"org/bouncycastle/asn1/ASN1Sequence.class"}, + {"pattern":"org/bouncycastle/asn1/ASN1SequenceParser.class"}, + {"pattern":"org/bouncycastle/asn1/ASN1Set.class"}, + {"pattern":"org/bouncycastle/asn1/ASN1SetParser.class"}, + {"pattern":"org/bouncycastle/asn1/ASN1StreamParser.class"}, + {"pattern":"org/bouncycastle/asn1/ASN1String.class"}, + {"pattern":"org/bouncycastle/asn1/ASN1TaggedObject.class"}, + {"pattern":"org/bouncycastle/asn1/ASN1TaggedObjectParser.class"}, + {"pattern":"org/bouncycastle/asn1/ASN1UTCTime.class"}, + {"pattern":"org/bouncycastle/asn1/BERGenerator.class"}, + {"pattern":"org/bouncycastle/asn1/BEROctetString.class"}, + {"pattern":"org/bouncycastle/asn1/BEROctetStringGenerator$BufferedBEROctetStream.class"}, + {"pattern":"org/bouncycastle/asn1/BEROctetStringGenerator.class"}, + {"pattern":"org/bouncycastle/asn1/BEROctetStringParser.class"}, + {"pattern":"org/bouncycastle/asn1/BEROutputStream.class"}, + {"pattern":"org/bouncycastle/asn1/BERSequence.class"}, + {"pattern":"org/bouncycastle/asn1/BERSequenceGenerator.class"}, + {"pattern":"org/bouncycastle/asn1/BERSequenceParser.class"}, + {"pattern":"org/bouncycastle/asn1/BERSet.class"}, + {"pattern":"org/bouncycastle/asn1/BERTaggedObject.class"}, + {"pattern":"org/bouncycastle/asn1/BERTaggedObjectParser.class"}, + {"pattern":"org/bouncycastle/asn1/BERTags.class"}, + {"pattern":"org/bouncycastle/asn1/ConstructedOctetStream.class"}, + {"pattern":"org/bouncycastle/asn1/DERApplicationSpecific.class"}, + {"pattern":"org/bouncycastle/asn1/DERBMPString.class"}, + {"pattern":"org/bouncycastle/asn1/DERBitString.class"}, + {"pattern":"org/bouncycastle/asn1/DERExternal.class"}, + {"pattern":"org/bouncycastle/asn1/DERFactory.class"}, + {"pattern":"org/bouncycastle/asn1/DERGeneralString.class"}, + {"pattern":"org/bouncycastle/asn1/DERGeneralizedTime.class"}, + {"pattern":"org/bouncycastle/asn1/DERGraphicString.class"}, + {"pattern":"org/bouncycastle/asn1/DERIA5String.class"}, + {"pattern":"org/bouncycastle/asn1/DERNull.class"}, + {"pattern":"org/bouncycastle/asn1/DERNumericString.class"}, + {"pattern":"org/bouncycastle/asn1/DEROctetString.class"}, + {"pattern":"org/bouncycastle/asn1/DEROctetStringParser.class"}, + {"pattern":"org/bouncycastle/asn1/DEROutputStream.class"}, + {"pattern":"org/bouncycastle/asn1/DERPrintableString.class"}, + {"pattern":"org/bouncycastle/asn1/DERSequence.class"}, + {"pattern":"org/bouncycastle/asn1/DERSequenceParser.class"}, + {"pattern":"org/bouncycastle/asn1/DERSet.class"}, + {"pattern":"org/bouncycastle/asn1/DERSetParser.class"}, + {"pattern":"org/bouncycastle/asn1/DERT61String.class"}, + {"pattern":"org/bouncycastle/asn1/DERTaggedObject.class"}, + {"pattern":"org/bouncycastle/asn1/DERUTCTime.class"}, + {"pattern":"org/bouncycastle/asn1/DERUTF8String.class"}, + {"pattern":"org/bouncycastle/asn1/DERUniversalString.class"}, + {"pattern":"org/bouncycastle/asn1/DERVideotexString.class"}, + {"pattern":"org/bouncycastle/asn1/DERVisibleString.class"}, + {"pattern":"org/bouncycastle/asn1/DLBitString.class"}, + {"pattern":"org/bouncycastle/asn1/DLOutputStream.class"}, + {"pattern":"org/bouncycastle/asn1/DLSequence.class"}, + {"pattern":"org/bouncycastle/asn1/DLSet.class"}, + {"pattern":"org/bouncycastle/asn1/DLTaggedObject.class"}, + {"pattern":"org/bouncycastle/asn1/DefiniteLengthInputStream.class"}, + {"pattern":"org/bouncycastle/asn1/InMemoryRepresentable.class"}, + {"pattern":"org/bouncycastle/asn1/IndefiniteLengthInputStream.class"}, + {"pattern":"org/bouncycastle/asn1/LazyEncodedSequence.class"}, + {"pattern":"org/bouncycastle/asn1/LimitedInputStream.class"}, + {"pattern":"org/bouncycastle/asn1/OIDTokenizer.class"}, + {"pattern":"org/bouncycastle/asn1/StreamUtil.class"}, + {"pattern":"org/bouncycastle/asn1/bc/BCObjectIdentifiers.class"}, + {"pattern":"org/bouncycastle/asn1/bsi/BSIObjectIdentifiers.class"}, + {"pattern":"org/bouncycastle/asn1/cms/CMSObjectIdentifiers.class"}, + {"pattern":"org/bouncycastle/asn1/cms/ContentInfoParser.class"}, + {"pattern":"org/bouncycastle/asn1/cms/EncryptedContentInfoParser.class"}, + {"pattern":"org/bouncycastle/asn1/cms/EnvelopedDataParser.class"}, + {"pattern":"org/bouncycastle/asn1/cms/KEKIdentifier.class"}, + {"pattern":"org/bouncycastle/asn1/cms/KEKRecipientInfo.class"}, + {"pattern":"org/bouncycastle/asn1/cms/KeyTransRecipientInfo.class"}, + {"pattern":"org/bouncycastle/asn1/cms/OtherRevocationInfoFormat.class"}, + {"pattern":"org/bouncycastle/asn1/cms/RecipientInfo.class"}, + {"pattern":"org/bouncycastle/asn1/cryptopro/CryptoProObjectIdentifiers.class"}, + {"pattern":"org/bouncycastle/asn1/eac/EACObjectIdentifiers.class"}, + {"pattern":"org/bouncycastle/asn1/gm/GMObjectIdentifiers.class"}, + {"pattern":"org/bouncycastle/asn1/gnu/GNUObjectIdentifiers.class"}, + {"pattern":"org/bouncycastle/asn1/iana/IANAObjectIdentifiers.class"}, + {"pattern":"org/bouncycastle/asn1/kisa/KISAObjectIdentifiers.class"}, + {"pattern":"org/bouncycastle/asn1/misc/MiscObjectIdentifiers.class"}, + {"pattern":"org/bouncycastle/asn1/nist/NISTObjectIdentifiers.class"}, + {"pattern":"org/bouncycastle/asn1/nsri/NSRIObjectIdentifiers.class"}, + {"pattern":"org/bouncycastle/asn1/ntt/NTTObjectIdentifiers.class"}, + {"pattern":"org/bouncycastle/asn1/oiw/OIWObjectIdentifiers.class"}, + {"pattern":"org/bouncycastle/asn1/pkcs/PKCSObjectIdentifiers.class"}, + {"pattern":"org/bouncycastle/asn1/pkcs/RSASSAPSSparams.class"}, + {"pattern":"org/bouncycastle/asn1/rosstandart/RosstandartObjectIdentifiers.class"}, + {"pattern":"org/bouncycastle/asn1/sec/SECObjectIdentifiers.class"}, + {"pattern":"org/bouncycastle/asn1/teletrust/TeleTrusTObjectIdentifiers.class"}, + {"pattern":"org/bouncycastle/asn1/ua/UAObjectIdentifiers.class"}, + {"pattern":"org/bouncycastle/asn1/x500/RDN.class"}, + {"pattern":"org/bouncycastle/asn1/x500/X500Name.class"}, + {"pattern":"org/bouncycastle/asn1/x500/X500NameBuilder.class"}, + {"pattern":"org/bouncycastle/asn1/x500/X500NameStyle.class"}, + {"pattern":"org/bouncycastle/asn1/x500/style/AbstractX500NameStyle.class"}, + {"pattern":"org/bouncycastle/asn1/x500/style/BCStyle.class"}, + {"pattern":"org/bouncycastle/asn1/x509/AlgorithmIdentifier.class"}, + {"pattern":"org/bouncycastle/asn1/x509/AuthorityKeyIdentifier.class"}, + {"pattern":"org/bouncycastle/asn1/x509/BasicConstraints.class"}, + {"pattern":"org/bouncycastle/asn1/x509/Certificate.class"}, + {"pattern":"org/bouncycastle/asn1/x509/Extension.class"}, + {"pattern":"org/bouncycastle/asn1/x509/Extensions.class"}, + {"pattern":"org/bouncycastle/asn1/x509/ExtensionsGenerator.class"}, + {"pattern":"org/bouncycastle/asn1/x509/KeyUsage.class"}, + {"pattern":"org/bouncycastle/asn1/x509/SubjectKeyIdentifier.class"}, + {"pattern":"org/bouncycastle/asn1/x509/SubjectPublicKeyInfo.class"}, + {"pattern":"org/bouncycastle/asn1/x509/TBSCertificate.class"}, + {"pattern":"org/bouncycastle/asn1/x509/Time.class"}, + {"pattern":"org/bouncycastle/asn1/x509/V3TBSCertificateGenerator.class"}, + {"pattern":"org/bouncycastle/asn1/x509/X509Extension.class"}, + {"pattern":"org/bouncycastle/asn1/x509/X509ObjectIdentifiers.class"}, + {"pattern":"org/bouncycastle/asn1/x9/X9ObjectIdentifiers.class"}, + {"pattern":"org/bouncycastle/cert/CertException.class"}, + {"pattern":"org/bouncycastle/cert/CertIOException.class"}, + {"pattern":"org/bouncycastle/cert/CertRuntimeException.class"}, + {"pattern":"org/bouncycastle/cert/CertUtils.class"}, + {"pattern":"org/bouncycastle/cert/X509CRLHolder.class"}, + {"pattern":"org/bouncycastle/cert/X509CertificateHolder.class"}, + {"pattern":"org/bouncycastle/cert/X509ExtensionUtils.class"}, + {"pattern":"org/bouncycastle/cert/X509v3CertificateBuilder.class"}, + {"pattern":"org/bouncycastle/cert/jcajce/CertHelper.class"}, + {"pattern":"org/bouncycastle/cert/jcajce/DefaultCertHelper.class"}, + {"pattern":"org/bouncycastle/cert/jcajce/JcaX509CertificateConverter$ExCertificateException.class"}, + {"pattern":"org/bouncycastle/cert/jcajce/JcaX509CertificateConverter$ExCertificateParsingException.class"}, + {"pattern":"org/bouncycastle/cert/jcajce/JcaX509CertificateConverter.class"}, + {"pattern":"org/bouncycastle/cert/jcajce/JcaX509CertificateHolder.class"}, + {"pattern":"org/bouncycastle/cert/jcajce/JcaX509ExtensionUtils$SHA1DigestCalculator.class"}, + {"pattern":"org/bouncycastle/cert/jcajce/JcaX509ExtensionUtils.class"}, + {"pattern":"org/bouncycastle/cert/jcajce/JcaX509v3CertificateBuilder.class"}, + {"pattern":"org/bouncycastle/cert/jcajce/NamedCertHelper.class"}, + {"pattern":"org/bouncycastle/cert/jcajce/ProviderCertHelper.class"}, + {"pattern":"org/bouncycastle/cms/CMSAlgorithm.class"}, + {"pattern":"org/bouncycastle/cms/CMSContentInfoParser.class"}, + {"pattern":"org/bouncycastle/cms/CMSEnvelopedDataParser.class"}, + {"pattern":"org/bouncycastle/cms/CMSEnvelopedDataStreamGenerator$CmsEnvelopedDataOutputStream.class"}, + {"pattern":"org/bouncycastle/cms/CMSEnvelopedDataStreamGenerator.class"}, + {"pattern":"org/bouncycastle/cms/CMSEnvelopedGenerator.class"}, + {"pattern":"org/bouncycastle/cms/CMSEnvelopedHelper$CMSEnvelopedSecureReadable.class"}, + {"pattern":"org/bouncycastle/cms/CMSEnvelopedHelper.class"}, + {"pattern":"org/bouncycastle/cms/CMSException.class"}, + {"pattern":"org/bouncycastle/cms/CMSProcessable.class"}, + {"pattern":"org/bouncycastle/cms/CMSProcessableInputStream.class"}, + {"pattern":"org/bouncycastle/cms/CMSReadable.class"}, + {"pattern":"org/bouncycastle/cms/CMSSecureReadable.class"}, + {"pattern":"org/bouncycastle/cms/CMSTypedStream$FullReaderStream.class"}, + {"pattern":"org/bouncycastle/cms/CMSTypedStream.class"}, + {"pattern":"org/bouncycastle/cms/CMSUtils.class"}, + {"pattern":"org/bouncycastle/cms/KEKRecipient.class"}, + {"pattern":"org/bouncycastle/cms/KEKRecipientId.class"}, + {"pattern":"org/bouncycastle/cms/KEKRecipientInfoGenerator.class"}, + {"pattern":"org/bouncycastle/cms/KEKRecipientInformation.class"}, + {"pattern":"org/bouncycastle/cms/KeyTransRecipientId.class"}, + {"pattern":"org/bouncycastle/cms/NullOutputStream.class"}, + {"pattern":"org/bouncycastle/cms/PasswordRecipient$PRF.class"}, + {"pattern":"org/bouncycastle/cms/Recipient.class"}, + {"pattern":"org/bouncycastle/cms/RecipientId.class"}, + {"pattern":"org/bouncycastle/cms/RecipientInfoGenerator.class"}, + {"pattern":"org/bouncycastle/cms/RecipientInformation.class"}, + {"pattern":"org/bouncycastle/cms/RecipientInformationStore.class"}, + {"pattern":"org/bouncycastle/cms/RecipientOperator.class"}, + {"pattern":"org/bouncycastle/cms/jcajce/CMSUtils.class"}, + {"pattern":"org/bouncycastle/cms/jcajce/DefaultJcaJceExtHelper.class"}, + {"pattern":"org/bouncycastle/cms/jcajce/EnvelopedDataHelper$1.class"}, + {"pattern":"org/bouncycastle/cms/jcajce/EnvelopedDataHelper$JCECallback.class"}, + {"pattern":"org/bouncycastle/cms/jcajce/EnvelopedDataHelper.class"}, + {"pattern":"org/bouncycastle/cms/jcajce/JcaJceExtHelper.class"}, + {"pattern":"org/bouncycastle/cms/jcajce/JceCMSContentEncryptorBuilder$CMSOutputEncryptor.class"}, + {"pattern":"org/bouncycastle/cms/jcajce/JceCMSContentEncryptorBuilder.class"}, + {"pattern":"org/bouncycastle/cms/jcajce/JceKEKEnvelopedRecipient$1.class"}, + {"pattern":"org/bouncycastle/cms/jcajce/JceKEKEnvelopedRecipient.class"}, + {"pattern":"org/bouncycastle/cms/jcajce/JceKEKRecipient.class"}, + {"pattern":"org/bouncycastle/cms/jcajce/JceKEKRecipientInfoGenerator.class"}, + {"pattern":"org/bouncycastle/cms/jcajce/NamedJcaJceExtHelper.class"}, + {"pattern":"org/bouncycastle/crypto/CipherParameters.class"}, + {"pattern":"org/bouncycastle/crypto/Digest.class"}, + {"pattern":"org/bouncycastle/crypto/io/CipherIOException.class"}, + {"pattern":"org/bouncycastle/crypto/io/InvalidCipherTextIOException.class"}, + {"pattern":"org/bouncycastle/crypto/params/AsymmetricKeyParameter.class"}, + {"pattern":"org/bouncycastle/crypto/params/DSAKeyParameters.class"}, + {"pattern":"org/bouncycastle/crypto/params/DSAPrivateKeyParameters.class"}, + {"pattern":"org/bouncycastle/crypto/params/DSAPublicKeyParameters.class"}, + {"pattern":"org/bouncycastle/crypto/prng/SP800SecureRandom.class"}, + {"pattern":"org/bouncycastle/jcajce/io/CipherInputStream.class"}, + {"pattern":"org/bouncycastle/jcajce/provider/asymmetric/DH$Mappings.class"}, + {"pattern":"org/bouncycastle/jcajce/provider/asymmetric/DH.class"}, + {"pattern":"org/bouncycastle/jcajce/provider/asymmetric/DSA$Mappings.class"}, + {"pattern":"org/bouncycastle/jcajce/provider/asymmetric/DSTU4145$Mappings.class"}, + {"pattern":"org/bouncycastle/jcajce/provider/asymmetric/EC$Mappings.class"}, + {"pattern":"org/bouncycastle/jcajce/provider/asymmetric/EC.class"}, + {"pattern":"org/bouncycastle/jcajce/provider/asymmetric/ECGOST$Mappings.class"}, + {"pattern":"org/bouncycastle/jcajce/provider/asymmetric/ElGamal$Mappings.class"}, + {"pattern":"org/bouncycastle/jcajce/provider/asymmetric/GM$Mappings.class"}, + {"pattern":"org/bouncycastle/jcajce/provider/asymmetric/GOST$Mappings.class"}, + {"pattern":"org/bouncycastle/jcajce/provider/asymmetric/IES$Mappings.class"}, + {"pattern":"org/bouncycastle/jcajce/provider/asymmetric/RSA$Mappings.class"}, + {"pattern":"org/bouncycastle/jcajce/provider/asymmetric/RSA.class"}, + {"pattern":"org/bouncycastle/jcajce/provider/asymmetric/X509$Mappings.class"}, + {"pattern":"org/bouncycastle/jcajce/provider/asymmetric/dh/KeyFactorySpi.class"}, + {"pattern":"org/bouncycastle/jcajce/provider/asymmetric/dsa/DSAUtil.class"}, + {"pattern":"org/bouncycastle/jcajce/provider/asymmetric/dsa/KeyFactorySpi$1.class"}, + {"pattern":"org/bouncycastle/jcajce/provider/asymmetric/dsa/KeyFactorySpi.class"}, + {"pattern":"org/bouncycastle/jcajce/provider/asymmetric/dstu/KeyFactorySpi.class"}, + {"pattern":"org/bouncycastle/jcajce/provider/asymmetric/ec/KeyFactorySpi$EC.class"}, + {"pattern":"org/bouncycastle/jcajce/provider/asymmetric/ec/KeyFactorySpi$ECMQV.class"}, + {"pattern":"org/bouncycastle/jcajce/provider/asymmetric/ec/KeyFactorySpi.class"}, + {"pattern":"org/bouncycastle/jcajce/provider/asymmetric/ecgost/KeyFactorySpi.class"}, + {"pattern":"org/bouncycastle/jcajce/provider/asymmetric/ecgost12/KeyFactorySpi.class"}, + {"pattern":"org/bouncycastle/jcajce/provider/asymmetric/elgamal/KeyFactorySpi.class"}, + {"pattern":"org/bouncycastle/jcajce/provider/asymmetric/gost/KeyFactorySpi.class"}, + {"pattern":"org/bouncycastle/jcajce/provider/asymmetric/rsa/KeyFactorySpi.class"}, + {"pattern":"org/bouncycastle/jcajce/provider/asymmetric/util/BaseKeyFactorySpi.class"}, + {"pattern":"org/bouncycastle/jcajce/provider/asymmetric/util/ExtendedInvalidKeySpecException.class"}, + {"pattern":"org/bouncycastle/jcajce/provider/config/ProviderConfiguration.class"}, + {"pattern":"org/bouncycastle/jcajce/provider/config/ProviderConfigurationPermission.class"}, + {"pattern":"org/bouncycastle/jcajce/provider/digest/Blake2b$Mappings.class"}, + {"pattern":"org/bouncycastle/jcajce/provider/digest/DSTU7564$Mappings.class"}, + {"pattern":"org/bouncycastle/jcajce/provider/digest/DigestAlgorithmProvider.class"}, + {"pattern":"org/bouncycastle/jcajce/provider/digest/GOST3411$Mappings.class"}, + {"pattern":"org/bouncycastle/jcajce/provider/digest/Keccak$Mappings.class"}, + {"pattern":"org/bouncycastle/jcajce/provider/digest/MD2$Mappings.class"}, + {"pattern":"org/bouncycastle/jcajce/provider/digest/MD4$Mappings.class"}, + {"pattern":"org/bouncycastle/jcajce/provider/digest/MD5$Mappings.class"}, + {"pattern":"org/bouncycastle/jcajce/provider/digest/RIPEMD128$Mappings.class"}, + {"pattern":"org/bouncycastle/jcajce/provider/digest/RIPEMD160$Mappings.class"}, + {"pattern":"org/bouncycastle/jcajce/provider/digest/RIPEMD256$Mappings.class"}, + {"pattern":"org/bouncycastle/jcajce/provider/digest/RIPEMD320$Mappings.class"}, + {"pattern":"org/bouncycastle/jcajce/provider/digest/SHA1$Mappings.class"}, + {"pattern":"org/bouncycastle/jcajce/provider/digest/SHA224$Mappings.class"}, + {"pattern":"org/bouncycastle/jcajce/provider/digest/SHA256$Mappings.class"}, + {"pattern":"org/bouncycastle/jcajce/provider/digest/SHA3$Mappings.class"}, + {"pattern":"org/bouncycastle/jcajce/provider/digest/SHA384$Mappings.class"}, + {"pattern":"org/bouncycastle/jcajce/provider/digest/SHA512$Mappings.class"}, + {"pattern":"org/bouncycastle/jcajce/provider/digest/SM3$Mappings.class"}, + {"pattern":"org/bouncycastle/jcajce/provider/digest/Skein$Mappings.class"}, + {"pattern":"org/bouncycastle/jcajce/provider/digest/Tiger$Mappings.class"}, + {"pattern":"org/bouncycastle/jcajce/provider/digest/Whirlpool$Mappings.class"}, + {"pattern":"org/bouncycastle/jcajce/provider/drbg/DRBG$CoreSecureRandom.class"}, + {"pattern":"org/bouncycastle/jcajce/provider/drbg/DRBG$HybridSecureRandom.class"}, + {"pattern":"org/bouncycastle/jcajce/provider/drbg/DRBG$Mappings.class"}, + {"pattern":"org/bouncycastle/jcajce/provider/drbg/DRBG.class"}, + {"pattern":"org/bouncycastle/jcajce/provider/keystore/BC$Mappings.class"}, + {"pattern":"org/bouncycastle/jcajce/provider/keystore/BCFKS$Mappings.class"}, + {"pattern":"org/bouncycastle/jcajce/provider/keystore/PKCS12$Mappings.class"}, + {"pattern":"org/bouncycastle/jcajce/provider/symmetric/AES$Mappings.class"}, + {"pattern":"org/bouncycastle/jcajce/provider/symmetric/ARC4$Mappings.class"}, + {"pattern":"org/bouncycastle/jcajce/provider/symmetric/ARIA$Mappings.class"}, + {"pattern":"org/bouncycastle/jcajce/provider/symmetric/Blowfish$Mappings.class"}, + {"pattern":"org/bouncycastle/jcajce/provider/symmetric/CAST5$Mappings.class"}, + {"pattern":"org/bouncycastle/jcajce/provider/symmetric/CAST6$Mappings.class"}, + {"pattern":"org/bouncycastle/jcajce/provider/symmetric/Camellia$Mappings.class"}, + {"pattern":"org/bouncycastle/jcajce/provider/symmetric/ChaCha$Mappings.class"}, + {"pattern":"org/bouncycastle/jcajce/provider/symmetric/DES$Mappings.class"}, + {"pattern":"org/bouncycastle/jcajce/provider/symmetric/DESede$Mappings.class"}, + {"pattern":"org/bouncycastle/jcajce/provider/symmetric/DSTU7624$Mappings.class"}, + {"pattern":"org/bouncycastle/jcajce/provider/symmetric/GOST28147$Mappings.class"}, + {"pattern":"org/bouncycastle/jcajce/provider/symmetric/Grain128$Mappings.class"}, + {"pattern":"org/bouncycastle/jcajce/provider/symmetric/Grainv1$Mappings.class"}, + {"pattern":"org/bouncycastle/jcajce/provider/symmetric/HC128$Mappings.class"}, + {"pattern":"org/bouncycastle/jcajce/provider/symmetric/HC256$Mappings.class"}, + {"pattern":"org/bouncycastle/jcajce/provider/symmetric/IDEA$Mappings.class"}, + {"pattern":"org/bouncycastle/jcajce/provider/symmetric/Noekeon$Mappings.class"}, + {"pattern":"org/bouncycastle/jcajce/provider/symmetric/OpenSSLPBKDF$Mappings.class"}, + {"pattern":"org/bouncycastle/jcajce/provider/symmetric/PBEPBKDF1$Mappings.class"}, + {"pattern":"org/bouncycastle/jcajce/provider/symmetric/PBEPBKDF2$Mappings.class"}, + {"pattern":"org/bouncycastle/jcajce/provider/symmetric/PBEPKCS12$Mappings.class"}, + {"pattern":"org/bouncycastle/jcajce/provider/symmetric/Poly1305$Mappings.class"}, + {"pattern":"org/bouncycastle/jcajce/provider/symmetric/RC2$Mappings.class"}, + {"pattern":"org/bouncycastle/jcajce/provider/symmetric/RC5$Mappings.class"}, + {"pattern":"org/bouncycastle/jcajce/provider/symmetric/RC6$Mappings.class"}, + {"pattern":"org/bouncycastle/jcajce/provider/symmetric/Rijndael$Mappings.class"}, + {"pattern":"org/bouncycastle/jcajce/provider/symmetric/SEED$Mappings.class"}, + {"pattern":"org/bouncycastle/jcajce/provider/symmetric/SM4$Mappings.class"}, + {"pattern":"org/bouncycastle/jcajce/provider/symmetric/Salsa20$Mappings.class"}, + {"pattern":"org/bouncycastle/jcajce/provider/symmetric/Serpent$Mappings.class"}, + {"pattern":"org/bouncycastle/jcajce/provider/symmetric/Shacal2$Mappings.class"}, + {"pattern":"org/bouncycastle/jcajce/provider/symmetric/SipHash$Mappings.class"}, + {"pattern":"org/bouncycastle/jcajce/provider/symmetric/Skipjack$Mappings.class"}, + {"pattern":"org/bouncycastle/jcajce/provider/symmetric/SymmetricAlgorithmProvider.class"}, + {"pattern":"org/bouncycastle/jcajce/provider/symmetric/TEA$Mappings.class"}, + {"pattern":"org/bouncycastle/jcajce/provider/symmetric/TLSKDF$Mappings.class"}, + {"pattern":"org/bouncycastle/jcajce/provider/symmetric/Threefish$Mappings.class"}, + {"pattern":"org/bouncycastle/jcajce/provider/symmetric/Twofish$Mappings.class"}, + {"pattern":"org/bouncycastle/jcajce/provider/symmetric/VMPC$Mappings.class"}, + {"pattern":"org/bouncycastle/jcajce/provider/symmetric/VMPCKSA3$Mappings.class"}, + {"pattern":"org/bouncycastle/jcajce/provider/symmetric/XSalsa20$Mappings.class"}, + {"pattern":"org/bouncycastle/jcajce/provider/symmetric/XTEA$Mappings.class"}, + {"pattern":"org/bouncycastle/jcajce/provider/symmetric/util/ClassUtil.class"}, + {"pattern":"org/bouncycastle/jcajce/provider/util/AlgorithmProvider.class"}, + {"pattern":"org/bouncycastle/jcajce/provider/util/AsymmetricAlgorithmProvider.class"}, + {"pattern":"org/bouncycastle/jcajce/provider/util/AsymmetricKeyInfoConverter.class"}, + {"pattern":"org/bouncycastle/jcajce/util/AlgorithmParametersUtils.class"}, + {"pattern":"org/bouncycastle/jcajce/util/DefaultJcaJceHelper.class"}, + {"pattern":"org/bouncycastle/jcajce/util/JcaJceHelper.class"}, + {"pattern":"org/bouncycastle/jcajce/util/NamedJcaJceHelper.class"}, + {"pattern":"org/bouncycastle/jcajce/util/ProviderJcaJceHelper.class"}, + {"pattern":"org/bouncycastle/jce/provider/BouncyCastleProvider$1.class"}, + {"pattern":"org/bouncycastle/jce/provider/BouncyCastleProviderConfiguration.class"}, + {"pattern":"org/bouncycastle/operator/ContentSigner.class"}, + {"pattern":"org/bouncycastle/operator/DefaultSecretKeySizeProvider.class"}, + {"pattern":"org/bouncycastle/operator/DefaultSignatureAlgorithmIdentifierFinder.class"}, + {"pattern":"org/bouncycastle/operator/DigestCalculator.class"}, + {"pattern":"org/bouncycastle/operator/GenericKey.class"}, + {"pattern":"org/bouncycastle/operator/InputDecryptor.class"}, + {"pattern":"org/bouncycastle/operator/KeyUnwrapper.class"}, + {"pattern":"org/bouncycastle/operator/KeyWrapper.class"}, + {"pattern":"org/bouncycastle/operator/OperatorCreationException.class"}, + {"pattern":"org/bouncycastle/operator/OperatorException.class"}, + {"pattern":"org/bouncycastle/operator/OperatorStreamException.class"}, + {"pattern":"org/bouncycastle/operator/OutputEncryptor.class"}, + {"pattern":"org/bouncycastle/operator/RuntimeOperatorException.class"}, + {"pattern":"org/bouncycastle/operator/SecretKeySizeProvider.class"}, + {"pattern":"org/bouncycastle/operator/SignatureAlgorithmIdentifierFinder.class"}, + {"pattern":"org/bouncycastle/operator/SymmetricKeyUnwrapper.class"}, + {"pattern":"org/bouncycastle/operator/SymmetricKeyWrapper.class"}, + {"pattern":"org/bouncycastle/operator/jcajce/JcaContentSignerBuilder$1.class"}, + {"pattern":"org/bouncycastle/operator/jcajce/JcaContentSignerBuilder$SignatureOutputStream.class"}, + {"pattern":"org/bouncycastle/operator/jcajce/JcaContentSignerBuilder.class"}, + {"pattern":"org/bouncycastle/operator/jcajce/JceGenericKey.class"}, + {"pattern":"org/bouncycastle/operator/jcajce/JceSymmetricKeyUnwrapper.class"}, + {"pattern":"org/bouncycastle/operator/jcajce/JceSymmetricKeyWrapper.class"}, + {"pattern":"org/bouncycastle/operator/jcajce/OperatorHelper$OpCertificateException.class"}, + {"pattern":"org/bouncycastle/operator/jcajce/OperatorHelper.class"}, + {"pattern":"org/bouncycastle/operator/jcajce/OperatorUtils.class"}, + {"pattern":"org/bouncycastle/pqc/asn1/PQCObjectIdentifiers.class"}, + {"pattern":"org/bouncycastle/pqc/jcajce/provider/mceliece/McElieceCCA2KeyFactorySpi.class"}, + {"pattern":"org/bouncycastle/pqc/jcajce/provider/mceliece/McElieceKeyFactorySpi.class"}, + {"pattern":"org/bouncycastle/pqc/jcajce/provider/newhope/NHKeyFactorySpi.class"}, + {"pattern":"org/bouncycastle/pqc/jcajce/provider/rainbow/RainbowKeyFactorySpi.class"}, + {"pattern":"org/bouncycastle/pqc/jcajce/provider/sphincs/Sphincs256KeyFactorySpi.class"}, + {"pattern":"org/bouncycastle/pqc/jcajce/provider/xmss/XMSSKeyFactorySpi.class"}, + {"pattern":"org/bouncycastle/pqc/jcajce/provider/xmss/XMSSMTKeyFactorySpi.class"}, + {"pattern":"org/bouncycastle/util/Arrays.class"}, + {"pattern":"org/bouncycastle/util/Encodable.class"}, + {"pattern":"org/bouncycastle/util/Integers.class"}, + {"pattern":"org/bouncycastle/util/Iterable.class"}, + {"pattern":"org/bouncycastle/util/Properties$1.class"}, + {"pattern":"org/bouncycastle/util/Properties.class"}, + {"pattern":"org/bouncycastle/util/Selector.class"}, + {"pattern":"org/bouncycastle/util/StringList.class"}, + {"pattern":"org/bouncycastle/util/Strings$1.class"}, + {"pattern":"org/bouncycastle/util/Strings.class"}, + {"pattern":"org/bouncycastle/util/io/StreamOverflowException.class"}, + {"pattern":"org/bouncycastle/util/io/Streams.class"}, + {"pattern":"org/bouncycastle/util/io/TeeInputStream.class"}, + {"pattern":"org/bouncycastle/util/io/TeeOutputStream.class"}, + {"pattern":"org/slf4j/impl/StaticLoggerBinder.class"} + ] +} From 596cdaad518286f0385e0471c43a91d3088446ba Mon Sep 17 00:00:00 2001 From: Valentyn Berezin Date: Wed, 28 Aug 2019 13:39:09 +0300 Subject: [PATCH 003/255] CLI-more work with hacks --- datasafe-cli/README.md | 2 + datasafe-cli/pom.xml | 14 +- ...eOnMissingServiceTypeInKnownProviders.java | 126 ++++++++++++++++++ .../datasafe-cli/native-image.properties | 2 + .../datasafe-cli/reflect-config.json | 22 ++- .../datasafe-cli/resource-config.json | 8 +- .../src/main/resources/extra_engines.hack | 2 + ...erationsTestWithVersionedDatasafeTest.java | 1 - 8 files changed, 168 insertions(+), 9 deletions(-) create mode 100644 datasafe-cli/README.md create mode 100644 datasafe-cli/src/main/java/de/adorsys/datasafe/cli/hacks/GraalCompileFixNpeOnMissingServiceTypeInKnownProviders.java create mode 100644 datasafe-cli/src/main/resources/extra_engines.hack diff --git a/datasafe-cli/README.md b/datasafe-cli/README.md new file mode 100644 index 000000000..cfaf61f27 --- /dev/null +++ b/datasafe-cli/README.md @@ -0,0 +1,2 @@ +# Build +You need GraalVM compiler and BouncyCastle in java-home/jre/lib/ext/ of this compiler. diff --git a/datasafe-cli/pom.xml b/datasafe-cli/pom.xml index 20d46abf7..b1e3a581a 100644 --- a/datasafe-cli/pom.xml +++ b/datasafe-cli/pom.xml @@ -35,6 +35,13 @@ slf4j-simple + + com.oracle.substratevm + svm + ${graal.version} + provided + + org.junit.jupiter @@ -72,12 +79,12 @@ --no-server --no-fallback - + --enable-all-security-services + --features=de.adorsys.datasafe.cli.hacks.GraalCompileFixNpeOnMissingServiceTypeInKnownProviders --rerun-class-initialization-at-runtime=org.bouncycastle.crypto.prng.SP800SecureRandom --rerun-class-initialization-at-runtime=org.bouncycastle.jcajce.provider.drbg.DRBG$Default --rerun-class-initialization-at-runtime=org.bouncycastle.jcajce.provider.drbg.DRBG$NonceAndIV - @@ -87,6 +94,9 @@ maven-jar-plugin ${maven.jar.plugin} + + de.adorsys.datasafe.cli.hacks + ${cli.main.class} diff --git a/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/hacks/GraalCompileFixNpeOnMissingServiceTypeInKnownProviders.java b/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/hacks/GraalCompileFixNpeOnMissingServiceTypeInKnownProviders.java new file mode 100644 index 000000000..b1821d2db --- /dev/null +++ b/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/hacks/GraalCompileFixNpeOnMissingServiceTypeInKnownProviders.java @@ -0,0 +1,126 @@ +package de.adorsys.datasafe.cli.hacks; + +import com.oracle.svm.core.annotate.AutomaticFeature; +import lombok.RequiredArgsConstructor; +import lombok.experimental.Delegate; +import org.graalvm.nativeimage.hosted.Feature; + +import java.io.BufferedReader; +import java.io.IOException; +import java.io.InputStream; +import java.io.InputStreamReader; +import java.lang.reflect.Constructor; +import java.lang.reflect.Field; +import java.lang.reflect.InvocationTargetException; +import java.lang.reflect.Modifier; +import java.nio.charset.StandardCharsets; +import java.security.Provider; +import java.util.Locale; +import java.util.Map; + +/** + * This class fixes NPE exception in Graal-compilator - when it tries to get non-existing engines from + * {@link java.security.Provider} + * + * Additionally can log access to null service types using property PROVIDER_ACCESS_LOGGER, + * so you can add necessary fields to extra_engines.hack. (This will break build later, so you will need + * to remove this property when you detected all nulls in Provider). + * + * Override string example: + * X509Store=false,null + */ +@AutomaticFeature +public class GraalCompileFixNpeOnMissingServiceTypeInKnownProviders implements Feature { + + private static final String PROVIDER_ACCESS_LOGGER = "PROVIDER_ACCESS_LOGGER"; + + @Override + public void afterRegistration(AfterRegistrationAccess access) { + ClassLoader classloader = Thread.currentThread().getContextClassLoader(); + + try (InputStream is = classloader.getResourceAsStream("extra_engines.hack"); + InputStreamReader streamReader = new InputStreamReader(is, StandardCharsets.UTF_8); + BufferedReader reader = new BufferedReader(streamReader)) { + reader.lines().forEach(it -> { + System.out.println("Overriding " + it); + String[] typeAndValue = it.split("="); + String[] params = typeAndValue[1].split(","); + addEngine(typeAndValue[0], params[0], params[1]); + }); + } catch (IOException ex) { + System.out.println("Failed to read resource - extra_engines.hack " + ex.getMessage()); + ex.printStackTrace(); + } + + } + + private void addEngine(String name, String sp, String paramNam) { + try { + addEngineInternal(name, sp, paramNam); + } catch (ReflectiveOperationException ex) { + System.out.println("Reflective access error " + ex.getMessage()); + ex.printStackTrace(); + throw new IllegalStateException("Failed"); + } + } + + private void addEngineInternal(String name, String sp, String paramNam) throws + NoSuchFieldException, + ClassNotFoundException, + NoSuchMethodException, + IllegalAccessException, + InstantiationException, + InvocationTargetException { + Field knownEngines = Provider.class.getDeclaredField("knownEngines"); + knownEngines.setAccessible(true); + + Field modifiersField = Field.class.getDeclaredField("modifiers"); + modifiersField.setAccessible(true); + modifiersField.setInt(knownEngines, knownEngines.getModifiers() & ~Modifier.FINAL); + + Class engineDescription = Class.forName("java.security.Provider$EngineDescription"); + + Constructor ctor = engineDescription.getDeclaredConstructor(String.class, boolean.class, String.class); + ctor.setAccessible(true); + + @SuppressWarnings("unchecked") + Map originalEngine = (Map) knownEngines.get(null); + + Map delegate = null != System.getProperty(PROVIDER_ACCESS_LOGGER) + ? new EngineDelegate(originalEngine) : originalEngine; + + knownEngines.set(Map.class, delegate); + + Object engineDescInstance = ctor.newInstance( + name, + Boolean.parseBoolean(sp), + "null".equals(paramNam) ? null : paramNam + ); + + delegate.put(name.toLowerCase(Locale.ENGLISH), engineDescInstance); + delegate.put(name, engineDescInstance); + } + + @RequiredArgsConstructor + private static class EngineDelegate implements Map { + + @Delegate(excludes = Get.class) + private final Map delegate; + + + @Override + public Object get(Object key) { + Object value = delegate.get(key); + + if (null == value) { + System.out.println("Detected access to null value in Provider.knownEngines for type " + key); + } + + return value; + } + + private interface Get { + Object get(Object key); + } + } +} diff --git a/datasafe-cli/src/main/resources/META-INF/native-image/de.adorsys/datasafe-cli/native-image.properties b/datasafe-cli/src/main/resources/META-INF/native-image/de.adorsys/datasafe-cli/native-image.properties index 38c2e5664..9f16897de 100644 --- a/datasafe-cli/src/main/resources/META-INF/native-image/de.adorsys/datasafe-cli/native-image.properties +++ b/datasafe-cli/src/main/resources/META-INF/native-image/de.adorsys/datasafe-cli/native-image.properties @@ -1,4 +1,6 @@ Args = \ + -H:+ReportExceptionStackTraces \ + -H:+TraceClassInitialization \ -H:+ReportUnsupportedElementsAtRuntime \ -H:ResourceConfigurationResources=${.}/resource-config.json \ -H:ReflectionConfigurationResources=${.}/reflect-config.json \ diff --git a/datasafe-cli/src/main/resources/META-INF/native-image/de.adorsys/datasafe-cli/reflect-config.json b/datasafe-cli/src/main/resources/META-INF/native-image/de.adorsys/datasafe-cli/reflect-config.json index c11c2fae0..e3271647e 100644 --- a/datasafe-cli/src/main/resources/META-INF/native-image/de.adorsys/datasafe-cli/reflect-config.json +++ b/datasafe-cli/src/main/resources/META-INF/native-image/de.adorsys/datasafe-cli/reflect-config.json @@ -20,11 +20,24 @@ }, { "name":"de.adorsys.datasafe.directory.api.types.UserPrivateProfile", - "allDeclaredFields":true + "allDeclaredFields":true, + "fields": [ + {"name":"keystore", "allowWrite": true}, + {"name":"privateStorage", "allowWrite": true}, + {"name":"inboxWithFullAccess", "allowWrite": true}, + {"name":"publishPublicKeysTo", "allowWrite": true}, + {"name":"associatedResources", "allowWrite": true}, + {"name":"documentVersionStorage", "allowWrite": true}, + {"name":"storageCredentialsKeystore", "allowWrite": true}, + ] }, { "name":"de.adorsys.datasafe.directory.api.types.UserPublicProfile", - "allDeclaredFields":true + "allDeclaredFields":true, + "fields": [ + {"name":"publicKeys", "allowWrite": true}, + {"name":"inbox", "allowWrite": true} + ] }, { "name":"de.adorsys.datasafe.encrypiton.api.types.BaseTypeString", @@ -40,7 +53,10 @@ }, { "name":"de.adorsys.datasafe.types.api.resource.AbsoluteLocation", - "allDeclaredFields":true + "allDeclaredFields":true, + "fields": [ + {"name":"resource", "allowWrite": true} + ] }, { "name":"de.adorsys.datasafe.types.api.resource.BasePrivateResource", diff --git a/datasafe-cli/src/main/resources/META-INF/native-image/de.adorsys/datasafe-cli/resource-config.json b/datasafe-cli/src/main/resources/META-INF/native-image/de.adorsys/datasafe-cli/resource-config.json index 42c3c3a3b..fca5e2c96 100644 --- a/datasafe-cli/src/main/resources/META-INF/native-image/de.adorsys/datasafe-cli/resource-config.json +++ b/datasafe-cli/src/main/resources/META-INF/native-image/de.adorsys/datasafe-cli/resource-config.json @@ -182,7 +182,9 @@ {"pattern":"org/bouncycastle/cert/jcajce/JcaX509CertificateHolder.class"}, {"pattern":"org/bouncycastle/cert/jcajce/JcaX509ExtensionUtils$SHA1DigestCalculator.class"}, {"pattern":"org/bouncycastle/cert/jcajce/JcaX509ExtensionUtils.class"}, - {"pattern":"org/bouncycastle/cert/jcajce/JcaX509v3CertificateBuilder.class"}, + {"pattern":"org/bouncycastle/cert/jcajce/JcaX509v3CertificateBuilder.class"}, + {"pattern":"org/bouncycastle/x509/X509Store.class"}, + {"pattern":"org/bouncycastle/jce/provider/X509StoreCertCollection.class"}, {"pattern":"org/bouncycastle/cert/jcajce/NamedCertHelper.class"}, {"pattern":"org/bouncycastle/cert/jcajce/ProviderCertHelper.class"}, {"pattern":"org/bouncycastle/cms/CMSAlgorithm.class"}, @@ -294,7 +296,7 @@ {"pattern":"org/bouncycastle/jcajce/provider/drbg/DRBG$HybridSecureRandom.class"}, {"pattern":"org/bouncycastle/jcajce/provider/drbg/DRBG$Mappings.class"}, {"pattern":"org/bouncycastle/jcajce/provider/drbg/DRBG.class"}, - {"pattern":"org/bouncycastle/jcajce/provider/keystore/BC$Mappings.class"}, + {"pattern":"org/bouncycastle/jcajce/provider/keystore/BC$Mappings.class"}, {"pattern":"org/bouncycastle/jcajce/provider/keystore/BCFKS$Mappings.class"}, {"pattern":"org/bouncycastle/jcajce/provider/keystore/PKCS12$Mappings.class"}, {"pattern":"org/bouncycastle/jcajce/provider/symmetric/AES$Mappings.class"}, @@ -384,7 +386,7 @@ {"pattern":"org/bouncycastle/pqc/jcajce/provider/rainbow/RainbowKeyFactorySpi.class"}, {"pattern":"org/bouncycastle/pqc/jcajce/provider/sphincs/Sphincs256KeyFactorySpi.class"}, {"pattern":"org/bouncycastle/pqc/jcajce/provider/xmss/XMSSKeyFactorySpi.class"}, - {"pattern":"org/bouncycastle/pqc/jcajce/provider/xmss/XMSSMTKeyFactorySpi.class"}, + {"pattern":"org/bouncycastle/pqc/jcajce/provider/xmss/XMSSMTKeyFactorySpi.class"}, {"pattern":"org/bouncycastle/util/Arrays.class"}, {"pattern":"org/bouncycastle/util/Encodable.class"}, {"pattern":"org/bouncycastle/util/Integers.class"}, diff --git a/datasafe-cli/src/main/resources/extra_engines.hack b/datasafe-cli/src/main/resources/extra_engines.hack new file mode 100644 index 000000000..442931623 --- /dev/null +++ b/datasafe-cli/src/main/resources/extra_engines.hack @@ -0,0 +1,2 @@ +X509Store=false,null +X509StreamParser=false,null diff --git a/datasafe-examples/datasafe-examples-business/src/test/java/de/adorsys/datasafe/examples/business/filesystem/BaseUserOperationsTestWithVersionedDatasafeTest.java b/datasafe-examples/datasafe-examples-business/src/test/java/de/adorsys/datasafe/examples/business/filesystem/BaseUserOperationsTestWithVersionedDatasafeTest.java index 0ac35ca01..bc6a4c52b 100644 --- a/datasafe-examples/datasafe-examples-business/src/test/java/de/adorsys/datasafe/examples/business/filesystem/BaseUserOperationsTestWithVersionedDatasafeTest.java +++ b/datasafe-examples/datasafe-examples-business/src/test/java/de/adorsys/datasafe/examples/business/filesystem/BaseUserOperationsTestWithVersionedDatasafeTest.java @@ -44,7 +44,6 @@ class BaseUserOperationsTestWithVersionedDatasafeTest { */ @BeforeEach void createServices(@TempDir Path root) { - Security.addProvider(new BouncyCastleProvider()); // BEGIN_SNIPPET:Create versioned Datasafe services Security.addProvider(new BouncyCastleProvider()); // this will create all Datasafe files and user documents under From 9311e5fdfe91317a590b4a7d046213dfd76eac67 Mon Sep 17 00:00:00 2001 From: Valentyn Berezin Date: Wed, 28 Aug 2019 15:37:00 +0300 Subject: [PATCH 004/255] CLI-more work with hacks - e2e works --- .../impl/keystore/DefaultKeyStoreModule.java | 2 +- .../impl/e2e/DatasafeServicesProvider.java | 5 +++++ .../datasafe-cli/reflect-config.json | 11 ++++++++-- .../datasafe-encryption-impl/pom.xml | 12 +++++------ .../CMSEncryptionServiceImpl.java | 4 ++-- .../impl/keystore/PublicKeySerdeImpl.java | 21 +++++++------------ .../keystore/generator/ProviderUtils.java | 4 ++-- 7 files changed, 33 insertions(+), 26 deletions(-) diff --git a/datasafe-business/src/main/java/de/adorsys/datasafe/business/impl/keystore/DefaultKeyStoreModule.java b/datasafe-business/src/main/java/de/adorsys/datasafe/business/impl/keystore/DefaultKeyStoreModule.java index 282c1b076..2fb8477b3 100644 --- a/datasafe-business/src/main/java/de/adorsys/datasafe/business/impl/keystore/DefaultKeyStoreModule.java +++ b/datasafe-business/src/main/java/de/adorsys/datasafe/business/impl/keystore/DefaultKeyStoreModule.java @@ -16,7 +16,7 @@ public abstract class DefaultKeyStoreModule { /** - * Default public key serializer using {@link java.io.ObjectInputStream} and Base64 encoding of bytes + * Default public key serializer. */ @Binds public abstract PublicKeySerde publicKeySerde(PublicKeySerdeImplRuntimeDelegatable impl); diff --git a/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/DatasafeServicesProvider.java b/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/DatasafeServicesProvider.java index cd02aef40..7f5600e91 100644 --- a/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/DatasafeServicesProvider.java +++ b/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/DatasafeServicesProvider.java @@ -9,6 +9,9 @@ import de.adorsys.datasafe.storage.api.StorageService; import de.adorsys.datasafe.types.api.resource.Uri; import lombok.experimental.UtilityClass; +import org.bouncycastle.jce.provider.BouncyCastleProvider; + +import java.security.Security; /** * Factory to get Datasafe services. @@ -19,6 +22,7 @@ public class DatasafeServicesProvider { public static final String STORE_PAZZWORD = "PAZZWORD"; public static DefaultDatasafeServices defaultDatasafeServices(StorageService storageService, Uri systemRoot) { + Security.addProvider(new BouncyCastleProvider()); return DaggerDefaultDatasafeServices .builder() .config(dfsConfig(systemRoot)) @@ -27,6 +31,7 @@ public static DefaultDatasafeServices defaultDatasafeServices(StorageService sto } public static VersionedDatasafeServices versionedDatasafeServices(StorageService storageService, Uri systemRoot) { + Security.addProvider(new BouncyCastleProvider()); return DaggerVersionedDatasafeServices .builder() .config(dfsConfig(systemRoot)) diff --git a/datasafe-cli/src/main/resources/META-INF/native-image/de.adorsys/datasafe-cli/reflect-config.json b/datasafe-cli/src/main/resources/META-INF/native-image/de.adorsys/datasafe-cli/reflect-config.json index e3271647e..086b5cd75 100644 --- a/datasafe-cli/src/main/resources/META-INF/native-image/de.adorsys/datasafe-cli/reflect-config.json +++ b/datasafe-cli/src/main/resources/META-INF/native-image/de.adorsys/datasafe-cli/reflect-config.json @@ -28,7 +28,7 @@ {"name":"publishPublicKeysTo", "allowWrite": true}, {"name":"associatedResources", "allowWrite": true}, {"name":"documentVersionStorage", "allowWrite": true}, - {"name":"storageCredentialsKeystore", "allowWrite": true}, + {"name":"storageCredentialsKeystore", "allowWrite": true} ] }, { @@ -69,7 +69,10 @@ }, { "name":"de.adorsys.datasafe.types.api.resource.StorageIdentifier", - "allDeclaredFields":true + "allDeclaredFields":true, + "fields": [ + {"name":"id", "allowWrite": true} + ] }, { "name":"de.adorsys.datasafe.types.api.resource.Uri", @@ -407,6 +410,10 @@ "name":"org.bouncycastle.jcajce.provider.symmetric.XTEA$Mappings", "methods":[{"name":"","parameterTypes":[] }] }, +{ + "name":"java.security.AlgorithmParameterGeneratorSpi", + "methods":[{"name":"","parameterTypes":[] }] +}, { "name":"sun.misc.Unsafe", "allDeclaredFields":true, diff --git a/datasafe-encryption/datasafe-encryption-impl/pom.xml b/datasafe-encryption/datasafe-encryption-impl/pom.xml index 982f273dc..bb21ac2ec 100644 --- a/datasafe-encryption/datasafe-encryption-impl/pom.xml +++ b/datasafe-encryption/datasafe-encryption-impl/pom.xml @@ -29,6 +29,12 @@ datasafe-directory-api ${project.version} + + de.adorsys + datasafe-runtime-delegate + ${project.version} + provided + org.projectlombok @@ -58,12 +64,6 @@ org.slf4j slf4j-api - - de.adorsys - datasafe-runtime-delegate - ${project.version} - provided - com.google.code.findbugs jsr305 diff --git a/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/cmsencryption/CMSEncryptionServiceImpl.java b/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/cmsencryption/CMSEncryptionServiceImpl.java index 985524817..b57403db7 100644 --- a/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/cmsencryption/CMSEncryptionServiceImpl.java +++ b/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/cmsencryption/CMSEncryptionServiceImpl.java @@ -6,6 +6,7 @@ import de.adorsys.datasafe.encrypiton.impl.cmsencryption.decryptors.Decryptor; import de.adorsys.datasafe.encrypiton.impl.cmsencryption.decryptors.DecryptorFactory; import de.adorsys.datasafe.encrypiton.impl.cmsencryption.exceptions.DecryptionException; +import de.adorsys.datasafe.encrypiton.impl.keystore.generator.ProviderUtils; import de.adorsys.datasafe.types.api.context.annotations.RuntimeDelegate; import lombok.SneakyThrows; import lombok.extern.slf4j.Slf4j; @@ -14,7 +15,6 @@ import org.bouncycastle.cms.jcajce.JceCMSContentEncryptorBuilder; import org.bouncycastle.cms.jcajce.JceKEKRecipientInfoGenerator; import org.bouncycastle.cms.jcajce.JceKeyTransRecipientInfoGenerator; -import org.bouncycastle.jce.provider.BouncyCastleProvider; import javax.crypto.SecretKey; import javax.inject.Inject; @@ -119,7 +119,7 @@ private OutputStream streamEncrypt(OutputStream dataContentStream, Set Date: Wed, 28 Aug 2019 15:52:02 +0300 Subject: [PATCH 005/255] File sharing works too --- .../java/de/adorsys/datasafe/cli/Cli.java | 21 +++++++++++++++++++ .../datasafe-cli/reflect-config.json | 11 ++++++++-- 2 files changed, 30 insertions(+), 2 deletions(-) diff --git a/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/Cli.java b/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/Cli.java index 96993fb8c..e418797db 100644 --- a/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/Cli.java +++ b/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/Cli.java @@ -1,5 +1,6 @@ package de.adorsys.datasafe.cli; +import com.google.common.collect.ImmutableSet; import com.google.common.io.ByteStreams; import de.adorsys.datasafe.business.impl.service.DaggerDefaultDatasafeServices; import de.adorsys.datasafe.business.impl.service.DefaultDatasafeServices; @@ -41,7 +42,11 @@ public static void main(String[] args) { .build(); UserIDAuth user = new UserIDAuth("me", "mememe"); + UserIDAuth userRecipient = new UserIDAuth("recipient", "RRRE!!"); + defaultDatasafeServices.userProfile().registerUsingDefaults(user); + defaultDatasafeServices.userProfile().registerUsingDefaults(userRecipient); + try (OutputStream os = defaultDatasafeServices.privateService().write(WriteRequest.forDefaultPrivate(user, "my-file")) ) { @@ -57,5 +62,21 @@ public static void main(String[] args) { defaultDatasafeServices.privateService().read(ReadRequest.forDefaultPrivate(user, "my-file")) ) )); + + try (OutputStream os = + defaultDatasafeServices.inboxService().write(WriteRequest.forDefaultPublic( + ImmutableSet.of(user.getUserID(), userRecipient.getUserID()), "hello-recipient")) + ) { + os.write("Hello from INBOX!".getBytes()); + } + + long szInb = defaultDatasafeServices.inboxService().list(ListRequest.forDefaultPrivate(user, "./")).count(); + System.out.println("User has " + szInb + " files in INBOX"); + + System.out.println(new String( + ByteStreams.toByteArray( + defaultDatasafeServices.inboxService().read(ReadRequest.forDefaultPrivate(user, "hello-recipient")) + ) + )); } } diff --git a/datasafe-cli/src/main/resources/META-INF/native-image/de.adorsys/datasafe-cli/reflect-config.json b/datasafe-cli/src/main/resources/META-INF/native-image/de.adorsys/datasafe-cli/reflect-config.json index 086b5cd75..816722882 100644 --- a/datasafe-cli/src/main/resources/META-INF/native-image/de.adorsys/datasafe-cli/reflect-config.json +++ b/datasafe-cli/src/main/resources/META-INF/native-image/de.adorsys/datasafe-cli/reflect-config.json @@ -41,7 +41,10 @@ }, { "name":"de.adorsys.datasafe.encrypiton.api.types.BaseTypeString", - "allDeclaredFields":true + "allDeclaredFields":true, + "fields": [ + {"name":"value", "allowWrite": true} + ] }, { "name":"de.adorsys.datasafe.encrypiton.api.types.keystore.KeyID", @@ -49,7 +52,11 @@ }, { "name":"de.adorsys.datasafe.encrypiton.api.types.keystore.PublicKeyIDWithPublicKey", - "allDeclaredFields":true + "allDeclaredFields":true, + "fields": [ + {"name":"keyID", "allowWrite": true}, + {"name":"publicKey", "allowWrite": true} + ] }, { "name":"de.adorsys.datasafe.types.api.resource.AbsoluteLocation", From 43a4effe5a2c80efa3cf3c2fd3d65aec67a706a6 Mon Sep 17 00:00:00 2001 From: Valentyn Berezin Date: Wed, 28 Aug 2019 16:04:56 +0300 Subject: [PATCH 006/255] Clean flow - reading + writing too --- .../native-image/de.adorsys/datasafe-cli/reflect-config.json | 2 ++ 1 file changed, 2 insertions(+) diff --git a/datasafe-cli/src/main/resources/META-INF/native-image/de.adorsys/datasafe-cli/reflect-config.json b/datasafe-cli/src/main/resources/META-INF/native-image/de.adorsys/datasafe-cli/reflect-config.json index 816722882..121453092 100644 --- a/datasafe-cli/src/main/resources/META-INF/native-image/de.adorsys/datasafe-cli/reflect-config.json +++ b/datasafe-cli/src/main/resources/META-INF/native-image/de.adorsys/datasafe-cli/reflect-config.json @@ -20,6 +20,7 @@ }, { "name":"de.adorsys.datasafe.directory.api.types.UserPrivateProfile", + "allDeclaredConstructors" : true, "allDeclaredFields":true, "fields": [ {"name":"keystore", "allowWrite": true}, @@ -33,6 +34,7 @@ }, { "name":"de.adorsys.datasafe.directory.api.types.UserPublicProfile", + "allDeclaredConstructors" : true, "allDeclaredFields":true, "fields": [ {"name":"publicKeys", "allowWrite": true}, From 933c5745d3368a845b1357db05b5abac219d607d Mon Sep 17 00:00:00 2001 From: Valentyn Berezin Date: Wed, 28 Aug 2019 17:40:54 +0300 Subject: [PATCH 007/255] CLI - adding S3 --- datasafe-cli/README.md | 5 + datasafe-cli/pom.xml | 11 +- .../java/de/adorsys/datasafe/cli/Cli.java | 125 ++++++++++++++++-- .../datasafe-cli/reflect-config.json | 18 +++ ...cessServiceWithStorageCredentialsImpl.java | 9 +- .../storage/impl/s3/S3ClientFactory.java | 11 ++ 6 files changed, 162 insertions(+), 17 deletions(-) diff --git a/datasafe-cli/README.md b/datasafe-cli/README.md index cfaf61f27..4d5d9d1d2 100644 --- a/datasafe-cli/README.md +++ b/datasafe-cli/README.md @@ -1,2 +1,7 @@ # Build You need GraalVM compiler and BouncyCastle in java-home/jre/lib/ext/ of this compiler. +Edit the java-home/jre/lib/security/java.security properties file in any text editor. +Add the JCE provider you’ve just downloaded to this file. +The java.security file contains detailed instructions for adding this provider. +Basically, you need to add a line of the following format in a location with similar properties: +security.provider.n=provider-class-name diff --git a/datasafe-cli/pom.xml b/datasafe-cli/pom.xml index b1e3a581a..350af4235 100644 --- a/datasafe-cli/pom.xml +++ b/datasafe-cli/pom.xml @@ -26,6 +26,11 @@ datasafe-storage-impl-fs ${project.version} + + de.adorsys + datasafe-storage-impl-s3 + ${project.version} + org.slf4j slf4j-api @@ -82,9 +87,9 @@ --enable-all-security-services --features=de.adorsys.datasafe.cli.hacks.GraalCompileFixNpeOnMissingServiceTypeInKnownProviders - --rerun-class-initialization-at-runtime=org.bouncycastle.crypto.prng.SP800SecureRandom - --rerun-class-initialization-at-runtime=org.bouncycastle.jcajce.provider.drbg.DRBG$Default - --rerun-class-initialization-at-runtime=org.bouncycastle.jcajce.provider.drbg.DRBG$NonceAndIV + --initialize-at-run-time=org.bouncycastle.crypto.prng.SP800SecureRandom + --initialize-at-run-time=org.bouncycastle.jcajce.provider.drbg.DRBG$Default + --initialize-at-run-time=org.bouncycastle.jcajce.provider.drbg.DRBG$NonceAndIV diff --git a/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/Cli.java b/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/Cli.java index e418797db..dfbb75103 100644 --- a/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/Cli.java +++ b/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/Cli.java @@ -1,22 +1,43 @@ package de.adorsys.datasafe.cli; +import com.google.common.collect.ImmutableMap; import com.google.common.collect.ImmutableSet; import com.google.common.io.ByteStreams; +import dagger.Lazy; import de.adorsys.datasafe.business.impl.service.DaggerDefaultDatasafeServices; import de.adorsys.datasafe.business.impl.service.DefaultDatasafeServices; -import de.adorsys.datasafe.directory.impl.profile.config.DefaultDFSConfig; +import de.adorsys.datasafe.directory.api.profile.keys.StorageKeyStoreOperations; +import de.adorsys.datasafe.directory.api.types.CreateUserPrivateProfile; +import de.adorsys.datasafe.directory.api.types.CreateUserPublicProfile; +import de.adorsys.datasafe.directory.api.types.StorageCredentials; +import de.adorsys.datasafe.directory.impl.profile.config.DFSConfigWithStorageCreds; +import de.adorsys.datasafe.directory.impl.profile.dfs.BucketAccessServiceImpl; +import de.adorsys.datasafe.directory.impl.profile.dfs.BucketAccessServiceImplRuntimeDelegatable; +import de.adorsys.datasafe.directory.impl.profile.dfs.RegexAccessServiceWithStorageCredentialsImpl; +import de.adorsys.datasafe.encrypiton.api.types.UserID; import de.adorsys.datasafe.encrypiton.api.types.UserIDAuth; +import de.adorsys.datasafe.storage.api.RegexDelegatingStorage; +import de.adorsys.datasafe.storage.api.StorageService; +import de.adorsys.datasafe.storage.api.UriBasedAuthStorageService; import de.adorsys.datasafe.storage.impl.fs.FileSystemStorageService; +import de.adorsys.datasafe.storage.impl.s3.S3ClientFactory; +import de.adorsys.datasafe.storage.impl.s3.S3StorageService; import de.adorsys.datasafe.types.api.actions.ListRequest; import de.adorsys.datasafe.types.api.actions.ReadRequest; import de.adorsys.datasafe.types.api.actions.WriteRequest; +import de.adorsys.datasafe.types.api.context.BaseOverridesRegistry; +import de.adorsys.datasafe.types.api.context.overrides.OverridesRegistry; +import de.adorsys.datasafe.types.api.resource.*; +import de.adorsys.datasafe.types.api.utils.ExecutorServiceUtil; import lombok.SneakyThrows; +import lombok.experimental.Delegate; import org.bouncycastle.jce.provider.BouncyCastleProvider; import java.io.OutputStream; import java.nio.file.Path; import java.nio.file.Paths; import java.security.Security; +import java.util.regex.Pattern; public class Cli { @@ -36,47 +57,125 @@ public static void main(String[] args) { */ // this will create all Datasafe files and user documents under - DefaultDatasafeServices defaultDatasafeServices = DaggerDefaultDatasafeServices.builder() - .config(new DefaultDFSConfig(root.toAbsolutePath().toUri(), "secret")) - .storage(new FileSystemStorageService(root)) - .build(); + DefaultDatasafeServices datasafe = datasafeServices(root, "PAZZWORT"); UserIDAuth user = new UserIDAuth("me", "mememe"); UserIDAuth userRecipient = new UserIDAuth("recipient", "RRRE!!"); - defaultDatasafeServices.userProfile().registerUsingDefaults(user); - defaultDatasafeServices.userProfile().registerUsingDefaults(userRecipient); + datasafe.userProfile().registerUsingDefaults(user); + datasafe.userProfile().registerUsingDefaults(userRecipient); + + datasafe.userProfile().registerStorageCredentials(user, StorageIdentifier.DEFAULT, awsCredentials()); + datasafe.userProfile().registerStorageCredentials(userRecipient, StorageIdentifier.DEFAULT, awsCredentials()); try (OutputStream os = - defaultDatasafeServices.privateService().write(WriteRequest.forDefaultPrivate(user, "my-file")) + datasafe.privateService().write(WriteRequest.forDefaultPrivate(user, "my-file")) ) { os.write("Hello from Datasafe".getBytes()); } - long sz = defaultDatasafeServices.privateService().list(ListRequest.forDefaultPrivate(user, "./")).count(); + long sz = datasafe.privateService().list(ListRequest.forDefaultPrivate(user, "./")).count(); System.out.println("User has " + sz + " files"); System.out.println(new String( ByteStreams.toByteArray( - defaultDatasafeServices.privateService().read(ReadRequest.forDefaultPrivate(user, "my-file")) + datasafe.privateService().read(ReadRequest.forDefaultPrivate(user, "my-file")) ) )); try (OutputStream os = - defaultDatasafeServices.inboxService().write(WriteRequest.forDefaultPublic( + datasafe.inboxService().write(WriteRequest.forDefaultPublic( ImmutableSet.of(user.getUserID(), userRecipient.getUserID()), "hello-recipient")) ) { os.write("Hello from INBOX!".getBytes()); } - long szInb = defaultDatasafeServices.inboxService().list(ListRequest.forDefaultPrivate(user, "./")).count(); + long szInb = datasafe.inboxService().list(ListRequest.forDefaultPrivate(user, "./")).count(); System.out.println("User has " + szInb + " files in INBOX"); System.out.println(new String( ByteStreams.toByteArray( - defaultDatasafeServices.inboxService().read(ReadRequest.forDefaultPrivate(user, "hello-recipient")) + datasafe.inboxService().read(ReadRequest.forDefaultPrivate(user, "hello-recipient")) ) )); } + + private static DefaultDatasafeServices datasafeServices(Path fsRoot, String systemPassword) { + OverridesRegistry registry = new BaseOverridesRegistry(); + DefaultDatasafeServices multiDfsDatasafe = DaggerDefaultDatasafeServices + .builder() + .config(new DataOnS3(fsRoot.toUri().toASCIIString(), systemPassword)) + .storage( + new RegexDelegatingStorage( + ImmutableMap.builder() + .put(Pattern.compile("file:/.+"), localFs(fsRoot)) + .put(Pattern.compile("s3://.+"), amazonS3()).build() + ) + ) + .overridesRegistry(registry) + .build(); + + BucketAccessServiceImplRuntimeDelegatable.overrideWith( + registry, args -> new WithCredentialProvider(args.getStorageKeyStoreOperations()) + ); + + return multiDfsDatasafe; + } + + private static StorageCredentials awsCredentials() { + return new StorageCredentials( + System.getenv("AWS_ACCESS_KEY"), + System.getenv("AWS_SECRET_KEY") + ); + } + + private static StorageService localFs(Path fsRoot) { + return new FileSystemStorageService(fsRoot); + } + + private static StorageService amazonS3() { + return new UriBasedAuthStorageService( + acc -> new S3StorageService( + S3ClientFactory.getClientByRegion( + acc.getOnlyHostPart().toString().split("://")[1], + acc.getAccessKey(), + acc.getSecretKey() + ), + // Bucket name is encoded in first path segment + acc.getBucketName(), + ExecutorServiceUtil.submitterExecutesOnStarvationExecutingService() + ) + ); + } + + private static class WithCredentialProvider extends BucketAccessServiceImpl { + + @Delegate + private final RegexAccessServiceWithStorageCredentialsImpl delegate; + + private WithCredentialProvider(Lazy storageKeyStoreOperations) { + super(null); + this.delegate = new RegexAccessServiceWithStorageCredentialsImpl(storageKeyStoreOperations); + } + } + + private static class DataOnS3 extends DFSConfigWithStorageCreds { + + private DataOnS3(String systemRoot, String systemPassword) { + super(systemRoot, systemPassword); + } + + @Override + public CreateUserPublicProfile defaultPublicTemplate(UserID id) { + return super.defaultPublicTemplate(id); + } + + @Override + public CreateUserPrivateProfile defaultPrivateTemplate(UserIDAuth id) { + return super.defaultPrivateTemplate(id).toBuilder() + .privateStorage(BasePrivateResource.forAbsolutePrivate("s3://eu-central-1/adorsys-docusafe/")) + .build(); + } + } } diff --git a/datasafe-cli/src/main/resources/META-INF/native-image/de.adorsys/datasafe-cli/reflect-config.json b/datasafe-cli/src/main/resources/META-INF/native-image/de.adorsys/datasafe-cli/reflect-config.json index 121453092..bc0a2ee9c 100644 --- a/datasafe-cli/src/main/resources/META-INF/native-image/de.adorsys/datasafe-cli/reflect-config.json +++ b/datasafe-cli/src/main/resources/META-INF/native-image/de.adorsys/datasafe-cli/reflect-config.json @@ -419,10 +419,28 @@ "name":"org.bouncycastle.jcajce.provider.symmetric.XTEA$Mappings", "methods":[{"name":"","parameterTypes":[] }] }, +{ + "name": "org.apache.commons.logging.LogFactory" +}, +{ + "name": "org.apache.commons.logging.impl.LogFactoryImpl", + "methods":[{"name":"","parameterTypes":[] }] +}, +{ + "name": "org.apache.commons.logging.impl.SimpleLog", + "methods":[{"name":"","parameterTypes":["java.lang.String"] }] +}, { "name":"java.security.AlgorithmParameterGeneratorSpi", "methods":[{"name":"","parameterTypes":[] }] }, +{ + "name": "java.lang.Thread", + "methods":[{"name":"getContextClassLoader","parameterTypes":[] }] +}, +{ + "name": "java.lang.String" +}, { "name":"sun.misc.Unsafe", "allDeclaredFields":true, diff --git a/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/dfs/RegexAccessServiceWithStorageCredentialsImpl.java b/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/dfs/RegexAccessServiceWithStorageCredentialsImpl.java index d226442e6..fb2aca55d 100644 --- a/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/dfs/RegexAccessServiceWithStorageCredentialsImpl.java +++ b/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/dfs/RegexAccessServiceWithStorageCredentialsImpl.java @@ -15,6 +15,7 @@ import javax.inject.Inject; import java.util.Optional; +import java.util.Set; /** * Specifies how to access desired user resource (example: private bucket). Reads credentials that are associated @@ -74,9 +75,15 @@ public AbsoluteLocation withSystemAccess(AbsoluteLocation resource) { private Optional getStorageAccessCredentials(UserIDAuth user, PrivateResource resource) { String uri = resource.location().asString(); - return storageKeyStoreOperations.get().readAliases(user) + Set aliases = storageKeyStoreOperations.get().readAliases(user); + + Optional directMatch = aliases .stream() .filter(it -> uri.matches(it.getId())) .findFirst(); + + return directMatch.isPresent() + ? directMatch + : aliases.stream().filter(it -> StorageIdentifier.DEFAULT.getId().equals(it.getId())).findFirst(); } } diff --git a/datasafe-storage/datasafe-storage-impl-s3/src/main/java/de/adorsys/datasafe/storage/impl/s3/S3ClientFactory.java b/datasafe-storage/datasafe-storage-impl-s3/src/main/java/de/adorsys/datasafe/storage/impl/s3/S3ClientFactory.java index 38cd26555..1611192ca 100644 --- a/datasafe-storage/datasafe-storage-impl-s3/src/main/java/de/adorsys/datasafe/storage/impl/s3/S3ClientFactory.java +++ b/datasafe-storage/datasafe-storage-impl-s3/src/main/java/de/adorsys/datasafe/storage/impl/s3/S3ClientFactory.java @@ -23,4 +23,15 @@ public AmazonS3 getClient(String endpointUrl, String accessKey, String secretKey .enablePathStyleAccess() .build(); } + + public AmazonS3 getClientByRegion(String region, String accessKey, String secretKey) { + return AmazonS3ClientBuilder.standard() + .withRegion(region) + .withCredentials( + new AWSStaticCredentialsProvider( + new BasicAWSCredentials(accessKey, secretKey) + ) + ) + .build(); + } } From 82851becb711e49e5bb043d35b334463d6190999 Mon Sep 17 00:00:00 2001 From: Valentyn Berezin Date: Wed, 28 Aug 2019 18:18:34 +0300 Subject: [PATCH 008/255] Working with S3 with exception that you get NullPtr warnings --- datasafe-cli/pom.xml | 7 + .../java/de/adorsys/datasafe/cli/Cli.java | 4 +- .../de.adorsys/datasafe-cli/proxy-config.json | 2 + .../datasafe-cli/reflect-config.json | 150 +++++++++++++++--- .../datasafe-cli/resource-config.json | 86 +++++++--- 5 files changed, 207 insertions(+), 42 deletions(-) diff --git a/datasafe-cli/pom.xml b/datasafe-cli/pom.xml index 350af4235..ff6561467 100644 --- a/datasafe-cli/pom.xml +++ b/datasafe-cli/pom.xml @@ -87,6 +87,13 @@ --enable-all-security-services --features=de.adorsys.datasafe.cli.hacks.GraalCompileFixNpeOnMissingServiceTypeInKnownProviders + --initialize-at-build-time=org.apache.http.conn.routing.HttpRoute + --initialize-at-build-time=org.apache.http.conn.HttpClientConnectionManager + --initialize-at-build-time=org.apache.http.HttpClientConnection + --initialize-at-build-time=org.apache.http.conn.ConnectionRequest + --initialize-at-build-time=org.apache.http.protocol.HttpContext + --initialize-at-build-time=org.apache.http.pool.ConnPoolControl + --initialize-at-run-time=org.bouncycastle.crypto.prng.SP800SecureRandom --initialize-at-run-time=org.bouncycastle.jcajce.provider.drbg.DRBG$Default --initialize-at-run-time=org.bouncycastle.jcajce.provider.drbg.DRBG$NonceAndIV diff --git a/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/Cli.java b/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/Cli.java index dfbb75103..d2e5e86c9 100644 --- a/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/Cli.java +++ b/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/Cli.java @@ -174,7 +174,9 @@ public CreateUserPublicProfile defaultPublicTemplate(UserID id) { @Override public CreateUserPrivateProfile defaultPrivateTemplate(UserIDAuth id) { return super.defaultPrivateTemplate(id).toBuilder() - .privateStorage(BasePrivateResource.forAbsolutePrivate("s3://eu-central-1/adorsys-docusafe/")) + .privateStorage(BasePrivateResource.forAbsolutePrivate( + "s3://eu-central-1/adorsys-docusafe/" + id.getUserID() + "/") + ) .build(); } } diff --git a/datasafe-cli/src/main/resources/META-INF/native-image/de.adorsys/datasafe-cli/proxy-config.json b/datasafe-cli/src/main/resources/META-INF/native-image/de.adorsys/datasafe-cli/proxy-config.json index 0d4f101c7..e5ff66611 100644 --- a/datasafe-cli/src/main/resources/META-INF/native-image/de.adorsys/datasafe-cli/proxy-config.json +++ b/datasafe-cli/src/main/resources/META-INF/native-image/de.adorsys/datasafe-cli/proxy-config.json @@ -1,2 +1,4 @@ [ + ["org.apache.http.conn.ConnectionRequest","com.amazonaws.http.conn.Wrapped"], + ["org.apache.http.conn.HttpClientConnectionManager","org.apache.http.pool.ConnPoolControl","com.amazonaws.http.conn.Wrapped"] ] diff --git a/datasafe-cli/src/main/resources/META-INF/native-image/de.adorsys/datasafe-cli/reflect-config.json b/datasafe-cli/src/main/resources/META-INF/native-image/de.adorsys/datasafe-cli/reflect-config.json index bc0a2ee9c..29aeb745d 100644 --- a/datasafe-cli/src/main/resources/META-INF/native-image/de.adorsys/datasafe-cli/reflect-config.json +++ b/datasafe-cli/src/main/resources/META-INF/native-image/de.adorsys/datasafe-cli/reflect-config.json @@ -1,4 +1,82 @@ [ +{ + "name":"com.amazonaws.internal.config.Builder", + "allDeclaredMethods":true +}, +{ + "name":"com.amazonaws.internal.config.HostRegexToRegionMappingJsonHelper", + "allDeclaredFields":true, + "allDeclaredMethods":true, + "allDeclaredConstructors":true +}, +{ + "name":"com.amazonaws.internal.config.HttpClientConfigJsonHelper", + "allDeclaredFields":true, + "allDeclaredMethods":true, + "allDeclaredConstructors":true +}, +{ + "name":"com.amazonaws.internal.config.InternalConfigJsonHelper", + "allDeclaredFields":true, + "allDeclaredMethods":true, + "allDeclaredConstructors":true +}, +{ + "name":"com.amazonaws.internal.config.JsonIndex", + "allDeclaredFields":true, + "allDeclaredMethods":true, + "allDeclaredConstructors":true +}, +{ + "name":"com.amazonaws.internal.config.SignerConfigJsonHelper", + "allDeclaredFields":true, + "allDeclaredMethods":true, + "allDeclaredConstructors":true +}, +{ + "name":"com.amazonaws.jmx.SdkMBeanRegistrySupport", + "methods":[{"name":"","parameterTypes":[] }] +}, +{ + "name":"com.amazonaws.partitions.model.CredentialScope", + "allDeclaredFields":true, + "allDeclaredMethods":true, + "allDeclaredConstructors":true +}, +{ + "name":"com.amazonaws.partitions.model.Endpoint", + "allDeclaredFields":true, + "allDeclaredMethods":true, + "allDeclaredConstructors":true +}, +{ + "name":"com.amazonaws.partitions.model.Partition", + "allDeclaredFields":true, + "allDeclaredMethods":true, + "allDeclaredConstructors":true +}, +{ + "name":"com.amazonaws.partitions.model.Partitions", + "allDeclaredFields":true, + "allDeclaredMethods":true, + "allDeclaredConstructors":true +}, +{ + "name":"com.amazonaws.partitions.model.Region", + "allDeclaredFields":true, + "allDeclaredMethods":true, + "allDeclaredConstructors":true +}, +{ + "name":"com.amazonaws.partitions.model.Service", + "allDeclaredFields":true, + "allDeclaredMethods":true, + "allDeclaredConstructors":true +}, +{ + "name":"com.amazonaws.services.s3.internal.AWSS3V4Signer", + "methods":[{"name":"","parameterTypes":[] }] +}, { "name":"com.google.common.util.concurrent.AbstractFuture", "fields":[ @@ -14,10 +92,22 @@ {"name":"thread", "allowUnsafeAccess":true} ] }, +{ + "name":"com.sun.org.apache.xerces.internal.parsers.SAXParser", + "methods":[{"name":"","parameterTypes":[] }] +}, { "name":"de.adorsys.datasafe.cli.Cli", "methods":[{"name":"main","parameterTypes":["java.lang.String[]"] }] }, +{ + "name":"de.adorsys.datasafe.directory.api.types.StorageCredentials", + "allDeclaredFields":true, + "fields": [ + {"name":"username", "allowWrite": true}, + {"name":"password", "allowWrite": true} + ] +}, { "name":"de.adorsys.datasafe.directory.api.types.UserPrivateProfile", "allDeclaredConstructors" : true, @@ -87,9 +177,31 @@ "name":"de.adorsys.datasafe.types.api.resource.Uri", "allDeclaredFields":true }, +{ + "name":"java.lang.String" +}, +{ + "name":"java.lang.Thread", + "methods":[{"name":"getContextClassLoader","parameterTypes":[] }] +}, +{ + "name":"java.text.DateFormatSymbols", + "methods":[{"name":"getInstance","parameterTypes":["java.util.Locale"] }] +}, { "name":"java.util.ArrayList", - "methods":[{"name":"","parameterTypes":[] }] + "allDeclaredMethods":true, + "allDeclaredConstructors":true +}, +{ + "name":"java.util.HashSet", + "allDeclaredMethods":true, + "allDeclaredConstructors":true +}, +{ + "name":"java.util.LinkedHashMap", + "allDeclaredMethods":true, + "allDeclaredConstructors":true }, { "name":"javax.crypto.AEADBadTagException", @@ -103,6 +215,24 @@ {"name":"getTLen","parameterTypes":[] } ] }, +{ + "name":"javax.xml.bind.DatatypeConverter" +}, +{ + "name":"org.apache.commons.logging.LogFactory" +}, +{ + "name":"org.apache.commons.logging.impl.Jdk14Logger", + "methods":[{"name":"","parameterTypes":["java.lang.String"] }] +}, +{ + "name":"org.apache.commons.logging.impl.LogFactoryImpl", + "methods":[{"name":"","parameterTypes":[] }] +}, +{ + "name":"org.apache.commons.logging.impl.WeakHashtable", + "methods":[{"name":"","parameterTypes":[] }] +}, { "name":"org.bouncycastle.jcajce.provider.asymmetric.DH$Mappings", "methods":[{"name":"","parameterTypes":[] }] @@ -419,28 +549,10 @@ "name":"org.bouncycastle.jcajce.provider.symmetric.XTEA$Mappings", "methods":[{"name":"","parameterTypes":[] }] }, -{ - "name": "org.apache.commons.logging.LogFactory" -}, -{ - "name": "org.apache.commons.logging.impl.LogFactoryImpl", - "methods":[{"name":"","parameterTypes":[] }] -}, -{ - "name": "org.apache.commons.logging.impl.SimpleLog", - "methods":[{"name":"","parameterTypes":["java.lang.String"] }] -}, { "name":"java.security.AlgorithmParameterGeneratorSpi", "methods":[{"name":"","parameterTypes":[] }] }, -{ - "name": "java.lang.Thread", - "methods":[{"name":"getContextClassLoader","parameterTypes":[] }] -}, -{ - "name": "java.lang.String" -}, { "name":"sun.misc.Unsafe", "allDeclaredFields":true, diff --git a/datasafe-cli/src/main/resources/META-INF/native-image/de.adorsys/datasafe-cli/resource-config.json b/datasafe-cli/src/main/resources/META-INF/native-image/de.adorsys/datasafe-cli/resource-config.json index fca5e2c96..d2d3d410e 100644 --- a/datasafe-cli/src/main/resources/META-INF/native-image/de.adorsys/datasafe-cli/resource-config.json +++ b/datasafe-cli/src/main/resources/META-INF/native-image/de.adorsys/datasafe-cli/resource-config.json @@ -1,38 +1,59 @@ { "resources":[ {"pattern":"META-INF/MANIFEST.MF"}, + {"pattern":"com/amazonaws/internal/config/awssdk_config_default.json"}, + {"pattern":"com/amazonaws/partitions/endpoints.json"}, + {"pattern":"com/amazonaws/sdk/versionInfo.properties"}, + {"pattern":"de/adorsys/datasafe/cli/Cli$DataOnS3.class"}, {"pattern":"javax/crypto/Cipher.class"}, {"pattern":"lib/animal-sniffer-annotations-1.17.jar"}, + {"pattern":"lib/aws-java-sdk-core-1.11.538.jar"}, + {"pattern":"lib/aws-java-sdk-kms-1.11.538.jar"}, + {"pattern":"lib/aws-java-sdk-s3-1.11.538.jar"}, {"pattern":"lib/bcpkix-jdk15on-1.58.jar"}, {"pattern":"lib/bcprov-jdk15on-1.58.jar"}, {"pattern":"lib/checker-qual-2.5.2.jar"}, + {"pattern":"lib/commons-codec-1.10.jar"}, {"pattern":"lib/commons-lang3-3.5.jar"}, + {"pattern":"lib/commons-logging-1.1.3.jar"}, {"pattern":"lib/dagger-2.17.jar"}, - {"pattern":"lib/datasafe-business-0.6.1-SNAPSHOT.jar"}, - {"pattern":"lib/datasafe-directory-api-0.6.1-SNAPSHOT.jar"}, - {"pattern":"lib/datasafe-directory-impl-0.6.1-SNAPSHOT.jar"}, - {"pattern":"lib/datasafe-encryption-api-0.6.1-SNAPSHOT.jar"}, - {"pattern":"lib/datasafe-encryption-impl-0.6.1-SNAPSHOT.jar"}, - {"pattern":"lib/datasafe-inbox-api-0.6.1-SNAPSHOT.jar"}, - {"pattern":"lib/datasafe-inbox-impl-0.6.1-SNAPSHOT.jar"}, - {"pattern":"lib/datasafe-metainfo-version-api-0.6.1-SNAPSHOT.jar"}, - {"pattern":"lib/datasafe-metainfo-version-impl-0.6.1-SNAPSHOT.jar"}, - {"pattern":"lib/datasafe-privatestore-api-0.6.1-SNAPSHOT.jar"}, - {"pattern":"lib/datasafe-privatestore-impl-0.6.1-SNAPSHOT.jar"}, - {"pattern":"lib/datasafe-storage-api-0.6.1-SNAPSHOT.jar"}, - {"pattern":"lib/datasafe-storage-impl-fs-0.6.1-SNAPSHOT.jar"}, - {"pattern":"lib/datasafe-types-api-0.6.1-SNAPSHOT.jar"}, + {"pattern":"lib/datasafe-business.jar"}, + {"pattern":"lib/datasafe-directory-api.jar"}, + {"pattern":"lib/datasafe-directory-impl.jar"}, + {"pattern":"lib/datasafe-encryption-api.jar"}, + {"pattern":"lib/datasafe-encryption-impl.jar"}, + {"pattern":"lib/datasafe-inbox-api.jar"}, + {"pattern":"lib/datasafe-inbox-impl.jar"}, + {"pattern":"lib/datasafe-metainfo-version-api.jar"}, + {"pattern":"lib/datasafe-metainfo-version-impl.jar"}, + {"pattern":"lib/datasafe-privatestore-api.jar"}, + {"pattern":"lib/datasafe-privatestore-impl.jar"}, + {"pattern":"lib/datasafe-storage-api.jar"}, + {"pattern":"lib/datasafe-storage-impl-fs.jar"}, + {"pattern":"lib/datasafe-storage-impl-s3.jar"}, + {"pattern":"lib/datasafe-types-api.jar"}, {"pattern":"lib/error_prone_annotations-2.2.0.jar"}, {"pattern":"lib/failureaccess-1.0.1.jar"}, {"pattern":"lib/gson-2.8.5.jar"}, {"pattern":"lib/guava-27.0.1-jre.jar"}, + {"pattern":"lib/httpclient-4.5.5.jar"}, + {"pattern":"lib/httpcore-4.4.9.jar"}, + {"pattern":"lib/ion-java-1.0.2.jar"}, {"pattern":"lib/j2objc-annotations-1.1.jar"}, + {"pattern":"lib/jackson-annotations-2.6.0.jar"}, + {"pattern":"lib/jackson-core-2.6.7.jar"}, + {"pattern":"lib/jackson-databind-2.6.7.2.jar"}, + {"pattern":"lib/jackson-dataformat-cbor-2.6.7.jar"}, {"pattern":"lib/javax.inject-1.jar"}, + {"pattern":"lib/jmespath-java-1.11.538.jar"}, + {"pattern":"lib/joda-time-2.8.1.jar"}, {"pattern":"lib/jsr305-3.0.0.jar"}, {"pattern":"lib/listenablefuture-9999.0-empty-to-avoid-conflict-with-guava.jar"}, {"pattern":"lib/lombok-1.18.6.jar"}, {"pattern":"lib/slf4j-api-1.7.25.jar"}, {"pattern":"lib/slf4j-simple-1.7.25.jar"}, + {"pattern":"mozilla/public-suffix-list.txt"}, + {"pattern":"org/apache/http/client/version.properties"}, {"pattern":"org/bouncycastle/asn1/ASN1ApplicationSpecific.class"}, {"pattern":"org/bouncycastle/asn1/ASN1BitString.class"}, {"pattern":"org/bouncycastle/asn1/ASN1Boolean.class"}, @@ -122,10 +143,12 @@ {"pattern":"org/bouncycastle/asn1/cms/ContentInfoParser.class"}, {"pattern":"org/bouncycastle/asn1/cms/EncryptedContentInfoParser.class"}, {"pattern":"org/bouncycastle/asn1/cms/EnvelopedDataParser.class"}, + {"pattern":"org/bouncycastle/asn1/cms/IssuerAndSerialNumber.class"}, {"pattern":"org/bouncycastle/asn1/cms/KEKIdentifier.class"}, {"pattern":"org/bouncycastle/asn1/cms/KEKRecipientInfo.class"}, {"pattern":"org/bouncycastle/asn1/cms/KeyTransRecipientInfo.class"}, {"pattern":"org/bouncycastle/asn1/cms/OtherRevocationInfoFormat.class"}, + {"pattern":"org/bouncycastle/asn1/cms/RecipientIdentifier.class"}, {"pattern":"org/bouncycastle/asn1/cms/RecipientInfo.class"}, {"pattern":"org/bouncycastle/asn1/cryptopro/CryptoProObjectIdentifiers.class"}, {"pattern":"org/bouncycastle/asn1/eac/EACObjectIdentifiers.class"}, @@ -139,6 +162,7 @@ {"pattern":"org/bouncycastle/asn1/ntt/NTTObjectIdentifiers.class"}, {"pattern":"org/bouncycastle/asn1/oiw/OIWObjectIdentifiers.class"}, {"pattern":"org/bouncycastle/asn1/pkcs/PKCSObjectIdentifiers.class"}, + {"pattern":"org/bouncycastle/asn1/pkcs/RSAPublicKey.class"}, {"pattern":"org/bouncycastle/asn1/pkcs/RSASSAPSSparams.class"}, {"pattern":"org/bouncycastle/asn1/rosstandart/RosstandartObjectIdentifiers.class"}, {"pattern":"org/bouncycastle/asn1/sec/SECObjectIdentifiers.class"}, @@ -182,11 +206,10 @@ {"pattern":"org/bouncycastle/cert/jcajce/JcaX509CertificateHolder.class"}, {"pattern":"org/bouncycastle/cert/jcajce/JcaX509ExtensionUtils$SHA1DigestCalculator.class"}, {"pattern":"org/bouncycastle/cert/jcajce/JcaX509ExtensionUtils.class"}, - {"pattern":"org/bouncycastle/cert/jcajce/JcaX509v3CertificateBuilder.class"}, - {"pattern":"org/bouncycastle/x509/X509Store.class"}, - {"pattern":"org/bouncycastle/jce/provider/X509StoreCertCollection.class"}, + {"pattern":"org/bouncycastle/cert/jcajce/JcaX509v3CertificateBuilder.class"}, {"pattern":"org/bouncycastle/cert/jcajce/NamedCertHelper.class"}, {"pattern":"org/bouncycastle/cert/jcajce/ProviderCertHelper.class"}, + {"pattern":"org/bouncycastle/cert/selector/X509CertificateHolderSelector.class"}, {"pattern":"org/bouncycastle/cms/CMSAlgorithm.class"}, {"pattern":"org/bouncycastle/cms/CMSContentInfoParser.class"}, {"pattern":"org/bouncycastle/cms/CMSEnvelopedDataParser.class"}, @@ -207,7 +230,10 @@ {"pattern":"org/bouncycastle/cms/KEKRecipientId.class"}, {"pattern":"org/bouncycastle/cms/KEKRecipientInfoGenerator.class"}, {"pattern":"org/bouncycastle/cms/KEKRecipientInformation.class"}, + {"pattern":"org/bouncycastle/cms/KeyTransRecipient.class"}, {"pattern":"org/bouncycastle/cms/KeyTransRecipientId.class"}, + {"pattern":"org/bouncycastle/cms/KeyTransRecipientInfoGenerator.class"}, + {"pattern":"org/bouncycastle/cms/KeyTransRecipientInformation.class"}, {"pattern":"org/bouncycastle/cms/NullOutputStream.class"}, {"pattern":"org/bouncycastle/cms/PasswordRecipient$PRF.class"}, {"pattern":"org/bouncycastle/cms/Recipient.class"}, @@ -228,7 +254,11 @@ {"pattern":"org/bouncycastle/cms/jcajce/JceKEKEnvelopedRecipient.class"}, {"pattern":"org/bouncycastle/cms/jcajce/JceKEKRecipient.class"}, {"pattern":"org/bouncycastle/cms/jcajce/JceKEKRecipientInfoGenerator.class"}, - {"pattern":"org/bouncycastle/cms/jcajce/NamedJcaJceExtHelper.class"}, + {"pattern":"org/bouncycastle/cms/jcajce/JceKeyTransEnvelopedRecipient$1.class"}, + {"pattern":"org/bouncycastle/cms/jcajce/JceKeyTransEnvelopedRecipient.class"}, + {"pattern":"org/bouncycastle/cms/jcajce/JceKeyTransRecipient.class"}, + {"pattern":"org/bouncycastle/cms/jcajce/JceKeyTransRecipientInfoGenerator.class"}, + {"pattern":"org/bouncycastle/cms/jcajce/ProviderJcaJceExtHelper.class"}, {"pattern":"org/bouncycastle/crypto/CipherParameters.class"}, {"pattern":"org/bouncycastle/crypto/Digest.class"}, {"pattern":"org/bouncycastle/crypto/io/CipherIOException.class"}, @@ -237,6 +267,8 @@ {"pattern":"org/bouncycastle/crypto/params/DSAKeyParameters.class"}, {"pattern":"org/bouncycastle/crypto/params/DSAPrivateKeyParameters.class"}, {"pattern":"org/bouncycastle/crypto/params/DSAPublicKeyParameters.class"}, + {"pattern":"org/bouncycastle/crypto/params/RSAKeyParameters.class"}, + {"pattern":"org/bouncycastle/crypto/params/RSAPrivateCrtKeyParameters.class"}, {"pattern":"org/bouncycastle/crypto/prng/SP800SecureRandom.class"}, {"pattern":"org/bouncycastle/jcajce/io/CipherInputStream.class"}, {"pattern":"org/bouncycastle/jcajce/provider/asymmetric/DH$Mappings.class"}, @@ -265,9 +297,12 @@ {"pattern":"org/bouncycastle/jcajce/provider/asymmetric/ecgost12/KeyFactorySpi.class"}, {"pattern":"org/bouncycastle/jcajce/provider/asymmetric/elgamal/KeyFactorySpi.class"}, {"pattern":"org/bouncycastle/jcajce/provider/asymmetric/gost/KeyFactorySpi.class"}, + {"pattern":"org/bouncycastle/jcajce/provider/asymmetric/rsa/BCRSAPublicKey.class"}, {"pattern":"org/bouncycastle/jcajce/provider/asymmetric/rsa/KeyFactorySpi.class"}, + {"pattern":"org/bouncycastle/jcajce/provider/asymmetric/rsa/RSAUtil.class"}, {"pattern":"org/bouncycastle/jcajce/provider/asymmetric/util/BaseKeyFactorySpi.class"}, {"pattern":"org/bouncycastle/jcajce/provider/asymmetric/util/ExtendedInvalidKeySpecException.class"}, + {"pattern":"org/bouncycastle/jcajce/provider/asymmetric/util/KeyUtil.class"}, {"pattern":"org/bouncycastle/jcajce/provider/config/ProviderConfiguration.class"}, {"pattern":"org/bouncycastle/jcajce/provider/config/ProviderConfigurationPermission.class"}, {"pattern":"org/bouncycastle/jcajce/provider/digest/Blake2b$Mappings.class"}, @@ -296,7 +331,7 @@ {"pattern":"org/bouncycastle/jcajce/provider/drbg/DRBG$HybridSecureRandom.class"}, {"pattern":"org/bouncycastle/jcajce/provider/drbg/DRBG$Mappings.class"}, {"pattern":"org/bouncycastle/jcajce/provider/drbg/DRBG.class"}, - {"pattern":"org/bouncycastle/jcajce/provider/keystore/BC$Mappings.class"}, + {"pattern":"org/bouncycastle/jcajce/provider/keystore/BC$Mappings.class"}, {"pattern":"org/bouncycastle/jcajce/provider/keystore/BCFKS$Mappings.class"}, {"pattern":"org/bouncycastle/jcajce/provider/keystore/PKCS12$Mappings.class"}, {"pattern":"org/bouncycastle/jcajce/provider/symmetric/AES$Mappings.class"}, @@ -349,10 +384,11 @@ {"pattern":"org/bouncycastle/jcajce/util/AlgorithmParametersUtils.class"}, {"pattern":"org/bouncycastle/jcajce/util/DefaultJcaJceHelper.class"}, {"pattern":"org/bouncycastle/jcajce/util/JcaJceHelper.class"}, - {"pattern":"org/bouncycastle/jcajce/util/NamedJcaJceHelper.class"}, {"pattern":"org/bouncycastle/jcajce/util/ProviderJcaJceHelper.class"}, {"pattern":"org/bouncycastle/jce/provider/BouncyCastleProvider$1.class"}, {"pattern":"org/bouncycastle/jce/provider/BouncyCastleProviderConfiguration.class"}, + {"pattern":"org/bouncycastle/operator/AsymmetricKeyUnwrapper.class"}, + {"pattern":"org/bouncycastle/operator/AsymmetricKeyWrapper.class"}, {"pattern":"org/bouncycastle/operator/ContentSigner.class"}, {"pattern":"org/bouncycastle/operator/DefaultSecretKeySizeProvider.class"}, {"pattern":"org/bouncycastle/operator/DefaultSignatureAlgorithmIdentifierFinder.class"}, @@ -373,6 +409,8 @@ {"pattern":"org/bouncycastle/operator/jcajce/JcaContentSignerBuilder$1.class"}, {"pattern":"org/bouncycastle/operator/jcajce/JcaContentSignerBuilder$SignatureOutputStream.class"}, {"pattern":"org/bouncycastle/operator/jcajce/JcaContentSignerBuilder.class"}, + {"pattern":"org/bouncycastle/operator/jcajce/JceAsymmetricKeyUnwrapper.class"}, + {"pattern":"org/bouncycastle/operator/jcajce/JceAsymmetricKeyWrapper.class"}, {"pattern":"org/bouncycastle/operator/jcajce/JceGenericKey.class"}, {"pattern":"org/bouncycastle/operator/jcajce/JceSymmetricKeyUnwrapper.class"}, {"pattern":"org/bouncycastle/operator/jcajce/JceSymmetricKeyWrapper.class"}, @@ -386,7 +424,7 @@ {"pattern":"org/bouncycastle/pqc/jcajce/provider/rainbow/RainbowKeyFactorySpi.class"}, {"pattern":"org/bouncycastle/pqc/jcajce/provider/sphincs/Sphincs256KeyFactorySpi.class"}, {"pattern":"org/bouncycastle/pqc/jcajce/provider/xmss/XMSSKeyFactorySpi.class"}, - {"pattern":"org/bouncycastle/pqc/jcajce/provider/xmss/XMSSMTKeyFactorySpi.class"}, + {"pattern":"org/bouncycastle/pqc/jcajce/provider/xmss/XMSSMTKeyFactorySpi.class"}, {"pattern":"org/bouncycastle/util/Arrays.class"}, {"pattern":"org/bouncycastle/util/Encodable.class"}, {"pattern":"org/bouncycastle/util/Integers.class"}, @@ -401,6 +439,10 @@ {"pattern":"org/bouncycastle/util/io/Streams.class"}, {"pattern":"org/bouncycastle/util/io/TeeInputStream.class"}, {"pattern":"org/bouncycastle/util/io/TeeOutputStream.class"}, - {"pattern":"org/slf4j/impl/StaticLoggerBinder.class"} + {"pattern":"org/joda/time/tz/data/Europe/Kiev"}, + {"pattern":"org/joda/time/tz/data/ZoneInfoMap"}, + {"pattern":"org/slf4j/impl/StaticLoggerBinder.class"}, + {"pattern":"sun/net/idn/uidna.spp"}, + {"pattern":"sun/text/resources/unorm.icu"} ] } From 6fddf0baa0341bd618ed57cf4d297401df8c46de Mon Sep 17 00:00:00 2001 From: Valentyn Berezin Date: Thu, 29 Aug 2019 13:51:35 +0300 Subject: [PATCH 009/255] Picocli - initial layout for command line parsing --- datasafe-cli/README.md | 8 +- datasafe-cli/pom.xml | 81 +- .../java/de/adorsys/datasafe/cli/Cli.java | 191 +- .../java/de/adorsys/datasafe/cli/CliOld.java | 184 ++ .../datasafe/cli/commands/inbox/Cat.java | 15 + .../datasafe/cli/commands/inbox/Copy.java | 17 + .../datasafe/cli/commands/inbox/Delete.java | 16 + .../datasafe/cli/commands/inbox/Inbox.java | 20 + .../cli/commands/privatespace/Cat.java | 15 + .../cli/commands/privatespace/Copy.java | 16 + .../cli/commands/privatespace/Delete.java | 16 + .../commands/privatespace/Privatespace.java | 19 + .../datasafe/cli/commands/profile/Create.java | 15 + .../datasafe/cli/commands/profile/Delete.java | 16 + .../cli/commands/profile/Profile.java | 21 + .../datasafe/cli/commands/profile/Read.java | 15 + .../datasafe/cli/commands/profile/Update.java | 15 + ...eOnMissingServiceTypeInKnownProviders.java | 6 +- .../datasafe-cli/native-image.properties | 2 +- .../de.adorsys/datasafe-cli/proxy-config.json | 11 +- .../datasafe-cli/reflect-config.json | 1684 ++++++++++------ .../datasafe-cli/resource-config.json | 1778 ++++++++++++----- pom.xml | 6 + 23 files changed, 2936 insertions(+), 1231 deletions(-) create mode 100644 datasafe-cli/src/main/java/de/adorsys/datasafe/cli/CliOld.java create mode 100644 datasafe-cli/src/main/java/de/adorsys/datasafe/cli/commands/inbox/Cat.java create mode 100644 datasafe-cli/src/main/java/de/adorsys/datasafe/cli/commands/inbox/Copy.java create mode 100644 datasafe-cli/src/main/java/de/adorsys/datasafe/cli/commands/inbox/Delete.java create mode 100644 datasafe-cli/src/main/java/de/adorsys/datasafe/cli/commands/inbox/Inbox.java create mode 100644 datasafe-cli/src/main/java/de/adorsys/datasafe/cli/commands/privatespace/Cat.java create mode 100644 datasafe-cli/src/main/java/de/adorsys/datasafe/cli/commands/privatespace/Copy.java create mode 100644 datasafe-cli/src/main/java/de/adorsys/datasafe/cli/commands/privatespace/Delete.java create mode 100644 datasafe-cli/src/main/java/de/adorsys/datasafe/cli/commands/privatespace/Privatespace.java create mode 100644 datasafe-cli/src/main/java/de/adorsys/datasafe/cli/commands/profile/Create.java create mode 100644 datasafe-cli/src/main/java/de/adorsys/datasafe/cli/commands/profile/Delete.java create mode 100644 datasafe-cli/src/main/java/de/adorsys/datasafe/cli/commands/profile/Profile.java create mode 100644 datasafe-cli/src/main/java/de/adorsys/datasafe/cli/commands/profile/Read.java create mode 100644 datasafe-cli/src/main/java/de/adorsys/datasafe/cli/commands/profile/Update.java diff --git a/datasafe-cli/README.md b/datasafe-cli/README.md index 4d5d9d1d2..5eb3ca753 100644 --- a/datasafe-cli/README.md +++ b/datasafe-cli/README.md @@ -1,7 +1,7 @@ # Build -You need GraalVM compiler and BouncyCastle in java-home/jre/lib/ext/ of this compiler. -Edit the java-home/jre/lib/security/java.security properties file in any text editor. -Add the JCE provider you’ve just downloaded to this file. -The java.security file contains detailed instructions for adding this provider. +1. You need GraalVM compiler and BouncyCastle in java-home/jre/lib/ext/ of this compiler. +1. Edit the java-home/jre/lib/security/java.security properties file in any text editor. +1. Add the JCE provider you’ve just downloaded to this file. +1. The java.security file contains detailed instructions for adding this provider. Basically, you need to add a line of the following format in a location with similar properties: security.provider.n=provider-class-name diff --git a/datasafe-cli/pom.xml b/datasafe-cli/pom.xml index ff6561467..8cf817a9c 100644 --- a/datasafe-cli/pom.xml +++ b/datasafe-cli/pom.xml @@ -31,6 +31,10 @@ datasafe-storage-impl-s3 ${project.version} + + info.picocli + picocli + org.slf4j slf4j-api @@ -67,40 +71,6 @@ - - com.oracle.substratevm - native-image-maven-plugin - ${graal.version} - - - - native-image - - package - - - - datasafe-cli - - --no-server - --no-fallback - --enable-all-security-services - --features=de.adorsys.datasafe.cli.hacks.GraalCompileFixNpeOnMissingServiceTypeInKnownProviders - - --initialize-at-build-time=org.apache.http.conn.routing.HttpRoute - --initialize-at-build-time=org.apache.http.conn.HttpClientConnectionManager - --initialize-at-build-time=org.apache.http.HttpClientConnection - --initialize-at-build-time=org.apache.http.conn.ConnectionRequest - --initialize-at-build-time=org.apache.http.protocol.HttpContext - --initialize-at-build-time=org.apache.http.pool.ConnPoolControl - - --initialize-at-run-time=org.bouncycastle.crypto.prng.SP800SecureRandom - --initialize-at-run-time=org.bouncycastle.jcajce.provider.drbg.DRBG$Default - --initialize-at-run-time=org.bouncycastle.jcajce.provider.drbg.DRBG$NonceAndIV - - - - org.apache.maven.plugins maven-jar-plugin @@ -142,4 +112,47 @@ + + + + native-image + + + + com.oracle.substratevm + native-image-maven-plugin + ${graal.version} + + + + native-image + + package + + + + datasafe-cli + + --no-server + --no-fallback + --enable-all-security-services + --features=de.adorsys.datasafe.cli.hacks.GraalCompileFixNpeOnMissingServiceTypeInKnownProviders + + --initialize-at-build-time=org.apache.http.conn.routing.HttpRoute + --initialize-at-build-time=org.apache.http.conn.HttpClientConnectionManager + --initialize-at-build-time=org.apache.http.HttpClientConnection + --initialize-at-build-time=org.apache.http.conn.ConnectionRequest + --initialize-at-build-time=org.apache.http.protocol.HttpContext + --initialize-at-build-time=org.apache.http.pool.ConnPoolControl + + --initialize-at-run-time=org.bouncycastle.crypto.prng.SP800SecureRandom + --initialize-at-run-time=org.bouncycastle.jcajce.provider.drbg.DRBG$Default + --initialize-at-run-time=org.bouncycastle.jcajce.provider.drbg.DRBG$NonceAndIV + + + + + + + diff --git a/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/Cli.java b/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/Cli.java index d2e5e86c9..a434f21d0 100644 --- a/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/Cli.java +++ b/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/Cli.java @@ -1,183 +1,24 @@ package de.adorsys.datasafe.cli; -import com.google.common.collect.ImmutableMap; -import com.google.common.collect.ImmutableSet; -import com.google.common.io.ByteStreams; -import dagger.Lazy; -import de.adorsys.datasafe.business.impl.service.DaggerDefaultDatasafeServices; -import de.adorsys.datasafe.business.impl.service.DefaultDatasafeServices; -import de.adorsys.datasafe.directory.api.profile.keys.StorageKeyStoreOperations; -import de.adorsys.datasafe.directory.api.types.CreateUserPrivateProfile; -import de.adorsys.datasafe.directory.api.types.CreateUserPublicProfile; -import de.adorsys.datasafe.directory.api.types.StorageCredentials; -import de.adorsys.datasafe.directory.impl.profile.config.DFSConfigWithStorageCreds; -import de.adorsys.datasafe.directory.impl.profile.dfs.BucketAccessServiceImpl; -import de.adorsys.datasafe.directory.impl.profile.dfs.BucketAccessServiceImplRuntimeDelegatable; -import de.adorsys.datasafe.directory.impl.profile.dfs.RegexAccessServiceWithStorageCredentialsImpl; -import de.adorsys.datasafe.encrypiton.api.types.UserID; -import de.adorsys.datasafe.encrypiton.api.types.UserIDAuth; -import de.adorsys.datasafe.storage.api.RegexDelegatingStorage; -import de.adorsys.datasafe.storage.api.StorageService; -import de.adorsys.datasafe.storage.api.UriBasedAuthStorageService; -import de.adorsys.datasafe.storage.impl.fs.FileSystemStorageService; -import de.adorsys.datasafe.storage.impl.s3.S3ClientFactory; -import de.adorsys.datasafe.storage.impl.s3.S3StorageService; -import de.adorsys.datasafe.types.api.actions.ListRequest; -import de.adorsys.datasafe.types.api.actions.ReadRequest; -import de.adorsys.datasafe.types.api.actions.WriteRequest; -import de.adorsys.datasafe.types.api.context.BaseOverridesRegistry; -import de.adorsys.datasafe.types.api.context.overrides.OverridesRegistry; -import de.adorsys.datasafe.types.api.resource.*; -import de.adorsys.datasafe.types.api.utils.ExecutorServiceUtil; -import lombok.SneakyThrows; -import lombok.experimental.Delegate; -import org.bouncycastle.jce.provider.BouncyCastleProvider; +import de.adorsys.datasafe.cli.commands.inbox.Inbox; +import de.adorsys.datasafe.cli.commands.privatespace.Privatespace; +import de.adorsys.datasafe.cli.commands.profile.Profile; +import picocli.CommandLine; + +@CommandLine.Command(subcommands = { + Profile.class, + Privatespace.class, + Inbox.class +}) +public class Cli implements Runnable { -import java.io.OutputStream; -import java.nio.file.Path; -import java.nio.file.Paths; -import java.security.Security; -import java.util.regex.Pattern; - -public class Cli { - - @SneakyThrows public static void main(String[] args) { - Path root = Paths.get("/Users/valentyn.berezin/IdeaProjects/datasafe/datasafe-cli/target/datasafe/"); - - Security.addProvider(new BouncyCastleProvider()); - // To register provider you need to: - /* - Copy the JCE provider JAR file to java-home/jre/lib/ext/. - Stop the Application Server. - If the Application Server is not stopped and then restarted later in this process, the JCE provider will not be recognized by the Application Server. - Edit the java-home/jre/lib/security/java.security properties file in any text editor. Add the JCE provider you’ve just downloaded to this file. - The java.security file contains detailed instructions for adding this provider. Basically, you need to add a line of the following format in a location with similar properties: - security.provider.n=provider-class-name - */ - - // this will create all Datasafe files and user documents under - DefaultDatasafeServices datasafe = datasafeServices(root, "PAZZWORT"); - - UserIDAuth user = new UserIDAuth("me", "mememe"); - UserIDAuth userRecipient = new UserIDAuth("recipient", "RRRE!!"); - - datasafe.userProfile().registerUsingDefaults(user); - datasafe.userProfile().registerUsingDefaults(userRecipient); - - datasafe.userProfile().registerStorageCredentials(user, StorageIdentifier.DEFAULT, awsCredentials()); - datasafe.userProfile().registerStorageCredentials(userRecipient, StorageIdentifier.DEFAULT, awsCredentials()); - - try (OutputStream os = - datasafe.privateService().write(WriteRequest.forDefaultPrivate(user, "my-file")) - ) { - os.write("Hello from Datasafe".getBytes()); - } - - - long sz = datasafe.privateService().list(ListRequest.forDefaultPrivate(user, "./")).count(); - System.out.println("User has " + sz + " files"); - - System.out.println(new String( - ByteStreams.toByteArray( - datasafe.privateService().read(ReadRequest.forDefaultPrivate(user, "my-file")) - ) - )); - - try (OutputStream os = - datasafe.inboxService().write(WriteRequest.forDefaultPublic( - ImmutableSet.of(user.getUserID(), userRecipient.getUserID()), "hello-recipient")) - ) { - os.write("Hello from INBOX!".getBytes()); - } - - long szInb = datasafe.inboxService().list(ListRequest.forDefaultPrivate(user, "./")).count(); - System.out.println("User has " + szInb + " files in INBOX"); - - System.out.println(new String( - ByteStreams.toByteArray( - datasafe.inboxService().read(ReadRequest.forDefaultPrivate(user, "hello-recipient")) - ) - )); + int exitCode = new CommandLine(new Cli()).execute(args); + System.exit(exitCode); } - private static DefaultDatasafeServices datasafeServices(Path fsRoot, String systemPassword) { - OverridesRegistry registry = new BaseOverridesRegistry(); - DefaultDatasafeServices multiDfsDatasafe = DaggerDefaultDatasafeServices - .builder() - .config(new DataOnS3(fsRoot.toUri().toASCIIString(), systemPassword)) - .storage( - new RegexDelegatingStorage( - ImmutableMap.builder() - .put(Pattern.compile("file:/.+"), localFs(fsRoot)) - .put(Pattern.compile("s3://.+"), amazonS3()).build() - ) - ) - .overridesRegistry(registry) - .build(); - - BucketAccessServiceImplRuntimeDelegatable.overrideWith( - registry, args -> new WithCredentialProvider(args.getStorageKeyStoreOperations()) - ); - - return multiDfsDatasafe; - } - - private static StorageCredentials awsCredentials() { - return new StorageCredentials( - System.getenv("AWS_ACCESS_KEY"), - System.getenv("AWS_SECRET_KEY") - ); - } - - private static StorageService localFs(Path fsRoot) { - return new FileSystemStorageService(fsRoot); - } - - private static StorageService amazonS3() { - return new UriBasedAuthStorageService( - acc -> new S3StorageService( - S3ClientFactory.getClientByRegion( - acc.getOnlyHostPart().toString().split("://")[1], - acc.getAccessKey(), - acc.getSecretKey() - ), - // Bucket name is encoded in first path segment - acc.getBucketName(), - ExecutorServiceUtil.submitterExecutesOnStarvationExecutingService() - ) - ); - } - - private static class WithCredentialProvider extends BucketAccessServiceImpl { - - @Delegate - private final RegexAccessServiceWithStorageCredentialsImpl delegate; - - private WithCredentialProvider(Lazy storageKeyStoreOperations) { - super(null); - this.delegate = new RegexAccessServiceWithStorageCredentialsImpl(storageKeyStoreOperations); - } - } - - private static class DataOnS3 extends DFSConfigWithStorageCreds { - - private DataOnS3(String systemRoot, String systemPassword) { - super(systemRoot, systemPassword); - } - - @Override - public CreateUserPublicProfile defaultPublicTemplate(UserID id) { - return super.defaultPublicTemplate(id); - } - - @Override - public CreateUserPrivateProfile defaultPrivateTemplate(UserIDAuth id) { - return super.defaultPrivateTemplate(id).toBuilder() - .privateStorage(BasePrivateResource.forAbsolutePrivate( - "s3://eu-central-1/adorsys-docusafe/" + id.getUserID() + "/") - ) - .build(); - } + @Override + public void run() { + CommandLine.usage(new Cli(), System.out); } } diff --git a/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/CliOld.java b/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/CliOld.java new file mode 100644 index 000000000..86b279679 --- /dev/null +++ b/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/CliOld.java @@ -0,0 +1,184 @@ +package de.adorsys.datasafe.cli; + +import com.google.common.collect.ImmutableMap; +import com.google.common.collect.ImmutableSet; +import com.google.common.io.ByteStreams; +import dagger.Lazy; +import de.adorsys.datasafe.business.impl.service.DaggerDefaultDatasafeServices; +import de.adorsys.datasafe.business.impl.service.DefaultDatasafeServices; +import de.adorsys.datasafe.directory.api.profile.keys.StorageKeyStoreOperations; +import de.adorsys.datasafe.directory.api.types.CreateUserPrivateProfile; +import de.adorsys.datasafe.directory.api.types.CreateUserPublicProfile; +import de.adorsys.datasafe.directory.api.types.StorageCredentials; +import de.adorsys.datasafe.directory.impl.profile.config.DFSConfigWithStorageCreds; +import de.adorsys.datasafe.directory.impl.profile.dfs.BucketAccessServiceImpl; +import de.adorsys.datasafe.directory.impl.profile.dfs.BucketAccessServiceImplRuntimeDelegatable; +import de.adorsys.datasafe.directory.impl.profile.dfs.RegexAccessServiceWithStorageCredentialsImpl; +import de.adorsys.datasafe.encrypiton.api.types.UserID; +import de.adorsys.datasafe.encrypiton.api.types.UserIDAuth; +import de.adorsys.datasafe.storage.api.RegexDelegatingStorage; +import de.adorsys.datasafe.storage.api.StorageService; +import de.adorsys.datasafe.storage.api.UriBasedAuthStorageService; +import de.adorsys.datasafe.storage.impl.fs.FileSystemStorageService; +import de.adorsys.datasafe.storage.impl.s3.S3ClientFactory; +import de.adorsys.datasafe.storage.impl.s3.S3StorageService; +import de.adorsys.datasafe.types.api.actions.ListRequest; +import de.adorsys.datasafe.types.api.actions.ReadRequest; +import de.adorsys.datasafe.types.api.actions.WriteRequest; +import de.adorsys.datasafe.types.api.context.BaseOverridesRegistry; +import de.adorsys.datasafe.types.api.context.overrides.OverridesRegistry; +import de.adorsys.datasafe.types.api.resource.BasePrivateResource; +import de.adorsys.datasafe.types.api.resource.StorageIdentifier; +import de.adorsys.datasafe.types.api.utils.ExecutorServiceUtil; +import lombok.SneakyThrows; +import lombok.experimental.Delegate; +import org.bouncycastle.jce.provider.BouncyCastleProvider; + +import java.io.OutputStream; +import java.nio.file.Path; +import java.nio.file.Paths; +import java.security.Security; +import java.util.regex.Pattern; + +public class CliOld { + + @SneakyThrows + public static void main(String[] args) { + Path root = Paths.get("/Users/valentyn.berezin/IdeaProjects/datasafe/datasafe-cli/target/datasafe/"); + + Security.addProvider(new BouncyCastleProvider()); + // To register provider you need to: + /* + Copy the JCE provider JAR file to java-home/jre/lib/ext/. + Stop the Application Server. + If the Application Server is not stopped and then restarted later in this process, the JCE provider will not be recognized by the Application Server. + Edit the java-home/jre/lib/security/java.security properties file in any text editor. Add the JCE provider you’ve just downloaded to this file. + The java.security file contains detailed instructions for adding this provider. Basically, you need to add a line of the following format in a location with similar properties: + security.provider.n=provider-class-name + */ + + // this will create all Datasafe files and user documents under + DefaultDatasafeServices datasafe = datasafeServices(root, "PAZZWORT"); + + UserIDAuth user = new UserIDAuth("me", "mememe"); + UserIDAuth userRecipient = new UserIDAuth("recipient", "RRRE!!"); + + datasafe.userProfile().registerUsingDefaults(user); + datasafe.userProfile().registerUsingDefaults(userRecipient); + + datasafe.userProfile().registerStorageCredentials(user, StorageIdentifier.DEFAULT, awsCredentials()); + datasafe.userProfile().registerStorageCredentials(userRecipient, StorageIdentifier.DEFAULT, awsCredentials()); + + try (OutputStream os = + datasafe.privateService().write(WriteRequest.forDefaultPrivate(user, "my-file")) + ) { + os.write("Hello from Datasafe".getBytes()); + } + + + long sz = datasafe.privateService().list(ListRequest.forDefaultPrivate(user, "./")).count(); + System.out.println("User has " + sz + " files"); + + System.out.println(new String( + ByteStreams.toByteArray( + datasafe.privateService().read(ReadRequest.forDefaultPrivate(user, "my-file")) + ) + )); + + try (OutputStream os = + datasafe.inboxService().write(WriteRequest.forDefaultPublic( + ImmutableSet.of(user.getUserID(), userRecipient.getUserID()), "hello-recipient")) + ) { + os.write("Hello from INBOX!".getBytes()); + } + + long szInb = datasafe.inboxService().list(ListRequest.forDefaultPrivate(user, "./")).count(); + System.out.println("User has " + szInb + " files in INBOX"); + + System.out.println(new String( + ByteStreams.toByteArray( + datasafe.inboxService().read(ReadRequest.forDefaultPrivate(user, "hello-recipient")) + ) + )); + } + + private static DefaultDatasafeServices datasafeServices(Path fsRoot, String systemPassword) { + OverridesRegistry registry = new BaseOverridesRegistry(); + DefaultDatasafeServices multiDfsDatasafe = DaggerDefaultDatasafeServices + .builder() + .config(new DataOnS3(fsRoot.toUri().toASCIIString(), systemPassword)) + .storage( + new RegexDelegatingStorage( + ImmutableMap.builder() + .put(Pattern.compile("file:/.+"), localFs(fsRoot)) + .put(Pattern.compile("s3://.+"), amazonS3()).build() + ) + ) + .overridesRegistry(registry) + .build(); + + BucketAccessServiceImplRuntimeDelegatable.overrideWith( + registry, args -> new WithCredentialProvider(args.getStorageKeyStoreOperations()) + ); + + return multiDfsDatasafe; + } + + private static StorageCredentials awsCredentials() { + return new StorageCredentials( + System.getenv("AWS_ACCESS_KEY"), + System.getenv("AWS_SECRET_KEY") + ); + } + + private static StorageService localFs(Path fsRoot) { + return new FileSystemStorageService(fsRoot); + } + + private static StorageService amazonS3() { + return new UriBasedAuthStorageService( + acc -> new S3StorageService( + S3ClientFactory.getClientByRegion( + acc.getOnlyHostPart().toString().split("://")[1], + acc.getAccessKey(), + acc.getSecretKey() + ), + // Bucket name is encoded in first path segment + acc.getBucketName(), + ExecutorServiceUtil.submitterExecutesOnStarvationExecutingService() + ) + ); + } + + private static class WithCredentialProvider extends BucketAccessServiceImpl { + + @Delegate + private final RegexAccessServiceWithStorageCredentialsImpl delegate; + + private WithCredentialProvider(Lazy storageKeyStoreOperations) { + super(null); + this.delegate = new RegexAccessServiceWithStorageCredentialsImpl(storageKeyStoreOperations); + } + } + + private static class DataOnS3 extends DFSConfigWithStorageCreds { + + private DataOnS3(String systemRoot, String systemPassword) { + super(systemRoot, systemPassword); + } + + @Override + public CreateUserPublicProfile defaultPublicTemplate(UserID id) { + return super.defaultPublicTemplate(id); + } + + @Override + public CreateUserPrivateProfile defaultPrivateTemplate(UserIDAuth id) { + return super.defaultPrivateTemplate(id).toBuilder() + .privateStorage(BasePrivateResource.forAbsolutePrivate( + "s3://eu-central-1/adorsys-docusafe/" + id.getUserID() + "/") + ) + .build(); + } + } +} diff --git a/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/commands/inbox/Cat.java b/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/commands/inbox/Cat.java new file mode 100644 index 000000000..cc6acf01f --- /dev/null +++ b/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/commands/inbox/Cat.java @@ -0,0 +1,15 @@ +package de.adorsys.datasafe.cli.commands.inbox; + +import picocli.CommandLine; + +@CommandLine.Command( + name = "cat", + description = "Decrypts inbox file contents and prints it to STDOUT" +) +public class Cat implements Runnable { + + @Override + public void run() { + + } +} diff --git a/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/commands/inbox/Copy.java b/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/commands/inbox/Copy.java new file mode 100644 index 000000000..5b248cba0 --- /dev/null +++ b/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/commands/inbox/Copy.java @@ -0,0 +1,17 @@ +package de.adorsys.datasafe.cli.commands.inbox; + +import picocli.CommandLine; + +@CommandLine.Command( + name = "copy", + aliases = "cp", + description = "Shares file with other users, " + + "file will be encrypted using recipient public key - only recipient can read it" +) +public class Copy implements Runnable { + + @Override + public void run() { + + } +} diff --git a/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/commands/inbox/Delete.java b/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/commands/inbox/Delete.java new file mode 100644 index 000000000..ca140afda --- /dev/null +++ b/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/commands/inbox/Delete.java @@ -0,0 +1,16 @@ +package de.adorsys.datasafe.cli.commands.inbox; + +import picocli.CommandLine; + +@CommandLine.Command( + name = "remove", + aliases = "rm", + description = "Deletes file from your inbox" +) +public class Delete implements Runnable { + + @Override + public void run() { + + } +} diff --git a/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/commands/inbox/Inbox.java b/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/commands/inbox/Inbox.java new file mode 100644 index 000000000..eaf6eee0b --- /dev/null +++ b/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/commands/inbox/Inbox.java @@ -0,0 +1,20 @@ +package de.adorsys.datasafe.cli.commands.inbox; + +import picocli.CommandLine; + +@CommandLine.Command( + name = "inbox", + description = + "Allows user to read encrypted files that are shared with him and to share his files with other users", + subcommands = { + Cat.class, + Copy.class, + Delete.class, + }) +public class Inbox implements Runnable { + + @Override + public void run() { + + } +} diff --git a/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/commands/privatespace/Cat.java b/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/commands/privatespace/Cat.java new file mode 100644 index 000000000..e108c220a --- /dev/null +++ b/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/commands/privatespace/Cat.java @@ -0,0 +1,15 @@ +package de.adorsys.datasafe.cli.commands.privatespace; + +import picocli.CommandLine; + +@CommandLine.Command( + name = "cat", + description = "Decrypts private file contents and prints it to STDOUT" +) +public class Cat implements Runnable { + + @Override + public void run() { + + } +} diff --git a/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/commands/privatespace/Copy.java b/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/commands/privatespace/Copy.java new file mode 100644 index 000000000..ef4b8cb09 --- /dev/null +++ b/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/commands/privatespace/Copy.java @@ -0,0 +1,16 @@ +package de.adorsys.datasafe.cli.commands.privatespace; + +import picocli.CommandLine; + +@CommandLine.Command( + name = "copy", + aliases = "cp", + description = "Encrypts and copies file into your private space - only you can read it" +) +public class Copy implements Runnable { + + @Override + public void run() { + + } +} diff --git a/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/commands/privatespace/Delete.java b/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/commands/privatespace/Delete.java new file mode 100644 index 000000000..bbc5f4744 --- /dev/null +++ b/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/commands/privatespace/Delete.java @@ -0,0 +1,16 @@ +package de.adorsys.datasafe.cli.commands.privatespace; + +import picocli.CommandLine; + +@CommandLine.Command( + name = "remove", + aliases = "rm", + description = "Removes file from your privatespace" +) +public class Delete implements Runnable { + + @Override + public void run() { + + } +} diff --git a/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/commands/privatespace/Privatespace.java b/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/commands/privatespace/Privatespace.java new file mode 100644 index 000000000..5cd623636 --- /dev/null +++ b/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/commands/privatespace/Privatespace.java @@ -0,0 +1,19 @@ +package de.adorsys.datasafe.cli.commands.privatespace; + +import picocli.CommandLine; + +@CommandLine.Command( + name = "private", + description = "Allows user to read and write encrypted files in his privatespace", + subcommands = { + Cat.class, + Copy.class, + Delete.class, + }) +public class Privatespace implements Runnable { + + @Override + public void run() { + + } +} diff --git a/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/commands/profile/Create.java b/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/commands/profile/Create.java new file mode 100644 index 000000000..78512ad92 --- /dev/null +++ b/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/commands/profile/Create.java @@ -0,0 +1,15 @@ +package de.adorsys.datasafe.cli.commands.profile; + +import picocli.CommandLine; + +@CommandLine.Command( + name = "create", + description = "Creates new user profile (new user)" +) +public class Create implements Runnable { + + @Override + public void run() { + + } +} diff --git a/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/commands/profile/Delete.java b/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/commands/profile/Delete.java new file mode 100644 index 000000000..1bf6e620f --- /dev/null +++ b/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/commands/profile/Delete.java @@ -0,0 +1,16 @@ +package de.adorsys.datasafe.cli.commands.profile; + +import picocli.CommandLine; + +@CommandLine.Command( + name = "remove", + aliases = "rm", + description = "Removes user profile and his files" +) +public class Delete implements Runnable { + + @Override + public void run() { + + } +} diff --git a/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/commands/profile/Profile.java b/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/commands/profile/Profile.java new file mode 100644 index 000000000..7aae97bc4 --- /dev/null +++ b/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/commands/profile/Profile.java @@ -0,0 +1,21 @@ +package de.adorsys.datasafe.cli.commands.profile; + +import de.adorsys.datasafe.cli.commands.inbox.Delete; +import picocli.CommandLine; + +@CommandLine.Command( + name = "profile", + description = "Manages user profile - reads/creates/updates it", + subcommands = { + Create.class, + Update.class, + Read.class, + Delete.class, + }) +public class Profile implements Runnable { + + @Override + public void run() { + + } +} diff --git a/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/commands/profile/Read.java b/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/commands/profile/Read.java new file mode 100644 index 000000000..3b74cbef4 --- /dev/null +++ b/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/commands/profile/Read.java @@ -0,0 +1,15 @@ +package de.adorsys.datasafe.cli.commands.profile; + +import picocli.CommandLine; + +@CommandLine.Command( + name = "cat", + description = "Reads and prints user profile to STDOUT" +) +public class Read implements Runnable { + + @Override + public void run() { + + } +} diff --git a/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/commands/profile/Update.java b/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/commands/profile/Update.java new file mode 100644 index 000000000..7743c2640 --- /dev/null +++ b/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/commands/profile/Update.java @@ -0,0 +1,15 @@ +package de.adorsys.datasafe.cli.commands.profile; + +import picocli.CommandLine; + +@CommandLine.Command( + name = "update", + description = "Updates user profile - i.e. adds another private storage" +) +public class Update implements Runnable { + + @Override + public void run() { + + } +} diff --git a/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/hacks/GraalCompileFixNpeOnMissingServiceTypeInKnownProviders.java b/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/hacks/GraalCompileFixNpeOnMissingServiceTypeInKnownProviders.java index b1821d2db..e90c26a79 100644 --- a/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/hacks/GraalCompileFixNpeOnMissingServiceTypeInKnownProviders.java +++ b/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/hacks/GraalCompileFixNpeOnMissingServiceTypeInKnownProviders.java @@ -21,11 +21,11 @@ /** * This class fixes NPE exception in Graal-compilator - when it tries to get non-existing engines from * {@link java.security.Provider} - * + *

* Additionally can log access to null service types using property PROVIDER_ACCESS_LOGGER, * so you can add necessary fields to extra_engines.hack. (This will break build later, so you will need * to remove this property when you detected all nulls in Provider). - * + *

* Override string example: * X509Store=false,null */ @@ -70,7 +70,7 @@ private void addEngineInternal(String name, String sp, String paramNam) throws NoSuchMethodException, IllegalAccessException, InstantiationException, - InvocationTargetException { + InvocationTargetException { Field knownEngines = Provider.class.getDeclaredField("knownEngines"); knownEngines.setAccessible(true); diff --git a/datasafe-cli/src/main/resources/META-INF/native-image/de.adorsys/datasafe-cli/native-image.properties b/datasafe-cli/src/main/resources/META-INF/native-image/de.adorsys/datasafe-cli/native-image.properties index 9f16897de..8f7419043 100644 --- a/datasafe-cli/src/main/resources/META-INF/native-image/de.adorsys/datasafe-cli/native-image.properties +++ b/datasafe-cli/src/main/resources/META-INF/native-image/de.adorsys/datasafe-cli/native-image.properties @@ -1,4 +1,4 @@ -Args = \ +Args=\ -H:+ReportExceptionStackTraces \ -H:+TraceClassInitialization \ -H:+ReportUnsupportedElementsAtRuntime \ diff --git a/datasafe-cli/src/main/resources/META-INF/native-image/de.adorsys/datasafe-cli/proxy-config.json b/datasafe-cli/src/main/resources/META-INF/native-image/de.adorsys/datasafe-cli/proxy-config.json index e5ff66611..d7b7b4c87 100644 --- a/datasafe-cli/src/main/resources/META-INF/native-image/de.adorsys/datasafe-cli/proxy-config.json +++ b/datasafe-cli/src/main/resources/META-INF/native-image/de.adorsys/datasafe-cli/proxy-config.json @@ -1,4 +1,11 @@ [ - ["org.apache.http.conn.ConnectionRequest","com.amazonaws.http.conn.Wrapped"], - ["org.apache.http.conn.HttpClientConnectionManager","org.apache.http.pool.ConnPoolControl","com.amazonaws.http.conn.Wrapped"] + [ + "org.apache.http.conn.ConnectionRequest", + "com.amazonaws.http.conn.Wrapped" + ], + [ + "org.apache.http.conn.HttpClientConnectionManager", + "org.apache.http.pool.ConnPoolControl", + "com.amazonaws.http.conn.Wrapped" + ] ] diff --git a/datasafe-cli/src/main/resources/META-INF/native-image/de.adorsys/datasafe-cli/reflect-config.json b/datasafe-cli/src/main/resources/META-INF/native-image/de.adorsys/datasafe-cli/reflect-config.json index 29aeb745d..a16bf51e6 100644 --- a/datasafe-cli/src/main/resources/META-INF/native-image/de.adorsys/datasafe-cli/reflect-config.json +++ b/datasafe-cli/src/main/resources/META-INF/native-image/de.adorsys/datasafe-cli/reflect-config.json @@ -1,569 +1,1119 @@ [ -{ - "name":"com.amazonaws.internal.config.Builder", - "allDeclaredMethods":true -}, -{ - "name":"com.amazonaws.internal.config.HostRegexToRegionMappingJsonHelper", - "allDeclaredFields":true, - "allDeclaredMethods":true, - "allDeclaredConstructors":true -}, -{ - "name":"com.amazonaws.internal.config.HttpClientConfigJsonHelper", - "allDeclaredFields":true, - "allDeclaredMethods":true, - "allDeclaredConstructors":true -}, -{ - "name":"com.amazonaws.internal.config.InternalConfigJsonHelper", - "allDeclaredFields":true, - "allDeclaredMethods":true, - "allDeclaredConstructors":true -}, -{ - "name":"com.amazonaws.internal.config.JsonIndex", - "allDeclaredFields":true, - "allDeclaredMethods":true, - "allDeclaredConstructors":true -}, -{ - "name":"com.amazonaws.internal.config.SignerConfigJsonHelper", - "allDeclaredFields":true, - "allDeclaredMethods":true, - "allDeclaredConstructors":true -}, -{ - "name":"com.amazonaws.jmx.SdkMBeanRegistrySupport", - "methods":[{"name":"","parameterTypes":[] }] -}, -{ - "name":"com.amazonaws.partitions.model.CredentialScope", - "allDeclaredFields":true, - "allDeclaredMethods":true, - "allDeclaredConstructors":true -}, -{ - "name":"com.amazonaws.partitions.model.Endpoint", - "allDeclaredFields":true, - "allDeclaredMethods":true, - "allDeclaredConstructors":true -}, -{ - "name":"com.amazonaws.partitions.model.Partition", - "allDeclaredFields":true, - "allDeclaredMethods":true, - "allDeclaredConstructors":true -}, -{ - "name":"com.amazonaws.partitions.model.Partitions", - "allDeclaredFields":true, - "allDeclaredMethods":true, - "allDeclaredConstructors":true -}, -{ - "name":"com.amazonaws.partitions.model.Region", - "allDeclaredFields":true, - "allDeclaredMethods":true, - "allDeclaredConstructors":true -}, -{ - "name":"com.amazonaws.partitions.model.Service", - "allDeclaredFields":true, - "allDeclaredMethods":true, - "allDeclaredConstructors":true -}, -{ - "name":"com.amazonaws.services.s3.internal.AWSS3V4Signer", - "methods":[{"name":"","parameterTypes":[] }] -}, -{ - "name":"com.google.common.util.concurrent.AbstractFuture", - "fields":[ - {"name":"listeners", "allowUnsafeAccess":true}, - {"name":"value", "allowUnsafeAccess":true}, - {"name":"waiters", "allowUnsafeAccess":true} - ] -}, -{ - "name":"com.google.common.util.concurrent.AbstractFuture$Waiter", - "fields":[ - {"name":"next", "allowUnsafeAccess":true}, - {"name":"thread", "allowUnsafeAccess":true} - ] -}, -{ - "name":"com.sun.org.apache.xerces.internal.parsers.SAXParser", - "methods":[{"name":"","parameterTypes":[] }] -}, -{ - "name":"de.adorsys.datasafe.cli.Cli", - "methods":[{"name":"main","parameterTypes":["java.lang.String[]"] }] -}, -{ - "name":"de.adorsys.datasafe.directory.api.types.StorageCredentials", - "allDeclaredFields":true, - "fields": [ - {"name":"username", "allowWrite": true}, - {"name":"password", "allowWrite": true} - ] -}, -{ - "name":"de.adorsys.datasafe.directory.api.types.UserPrivateProfile", - "allDeclaredConstructors" : true, - "allDeclaredFields":true, - "fields": [ - {"name":"keystore", "allowWrite": true}, - {"name":"privateStorage", "allowWrite": true}, - {"name":"inboxWithFullAccess", "allowWrite": true}, - {"name":"publishPublicKeysTo", "allowWrite": true}, - {"name":"associatedResources", "allowWrite": true}, - {"name":"documentVersionStorage", "allowWrite": true}, - {"name":"storageCredentialsKeystore", "allowWrite": true} - ] -}, -{ - "name":"de.adorsys.datasafe.directory.api.types.UserPublicProfile", - "allDeclaredConstructors" : true, - "allDeclaredFields":true, - "fields": [ - {"name":"publicKeys", "allowWrite": true}, - {"name":"inbox", "allowWrite": true} - ] -}, -{ - "name":"de.adorsys.datasafe.encrypiton.api.types.BaseTypeString", - "allDeclaredFields":true, - "fields": [ - {"name":"value", "allowWrite": true} - ] -}, -{ - "name":"de.adorsys.datasafe.encrypiton.api.types.keystore.KeyID", - "allDeclaredFields":true -}, -{ - "name":"de.adorsys.datasafe.encrypiton.api.types.keystore.PublicKeyIDWithPublicKey", - "allDeclaredFields":true, - "fields": [ - {"name":"keyID", "allowWrite": true}, - {"name":"publicKey", "allowWrite": true} - ] -}, -{ - "name":"de.adorsys.datasafe.types.api.resource.AbsoluteLocation", - "allDeclaredFields":true, - "fields": [ - {"name":"resource", "allowWrite": true} - ] -}, -{ - "name":"de.adorsys.datasafe.types.api.resource.BasePrivateResource", - "allDeclaredFields":true, - "methods":[{"name":"","parameterTypes":[] }] -}, -{ - "name":"de.adorsys.datasafe.types.api.resource.BasePublicResource", - "allDeclaredFields":true -}, -{ - "name":"de.adorsys.datasafe.types.api.resource.StorageIdentifier", - "allDeclaredFields":true, - "fields": [ - {"name":"id", "allowWrite": true} - ] -}, -{ - "name":"de.adorsys.datasafe.types.api.resource.Uri", - "allDeclaredFields":true -}, -{ - "name":"java.lang.String" -}, -{ - "name":"java.lang.Thread", - "methods":[{"name":"getContextClassLoader","parameterTypes":[] }] -}, -{ - "name":"java.text.DateFormatSymbols", - "methods":[{"name":"getInstance","parameterTypes":["java.util.Locale"] }] -}, -{ - "name":"java.util.ArrayList", - "allDeclaredMethods":true, - "allDeclaredConstructors":true -}, -{ - "name":"java.util.HashSet", - "allDeclaredMethods":true, - "allDeclaredConstructors":true -}, -{ - "name":"java.util.LinkedHashMap", - "allDeclaredMethods":true, - "allDeclaredConstructors":true -}, -{ - "name":"javax.crypto.AEADBadTagException", - "methods":[{"name":"","parameterTypes":["java.lang.String"] }] -}, -{ - "name":"javax.crypto.spec.GCMParameterSpec", - "methods":[ - {"name":"","parameterTypes":["int","byte[]"] }, - {"name":"getIV","parameterTypes":[] }, - {"name":"getTLen","parameterTypes":[] } - ] -}, -{ - "name":"javax.xml.bind.DatatypeConverter" -}, -{ - "name":"org.apache.commons.logging.LogFactory" -}, -{ - "name":"org.apache.commons.logging.impl.Jdk14Logger", - "methods":[{"name":"","parameterTypes":["java.lang.String"] }] -}, -{ - "name":"org.apache.commons.logging.impl.LogFactoryImpl", - "methods":[{"name":"","parameterTypes":[] }] -}, -{ - "name":"org.apache.commons.logging.impl.WeakHashtable", - "methods":[{"name":"","parameterTypes":[] }] -}, -{ - "name":"org.bouncycastle.jcajce.provider.asymmetric.DH$Mappings", - "methods":[{"name":"","parameterTypes":[] }] -}, -{ - "name":"org.bouncycastle.jcajce.provider.asymmetric.DSA$Mappings", - "methods":[{"name":"","parameterTypes":[] }] -}, -{ - "name":"org.bouncycastle.jcajce.provider.asymmetric.DSTU4145$Mappings", - "methods":[{"name":"","parameterTypes":[] }] -}, -{ - "name":"org.bouncycastle.jcajce.provider.asymmetric.EC$Mappings", - "methods":[{"name":"","parameterTypes":[] }] -}, -{ - "name":"org.bouncycastle.jcajce.provider.asymmetric.ECGOST$Mappings", - "methods":[{"name":"","parameterTypes":[] }] -}, -{ - "name":"org.bouncycastle.jcajce.provider.asymmetric.ElGamal$Mappings", - "methods":[{"name":"","parameterTypes":[] }] -}, -{ - "name":"org.bouncycastle.jcajce.provider.asymmetric.GM$Mappings", - "methods":[{"name":"","parameterTypes":[] }] -}, -{ - "name":"org.bouncycastle.jcajce.provider.asymmetric.GOST$Mappings", - "methods":[{"name":"","parameterTypes":[] }] -}, -{ - "name":"org.bouncycastle.jcajce.provider.asymmetric.IES$Mappings", - "methods":[{"name":"","parameterTypes":[] }] -}, -{ - "name":"org.bouncycastle.jcajce.provider.asymmetric.RSA$Mappings", - "methods":[{"name":"","parameterTypes":[] }] -}, -{ - "name":"org.bouncycastle.jcajce.provider.asymmetric.X509$Mappings", - "methods":[{"name":"","parameterTypes":[] }] -}, -{ - "name":"org.bouncycastle.jcajce.provider.asymmetric.rsa.BCRSAPublicKey", - "allDeclaredFields":true -}, -{ - "name":"org.bouncycastle.jcajce.provider.digest.Blake2b$Mappings", - "methods":[{"name":"","parameterTypes":[] }] -}, -{ - "name":"org.bouncycastle.jcajce.provider.digest.DSTU7564$Mappings", - "methods":[{"name":"","parameterTypes":[] }] -}, -{ - "name":"org.bouncycastle.jcajce.provider.digest.GOST3411$Mappings", - "methods":[{"name":"","parameterTypes":[] }] -}, -{ - "name":"org.bouncycastle.jcajce.provider.digest.Keccak$Mappings", - "methods":[{"name":"","parameterTypes":[] }] -}, -{ - "name":"org.bouncycastle.jcajce.provider.digest.MD2$Mappings", - "methods":[{"name":"","parameterTypes":[] }] -}, -{ - "name":"org.bouncycastle.jcajce.provider.digest.MD4$Mappings", - "methods":[{"name":"","parameterTypes":[] }] -}, -{ - "name":"org.bouncycastle.jcajce.provider.digest.MD5$Mappings", - "methods":[{"name":"","parameterTypes":[] }] -}, -{ - "name":"org.bouncycastle.jcajce.provider.digest.RIPEMD128$Mappings", - "methods":[{"name":"","parameterTypes":[] }] -}, -{ - "name":"org.bouncycastle.jcajce.provider.digest.RIPEMD160$Mappings", - "methods":[{"name":"","parameterTypes":[] }] -}, -{ - "name":"org.bouncycastle.jcajce.provider.digest.RIPEMD256$Mappings", - "methods":[{"name":"","parameterTypes":[] }] -}, -{ - "name":"org.bouncycastle.jcajce.provider.digest.RIPEMD320$Mappings", - "methods":[{"name":"","parameterTypes":[] }] -}, -{ - "name":"org.bouncycastle.jcajce.provider.digest.SHA1$Mappings", - "methods":[{"name":"","parameterTypes":[] }] -}, -{ - "name":"org.bouncycastle.jcajce.provider.digest.SHA224$Mappings", - "methods":[{"name":"","parameterTypes":[] }] -}, -{ - "name":"org.bouncycastle.jcajce.provider.digest.SHA256$Mappings", - "methods":[{"name":"","parameterTypes":[] }] -}, -{ - "name":"org.bouncycastle.jcajce.provider.digest.SHA3$Mappings", - "methods":[{"name":"","parameterTypes":[] }] -}, -{ - "name":"org.bouncycastle.jcajce.provider.digest.SHA384$Mappings", - "methods":[{"name":"","parameterTypes":[] }] -}, -{ - "name":"org.bouncycastle.jcajce.provider.digest.SHA512$Mappings", - "methods":[{"name":"","parameterTypes":[] }] -}, -{ - "name":"org.bouncycastle.jcajce.provider.digest.SM3$Mappings", - "methods":[{"name":"","parameterTypes":[] }] -}, -{ - "name":"org.bouncycastle.jcajce.provider.digest.Skein$Mappings", - "methods":[{"name":"","parameterTypes":[] }] -}, -{ - "name":"org.bouncycastle.jcajce.provider.digest.Tiger$Mappings", - "methods":[{"name":"","parameterTypes":[] }] -}, -{ - "name":"org.bouncycastle.jcajce.provider.digest.Whirlpool$Mappings", - "methods":[{"name":"","parameterTypes":[] }] -}, -{ - "name":"org.bouncycastle.jcajce.provider.drbg.DRBG$Mappings", - "methods":[{"name":"","parameterTypes":[] }] -}, -{ - "name":"org.bouncycastle.jcajce.provider.keystore.BC$Mappings", - "methods":[{"name":"","parameterTypes":[] }] -}, -{ - "name":"org.bouncycastle.jcajce.provider.keystore.BCFKS$Mappings", - "methods":[{"name":"","parameterTypes":[] }] -}, -{ - "name":"org.bouncycastle.jcajce.provider.keystore.PKCS12$Mappings", - "methods":[{"name":"","parameterTypes":[] }] -}, -{ - "name":"org.bouncycastle.jcajce.provider.symmetric.AES$Mappings", - "methods":[{"name":"","parameterTypes":[] }] -}, -{ - "name":"org.bouncycastle.jcajce.provider.symmetric.ARC4$Mappings", - "methods":[{"name":"","parameterTypes":[] }] -}, -{ - "name":"org.bouncycastle.jcajce.provider.symmetric.ARIA$Mappings", - "methods":[{"name":"","parameterTypes":[] }] -}, -{ - "name":"org.bouncycastle.jcajce.provider.symmetric.Blowfish$Mappings", - "methods":[{"name":"","parameterTypes":[] }] -}, -{ - "name":"org.bouncycastle.jcajce.provider.symmetric.CAST5$Mappings", - "methods":[{"name":"","parameterTypes":[] }] -}, -{ - "name":"org.bouncycastle.jcajce.provider.symmetric.CAST6$Mappings", - "methods":[{"name":"","parameterTypes":[] }] -}, -{ - "name":"org.bouncycastle.jcajce.provider.symmetric.Camellia$Mappings", - "methods":[{"name":"","parameterTypes":[] }] -}, -{ - "name":"org.bouncycastle.jcajce.provider.symmetric.ChaCha$Mappings", - "methods":[{"name":"","parameterTypes":[] }] -}, -{ - "name":"org.bouncycastle.jcajce.provider.symmetric.DES$Mappings", - "methods":[{"name":"","parameterTypes":[] }] -}, -{ - "name":"org.bouncycastle.jcajce.provider.symmetric.DESede$Mappings", - "methods":[{"name":"","parameterTypes":[] }] -}, -{ - "name":"org.bouncycastle.jcajce.provider.symmetric.DSTU7624$Mappings", - "methods":[{"name":"","parameterTypes":[] }] -}, -{ - "name":"org.bouncycastle.jcajce.provider.symmetric.GOST28147$Mappings", - "methods":[{"name":"","parameterTypes":[] }] -}, -{ - "name":"org.bouncycastle.jcajce.provider.symmetric.Grain128$Mappings", - "methods":[{"name":"","parameterTypes":[] }] -}, -{ - "name":"org.bouncycastle.jcajce.provider.symmetric.Grainv1$Mappings", - "methods":[{"name":"","parameterTypes":[] }] -}, -{ - "name":"org.bouncycastle.jcajce.provider.symmetric.HC128$Mappings", - "methods":[{"name":"","parameterTypes":[] }] -}, -{ - "name":"org.bouncycastle.jcajce.provider.symmetric.HC256$Mappings", - "methods":[{"name":"","parameterTypes":[] }] -}, -{ - "name":"org.bouncycastle.jcajce.provider.symmetric.IDEA$Mappings", - "methods":[{"name":"","parameterTypes":[] }] -}, -{ - "name":"org.bouncycastle.jcajce.provider.symmetric.Noekeon$Mappings", - "methods":[{"name":"","parameterTypes":[] }] -}, -{ - "name":"org.bouncycastle.jcajce.provider.symmetric.OpenSSLPBKDF$Mappings", - "methods":[{"name":"","parameterTypes":[] }] -}, -{ - "name":"org.bouncycastle.jcajce.provider.symmetric.PBEPBKDF1$Mappings", - "methods":[{"name":"","parameterTypes":[] }] -}, -{ - "name":"org.bouncycastle.jcajce.provider.symmetric.PBEPBKDF2$Mappings", - "methods":[{"name":"","parameterTypes":[] }] -}, -{ - "name":"org.bouncycastle.jcajce.provider.symmetric.PBEPKCS12$Mappings", - "methods":[{"name":"","parameterTypes":[] }] -}, -{ - "name":"org.bouncycastle.jcajce.provider.symmetric.Poly1305$Mappings", - "methods":[{"name":"","parameterTypes":[] }] -}, -{ - "name":"org.bouncycastle.jcajce.provider.symmetric.RC2$Mappings", - "methods":[{"name":"","parameterTypes":[] }] -}, -{ - "name":"org.bouncycastle.jcajce.provider.symmetric.RC5$Mappings", - "methods":[{"name":"","parameterTypes":[] }] -}, -{ - "name":"org.bouncycastle.jcajce.provider.symmetric.RC6$Mappings", - "methods":[{"name":"","parameterTypes":[] }] -}, -{ - "name":"org.bouncycastle.jcajce.provider.symmetric.Rijndael$Mappings", - "methods":[{"name":"","parameterTypes":[] }] -}, -{ - "name":"org.bouncycastle.jcajce.provider.symmetric.SEED$Mappings", - "methods":[{"name":"","parameterTypes":[] }] -}, -{ - "name":"org.bouncycastle.jcajce.provider.symmetric.SM4$Mappings", - "methods":[{"name":"","parameterTypes":[] }] -}, -{ - "name":"org.bouncycastle.jcajce.provider.symmetric.Salsa20$Mappings", - "methods":[{"name":"","parameterTypes":[] }] -}, -{ - "name":"org.bouncycastle.jcajce.provider.symmetric.Serpent$Mappings", - "methods":[{"name":"","parameterTypes":[] }] -}, -{ - "name":"org.bouncycastle.jcajce.provider.symmetric.Shacal2$Mappings", - "methods":[{"name":"","parameterTypes":[] }] -}, -{ - "name":"org.bouncycastle.jcajce.provider.symmetric.SipHash$Mappings", - "methods":[{"name":"","parameterTypes":[] }] -}, -{ - "name":"org.bouncycastle.jcajce.provider.symmetric.Skipjack$Mappings", - "methods":[{"name":"","parameterTypes":[] }] -}, -{ - "name":"org.bouncycastle.jcajce.provider.symmetric.TEA$Mappings", - "methods":[{"name":"","parameterTypes":[] }] -}, -{ - "name":"org.bouncycastle.jcajce.provider.symmetric.TLSKDF$Mappings", - "methods":[{"name":"","parameterTypes":[] }] -}, -{ - "name":"org.bouncycastle.jcajce.provider.symmetric.Threefish$Mappings", - "methods":[{"name":"","parameterTypes":[] }] -}, -{ - "name":"org.bouncycastle.jcajce.provider.symmetric.Twofish$Mappings", - "methods":[{"name":"","parameterTypes":[] }] -}, -{ - "name":"org.bouncycastle.jcajce.provider.symmetric.VMPC$Mappings", - "methods":[{"name":"","parameterTypes":[] }] -}, -{ - "name":"org.bouncycastle.jcajce.provider.symmetric.VMPCKSA3$Mappings", - "methods":[{"name":"","parameterTypes":[] }] -}, -{ - "name":"org.bouncycastle.jcajce.provider.symmetric.XSalsa20$Mappings", - "methods":[{"name":"","parameterTypes":[] }] -}, -{ - "name":"org.bouncycastle.jcajce.provider.symmetric.XTEA$Mappings", - "methods":[{"name":"","parameterTypes":[] }] -}, -{ - "name":"java.security.AlgorithmParameterGeneratorSpi", - "methods":[{"name":"","parameterTypes":[] }] -}, -{ - "name":"sun.misc.Unsafe", - "allDeclaredFields":true, - "methods":[{"name":"allocateInstance","parameterTypes":["java.lang.Class"] }] -}, -{ - "name":"sun.security.provider.SecureRandom", - "methods":[{"name":"","parameterTypes":[] }] -}, -{ - "name":"sun.security.provider.Sun", - "methods":[{"name":"","parameterTypes":[] }] -} + { + "name": "com.amazonaws.internal.config.Builder", + "allDeclaredMethods": true + }, + { + "name": "com.amazonaws.internal.config.HostRegexToRegionMappingJsonHelper", + "allDeclaredFields": true, + "allDeclaredMethods": true, + "allDeclaredConstructors": true + }, + { + "name": "com.amazonaws.internal.config.HttpClientConfigJsonHelper", + "allDeclaredFields": true, + "allDeclaredMethods": true, + "allDeclaredConstructors": true + }, + { + "name": "com.amazonaws.internal.config.InternalConfigJsonHelper", + "allDeclaredFields": true, + "allDeclaredMethods": true, + "allDeclaredConstructors": true + }, + { + "name": "com.amazonaws.internal.config.JsonIndex", + "allDeclaredFields": true, + "allDeclaredMethods": true, + "allDeclaredConstructors": true + }, + { + "name": "com.amazonaws.internal.config.SignerConfigJsonHelper", + "allDeclaredFields": true, + "allDeclaredMethods": true, + "allDeclaredConstructors": true + }, + { + "name": "com.amazonaws.jmx.SdkMBeanRegistrySupport", + "methods": [ + { + "name": "", + "parameterTypes": [] + } + ] + }, + { + "name": "com.amazonaws.partitions.model.CredentialScope", + "allDeclaredFields": true, + "allDeclaredMethods": true, + "allDeclaredConstructors": true + }, + { + "name": "com.amazonaws.partitions.model.Endpoint", + "allDeclaredFields": true, + "allDeclaredMethods": true, + "allDeclaredConstructors": true + }, + { + "name": "com.amazonaws.partitions.model.Partition", + "allDeclaredFields": true, + "allDeclaredMethods": true, + "allDeclaredConstructors": true + }, + { + "name": "com.amazonaws.partitions.model.Partitions", + "allDeclaredFields": true, + "allDeclaredMethods": true, + "allDeclaredConstructors": true + }, + { + "name": "com.amazonaws.partitions.model.Region", + "allDeclaredFields": true, + "allDeclaredMethods": true, + "allDeclaredConstructors": true + }, + { + "name": "com.amazonaws.partitions.model.Service", + "allDeclaredFields": true, + "allDeclaredMethods": true, + "allDeclaredConstructors": true + }, + { + "name": "com.amazonaws.services.s3.internal.AWSS3V4Signer", + "methods": [ + { + "name": "", + "parameterTypes": [] + } + ] + }, + { + "name": "com.google.common.util.concurrent.AbstractFuture", + "fields": [ + { + "name": "listeners", + "allowUnsafeAccess": true + }, + { + "name": "value", + "allowUnsafeAccess": true + }, + { + "name": "waiters", + "allowUnsafeAccess": true + } + ] + }, + { + "name": "com.google.common.util.concurrent.AbstractFuture$Waiter", + "fields": [ + { + "name": "next", + "allowUnsafeAccess": true + }, + { + "name": "thread", + "allowUnsafeAccess": true + } + ] + }, + { + "name": "com.sun.org.apache.xerces.internal.parsers.SAXParser", + "methods": [ + { + "name": "", + "parameterTypes": [] + } + ] + }, + { + "name": "de.adorsys.datasafe.cli.Cli", + "methods": [ + { + "name": "main", + "parameterTypes": [ + "java.lang.String[]" + ] + } + ] + }, + { + "name": "de.adorsys.datasafe.directory.api.types.StorageCredentials", + "allDeclaredFields": true, + "fields": [ + { + "name": "username", + "allowWrite": true + }, + { + "name": "password", + "allowWrite": true + } + ] + }, + { + "name": "de.adorsys.datasafe.directory.api.types.UserPrivateProfile", + "allDeclaredConstructors": true, + "allDeclaredFields": true, + "fields": [ + { + "name": "keystore", + "allowWrite": true + }, + { + "name": "privateStorage", + "allowWrite": true + }, + { + "name": "inboxWithFullAccess", + "allowWrite": true + }, + { + "name": "publishPublicKeysTo", + "allowWrite": true + }, + { + "name": "associatedResources", + "allowWrite": true + }, + { + "name": "documentVersionStorage", + "allowWrite": true + }, + { + "name": "storageCredentialsKeystore", + "allowWrite": true + } + ] + }, + { + "name": "de.adorsys.datasafe.directory.api.types.UserPublicProfile", + "allDeclaredConstructors": true, + "allDeclaredFields": true, + "fields": [ + { + "name": "publicKeys", + "allowWrite": true + }, + { + "name": "inbox", + "allowWrite": true + } + ] + }, + { + "name": "de.adorsys.datasafe.encrypiton.api.types.BaseTypeString", + "allDeclaredFields": true, + "fields": [ + { + "name": "value", + "allowWrite": true + } + ] + }, + { + "name": "de.adorsys.datasafe.encrypiton.api.types.keystore.KeyID", + "allDeclaredFields": true + }, + { + "name": "de.adorsys.datasafe.encrypiton.api.types.keystore.PublicKeyIDWithPublicKey", + "allDeclaredFields": true, + "fields": [ + { + "name": "keyID", + "allowWrite": true + }, + { + "name": "publicKey", + "allowWrite": true + } + ] + }, + { + "name": "de.adorsys.datasafe.types.api.resource.AbsoluteLocation", + "allDeclaredFields": true, + "fields": [ + { + "name": "resource", + "allowWrite": true + } + ] + }, + { + "name": "de.adorsys.datasafe.types.api.resource.BasePrivateResource", + "allDeclaredFields": true, + "methods": [ + { + "name": "", + "parameterTypes": [] + } + ] + }, + { + "name": "de.adorsys.datasafe.types.api.resource.BasePublicResource", + "allDeclaredFields": true + }, + { + "name": "de.adorsys.datasafe.types.api.resource.StorageIdentifier", + "allDeclaredFields": true, + "fields": [ + { + "name": "id", + "allowWrite": true + } + ] + }, + { + "name": "de.adorsys.datasafe.types.api.resource.Uri", + "allDeclaredFields": true + }, + { + "name": "java.lang.String" + }, + { + "name": "java.lang.Thread", + "methods": [ + { + "name": "getContextClassLoader", + "parameterTypes": [] + } + ] + }, + { + "name": "java.text.DateFormatSymbols", + "methods": [ + { + "name": "getInstance", + "parameterTypes": [ + "java.util.Locale" + ] + } + ] + }, + { + "name": "java.util.ArrayList", + "allDeclaredMethods": true, + "allDeclaredConstructors": true + }, + { + "name": "java.util.HashSet", + "allDeclaredMethods": true, + "allDeclaredConstructors": true + }, + { + "name": "java.util.LinkedHashMap", + "allDeclaredMethods": true, + "allDeclaredConstructors": true + }, + { + "name": "javax.crypto.AEADBadTagException", + "methods": [ + { + "name": "", + "parameterTypes": [ + "java.lang.String" + ] + } + ] + }, + { + "name": "javax.crypto.spec.GCMParameterSpec", + "methods": [ + { + "name": "", + "parameterTypes": [ + "int", + "byte[]" + ] + }, + { + "name": "getIV", + "parameterTypes": [] + }, + { + "name": "getTLen", + "parameterTypes": [] + } + ] + }, + { + "name": "javax.xml.bind.DatatypeConverter" + }, + { + "name": "org.apache.commons.logging.LogFactory" + }, + { + "name": "org.apache.commons.logging.impl.Jdk14Logger", + "methods": [ + { + "name": "", + "parameterTypes": [ + "java.lang.String" + ] + } + ] + }, + { + "name": "org.apache.commons.logging.impl.LogFactoryImpl", + "methods": [ + { + "name": "", + "parameterTypes": [] + } + ] + }, + { + "name": "org.apache.commons.logging.impl.WeakHashtable", + "methods": [ + { + "name": "", + "parameterTypes": [] + } + ] + }, + { + "name": "org.bouncycastle.jcajce.provider.asymmetric.DH$Mappings", + "methods": [ + { + "name": "", + "parameterTypes": [] + } + ] + }, + { + "name": "org.bouncycastle.jcajce.provider.asymmetric.DSA$Mappings", + "methods": [ + { + "name": "", + "parameterTypes": [] + } + ] + }, + { + "name": "org.bouncycastle.jcajce.provider.asymmetric.DSTU4145$Mappings", + "methods": [ + { + "name": "", + "parameterTypes": [] + } + ] + }, + { + "name": "org.bouncycastle.jcajce.provider.asymmetric.EC$Mappings", + "methods": [ + { + "name": "", + "parameterTypes": [] + } + ] + }, + { + "name": "org.bouncycastle.jcajce.provider.asymmetric.ECGOST$Mappings", + "methods": [ + { + "name": "", + "parameterTypes": [] + } + ] + }, + { + "name": "org.bouncycastle.jcajce.provider.asymmetric.ElGamal$Mappings", + "methods": [ + { + "name": "", + "parameterTypes": [] + } + ] + }, + { + "name": "org.bouncycastle.jcajce.provider.asymmetric.GM$Mappings", + "methods": [ + { + "name": "", + "parameterTypes": [] + } + ] + }, + { + "name": "org.bouncycastle.jcajce.provider.asymmetric.GOST$Mappings", + "methods": [ + { + "name": "", + "parameterTypes": [] + } + ] + }, + { + "name": "org.bouncycastle.jcajce.provider.asymmetric.IES$Mappings", + "methods": [ + { + "name": "", + "parameterTypes": [] + } + ] + }, + { + "name": "org.bouncycastle.jcajce.provider.asymmetric.RSA$Mappings", + "methods": [ + { + "name": "", + "parameterTypes": [] + } + ] + }, + { + "name": "org.bouncycastle.jcajce.provider.asymmetric.X509$Mappings", + "methods": [ + { + "name": "", + "parameterTypes": [] + } + ] + }, + { + "name": "org.bouncycastle.jcajce.provider.asymmetric.rsa.BCRSAPublicKey", + "allDeclaredFields": true + }, + { + "name": "org.bouncycastle.jcajce.provider.digest.Blake2b$Mappings", + "methods": [ + { + "name": "", + "parameterTypes": [] + } + ] + }, + { + "name": "org.bouncycastle.jcajce.provider.digest.DSTU7564$Mappings", + "methods": [ + { + "name": "", + "parameterTypes": [] + } + ] + }, + { + "name": "org.bouncycastle.jcajce.provider.digest.GOST3411$Mappings", + "methods": [ + { + "name": "", + "parameterTypes": [] + } + ] + }, + { + "name": "org.bouncycastle.jcajce.provider.digest.Keccak$Mappings", + "methods": [ + { + "name": "", + "parameterTypes": [] + } + ] + }, + { + "name": "org.bouncycastle.jcajce.provider.digest.MD2$Mappings", + "methods": [ + { + "name": "", + "parameterTypes": [] + } + ] + }, + { + "name": "org.bouncycastle.jcajce.provider.digest.MD4$Mappings", + "methods": [ + { + "name": "", + "parameterTypes": [] + } + ] + }, + { + "name": "org.bouncycastle.jcajce.provider.digest.MD5$Mappings", + "methods": [ + { + "name": "", + "parameterTypes": [] + } + ] + }, + { + "name": "org.bouncycastle.jcajce.provider.digest.RIPEMD128$Mappings", + "methods": [ + { + "name": "", + "parameterTypes": [] + } + ] + }, + { + "name": "org.bouncycastle.jcajce.provider.digest.RIPEMD160$Mappings", + "methods": [ + { + "name": "", + "parameterTypes": [] + } + ] + }, + { + "name": "org.bouncycastle.jcajce.provider.digest.RIPEMD256$Mappings", + "methods": [ + { + "name": "", + "parameterTypes": [] + } + ] + }, + { + "name": "org.bouncycastle.jcajce.provider.digest.RIPEMD320$Mappings", + "methods": [ + { + "name": "", + "parameterTypes": [] + } + ] + }, + { + "name": "org.bouncycastle.jcajce.provider.digest.SHA1$Mappings", + "methods": [ + { + "name": "", + "parameterTypes": [] + } + ] + }, + { + "name": "org.bouncycastle.jcajce.provider.digest.SHA224$Mappings", + "methods": [ + { + "name": "", + "parameterTypes": [] + } + ] + }, + { + "name": "org.bouncycastle.jcajce.provider.digest.SHA256$Mappings", + "methods": [ + { + "name": "", + "parameterTypes": [] + } + ] + }, + { + "name": "org.bouncycastle.jcajce.provider.digest.SHA3$Mappings", + "methods": [ + { + "name": "", + "parameterTypes": [] + } + ] + }, + { + "name": "org.bouncycastle.jcajce.provider.digest.SHA384$Mappings", + "methods": [ + { + "name": "", + "parameterTypes": [] + } + ] + }, + { + "name": "org.bouncycastle.jcajce.provider.digest.SHA512$Mappings", + "methods": [ + { + "name": "", + "parameterTypes": [] + } + ] + }, + { + "name": "org.bouncycastle.jcajce.provider.digest.SM3$Mappings", + "methods": [ + { + "name": "", + "parameterTypes": [] + } + ] + }, + { + "name": "org.bouncycastle.jcajce.provider.digest.Skein$Mappings", + "methods": [ + { + "name": "", + "parameterTypes": [] + } + ] + }, + { + "name": "org.bouncycastle.jcajce.provider.digest.Tiger$Mappings", + "methods": [ + { + "name": "", + "parameterTypes": [] + } + ] + }, + { + "name": "org.bouncycastle.jcajce.provider.digest.Whirlpool$Mappings", + "methods": [ + { + "name": "", + "parameterTypes": [] + } + ] + }, + { + "name": "org.bouncycastle.jcajce.provider.drbg.DRBG$Mappings", + "methods": [ + { + "name": "", + "parameterTypes": [] + } + ] + }, + { + "name": "org.bouncycastle.jcajce.provider.keystore.BC$Mappings", + "methods": [ + { + "name": "", + "parameterTypes": [] + } + ] + }, + { + "name": "org.bouncycastle.jcajce.provider.keystore.BCFKS$Mappings", + "methods": [ + { + "name": "", + "parameterTypes": [] + } + ] + }, + { + "name": "org.bouncycastle.jcajce.provider.keystore.PKCS12$Mappings", + "methods": [ + { + "name": "", + "parameterTypes": [] + } + ] + }, + { + "name": "org.bouncycastle.jcajce.provider.symmetric.AES$Mappings", + "methods": [ + { + "name": "", + "parameterTypes": [] + } + ] + }, + { + "name": "org.bouncycastle.jcajce.provider.symmetric.ARC4$Mappings", + "methods": [ + { + "name": "", + "parameterTypes": [] + } + ] + }, + { + "name": "org.bouncycastle.jcajce.provider.symmetric.ARIA$Mappings", + "methods": [ + { + "name": "", + "parameterTypes": [] + } + ] + }, + { + "name": "org.bouncycastle.jcajce.provider.symmetric.Blowfish$Mappings", + "methods": [ + { + "name": "", + "parameterTypes": [] + } + ] + }, + { + "name": "org.bouncycastle.jcajce.provider.symmetric.CAST5$Mappings", + "methods": [ + { + "name": "", + "parameterTypes": [] + } + ] + }, + { + "name": "org.bouncycastle.jcajce.provider.symmetric.CAST6$Mappings", + "methods": [ + { + "name": "", + "parameterTypes": [] + } + ] + }, + { + "name": "org.bouncycastle.jcajce.provider.symmetric.Camellia$Mappings", + "methods": [ + { + "name": "", + "parameterTypes": [] + } + ] + }, + { + "name": "org.bouncycastle.jcajce.provider.symmetric.ChaCha$Mappings", + "methods": [ + { + "name": "", + "parameterTypes": [] + } + ] + }, + { + "name": "org.bouncycastle.jcajce.provider.symmetric.DES$Mappings", + "methods": [ + { + "name": "", + "parameterTypes": [] + } + ] + }, + { + "name": "org.bouncycastle.jcajce.provider.symmetric.DESede$Mappings", + "methods": [ + { + "name": "", + "parameterTypes": [] + } + ] + }, + { + "name": "org.bouncycastle.jcajce.provider.symmetric.DSTU7624$Mappings", + "methods": [ + { + "name": "", + "parameterTypes": [] + } + ] + }, + { + "name": "org.bouncycastle.jcajce.provider.symmetric.GOST28147$Mappings", + "methods": [ + { + "name": "", + "parameterTypes": [] + } + ] + }, + { + "name": "org.bouncycastle.jcajce.provider.symmetric.Grain128$Mappings", + "methods": [ + { + "name": "", + "parameterTypes": [] + } + ] + }, + { + "name": "org.bouncycastle.jcajce.provider.symmetric.Grainv1$Mappings", + "methods": [ + { + "name": "", + "parameterTypes": [] + } + ] + }, + { + "name": "org.bouncycastle.jcajce.provider.symmetric.HC128$Mappings", + "methods": [ + { + "name": "", + "parameterTypes": [] + } + ] + }, + { + "name": "org.bouncycastle.jcajce.provider.symmetric.HC256$Mappings", + "methods": [ + { + "name": "", + "parameterTypes": [] + } + ] + }, + { + "name": "org.bouncycastle.jcajce.provider.symmetric.IDEA$Mappings", + "methods": [ + { + "name": "", + "parameterTypes": [] + } + ] + }, + { + "name": "org.bouncycastle.jcajce.provider.symmetric.Noekeon$Mappings", + "methods": [ + { + "name": "", + "parameterTypes": [] + } + ] + }, + { + "name": "org.bouncycastle.jcajce.provider.symmetric.OpenSSLPBKDF$Mappings", + "methods": [ + { + "name": "", + "parameterTypes": [] + } + ] + }, + { + "name": "org.bouncycastle.jcajce.provider.symmetric.PBEPBKDF1$Mappings", + "methods": [ + { + "name": "", + "parameterTypes": [] + } + ] + }, + { + "name": "org.bouncycastle.jcajce.provider.symmetric.PBEPBKDF2$Mappings", + "methods": [ + { + "name": "", + "parameterTypes": [] + } + ] + }, + { + "name": "org.bouncycastle.jcajce.provider.symmetric.PBEPKCS12$Mappings", + "methods": [ + { + "name": "", + "parameterTypes": [] + } + ] + }, + { + "name": "org.bouncycastle.jcajce.provider.symmetric.Poly1305$Mappings", + "methods": [ + { + "name": "", + "parameterTypes": [] + } + ] + }, + { + "name": "org.bouncycastle.jcajce.provider.symmetric.RC2$Mappings", + "methods": [ + { + "name": "", + "parameterTypes": [] + } + ] + }, + { + "name": "org.bouncycastle.jcajce.provider.symmetric.RC5$Mappings", + "methods": [ + { + "name": "", + "parameterTypes": [] + } + ] + }, + { + "name": "org.bouncycastle.jcajce.provider.symmetric.RC6$Mappings", + "methods": [ + { + "name": "", + "parameterTypes": [] + } + ] + }, + { + "name": "org.bouncycastle.jcajce.provider.symmetric.Rijndael$Mappings", + "methods": [ + { + "name": "", + "parameterTypes": [] + } + ] + }, + { + "name": "org.bouncycastle.jcajce.provider.symmetric.SEED$Mappings", + "methods": [ + { + "name": "", + "parameterTypes": [] + } + ] + }, + { + "name": "org.bouncycastle.jcajce.provider.symmetric.SM4$Mappings", + "methods": [ + { + "name": "", + "parameterTypes": [] + } + ] + }, + { + "name": "org.bouncycastle.jcajce.provider.symmetric.Salsa20$Mappings", + "methods": [ + { + "name": "", + "parameterTypes": [] + } + ] + }, + { + "name": "org.bouncycastle.jcajce.provider.symmetric.Serpent$Mappings", + "methods": [ + { + "name": "", + "parameterTypes": [] + } + ] + }, + { + "name": "org.bouncycastle.jcajce.provider.symmetric.Shacal2$Mappings", + "methods": [ + { + "name": "", + "parameterTypes": [] + } + ] + }, + { + "name": "org.bouncycastle.jcajce.provider.symmetric.SipHash$Mappings", + "methods": [ + { + "name": "", + "parameterTypes": [] + } + ] + }, + { + "name": "org.bouncycastle.jcajce.provider.symmetric.Skipjack$Mappings", + "methods": [ + { + "name": "", + "parameterTypes": [] + } + ] + }, + { + "name": "org.bouncycastle.jcajce.provider.symmetric.TEA$Mappings", + "methods": [ + { + "name": "", + "parameterTypes": [] + } + ] + }, + { + "name": "org.bouncycastle.jcajce.provider.symmetric.TLSKDF$Mappings", + "methods": [ + { + "name": "", + "parameterTypes": [] + } + ] + }, + { + "name": "org.bouncycastle.jcajce.provider.symmetric.Threefish$Mappings", + "methods": [ + { + "name": "", + "parameterTypes": [] + } + ] + }, + { + "name": "org.bouncycastle.jcajce.provider.symmetric.Twofish$Mappings", + "methods": [ + { + "name": "", + "parameterTypes": [] + } + ] + }, + { + "name": "org.bouncycastle.jcajce.provider.symmetric.VMPC$Mappings", + "methods": [ + { + "name": "", + "parameterTypes": [] + } + ] + }, + { + "name": "org.bouncycastle.jcajce.provider.symmetric.VMPCKSA3$Mappings", + "methods": [ + { + "name": "", + "parameterTypes": [] + } + ] + }, + { + "name": "org.bouncycastle.jcajce.provider.symmetric.XSalsa20$Mappings", + "methods": [ + { + "name": "", + "parameterTypes": [] + } + ] + }, + { + "name": "org.bouncycastle.jcajce.provider.symmetric.XTEA$Mappings", + "methods": [ + { + "name": "", + "parameterTypes": [] + } + ] + }, + { + "name": "java.security.AlgorithmParameterGeneratorSpi", + "methods": [ + { + "name": "", + "parameterTypes": [] + } + ] + }, + { + "name": "sun.misc.Unsafe", + "allDeclaredFields": true, + "methods": [ + { + "name": "allocateInstance", + "parameterTypes": [ + "java.lang.Class" + ] + } + ] + }, + { + "name": "sun.security.provider.SecureRandom", + "methods": [ + { + "name": "", + "parameterTypes": [] + } + ] + }, + { + "name": "sun.security.provider.Sun", + "methods": [ + { + "name": "", + "parameterTypes": [] + } + ] + } ] diff --git a/datasafe-cli/src/main/resources/META-INF/native-image/de.adorsys/datasafe-cli/resource-config.json b/datasafe-cli/src/main/resources/META-INF/native-image/de.adorsys/datasafe-cli/resource-config.json index d2d3d410e..b610f856b 100644 --- a/datasafe-cli/src/main/resources/META-INF/native-image/de.adorsys/datasafe-cli/resource-config.json +++ b/datasafe-cli/src/main/resources/META-INF/native-image/de.adorsys/datasafe-cli/resource-config.json @@ -1,448 +1,1336 @@ { - "resources":[ - {"pattern":"META-INF/MANIFEST.MF"}, - {"pattern":"com/amazonaws/internal/config/awssdk_config_default.json"}, - {"pattern":"com/amazonaws/partitions/endpoints.json"}, - {"pattern":"com/amazonaws/sdk/versionInfo.properties"}, - {"pattern":"de/adorsys/datasafe/cli/Cli$DataOnS3.class"}, - {"pattern":"javax/crypto/Cipher.class"}, - {"pattern":"lib/animal-sniffer-annotations-1.17.jar"}, - {"pattern":"lib/aws-java-sdk-core-1.11.538.jar"}, - {"pattern":"lib/aws-java-sdk-kms-1.11.538.jar"}, - {"pattern":"lib/aws-java-sdk-s3-1.11.538.jar"}, - {"pattern":"lib/bcpkix-jdk15on-1.58.jar"}, - {"pattern":"lib/bcprov-jdk15on-1.58.jar"}, - {"pattern":"lib/checker-qual-2.5.2.jar"}, - {"pattern":"lib/commons-codec-1.10.jar"}, - {"pattern":"lib/commons-lang3-3.5.jar"}, - {"pattern":"lib/commons-logging-1.1.3.jar"}, - {"pattern":"lib/dagger-2.17.jar"}, - {"pattern":"lib/datasafe-business.jar"}, - {"pattern":"lib/datasafe-directory-api.jar"}, - {"pattern":"lib/datasafe-directory-impl.jar"}, - {"pattern":"lib/datasafe-encryption-api.jar"}, - {"pattern":"lib/datasafe-encryption-impl.jar"}, - {"pattern":"lib/datasafe-inbox-api.jar"}, - {"pattern":"lib/datasafe-inbox-impl.jar"}, - {"pattern":"lib/datasafe-metainfo-version-api.jar"}, - {"pattern":"lib/datasafe-metainfo-version-impl.jar"}, - {"pattern":"lib/datasafe-privatestore-api.jar"}, - {"pattern":"lib/datasafe-privatestore-impl.jar"}, - {"pattern":"lib/datasafe-storage-api.jar"}, - {"pattern":"lib/datasafe-storage-impl-fs.jar"}, - {"pattern":"lib/datasafe-storage-impl-s3.jar"}, - {"pattern":"lib/datasafe-types-api.jar"}, - {"pattern":"lib/error_prone_annotations-2.2.0.jar"}, - {"pattern":"lib/failureaccess-1.0.1.jar"}, - {"pattern":"lib/gson-2.8.5.jar"}, - {"pattern":"lib/guava-27.0.1-jre.jar"}, - {"pattern":"lib/httpclient-4.5.5.jar"}, - {"pattern":"lib/httpcore-4.4.9.jar"}, - {"pattern":"lib/ion-java-1.0.2.jar"}, - {"pattern":"lib/j2objc-annotations-1.1.jar"}, - {"pattern":"lib/jackson-annotations-2.6.0.jar"}, - {"pattern":"lib/jackson-core-2.6.7.jar"}, - {"pattern":"lib/jackson-databind-2.6.7.2.jar"}, - {"pattern":"lib/jackson-dataformat-cbor-2.6.7.jar"}, - {"pattern":"lib/javax.inject-1.jar"}, - {"pattern":"lib/jmespath-java-1.11.538.jar"}, - {"pattern":"lib/joda-time-2.8.1.jar"}, - {"pattern":"lib/jsr305-3.0.0.jar"}, - {"pattern":"lib/listenablefuture-9999.0-empty-to-avoid-conflict-with-guava.jar"}, - {"pattern":"lib/lombok-1.18.6.jar"}, - {"pattern":"lib/slf4j-api-1.7.25.jar"}, - {"pattern":"lib/slf4j-simple-1.7.25.jar"}, - {"pattern":"mozilla/public-suffix-list.txt"}, - {"pattern":"org/apache/http/client/version.properties"}, - {"pattern":"org/bouncycastle/asn1/ASN1ApplicationSpecific.class"}, - {"pattern":"org/bouncycastle/asn1/ASN1BitString.class"}, - {"pattern":"org/bouncycastle/asn1/ASN1Boolean.class"}, - {"pattern":"org/bouncycastle/asn1/ASN1Choice.class"}, - {"pattern":"org/bouncycastle/asn1/ASN1Encodable.class"}, - {"pattern":"org/bouncycastle/asn1/ASN1EncodableVector.class"}, - {"pattern":"org/bouncycastle/asn1/ASN1Enumerated.class"}, - {"pattern":"org/bouncycastle/asn1/ASN1Exception.class"}, - {"pattern":"org/bouncycastle/asn1/ASN1GeneralizedTime.class"}, - {"pattern":"org/bouncycastle/asn1/ASN1Generator.class"}, - {"pattern":"org/bouncycastle/asn1/ASN1InputStream.class"}, - {"pattern":"org/bouncycastle/asn1/ASN1Integer.class"}, - {"pattern":"org/bouncycastle/asn1/ASN1Null.class"}, - {"pattern":"org/bouncycastle/asn1/ASN1Object.class"}, - {"pattern":"org/bouncycastle/asn1/ASN1ObjectIdentifier$OidHandle.class"}, - {"pattern":"org/bouncycastle/asn1/ASN1ObjectIdentifier.class"}, - {"pattern":"org/bouncycastle/asn1/ASN1OctetString.class"}, - {"pattern":"org/bouncycastle/asn1/ASN1OctetStringParser.class"}, - {"pattern":"org/bouncycastle/asn1/ASN1OutputStream$ImplicitOutputStream.class"}, - {"pattern":"org/bouncycastle/asn1/ASN1OutputStream.class"}, - {"pattern":"org/bouncycastle/asn1/ASN1ParsingException.class"}, - {"pattern":"org/bouncycastle/asn1/ASN1Primitive.class"}, - {"pattern":"org/bouncycastle/asn1/ASN1Sequence.class"}, - {"pattern":"org/bouncycastle/asn1/ASN1SequenceParser.class"}, - {"pattern":"org/bouncycastle/asn1/ASN1Set.class"}, - {"pattern":"org/bouncycastle/asn1/ASN1SetParser.class"}, - {"pattern":"org/bouncycastle/asn1/ASN1StreamParser.class"}, - {"pattern":"org/bouncycastle/asn1/ASN1String.class"}, - {"pattern":"org/bouncycastle/asn1/ASN1TaggedObject.class"}, - {"pattern":"org/bouncycastle/asn1/ASN1TaggedObjectParser.class"}, - {"pattern":"org/bouncycastle/asn1/ASN1UTCTime.class"}, - {"pattern":"org/bouncycastle/asn1/BERGenerator.class"}, - {"pattern":"org/bouncycastle/asn1/BEROctetString.class"}, - {"pattern":"org/bouncycastle/asn1/BEROctetStringGenerator$BufferedBEROctetStream.class"}, - {"pattern":"org/bouncycastle/asn1/BEROctetStringGenerator.class"}, - {"pattern":"org/bouncycastle/asn1/BEROctetStringParser.class"}, - {"pattern":"org/bouncycastle/asn1/BEROutputStream.class"}, - {"pattern":"org/bouncycastle/asn1/BERSequence.class"}, - {"pattern":"org/bouncycastle/asn1/BERSequenceGenerator.class"}, - {"pattern":"org/bouncycastle/asn1/BERSequenceParser.class"}, - {"pattern":"org/bouncycastle/asn1/BERSet.class"}, - {"pattern":"org/bouncycastle/asn1/BERTaggedObject.class"}, - {"pattern":"org/bouncycastle/asn1/BERTaggedObjectParser.class"}, - {"pattern":"org/bouncycastle/asn1/BERTags.class"}, - {"pattern":"org/bouncycastle/asn1/ConstructedOctetStream.class"}, - {"pattern":"org/bouncycastle/asn1/DERApplicationSpecific.class"}, - {"pattern":"org/bouncycastle/asn1/DERBMPString.class"}, - {"pattern":"org/bouncycastle/asn1/DERBitString.class"}, - {"pattern":"org/bouncycastle/asn1/DERExternal.class"}, - {"pattern":"org/bouncycastle/asn1/DERFactory.class"}, - {"pattern":"org/bouncycastle/asn1/DERGeneralString.class"}, - {"pattern":"org/bouncycastle/asn1/DERGeneralizedTime.class"}, - {"pattern":"org/bouncycastle/asn1/DERGraphicString.class"}, - {"pattern":"org/bouncycastle/asn1/DERIA5String.class"}, - {"pattern":"org/bouncycastle/asn1/DERNull.class"}, - {"pattern":"org/bouncycastle/asn1/DERNumericString.class"}, - {"pattern":"org/bouncycastle/asn1/DEROctetString.class"}, - {"pattern":"org/bouncycastle/asn1/DEROctetStringParser.class"}, - {"pattern":"org/bouncycastle/asn1/DEROutputStream.class"}, - {"pattern":"org/bouncycastle/asn1/DERPrintableString.class"}, - {"pattern":"org/bouncycastle/asn1/DERSequence.class"}, - {"pattern":"org/bouncycastle/asn1/DERSequenceParser.class"}, - {"pattern":"org/bouncycastle/asn1/DERSet.class"}, - {"pattern":"org/bouncycastle/asn1/DERSetParser.class"}, - {"pattern":"org/bouncycastle/asn1/DERT61String.class"}, - {"pattern":"org/bouncycastle/asn1/DERTaggedObject.class"}, - {"pattern":"org/bouncycastle/asn1/DERUTCTime.class"}, - {"pattern":"org/bouncycastle/asn1/DERUTF8String.class"}, - {"pattern":"org/bouncycastle/asn1/DERUniversalString.class"}, - {"pattern":"org/bouncycastle/asn1/DERVideotexString.class"}, - {"pattern":"org/bouncycastle/asn1/DERVisibleString.class"}, - {"pattern":"org/bouncycastle/asn1/DLBitString.class"}, - {"pattern":"org/bouncycastle/asn1/DLOutputStream.class"}, - {"pattern":"org/bouncycastle/asn1/DLSequence.class"}, - {"pattern":"org/bouncycastle/asn1/DLSet.class"}, - {"pattern":"org/bouncycastle/asn1/DLTaggedObject.class"}, - {"pattern":"org/bouncycastle/asn1/DefiniteLengthInputStream.class"}, - {"pattern":"org/bouncycastle/asn1/InMemoryRepresentable.class"}, - {"pattern":"org/bouncycastle/asn1/IndefiniteLengthInputStream.class"}, - {"pattern":"org/bouncycastle/asn1/LazyEncodedSequence.class"}, - {"pattern":"org/bouncycastle/asn1/LimitedInputStream.class"}, - {"pattern":"org/bouncycastle/asn1/OIDTokenizer.class"}, - {"pattern":"org/bouncycastle/asn1/StreamUtil.class"}, - {"pattern":"org/bouncycastle/asn1/bc/BCObjectIdentifiers.class"}, - {"pattern":"org/bouncycastle/asn1/bsi/BSIObjectIdentifiers.class"}, - {"pattern":"org/bouncycastle/asn1/cms/CMSObjectIdentifiers.class"}, - {"pattern":"org/bouncycastle/asn1/cms/ContentInfoParser.class"}, - {"pattern":"org/bouncycastle/asn1/cms/EncryptedContentInfoParser.class"}, - {"pattern":"org/bouncycastle/asn1/cms/EnvelopedDataParser.class"}, - {"pattern":"org/bouncycastle/asn1/cms/IssuerAndSerialNumber.class"}, - {"pattern":"org/bouncycastle/asn1/cms/KEKIdentifier.class"}, - {"pattern":"org/bouncycastle/asn1/cms/KEKRecipientInfo.class"}, - {"pattern":"org/bouncycastle/asn1/cms/KeyTransRecipientInfo.class"}, - {"pattern":"org/bouncycastle/asn1/cms/OtherRevocationInfoFormat.class"}, - {"pattern":"org/bouncycastle/asn1/cms/RecipientIdentifier.class"}, - {"pattern":"org/bouncycastle/asn1/cms/RecipientInfo.class"}, - {"pattern":"org/bouncycastle/asn1/cryptopro/CryptoProObjectIdentifiers.class"}, - {"pattern":"org/bouncycastle/asn1/eac/EACObjectIdentifiers.class"}, - {"pattern":"org/bouncycastle/asn1/gm/GMObjectIdentifiers.class"}, - {"pattern":"org/bouncycastle/asn1/gnu/GNUObjectIdentifiers.class"}, - {"pattern":"org/bouncycastle/asn1/iana/IANAObjectIdentifiers.class"}, - {"pattern":"org/bouncycastle/asn1/kisa/KISAObjectIdentifiers.class"}, - {"pattern":"org/bouncycastle/asn1/misc/MiscObjectIdentifiers.class"}, - {"pattern":"org/bouncycastle/asn1/nist/NISTObjectIdentifiers.class"}, - {"pattern":"org/bouncycastle/asn1/nsri/NSRIObjectIdentifiers.class"}, - {"pattern":"org/bouncycastle/asn1/ntt/NTTObjectIdentifiers.class"}, - {"pattern":"org/bouncycastle/asn1/oiw/OIWObjectIdentifiers.class"}, - {"pattern":"org/bouncycastle/asn1/pkcs/PKCSObjectIdentifiers.class"}, - {"pattern":"org/bouncycastle/asn1/pkcs/RSAPublicKey.class"}, - {"pattern":"org/bouncycastle/asn1/pkcs/RSASSAPSSparams.class"}, - {"pattern":"org/bouncycastle/asn1/rosstandart/RosstandartObjectIdentifiers.class"}, - {"pattern":"org/bouncycastle/asn1/sec/SECObjectIdentifiers.class"}, - {"pattern":"org/bouncycastle/asn1/teletrust/TeleTrusTObjectIdentifiers.class"}, - {"pattern":"org/bouncycastle/asn1/ua/UAObjectIdentifiers.class"}, - {"pattern":"org/bouncycastle/asn1/x500/RDN.class"}, - {"pattern":"org/bouncycastle/asn1/x500/X500Name.class"}, - {"pattern":"org/bouncycastle/asn1/x500/X500NameBuilder.class"}, - {"pattern":"org/bouncycastle/asn1/x500/X500NameStyle.class"}, - {"pattern":"org/bouncycastle/asn1/x500/style/AbstractX500NameStyle.class"}, - {"pattern":"org/bouncycastle/asn1/x500/style/BCStyle.class"}, - {"pattern":"org/bouncycastle/asn1/x509/AlgorithmIdentifier.class"}, - {"pattern":"org/bouncycastle/asn1/x509/AuthorityKeyIdentifier.class"}, - {"pattern":"org/bouncycastle/asn1/x509/BasicConstraints.class"}, - {"pattern":"org/bouncycastle/asn1/x509/Certificate.class"}, - {"pattern":"org/bouncycastle/asn1/x509/Extension.class"}, - {"pattern":"org/bouncycastle/asn1/x509/Extensions.class"}, - {"pattern":"org/bouncycastle/asn1/x509/ExtensionsGenerator.class"}, - {"pattern":"org/bouncycastle/asn1/x509/KeyUsage.class"}, - {"pattern":"org/bouncycastle/asn1/x509/SubjectKeyIdentifier.class"}, - {"pattern":"org/bouncycastle/asn1/x509/SubjectPublicKeyInfo.class"}, - {"pattern":"org/bouncycastle/asn1/x509/TBSCertificate.class"}, - {"pattern":"org/bouncycastle/asn1/x509/Time.class"}, - {"pattern":"org/bouncycastle/asn1/x509/V3TBSCertificateGenerator.class"}, - {"pattern":"org/bouncycastle/asn1/x509/X509Extension.class"}, - {"pattern":"org/bouncycastle/asn1/x509/X509ObjectIdentifiers.class"}, - {"pattern":"org/bouncycastle/asn1/x9/X9ObjectIdentifiers.class"}, - {"pattern":"org/bouncycastle/cert/CertException.class"}, - {"pattern":"org/bouncycastle/cert/CertIOException.class"}, - {"pattern":"org/bouncycastle/cert/CertRuntimeException.class"}, - {"pattern":"org/bouncycastle/cert/CertUtils.class"}, - {"pattern":"org/bouncycastle/cert/X509CRLHolder.class"}, - {"pattern":"org/bouncycastle/cert/X509CertificateHolder.class"}, - {"pattern":"org/bouncycastle/cert/X509ExtensionUtils.class"}, - {"pattern":"org/bouncycastle/cert/X509v3CertificateBuilder.class"}, - {"pattern":"org/bouncycastle/cert/jcajce/CertHelper.class"}, - {"pattern":"org/bouncycastle/cert/jcajce/DefaultCertHelper.class"}, - {"pattern":"org/bouncycastle/cert/jcajce/JcaX509CertificateConverter$ExCertificateException.class"}, - {"pattern":"org/bouncycastle/cert/jcajce/JcaX509CertificateConverter$ExCertificateParsingException.class"}, - {"pattern":"org/bouncycastle/cert/jcajce/JcaX509CertificateConverter.class"}, - {"pattern":"org/bouncycastle/cert/jcajce/JcaX509CertificateHolder.class"}, - {"pattern":"org/bouncycastle/cert/jcajce/JcaX509ExtensionUtils$SHA1DigestCalculator.class"}, - {"pattern":"org/bouncycastle/cert/jcajce/JcaX509ExtensionUtils.class"}, - {"pattern":"org/bouncycastle/cert/jcajce/JcaX509v3CertificateBuilder.class"}, - {"pattern":"org/bouncycastle/cert/jcajce/NamedCertHelper.class"}, - {"pattern":"org/bouncycastle/cert/jcajce/ProviderCertHelper.class"}, - {"pattern":"org/bouncycastle/cert/selector/X509CertificateHolderSelector.class"}, - {"pattern":"org/bouncycastle/cms/CMSAlgorithm.class"}, - {"pattern":"org/bouncycastle/cms/CMSContentInfoParser.class"}, - {"pattern":"org/bouncycastle/cms/CMSEnvelopedDataParser.class"}, - {"pattern":"org/bouncycastle/cms/CMSEnvelopedDataStreamGenerator$CmsEnvelopedDataOutputStream.class"}, - {"pattern":"org/bouncycastle/cms/CMSEnvelopedDataStreamGenerator.class"}, - {"pattern":"org/bouncycastle/cms/CMSEnvelopedGenerator.class"}, - {"pattern":"org/bouncycastle/cms/CMSEnvelopedHelper$CMSEnvelopedSecureReadable.class"}, - {"pattern":"org/bouncycastle/cms/CMSEnvelopedHelper.class"}, - {"pattern":"org/bouncycastle/cms/CMSException.class"}, - {"pattern":"org/bouncycastle/cms/CMSProcessable.class"}, - {"pattern":"org/bouncycastle/cms/CMSProcessableInputStream.class"}, - {"pattern":"org/bouncycastle/cms/CMSReadable.class"}, - {"pattern":"org/bouncycastle/cms/CMSSecureReadable.class"}, - {"pattern":"org/bouncycastle/cms/CMSTypedStream$FullReaderStream.class"}, - {"pattern":"org/bouncycastle/cms/CMSTypedStream.class"}, - {"pattern":"org/bouncycastle/cms/CMSUtils.class"}, - {"pattern":"org/bouncycastle/cms/KEKRecipient.class"}, - {"pattern":"org/bouncycastle/cms/KEKRecipientId.class"}, - {"pattern":"org/bouncycastle/cms/KEKRecipientInfoGenerator.class"}, - {"pattern":"org/bouncycastle/cms/KEKRecipientInformation.class"}, - {"pattern":"org/bouncycastle/cms/KeyTransRecipient.class"}, - {"pattern":"org/bouncycastle/cms/KeyTransRecipientId.class"}, - {"pattern":"org/bouncycastle/cms/KeyTransRecipientInfoGenerator.class"}, - {"pattern":"org/bouncycastle/cms/KeyTransRecipientInformation.class"}, - {"pattern":"org/bouncycastle/cms/NullOutputStream.class"}, - {"pattern":"org/bouncycastle/cms/PasswordRecipient$PRF.class"}, - {"pattern":"org/bouncycastle/cms/Recipient.class"}, - {"pattern":"org/bouncycastle/cms/RecipientId.class"}, - {"pattern":"org/bouncycastle/cms/RecipientInfoGenerator.class"}, - {"pattern":"org/bouncycastle/cms/RecipientInformation.class"}, - {"pattern":"org/bouncycastle/cms/RecipientInformationStore.class"}, - {"pattern":"org/bouncycastle/cms/RecipientOperator.class"}, - {"pattern":"org/bouncycastle/cms/jcajce/CMSUtils.class"}, - {"pattern":"org/bouncycastle/cms/jcajce/DefaultJcaJceExtHelper.class"}, - {"pattern":"org/bouncycastle/cms/jcajce/EnvelopedDataHelper$1.class"}, - {"pattern":"org/bouncycastle/cms/jcajce/EnvelopedDataHelper$JCECallback.class"}, - {"pattern":"org/bouncycastle/cms/jcajce/EnvelopedDataHelper.class"}, - {"pattern":"org/bouncycastle/cms/jcajce/JcaJceExtHelper.class"}, - {"pattern":"org/bouncycastle/cms/jcajce/JceCMSContentEncryptorBuilder$CMSOutputEncryptor.class"}, - {"pattern":"org/bouncycastle/cms/jcajce/JceCMSContentEncryptorBuilder.class"}, - {"pattern":"org/bouncycastle/cms/jcajce/JceKEKEnvelopedRecipient$1.class"}, - {"pattern":"org/bouncycastle/cms/jcajce/JceKEKEnvelopedRecipient.class"}, - {"pattern":"org/bouncycastle/cms/jcajce/JceKEKRecipient.class"}, - {"pattern":"org/bouncycastle/cms/jcajce/JceKEKRecipientInfoGenerator.class"}, - {"pattern":"org/bouncycastle/cms/jcajce/JceKeyTransEnvelopedRecipient$1.class"}, - {"pattern":"org/bouncycastle/cms/jcajce/JceKeyTransEnvelopedRecipient.class"}, - {"pattern":"org/bouncycastle/cms/jcajce/JceKeyTransRecipient.class"}, - {"pattern":"org/bouncycastle/cms/jcajce/JceKeyTransRecipientInfoGenerator.class"}, - {"pattern":"org/bouncycastle/cms/jcajce/ProviderJcaJceExtHelper.class"}, - {"pattern":"org/bouncycastle/crypto/CipherParameters.class"}, - {"pattern":"org/bouncycastle/crypto/Digest.class"}, - {"pattern":"org/bouncycastle/crypto/io/CipherIOException.class"}, - {"pattern":"org/bouncycastle/crypto/io/InvalidCipherTextIOException.class"}, - {"pattern":"org/bouncycastle/crypto/params/AsymmetricKeyParameter.class"}, - {"pattern":"org/bouncycastle/crypto/params/DSAKeyParameters.class"}, - {"pattern":"org/bouncycastle/crypto/params/DSAPrivateKeyParameters.class"}, - {"pattern":"org/bouncycastle/crypto/params/DSAPublicKeyParameters.class"}, - {"pattern":"org/bouncycastle/crypto/params/RSAKeyParameters.class"}, - {"pattern":"org/bouncycastle/crypto/params/RSAPrivateCrtKeyParameters.class"}, - {"pattern":"org/bouncycastle/crypto/prng/SP800SecureRandom.class"}, - {"pattern":"org/bouncycastle/jcajce/io/CipherInputStream.class"}, - {"pattern":"org/bouncycastle/jcajce/provider/asymmetric/DH$Mappings.class"}, - {"pattern":"org/bouncycastle/jcajce/provider/asymmetric/DH.class"}, - {"pattern":"org/bouncycastle/jcajce/provider/asymmetric/DSA$Mappings.class"}, - {"pattern":"org/bouncycastle/jcajce/provider/asymmetric/DSTU4145$Mappings.class"}, - {"pattern":"org/bouncycastle/jcajce/provider/asymmetric/EC$Mappings.class"}, - {"pattern":"org/bouncycastle/jcajce/provider/asymmetric/EC.class"}, - {"pattern":"org/bouncycastle/jcajce/provider/asymmetric/ECGOST$Mappings.class"}, - {"pattern":"org/bouncycastle/jcajce/provider/asymmetric/ElGamal$Mappings.class"}, - {"pattern":"org/bouncycastle/jcajce/provider/asymmetric/GM$Mappings.class"}, - {"pattern":"org/bouncycastle/jcajce/provider/asymmetric/GOST$Mappings.class"}, - {"pattern":"org/bouncycastle/jcajce/provider/asymmetric/IES$Mappings.class"}, - {"pattern":"org/bouncycastle/jcajce/provider/asymmetric/RSA$Mappings.class"}, - {"pattern":"org/bouncycastle/jcajce/provider/asymmetric/RSA.class"}, - {"pattern":"org/bouncycastle/jcajce/provider/asymmetric/X509$Mappings.class"}, - {"pattern":"org/bouncycastle/jcajce/provider/asymmetric/dh/KeyFactorySpi.class"}, - {"pattern":"org/bouncycastle/jcajce/provider/asymmetric/dsa/DSAUtil.class"}, - {"pattern":"org/bouncycastle/jcajce/provider/asymmetric/dsa/KeyFactorySpi$1.class"}, - {"pattern":"org/bouncycastle/jcajce/provider/asymmetric/dsa/KeyFactorySpi.class"}, - {"pattern":"org/bouncycastle/jcajce/provider/asymmetric/dstu/KeyFactorySpi.class"}, - {"pattern":"org/bouncycastle/jcajce/provider/asymmetric/ec/KeyFactorySpi$EC.class"}, - {"pattern":"org/bouncycastle/jcajce/provider/asymmetric/ec/KeyFactorySpi$ECMQV.class"}, - {"pattern":"org/bouncycastle/jcajce/provider/asymmetric/ec/KeyFactorySpi.class"}, - {"pattern":"org/bouncycastle/jcajce/provider/asymmetric/ecgost/KeyFactorySpi.class"}, - {"pattern":"org/bouncycastle/jcajce/provider/asymmetric/ecgost12/KeyFactorySpi.class"}, - {"pattern":"org/bouncycastle/jcajce/provider/asymmetric/elgamal/KeyFactorySpi.class"}, - {"pattern":"org/bouncycastle/jcajce/provider/asymmetric/gost/KeyFactorySpi.class"}, - {"pattern":"org/bouncycastle/jcajce/provider/asymmetric/rsa/BCRSAPublicKey.class"}, - {"pattern":"org/bouncycastle/jcajce/provider/asymmetric/rsa/KeyFactorySpi.class"}, - {"pattern":"org/bouncycastle/jcajce/provider/asymmetric/rsa/RSAUtil.class"}, - {"pattern":"org/bouncycastle/jcajce/provider/asymmetric/util/BaseKeyFactorySpi.class"}, - {"pattern":"org/bouncycastle/jcajce/provider/asymmetric/util/ExtendedInvalidKeySpecException.class"}, - {"pattern":"org/bouncycastle/jcajce/provider/asymmetric/util/KeyUtil.class"}, - {"pattern":"org/bouncycastle/jcajce/provider/config/ProviderConfiguration.class"}, - {"pattern":"org/bouncycastle/jcajce/provider/config/ProviderConfigurationPermission.class"}, - {"pattern":"org/bouncycastle/jcajce/provider/digest/Blake2b$Mappings.class"}, - {"pattern":"org/bouncycastle/jcajce/provider/digest/DSTU7564$Mappings.class"}, - {"pattern":"org/bouncycastle/jcajce/provider/digest/DigestAlgorithmProvider.class"}, - {"pattern":"org/bouncycastle/jcajce/provider/digest/GOST3411$Mappings.class"}, - {"pattern":"org/bouncycastle/jcajce/provider/digest/Keccak$Mappings.class"}, - {"pattern":"org/bouncycastle/jcajce/provider/digest/MD2$Mappings.class"}, - {"pattern":"org/bouncycastle/jcajce/provider/digest/MD4$Mappings.class"}, - {"pattern":"org/bouncycastle/jcajce/provider/digest/MD5$Mappings.class"}, - {"pattern":"org/bouncycastle/jcajce/provider/digest/RIPEMD128$Mappings.class"}, - {"pattern":"org/bouncycastle/jcajce/provider/digest/RIPEMD160$Mappings.class"}, - {"pattern":"org/bouncycastle/jcajce/provider/digest/RIPEMD256$Mappings.class"}, - {"pattern":"org/bouncycastle/jcajce/provider/digest/RIPEMD320$Mappings.class"}, - {"pattern":"org/bouncycastle/jcajce/provider/digest/SHA1$Mappings.class"}, - {"pattern":"org/bouncycastle/jcajce/provider/digest/SHA224$Mappings.class"}, - {"pattern":"org/bouncycastle/jcajce/provider/digest/SHA256$Mappings.class"}, - {"pattern":"org/bouncycastle/jcajce/provider/digest/SHA3$Mappings.class"}, - {"pattern":"org/bouncycastle/jcajce/provider/digest/SHA384$Mappings.class"}, - {"pattern":"org/bouncycastle/jcajce/provider/digest/SHA512$Mappings.class"}, - {"pattern":"org/bouncycastle/jcajce/provider/digest/SM3$Mappings.class"}, - {"pattern":"org/bouncycastle/jcajce/provider/digest/Skein$Mappings.class"}, - {"pattern":"org/bouncycastle/jcajce/provider/digest/Tiger$Mappings.class"}, - {"pattern":"org/bouncycastle/jcajce/provider/digest/Whirlpool$Mappings.class"}, - {"pattern":"org/bouncycastle/jcajce/provider/drbg/DRBG$CoreSecureRandom.class"}, - {"pattern":"org/bouncycastle/jcajce/provider/drbg/DRBG$HybridSecureRandom.class"}, - {"pattern":"org/bouncycastle/jcajce/provider/drbg/DRBG$Mappings.class"}, - {"pattern":"org/bouncycastle/jcajce/provider/drbg/DRBG.class"}, - {"pattern":"org/bouncycastle/jcajce/provider/keystore/BC$Mappings.class"}, - {"pattern":"org/bouncycastle/jcajce/provider/keystore/BCFKS$Mappings.class"}, - {"pattern":"org/bouncycastle/jcajce/provider/keystore/PKCS12$Mappings.class"}, - {"pattern":"org/bouncycastle/jcajce/provider/symmetric/AES$Mappings.class"}, - {"pattern":"org/bouncycastle/jcajce/provider/symmetric/ARC4$Mappings.class"}, - {"pattern":"org/bouncycastle/jcajce/provider/symmetric/ARIA$Mappings.class"}, - {"pattern":"org/bouncycastle/jcajce/provider/symmetric/Blowfish$Mappings.class"}, - {"pattern":"org/bouncycastle/jcajce/provider/symmetric/CAST5$Mappings.class"}, - {"pattern":"org/bouncycastle/jcajce/provider/symmetric/CAST6$Mappings.class"}, - {"pattern":"org/bouncycastle/jcajce/provider/symmetric/Camellia$Mappings.class"}, - {"pattern":"org/bouncycastle/jcajce/provider/symmetric/ChaCha$Mappings.class"}, - {"pattern":"org/bouncycastle/jcajce/provider/symmetric/DES$Mappings.class"}, - {"pattern":"org/bouncycastle/jcajce/provider/symmetric/DESede$Mappings.class"}, - {"pattern":"org/bouncycastle/jcajce/provider/symmetric/DSTU7624$Mappings.class"}, - {"pattern":"org/bouncycastle/jcajce/provider/symmetric/GOST28147$Mappings.class"}, - {"pattern":"org/bouncycastle/jcajce/provider/symmetric/Grain128$Mappings.class"}, - {"pattern":"org/bouncycastle/jcajce/provider/symmetric/Grainv1$Mappings.class"}, - {"pattern":"org/bouncycastle/jcajce/provider/symmetric/HC128$Mappings.class"}, - {"pattern":"org/bouncycastle/jcajce/provider/symmetric/HC256$Mappings.class"}, - {"pattern":"org/bouncycastle/jcajce/provider/symmetric/IDEA$Mappings.class"}, - {"pattern":"org/bouncycastle/jcajce/provider/symmetric/Noekeon$Mappings.class"}, - {"pattern":"org/bouncycastle/jcajce/provider/symmetric/OpenSSLPBKDF$Mappings.class"}, - {"pattern":"org/bouncycastle/jcajce/provider/symmetric/PBEPBKDF1$Mappings.class"}, - {"pattern":"org/bouncycastle/jcajce/provider/symmetric/PBEPBKDF2$Mappings.class"}, - {"pattern":"org/bouncycastle/jcajce/provider/symmetric/PBEPKCS12$Mappings.class"}, - {"pattern":"org/bouncycastle/jcajce/provider/symmetric/Poly1305$Mappings.class"}, - {"pattern":"org/bouncycastle/jcajce/provider/symmetric/RC2$Mappings.class"}, - {"pattern":"org/bouncycastle/jcajce/provider/symmetric/RC5$Mappings.class"}, - {"pattern":"org/bouncycastle/jcajce/provider/symmetric/RC6$Mappings.class"}, - {"pattern":"org/bouncycastle/jcajce/provider/symmetric/Rijndael$Mappings.class"}, - {"pattern":"org/bouncycastle/jcajce/provider/symmetric/SEED$Mappings.class"}, - {"pattern":"org/bouncycastle/jcajce/provider/symmetric/SM4$Mappings.class"}, - {"pattern":"org/bouncycastle/jcajce/provider/symmetric/Salsa20$Mappings.class"}, - {"pattern":"org/bouncycastle/jcajce/provider/symmetric/Serpent$Mappings.class"}, - {"pattern":"org/bouncycastle/jcajce/provider/symmetric/Shacal2$Mappings.class"}, - {"pattern":"org/bouncycastle/jcajce/provider/symmetric/SipHash$Mappings.class"}, - {"pattern":"org/bouncycastle/jcajce/provider/symmetric/Skipjack$Mappings.class"}, - {"pattern":"org/bouncycastle/jcajce/provider/symmetric/SymmetricAlgorithmProvider.class"}, - {"pattern":"org/bouncycastle/jcajce/provider/symmetric/TEA$Mappings.class"}, - {"pattern":"org/bouncycastle/jcajce/provider/symmetric/TLSKDF$Mappings.class"}, - {"pattern":"org/bouncycastle/jcajce/provider/symmetric/Threefish$Mappings.class"}, - {"pattern":"org/bouncycastle/jcajce/provider/symmetric/Twofish$Mappings.class"}, - {"pattern":"org/bouncycastle/jcajce/provider/symmetric/VMPC$Mappings.class"}, - {"pattern":"org/bouncycastle/jcajce/provider/symmetric/VMPCKSA3$Mappings.class"}, - {"pattern":"org/bouncycastle/jcajce/provider/symmetric/XSalsa20$Mappings.class"}, - {"pattern":"org/bouncycastle/jcajce/provider/symmetric/XTEA$Mappings.class"}, - {"pattern":"org/bouncycastle/jcajce/provider/symmetric/util/ClassUtil.class"}, - {"pattern":"org/bouncycastle/jcajce/provider/util/AlgorithmProvider.class"}, - {"pattern":"org/bouncycastle/jcajce/provider/util/AsymmetricAlgorithmProvider.class"}, - {"pattern":"org/bouncycastle/jcajce/provider/util/AsymmetricKeyInfoConverter.class"}, - {"pattern":"org/bouncycastle/jcajce/util/AlgorithmParametersUtils.class"}, - {"pattern":"org/bouncycastle/jcajce/util/DefaultJcaJceHelper.class"}, - {"pattern":"org/bouncycastle/jcajce/util/JcaJceHelper.class"}, - {"pattern":"org/bouncycastle/jcajce/util/ProviderJcaJceHelper.class"}, - {"pattern":"org/bouncycastle/jce/provider/BouncyCastleProvider$1.class"}, - {"pattern":"org/bouncycastle/jce/provider/BouncyCastleProviderConfiguration.class"}, - {"pattern":"org/bouncycastle/operator/AsymmetricKeyUnwrapper.class"}, - {"pattern":"org/bouncycastle/operator/AsymmetricKeyWrapper.class"}, - {"pattern":"org/bouncycastle/operator/ContentSigner.class"}, - {"pattern":"org/bouncycastle/operator/DefaultSecretKeySizeProvider.class"}, - {"pattern":"org/bouncycastle/operator/DefaultSignatureAlgorithmIdentifierFinder.class"}, - {"pattern":"org/bouncycastle/operator/DigestCalculator.class"}, - {"pattern":"org/bouncycastle/operator/GenericKey.class"}, - {"pattern":"org/bouncycastle/operator/InputDecryptor.class"}, - {"pattern":"org/bouncycastle/operator/KeyUnwrapper.class"}, - {"pattern":"org/bouncycastle/operator/KeyWrapper.class"}, - {"pattern":"org/bouncycastle/operator/OperatorCreationException.class"}, - {"pattern":"org/bouncycastle/operator/OperatorException.class"}, - {"pattern":"org/bouncycastle/operator/OperatorStreamException.class"}, - {"pattern":"org/bouncycastle/operator/OutputEncryptor.class"}, - {"pattern":"org/bouncycastle/operator/RuntimeOperatorException.class"}, - {"pattern":"org/bouncycastle/operator/SecretKeySizeProvider.class"}, - {"pattern":"org/bouncycastle/operator/SignatureAlgorithmIdentifierFinder.class"}, - {"pattern":"org/bouncycastle/operator/SymmetricKeyUnwrapper.class"}, - {"pattern":"org/bouncycastle/operator/SymmetricKeyWrapper.class"}, - {"pattern":"org/bouncycastle/operator/jcajce/JcaContentSignerBuilder$1.class"}, - {"pattern":"org/bouncycastle/operator/jcajce/JcaContentSignerBuilder$SignatureOutputStream.class"}, - {"pattern":"org/bouncycastle/operator/jcajce/JcaContentSignerBuilder.class"}, - {"pattern":"org/bouncycastle/operator/jcajce/JceAsymmetricKeyUnwrapper.class"}, - {"pattern":"org/bouncycastle/operator/jcajce/JceAsymmetricKeyWrapper.class"}, - {"pattern":"org/bouncycastle/operator/jcajce/JceGenericKey.class"}, - {"pattern":"org/bouncycastle/operator/jcajce/JceSymmetricKeyUnwrapper.class"}, - {"pattern":"org/bouncycastle/operator/jcajce/JceSymmetricKeyWrapper.class"}, - {"pattern":"org/bouncycastle/operator/jcajce/OperatorHelper$OpCertificateException.class"}, - {"pattern":"org/bouncycastle/operator/jcajce/OperatorHelper.class"}, - {"pattern":"org/bouncycastle/operator/jcajce/OperatorUtils.class"}, - {"pattern":"org/bouncycastle/pqc/asn1/PQCObjectIdentifiers.class"}, - {"pattern":"org/bouncycastle/pqc/jcajce/provider/mceliece/McElieceCCA2KeyFactorySpi.class"}, - {"pattern":"org/bouncycastle/pqc/jcajce/provider/mceliece/McElieceKeyFactorySpi.class"}, - {"pattern":"org/bouncycastle/pqc/jcajce/provider/newhope/NHKeyFactorySpi.class"}, - {"pattern":"org/bouncycastle/pqc/jcajce/provider/rainbow/RainbowKeyFactorySpi.class"}, - {"pattern":"org/bouncycastle/pqc/jcajce/provider/sphincs/Sphincs256KeyFactorySpi.class"}, - {"pattern":"org/bouncycastle/pqc/jcajce/provider/xmss/XMSSKeyFactorySpi.class"}, - {"pattern":"org/bouncycastle/pqc/jcajce/provider/xmss/XMSSMTKeyFactorySpi.class"}, - {"pattern":"org/bouncycastle/util/Arrays.class"}, - {"pattern":"org/bouncycastle/util/Encodable.class"}, - {"pattern":"org/bouncycastle/util/Integers.class"}, - {"pattern":"org/bouncycastle/util/Iterable.class"}, - {"pattern":"org/bouncycastle/util/Properties$1.class"}, - {"pattern":"org/bouncycastle/util/Properties.class"}, - {"pattern":"org/bouncycastle/util/Selector.class"}, - {"pattern":"org/bouncycastle/util/StringList.class"}, - {"pattern":"org/bouncycastle/util/Strings$1.class"}, - {"pattern":"org/bouncycastle/util/Strings.class"}, - {"pattern":"org/bouncycastle/util/io/StreamOverflowException.class"}, - {"pattern":"org/bouncycastle/util/io/Streams.class"}, - {"pattern":"org/bouncycastle/util/io/TeeInputStream.class"}, - {"pattern":"org/bouncycastle/util/io/TeeOutputStream.class"}, - {"pattern":"org/joda/time/tz/data/Europe/Kiev"}, - {"pattern":"org/joda/time/tz/data/ZoneInfoMap"}, - {"pattern":"org/slf4j/impl/StaticLoggerBinder.class"}, - {"pattern":"sun/net/idn/uidna.spp"}, - {"pattern":"sun/text/resources/unorm.icu"} + "resources": [ + { + "pattern": "META-INF/MANIFEST.MF" + }, + { + "pattern": "com/amazonaws/internal/config/awssdk_config_default.json" + }, + { + "pattern": "com/amazonaws/partitions/endpoints.json" + }, + { + "pattern": "com/amazonaws/sdk/versionInfo.properties" + }, + { + "pattern": "de/adorsys/datasafe/cli/Cli$DataOnS3.class" + }, + { + "pattern": "javax/crypto/Cipher.class" + }, + { + "pattern": "lib/animal-sniffer-annotations-1.17.jar" + }, + { + "pattern": "lib/aws-java-sdk-core-1.11.538.jar" + }, + { + "pattern": "lib/aws-java-sdk-kms-1.11.538.jar" + }, + { + "pattern": "lib/aws-java-sdk-s3-1.11.538.jar" + }, + { + "pattern": "lib/bcpkix-jdk15on-1.58.jar" + }, + { + "pattern": "lib/bcprov-jdk15on-1.58.jar" + }, + { + "pattern": "lib/checker-qual-2.5.2.jar" + }, + { + "pattern": "lib/commons-codec-1.10.jar" + }, + { + "pattern": "lib/commons-lang3-3.5.jar" + }, + { + "pattern": "lib/commons-logging-1.1.3.jar" + }, + { + "pattern": "lib/dagger-2.17.jar" + }, + { + "pattern": "lib/datasafe-business.jar" + }, + { + "pattern": "lib/datasafe-directory-api.jar" + }, + { + "pattern": "lib/datasafe-directory-impl.jar" + }, + { + "pattern": "lib/datasafe-encryption-api.jar" + }, + { + "pattern": "lib/datasafe-encryption-impl.jar" + }, + { + "pattern": "lib/datasafe-inbox-api.jar" + }, + { + "pattern": "lib/datasafe-inbox-impl.jar" + }, + { + "pattern": "lib/datasafe-metainfo-version-api.jar" + }, + { + "pattern": "lib/datasafe-metainfo-version-impl.jar" + }, + { + "pattern": "lib/datasafe-privatestore-api.jar" + }, + { + "pattern": "lib/datasafe-privatestore-impl.jar" + }, + { + "pattern": "lib/datasafe-storage-api.jar" + }, + { + "pattern": "lib/datasafe-storage-impl-fs.jar" + }, + { + "pattern": "lib/datasafe-storage-impl-s3.jar" + }, + { + "pattern": "lib/datasafe-types-api.jar" + }, + { + "pattern": "lib/error_prone_annotations-2.2.0.jar" + }, + { + "pattern": "lib/failureaccess-1.0.1.jar" + }, + { + "pattern": "lib/gson-2.8.5.jar" + }, + { + "pattern": "lib/guava-27.0.1-jre.jar" + }, + { + "pattern": "lib/httpclient-4.5.5.jar" + }, + { + "pattern": "lib/httpcore-4.4.9.jar" + }, + { + "pattern": "lib/ion-java-1.0.2.jar" + }, + { + "pattern": "lib/j2objc-annotations-1.1.jar" + }, + { + "pattern": "lib/jackson-annotations-2.6.0.jar" + }, + { + "pattern": "lib/jackson-core-2.6.7.jar" + }, + { + "pattern": "lib/jackson-databind-2.6.7.2.jar" + }, + { + "pattern": "lib/jackson-dataformat-cbor-2.6.7.jar" + }, + { + "pattern": "lib/javax.inject-1.jar" + }, + { + "pattern": "lib/jmespath-java-1.11.538.jar" + }, + { + "pattern": "lib/joda-time-2.8.1.jar" + }, + { + "pattern": "lib/jsr305-3.0.0.jar" + }, + { + "pattern": "lib/listenablefuture-9999.0-empty-to-avoid-conflict-with-guava.jar" + }, + { + "pattern": "lib/lombok-1.18.6.jar" + }, + { + "pattern": "lib/slf4j-api-1.7.25.jar" + }, + { + "pattern": "lib/slf4j-simple-1.7.25.jar" + }, + { + "pattern": "mozilla/public-suffix-list.txt" + }, + { + "pattern": "org/apache/http/client/version.properties" + }, + { + "pattern": "org/bouncycastle/asn1/ASN1ApplicationSpecific.class" + }, + { + "pattern": "org/bouncycastle/asn1/ASN1BitString.class" + }, + { + "pattern": "org/bouncycastle/asn1/ASN1Boolean.class" + }, + { + "pattern": "org/bouncycastle/asn1/ASN1Choice.class" + }, + { + "pattern": "org/bouncycastle/asn1/ASN1Encodable.class" + }, + { + "pattern": "org/bouncycastle/asn1/ASN1EncodableVector.class" + }, + { + "pattern": "org/bouncycastle/asn1/ASN1Enumerated.class" + }, + { + "pattern": "org/bouncycastle/asn1/ASN1Exception.class" + }, + { + "pattern": "org/bouncycastle/asn1/ASN1GeneralizedTime.class" + }, + { + "pattern": "org/bouncycastle/asn1/ASN1Generator.class" + }, + { + "pattern": "org/bouncycastle/asn1/ASN1InputStream.class" + }, + { + "pattern": "org/bouncycastle/asn1/ASN1Integer.class" + }, + { + "pattern": "org/bouncycastle/asn1/ASN1Null.class" + }, + { + "pattern": "org/bouncycastle/asn1/ASN1Object.class" + }, + { + "pattern": "org/bouncycastle/asn1/ASN1ObjectIdentifier$OidHandle.class" + }, + { + "pattern": "org/bouncycastle/asn1/ASN1ObjectIdentifier.class" + }, + { + "pattern": "org/bouncycastle/asn1/ASN1OctetString.class" + }, + { + "pattern": "org/bouncycastle/asn1/ASN1OctetStringParser.class" + }, + { + "pattern": "org/bouncycastle/asn1/ASN1OutputStream$ImplicitOutputStream.class" + }, + { + "pattern": "org/bouncycastle/asn1/ASN1OutputStream.class" + }, + { + "pattern": "org/bouncycastle/asn1/ASN1ParsingException.class" + }, + { + "pattern": "org/bouncycastle/asn1/ASN1Primitive.class" + }, + { + "pattern": "org/bouncycastle/asn1/ASN1Sequence.class" + }, + { + "pattern": "org/bouncycastle/asn1/ASN1SequenceParser.class" + }, + { + "pattern": "org/bouncycastle/asn1/ASN1Set.class" + }, + { + "pattern": "org/bouncycastle/asn1/ASN1SetParser.class" + }, + { + "pattern": "org/bouncycastle/asn1/ASN1StreamParser.class" + }, + { + "pattern": "org/bouncycastle/asn1/ASN1String.class" + }, + { + "pattern": "org/bouncycastle/asn1/ASN1TaggedObject.class" + }, + { + "pattern": "org/bouncycastle/asn1/ASN1TaggedObjectParser.class" + }, + { + "pattern": "org/bouncycastle/asn1/ASN1UTCTime.class" + }, + { + "pattern": "org/bouncycastle/asn1/BERGenerator.class" + }, + { + "pattern": "org/bouncycastle/asn1/BEROctetString.class" + }, + { + "pattern": "org/bouncycastle/asn1/BEROctetStringGenerator$BufferedBEROctetStream.class" + }, + { + "pattern": "org/bouncycastle/asn1/BEROctetStringGenerator.class" + }, + { + "pattern": "org/bouncycastle/asn1/BEROctetStringParser.class" + }, + { + "pattern": "org/bouncycastle/asn1/BEROutputStream.class" + }, + { + "pattern": "org/bouncycastle/asn1/BERSequence.class" + }, + { + "pattern": "org/bouncycastle/asn1/BERSequenceGenerator.class" + }, + { + "pattern": "org/bouncycastle/asn1/BERSequenceParser.class" + }, + { + "pattern": "org/bouncycastle/asn1/BERSet.class" + }, + { + "pattern": "org/bouncycastle/asn1/BERTaggedObject.class" + }, + { + "pattern": "org/bouncycastle/asn1/BERTaggedObjectParser.class" + }, + { + "pattern": "org/bouncycastle/asn1/BERTags.class" + }, + { + "pattern": "org/bouncycastle/asn1/ConstructedOctetStream.class" + }, + { + "pattern": "org/bouncycastle/asn1/DERApplicationSpecific.class" + }, + { + "pattern": "org/bouncycastle/asn1/DERBMPString.class" + }, + { + "pattern": "org/bouncycastle/asn1/DERBitString.class" + }, + { + "pattern": "org/bouncycastle/asn1/DERExternal.class" + }, + { + "pattern": "org/bouncycastle/asn1/DERFactory.class" + }, + { + "pattern": "org/bouncycastle/asn1/DERGeneralString.class" + }, + { + "pattern": "org/bouncycastle/asn1/DERGeneralizedTime.class" + }, + { + "pattern": "org/bouncycastle/asn1/DERGraphicString.class" + }, + { + "pattern": "org/bouncycastle/asn1/DERIA5String.class" + }, + { + "pattern": "org/bouncycastle/asn1/DERNull.class" + }, + { + "pattern": "org/bouncycastle/asn1/DERNumericString.class" + }, + { + "pattern": "org/bouncycastle/asn1/DEROctetString.class" + }, + { + "pattern": "org/bouncycastle/asn1/DEROctetStringParser.class" + }, + { + "pattern": "org/bouncycastle/asn1/DEROutputStream.class" + }, + { + "pattern": "org/bouncycastle/asn1/DERPrintableString.class" + }, + { + "pattern": "org/bouncycastle/asn1/DERSequence.class" + }, + { + "pattern": "org/bouncycastle/asn1/DERSequenceParser.class" + }, + { + "pattern": "org/bouncycastle/asn1/DERSet.class" + }, + { + "pattern": "org/bouncycastle/asn1/DERSetParser.class" + }, + { + "pattern": "org/bouncycastle/asn1/DERT61String.class" + }, + { + "pattern": "org/bouncycastle/asn1/DERTaggedObject.class" + }, + { + "pattern": "org/bouncycastle/asn1/DERUTCTime.class" + }, + { + "pattern": "org/bouncycastle/asn1/DERUTF8String.class" + }, + { + "pattern": "org/bouncycastle/asn1/DERUniversalString.class" + }, + { + "pattern": "org/bouncycastle/asn1/DERVideotexString.class" + }, + { + "pattern": "org/bouncycastle/asn1/DERVisibleString.class" + }, + { + "pattern": "org/bouncycastle/asn1/DLBitString.class" + }, + { + "pattern": "org/bouncycastle/asn1/DLOutputStream.class" + }, + { + "pattern": "org/bouncycastle/asn1/DLSequence.class" + }, + { + "pattern": "org/bouncycastle/asn1/DLSet.class" + }, + { + "pattern": "org/bouncycastle/asn1/DLTaggedObject.class" + }, + { + "pattern": "org/bouncycastle/asn1/DefiniteLengthInputStream.class" + }, + { + "pattern": "org/bouncycastle/asn1/InMemoryRepresentable.class" + }, + { + "pattern": "org/bouncycastle/asn1/IndefiniteLengthInputStream.class" + }, + { + "pattern": "org/bouncycastle/asn1/LazyEncodedSequence.class" + }, + { + "pattern": "org/bouncycastle/asn1/LimitedInputStream.class" + }, + { + "pattern": "org/bouncycastle/asn1/OIDTokenizer.class" + }, + { + "pattern": "org/bouncycastle/asn1/StreamUtil.class" + }, + { + "pattern": "org/bouncycastle/asn1/bc/BCObjectIdentifiers.class" + }, + { + "pattern": "org/bouncycastle/asn1/bsi/BSIObjectIdentifiers.class" + }, + { + "pattern": "org/bouncycastle/asn1/cms/CMSObjectIdentifiers.class" + }, + { + "pattern": "org/bouncycastle/asn1/cms/ContentInfoParser.class" + }, + { + "pattern": "org/bouncycastle/asn1/cms/EncryptedContentInfoParser.class" + }, + { + "pattern": "org/bouncycastle/asn1/cms/EnvelopedDataParser.class" + }, + { + "pattern": "org/bouncycastle/asn1/cms/IssuerAndSerialNumber.class" + }, + { + "pattern": "org/bouncycastle/asn1/cms/KEKIdentifier.class" + }, + { + "pattern": "org/bouncycastle/asn1/cms/KEKRecipientInfo.class" + }, + { + "pattern": "org/bouncycastle/asn1/cms/KeyTransRecipientInfo.class" + }, + { + "pattern": "org/bouncycastle/asn1/cms/OtherRevocationInfoFormat.class" + }, + { + "pattern": "org/bouncycastle/asn1/cms/RecipientIdentifier.class" + }, + { + "pattern": "org/bouncycastle/asn1/cms/RecipientInfo.class" + }, + { + "pattern": "org/bouncycastle/asn1/cryptopro/CryptoProObjectIdentifiers.class" + }, + { + "pattern": "org/bouncycastle/asn1/eac/EACObjectIdentifiers.class" + }, + { + "pattern": "org/bouncycastle/asn1/gm/GMObjectIdentifiers.class" + }, + { + "pattern": "org/bouncycastle/asn1/gnu/GNUObjectIdentifiers.class" + }, + { + "pattern": "org/bouncycastle/asn1/iana/IANAObjectIdentifiers.class" + }, + { + "pattern": "org/bouncycastle/asn1/kisa/KISAObjectIdentifiers.class" + }, + { + "pattern": "org/bouncycastle/asn1/misc/MiscObjectIdentifiers.class" + }, + { + "pattern": "org/bouncycastle/asn1/nist/NISTObjectIdentifiers.class" + }, + { + "pattern": "org/bouncycastle/asn1/nsri/NSRIObjectIdentifiers.class" + }, + { + "pattern": "org/bouncycastle/asn1/ntt/NTTObjectIdentifiers.class" + }, + { + "pattern": "org/bouncycastle/asn1/oiw/OIWObjectIdentifiers.class" + }, + { + "pattern": "org/bouncycastle/asn1/pkcs/PKCSObjectIdentifiers.class" + }, + { + "pattern": "org/bouncycastle/asn1/pkcs/RSAPublicKey.class" + }, + { + "pattern": "org/bouncycastle/asn1/pkcs/RSASSAPSSparams.class" + }, + { + "pattern": "org/bouncycastle/asn1/rosstandart/RosstandartObjectIdentifiers.class" + }, + { + "pattern": "org/bouncycastle/asn1/sec/SECObjectIdentifiers.class" + }, + { + "pattern": "org/bouncycastle/asn1/teletrust/TeleTrusTObjectIdentifiers.class" + }, + { + "pattern": "org/bouncycastle/asn1/ua/UAObjectIdentifiers.class" + }, + { + "pattern": "org/bouncycastle/asn1/x500/RDN.class" + }, + { + "pattern": "org/bouncycastle/asn1/x500/X500Name.class" + }, + { + "pattern": "org/bouncycastle/asn1/x500/X500NameBuilder.class" + }, + { + "pattern": "org/bouncycastle/asn1/x500/X500NameStyle.class" + }, + { + "pattern": "org/bouncycastle/asn1/x500/style/AbstractX500NameStyle.class" + }, + { + "pattern": "org/bouncycastle/asn1/x500/style/BCStyle.class" + }, + { + "pattern": "org/bouncycastle/asn1/x509/AlgorithmIdentifier.class" + }, + { + "pattern": "org/bouncycastle/asn1/x509/AuthorityKeyIdentifier.class" + }, + { + "pattern": "org/bouncycastle/asn1/x509/BasicConstraints.class" + }, + { + "pattern": "org/bouncycastle/asn1/x509/Certificate.class" + }, + { + "pattern": "org/bouncycastle/asn1/x509/Extension.class" + }, + { + "pattern": "org/bouncycastle/asn1/x509/Extensions.class" + }, + { + "pattern": "org/bouncycastle/asn1/x509/ExtensionsGenerator.class" + }, + { + "pattern": "org/bouncycastle/asn1/x509/KeyUsage.class" + }, + { + "pattern": "org/bouncycastle/asn1/x509/SubjectKeyIdentifier.class" + }, + { + "pattern": "org/bouncycastle/asn1/x509/SubjectPublicKeyInfo.class" + }, + { + "pattern": "org/bouncycastle/asn1/x509/TBSCertificate.class" + }, + { + "pattern": "org/bouncycastle/asn1/x509/Time.class" + }, + { + "pattern": "org/bouncycastle/asn1/x509/V3TBSCertificateGenerator.class" + }, + { + "pattern": "org/bouncycastle/asn1/x509/X509Extension.class" + }, + { + "pattern": "org/bouncycastle/asn1/x509/X509ObjectIdentifiers.class" + }, + { + "pattern": "org/bouncycastle/asn1/x9/X9ObjectIdentifiers.class" + }, + { + "pattern": "org/bouncycastle/cert/CertException.class" + }, + { + "pattern": "org/bouncycastle/cert/CertIOException.class" + }, + { + "pattern": "org/bouncycastle/cert/CertRuntimeException.class" + }, + { + "pattern": "org/bouncycastle/cert/CertUtils.class" + }, + { + "pattern": "org/bouncycastle/cert/X509CRLHolder.class" + }, + { + "pattern": "org/bouncycastle/cert/X509CertificateHolder.class" + }, + { + "pattern": "org/bouncycastle/cert/X509ExtensionUtils.class" + }, + { + "pattern": "org/bouncycastle/cert/X509v3CertificateBuilder.class" + }, + { + "pattern": "org/bouncycastle/cert/jcajce/CertHelper.class" + }, + { + "pattern": "org/bouncycastle/cert/jcajce/DefaultCertHelper.class" + }, + { + "pattern": "org/bouncycastle/cert/jcajce/JcaX509CertificateConverter$ExCertificateException.class" + }, + { + "pattern": "org/bouncycastle/cert/jcajce/JcaX509CertificateConverter$ExCertificateParsingException.class" + }, + { + "pattern": "org/bouncycastle/cert/jcajce/JcaX509CertificateConverter.class" + }, + { + "pattern": "org/bouncycastle/cert/jcajce/JcaX509CertificateHolder.class" + }, + { + "pattern": "org/bouncycastle/cert/jcajce/JcaX509ExtensionUtils$SHA1DigestCalculator.class" + }, + { + "pattern": "org/bouncycastle/cert/jcajce/JcaX509ExtensionUtils.class" + }, + { + "pattern": "org/bouncycastle/cert/jcajce/JcaX509v3CertificateBuilder.class" + }, + { + "pattern": "org/bouncycastle/cert/jcajce/NamedCertHelper.class" + }, + { + "pattern": "org/bouncycastle/cert/jcajce/ProviderCertHelper.class" + }, + { + "pattern": "org/bouncycastle/cert/selector/X509CertificateHolderSelector.class" + }, + { + "pattern": "org/bouncycastle/cms/CMSAlgorithm.class" + }, + { + "pattern": "org/bouncycastle/cms/CMSContentInfoParser.class" + }, + { + "pattern": "org/bouncycastle/cms/CMSEnvelopedDataParser.class" + }, + { + "pattern": "org/bouncycastle/cms/CMSEnvelopedDataStreamGenerator$CmsEnvelopedDataOutputStream.class" + }, + { + "pattern": "org/bouncycastle/cms/CMSEnvelopedDataStreamGenerator.class" + }, + { + "pattern": "org/bouncycastle/cms/CMSEnvelopedGenerator.class" + }, + { + "pattern": "org/bouncycastle/cms/CMSEnvelopedHelper$CMSEnvelopedSecureReadable.class" + }, + { + "pattern": "org/bouncycastle/cms/CMSEnvelopedHelper.class" + }, + { + "pattern": "org/bouncycastle/cms/CMSException.class" + }, + { + "pattern": "org/bouncycastle/cms/CMSProcessable.class" + }, + { + "pattern": "org/bouncycastle/cms/CMSProcessableInputStream.class" + }, + { + "pattern": "org/bouncycastle/cms/CMSReadable.class" + }, + { + "pattern": "org/bouncycastle/cms/CMSSecureReadable.class" + }, + { + "pattern": "org/bouncycastle/cms/CMSTypedStream$FullReaderStream.class" + }, + { + "pattern": "org/bouncycastle/cms/CMSTypedStream.class" + }, + { + "pattern": "org/bouncycastle/cms/CMSUtils.class" + }, + { + "pattern": "org/bouncycastle/cms/KEKRecipient.class" + }, + { + "pattern": "org/bouncycastle/cms/KEKRecipientId.class" + }, + { + "pattern": "org/bouncycastle/cms/KEKRecipientInfoGenerator.class" + }, + { + "pattern": "org/bouncycastle/cms/KEKRecipientInformation.class" + }, + { + "pattern": "org/bouncycastle/cms/KeyTransRecipient.class" + }, + { + "pattern": "org/bouncycastle/cms/KeyTransRecipientId.class" + }, + { + "pattern": "org/bouncycastle/cms/KeyTransRecipientInfoGenerator.class" + }, + { + "pattern": "org/bouncycastle/cms/KeyTransRecipientInformation.class" + }, + { + "pattern": "org/bouncycastle/cms/NullOutputStream.class" + }, + { + "pattern": "org/bouncycastle/cms/PasswordRecipient$PRF.class" + }, + { + "pattern": "org/bouncycastle/cms/Recipient.class" + }, + { + "pattern": "org/bouncycastle/cms/RecipientId.class" + }, + { + "pattern": "org/bouncycastle/cms/RecipientInfoGenerator.class" + }, + { + "pattern": "org/bouncycastle/cms/RecipientInformation.class" + }, + { + "pattern": "org/bouncycastle/cms/RecipientInformationStore.class" + }, + { + "pattern": "org/bouncycastle/cms/RecipientOperator.class" + }, + { + "pattern": "org/bouncycastle/cms/jcajce/CMSUtils.class" + }, + { + "pattern": "org/bouncycastle/cms/jcajce/DefaultJcaJceExtHelper.class" + }, + { + "pattern": "org/bouncycastle/cms/jcajce/EnvelopedDataHelper$1.class" + }, + { + "pattern": "org/bouncycastle/cms/jcajce/EnvelopedDataHelper$JCECallback.class" + }, + { + "pattern": "org/bouncycastle/cms/jcajce/EnvelopedDataHelper.class" + }, + { + "pattern": "org/bouncycastle/cms/jcajce/JcaJceExtHelper.class" + }, + { + "pattern": "org/bouncycastle/cms/jcajce/JceCMSContentEncryptorBuilder$CMSOutputEncryptor.class" + }, + { + "pattern": "org/bouncycastle/cms/jcajce/JceCMSContentEncryptorBuilder.class" + }, + { + "pattern": "org/bouncycastle/cms/jcajce/JceKEKEnvelopedRecipient$1.class" + }, + { + "pattern": "org/bouncycastle/cms/jcajce/JceKEKEnvelopedRecipient.class" + }, + { + "pattern": "org/bouncycastle/cms/jcajce/JceKEKRecipient.class" + }, + { + "pattern": "org/bouncycastle/cms/jcajce/JceKEKRecipientInfoGenerator.class" + }, + { + "pattern": "org/bouncycastle/cms/jcajce/JceKeyTransEnvelopedRecipient$1.class" + }, + { + "pattern": "org/bouncycastle/cms/jcajce/JceKeyTransEnvelopedRecipient.class" + }, + { + "pattern": "org/bouncycastle/cms/jcajce/JceKeyTransRecipient.class" + }, + { + "pattern": "org/bouncycastle/cms/jcajce/JceKeyTransRecipientInfoGenerator.class" + }, + { + "pattern": "org/bouncycastle/cms/jcajce/ProviderJcaJceExtHelper.class" + }, + { + "pattern": "org/bouncycastle/crypto/CipherParameters.class" + }, + { + "pattern": "org/bouncycastle/crypto/Digest.class" + }, + { + "pattern": "org/bouncycastle/crypto/io/CipherIOException.class" + }, + { + "pattern": "org/bouncycastle/crypto/io/InvalidCipherTextIOException.class" + }, + { + "pattern": "org/bouncycastle/crypto/params/AsymmetricKeyParameter.class" + }, + { + "pattern": "org/bouncycastle/crypto/params/DSAKeyParameters.class" + }, + { + "pattern": "org/bouncycastle/crypto/params/DSAPrivateKeyParameters.class" + }, + { + "pattern": "org/bouncycastle/crypto/params/DSAPublicKeyParameters.class" + }, + { + "pattern": "org/bouncycastle/crypto/params/RSAKeyParameters.class" + }, + { + "pattern": "org/bouncycastle/crypto/params/RSAPrivateCrtKeyParameters.class" + }, + { + "pattern": "org/bouncycastle/crypto/prng/SP800SecureRandom.class" + }, + { + "pattern": "org/bouncycastle/jcajce/io/CipherInputStream.class" + }, + { + "pattern": "org/bouncycastle/jcajce/provider/asymmetric/DH$Mappings.class" + }, + { + "pattern": "org/bouncycastle/jcajce/provider/asymmetric/DH.class" + }, + { + "pattern": "org/bouncycastle/jcajce/provider/asymmetric/DSA$Mappings.class" + }, + { + "pattern": "org/bouncycastle/jcajce/provider/asymmetric/DSTU4145$Mappings.class" + }, + { + "pattern": "org/bouncycastle/jcajce/provider/asymmetric/EC$Mappings.class" + }, + { + "pattern": "org/bouncycastle/jcajce/provider/asymmetric/EC.class" + }, + { + "pattern": "org/bouncycastle/jcajce/provider/asymmetric/ECGOST$Mappings.class" + }, + { + "pattern": "org/bouncycastle/jcajce/provider/asymmetric/ElGamal$Mappings.class" + }, + { + "pattern": "org/bouncycastle/jcajce/provider/asymmetric/GM$Mappings.class" + }, + { + "pattern": "org/bouncycastle/jcajce/provider/asymmetric/GOST$Mappings.class" + }, + { + "pattern": "org/bouncycastle/jcajce/provider/asymmetric/IES$Mappings.class" + }, + { + "pattern": "org/bouncycastle/jcajce/provider/asymmetric/RSA$Mappings.class" + }, + { + "pattern": "org/bouncycastle/jcajce/provider/asymmetric/RSA.class" + }, + { + "pattern": "org/bouncycastle/jcajce/provider/asymmetric/X509$Mappings.class" + }, + { + "pattern": "org/bouncycastle/jcajce/provider/asymmetric/dh/KeyFactorySpi.class" + }, + { + "pattern": "org/bouncycastle/jcajce/provider/asymmetric/dsa/DSAUtil.class" + }, + { + "pattern": "org/bouncycastle/jcajce/provider/asymmetric/dsa/KeyFactorySpi$1.class" + }, + { + "pattern": "org/bouncycastle/jcajce/provider/asymmetric/dsa/KeyFactorySpi.class" + }, + { + "pattern": "org/bouncycastle/jcajce/provider/asymmetric/dstu/KeyFactorySpi.class" + }, + { + "pattern": "org/bouncycastle/jcajce/provider/asymmetric/ec/KeyFactorySpi$EC.class" + }, + { + "pattern": "org/bouncycastle/jcajce/provider/asymmetric/ec/KeyFactorySpi$ECMQV.class" + }, + { + "pattern": "org/bouncycastle/jcajce/provider/asymmetric/ec/KeyFactorySpi.class" + }, + { + "pattern": "org/bouncycastle/jcajce/provider/asymmetric/ecgost/KeyFactorySpi.class" + }, + { + "pattern": "org/bouncycastle/jcajce/provider/asymmetric/ecgost12/KeyFactorySpi.class" + }, + { + "pattern": "org/bouncycastle/jcajce/provider/asymmetric/elgamal/KeyFactorySpi.class" + }, + { + "pattern": "org/bouncycastle/jcajce/provider/asymmetric/gost/KeyFactorySpi.class" + }, + { + "pattern": "org/bouncycastle/jcajce/provider/asymmetric/rsa/BCRSAPublicKey.class" + }, + { + "pattern": "org/bouncycastle/jcajce/provider/asymmetric/rsa/KeyFactorySpi.class" + }, + { + "pattern": "org/bouncycastle/jcajce/provider/asymmetric/rsa/RSAUtil.class" + }, + { + "pattern": "org/bouncycastle/jcajce/provider/asymmetric/util/BaseKeyFactorySpi.class" + }, + { + "pattern": "org/bouncycastle/jcajce/provider/asymmetric/util/ExtendedInvalidKeySpecException.class" + }, + { + "pattern": "org/bouncycastle/jcajce/provider/asymmetric/util/KeyUtil.class" + }, + { + "pattern": "org/bouncycastle/jcajce/provider/config/ProviderConfiguration.class" + }, + { + "pattern": "org/bouncycastle/jcajce/provider/config/ProviderConfigurationPermission.class" + }, + { + "pattern": "org/bouncycastle/jcajce/provider/digest/Blake2b$Mappings.class" + }, + { + "pattern": "org/bouncycastle/jcajce/provider/digest/DSTU7564$Mappings.class" + }, + { + "pattern": "org/bouncycastle/jcajce/provider/digest/DigestAlgorithmProvider.class" + }, + { + "pattern": "org/bouncycastle/jcajce/provider/digest/GOST3411$Mappings.class" + }, + { + "pattern": "org/bouncycastle/jcajce/provider/digest/Keccak$Mappings.class" + }, + { + "pattern": "org/bouncycastle/jcajce/provider/digest/MD2$Mappings.class" + }, + { + "pattern": "org/bouncycastle/jcajce/provider/digest/MD4$Mappings.class" + }, + { + "pattern": "org/bouncycastle/jcajce/provider/digest/MD5$Mappings.class" + }, + { + "pattern": "org/bouncycastle/jcajce/provider/digest/RIPEMD128$Mappings.class" + }, + { + "pattern": "org/bouncycastle/jcajce/provider/digest/RIPEMD160$Mappings.class" + }, + { + "pattern": "org/bouncycastle/jcajce/provider/digest/RIPEMD256$Mappings.class" + }, + { + "pattern": "org/bouncycastle/jcajce/provider/digest/RIPEMD320$Mappings.class" + }, + { + "pattern": "org/bouncycastle/jcajce/provider/digest/SHA1$Mappings.class" + }, + { + "pattern": "org/bouncycastle/jcajce/provider/digest/SHA224$Mappings.class" + }, + { + "pattern": "org/bouncycastle/jcajce/provider/digest/SHA256$Mappings.class" + }, + { + "pattern": "org/bouncycastle/jcajce/provider/digest/SHA3$Mappings.class" + }, + { + "pattern": "org/bouncycastle/jcajce/provider/digest/SHA384$Mappings.class" + }, + { + "pattern": "org/bouncycastle/jcajce/provider/digest/SHA512$Mappings.class" + }, + { + "pattern": "org/bouncycastle/jcajce/provider/digest/SM3$Mappings.class" + }, + { + "pattern": "org/bouncycastle/jcajce/provider/digest/Skein$Mappings.class" + }, + { + "pattern": "org/bouncycastle/jcajce/provider/digest/Tiger$Mappings.class" + }, + { + "pattern": "org/bouncycastle/jcajce/provider/digest/Whirlpool$Mappings.class" + }, + { + "pattern": "org/bouncycastle/jcajce/provider/drbg/DRBG$CoreSecureRandom.class" + }, + { + "pattern": "org/bouncycastle/jcajce/provider/drbg/DRBG$HybridSecureRandom.class" + }, + { + "pattern": "org/bouncycastle/jcajce/provider/drbg/DRBG$Mappings.class" + }, + { + "pattern": "org/bouncycastle/jcajce/provider/drbg/DRBG.class" + }, + { + "pattern": "org/bouncycastle/jcajce/provider/keystore/BC$Mappings.class" + }, + { + "pattern": "org/bouncycastle/jcajce/provider/keystore/BCFKS$Mappings.class" + }, + { + "pattern": "org/bouncycastle/jcajce/provider/keystore/PKCS12$Mappings.class" + }, + { + "pattern": "org/bouncycastle/jcajce/provider/symmetric/AES$Mappings.class" + }, + { + "pattern": "org/bouncycastle/jcajce/provider/symmetric/ARC4$Mappings.class" + }, + { + "pattern": "org/bouncycastle/jcajce/provider/symmetric/ARIA$Mappings.class" + }, + { + "pattern": "org/bouncycastle/jcajce/provider/symmetric/Blowfish$Mappings.class" + }, + { + "pattern": "org/bouncycastle/jcajce/provider/symmetric/CAST5$Mappings.class" + }, + { + "pattern": "org/bouncycastle/jcajce/provider/symmetric/CAST6$Mappings.class" + }, + { + "pattern": "org/bouncycastle/jcajce/provider/symmetric/Camellia$Mappings.class" + }, + { + "pattern": "org/bouncycastle/jcajce/provider/symmetric/ChaCha$Mappings.class" + }, + { + "pattern": "org/bouncycastle/jcajce/provider/symmetric/DES$Mappings.class" + }, + { + "pattern": "org/bouncycastle/jcajce/provider/symmetric/DESede$Mappings.class" + }, + { + "pattern": "org/bouncycastle/jcajce/provider/symmetric/DSTU7624$Mappings.class" + }, + { + "pattern": "org/bouncycastle/jcajce/provider/symmetric/GOST28147$Mappings.class" + }, + { + "pattern": "org/bouncycastle/jcajce/provider/symmetric/Grain128$Mappings.class" + }, + { + "pattern": "org/bouncycastle/jcajce/provider/symmetric/Grainv1$Mappings.class" + }, + { + "pattern": "org/bouncycastle/jcajce/provider/symmetric/HC128$Mappings.class" + }, + { + "pattern": "org/bouncycastle/jcajce/provider/symmetric/HC256$Mappings.class" + }, + { + "pattern": "org/bouncycastle/jcajce/provider/symmetric/IDEA$Mappings.class" + }, + { + "pattern": "org/bouncycastle/jcajce/provider/symmetric/Noekeon$Mappings.class" + }, + { + "pattern": "org/bouncycastle/jcajce/provider/symmetric/OpenSSLPBKDF$Mappings.class" + }, + { + "pattern": "org/bouncycastle/jcajce/provider/symmetric/PBEPBKDF1$Mappings.class" + }, + { + "pattern": "org/bouncycastle/jcajce/provider/symmetric/PBEPBKDF2$Mappings.class" + }, + { + "pattern": "org/bouncycastle/jcajce/provider/symmetric/PBEPKCS12$Mappings.class" + }, + { + "pattern": "org/bouncycastle/jcajce/provider/symmetric/Poly1305$Mappings.class" + }, + { + "pattern": "org/bouncycastle/jcajce/provider/symmetric/RC2$Mappings.class" + }, + { + "pattern": "org/bouncycastle/jcajce/provider/symmetric/RC5$Mappings.class" + }, + { + "pattern": "org/bouncycastle/jcajce/provider/symmetric/RC6$Mappings.class" + }, + { + "pattern": "org/bouncycastle/jcajce/provider/symmetric/Rijndael$Mappings.class" + }, + { + "pattern": "org/bouncycastle/jcajce/provider/symmetric/SEED$Mappings.class" + }, + { + "pattern": "org/bouncycastle/jcajce/provider/symmetric/SM4$Mappings.class" + }, + { + "pattern": "org/bouncycastle/jcajce/provider/symmetric/Salsa20$Mappings.class" + }, + { + "pattern": "org/bouncycastle/jcajce/provider/symmetric/Serpent$Mappings.class" + }, + { + "pattern": "org/bouncycastle/jcajce/provider/symmetric/Shacal2$Mappings.class" + }, + { + "pattern": "org/bouncycastle/jcajce/provider/symmetric/SipHash$Mappings.class" + }, + { + "pattern": "org/bouncycastle/jcajce/provider/symmetric/Skipjack$Mappings.class" + }, + { + "pattern": "org/bouncycastle/jcajce/provider/symmetric/SymmetricAlgorithmProvider.class" + }, + { + "pattern": "org/bouncycastle/jcajce/provider/symmetric/TEA$Mappings.class" + }, + { + "pattern": "org/bouncycastle/jcajce/provider/symmetric/TLSKDF$Mappings.class" + }, + { + "pattern": "org/bouncycastle/jcajce/provider/symmetric/Threefish$Mappings.class" + }, + { + "pattern": "org/bouncycastle/jcajce/provider/symmetric/Twofish$Mappings.class" + }, + { + "pattern": "org/bouncycastle/jcajce/provider/symmetric/VMPC$Mappings.class" + }, + { + "pattern": "org/bouncycastle/jcajce/provider/symmetric/VMPCKSA3$Mappings.class" + }, + { + "pattern": "org/bouncycastle/jcajce/provider/symmetric/XSalsa20$Mappings.class" + }, + { + "pattern": "org/bouncycastle/jcajce/provider/symmetric/XTEA$Mappings.class" + }, + { + "pattern": "org/bouncycastle/jcajce/provider/symmetric/util/ClassUtil.class" + }, + { + "pattern": "org/bouncycastle/jcajce/provider/util/AlgorithmProvider.class" + }, + { + "pattern": "org/bouncycastle/jcajce/provider/util/AsymmetricAlgorithmProvider.class" + }, + { + "pattern": "org/bouncycastle/jcajce/provider/util/AsymmetricKeyInfoConverter.class" + }, + { + "pattern": "org/bouncycastle/jcajce/util/AlgorithmParametersUtils.class" + }, + { + "pattern": "org/bouncycastle/jcajce/util/DefaultJcaJceHelper.class" + }, + { + "pattern": "org/bouncycastle/jcajce/util/JcaJceHelper.class" + }, + { + "pattern": "org/bouncycastle/jcajce/util/ProviderJcaJceHelper.class" + }, + { + "pattern": "org/bouncycastle/jce/provider/BouncyCastleProvider$1.class" + }, + { + "pattern": "org/bouncycastle/jce/provider/BouncyCastleProviderConfiguration.class" + }, + { + "pattern": "org/bouncycastle/operator/AsymmetricKeyUnwrapper.class" + }, + { + "pattern": "org/bouncycastle/operator/AsymmetricKeyWrapper.class" + }, + { + "pattern": "org/bouncycastle/operator/ContentSigner.class" + }, + { + "pattern": "org/bouncycastle/operator/DefaultSecretKeySizeProvider.class" + }, + { + "pattern": "org/bouncycastle/operator/DefaultSignatureAlgorithmIdentifierFinder.class" + }, + { + "pattern": "org/bouncycastle/operator/DigestCalculator.class" + }, + { + "pattern": "org/bouncycastle/operator/GenericKey.class" + }, + { + "pattern": "org/bouncycastle/operator/InputDecryptor.class" + }, + { + "pattern": "org/bouncycastle/operator/KeyUnwrapper.class" + }, + { + "pattern": "org/bouncycastle/operator/KeyWrapper.class" + }, + { + "pattern": "org/bouncycastle/operator/OperatorCreationException.class" + }, + { + "pattern": "org/bouncycastle/operator/OperatorException.class" + }, + { + "pattern": "org/bouncycastle/operator/OperatorStreamException.class" + }, + { + "pattern": "org/bouncycastle/operator/OutputEncryptor.class" + }, + { + "pattern": "org/bouncycastle/operator/RuntimeOperatorException.class" + }, + { + "pattern": "org/bouncycastle/operator/SecretKeySizeProvider.class" + }, + { + "pattern": "org/bouncycastle/operator/SignatureAlgorithmIdentifierFinder.class" + }, + { + "pattern": "org/bouncycastle/operator/SymmetricKeyUnwrapper.class" + }, + { + "pattern": "org/bouncycastle/operator/SymmetricKeyWrapper.class" + }, + { + "pattern": "org/bouncycastle/operator/jcajce/JcaContentSignerBuilder$1.class" + }, + { + "pattern": "org/bouncycastle/operator/jcajce/JcaContentSignerBuilder$SignatureOutputStream.class" + }, + { + "pattern": "org/bouncycastle/operator/jcajce/JcaContentSignerBuilder.class" + }, + { + "pattern": "org/bouncycastle/operator/jcajce/JceAsymmetricKeyUnwrapper.class" + }, + { + "pattern": "org/bouncycastle/operator/jcajce/JceAsymmetricKeyWrapper.class" + }, + { + "pattern": "org/bouncycastle/operator/jcajce/JceGenericKey.class" + }, + { + "pattern": "org/bouncycastle/operator/jcajce/JceSymmetricKeyUnwrapper.class" + }, + { + "pattern": "org/bouncycastle/operator/jcajce/JceSymmetricKeyWrapper.class" + }, + { + "pattern": "org/bouncycastle/operator/jcajce/OperatorHelper$OpCertificateException.class" + }, + { + "pattern": "org/bouncycastle/operator/jcajce/OperatorHelper.class" + }, + { + "pattern": "org/bouncycastle/operator/jcajce/OperatorUtils.class" + }, + { + "pattern": "org/bouncycastle/pqc/asn1/PQCObjectIdentifiers.class" + }, + { + "pattern": "org/bouncycastle/pqc/jcajce/provider/mceliece/McElieceCCA2KeyFactorySpi.class" + }, + { + "pattern": "org/bouncycastle/pqc/jcajce/provider/mceliece/McElieceKeyFactorySpi.class" + }, + { + "pattern": "org/bouncycastle/pqc/jcajce/provider/newhope/NHKeyFactorySpi.class" + }, + { + "pattern": "org/bouncycastle/pqc/jcajce/provider/rainbow/RainbowKeyFactorySpi.class" + }, + { + "pattern": "org/bouncycastle/pqc/jcajce/provider/sphincs/Sphincs256KeyFactorySpi.class" + }, + { + "pattern": "org/bouncycastle/pqc/jcajce/provider/xmss/XMSSKeyFactorySpi.class" + }, + { + "pattern": "org/bouncycastle/pqc/jcajce/provider/xmss/XMSSMTKeyFactorySpi.class" + }, + { + "pattern": "org/bouncycastle/util/Arrays.class" + }, + { + "pattern": "org/bouncycastle/util/Encodable.class" + }, + { + "pattern": "org/bouncycastle/util/Integers.class" + }, + { + "pattern": "org/bouncycastle/util/Iterable.class" + }, + { + "pattern": "org/bouncycastle/util/Properties$1.class" + }, + { + "pattern": "org/bouncycastle/util/Properties.class" + }, + { + "pattern": "org/bouncycastle/util/Selector.class" + }, + { + "pattern": "org/bouncycastle/util/StringList.class" + }, + { + "pattern": "org/bouncycastle/util/Strings$1.class" + }, + { + "pattern": "org/bouncycastle/util/Strings.class" + }, + { + "pattern": "org/bouncycastle/util/io/StreamOverflowException.class" + }, + { + "pattern": "org/bouncycastle/util/io/Streams.class" + }, + { + "pattern": "org/bouncycastle/util/io/TeeInputStream.class" + }, + { + "pattern": "org/bouncycastle/util/io/TeeOutputStream.class" + }, + { + "pattern": "org/joda/time/tz/data/Europe/Kiev" + }, + { + "pattern": "org/joda/time/tz/data/ZoneInfoMap" + }, + { + "pattern": "org/slf4j/impl/StaticLoggerBinder.class" + }, + { + "pattern": "sun/net/idn/uidna.spp" + }, + { + "pattern": "sun/text/resources/unorm.icu" + } ] } diff --git a/pom.xml b/pom.xml index 8614037a3..92b89b658 100644 --- a/pom.xml +++ b/pom.xml @@ -88,6 +88,7 @@ 2.8.5 2.17 27.0.1-jre + 4.0.3 5.4.1 1.4.1 3.12.2 @@ -167,6 +168,11 @@ guava ${guava.version} + + info.picocli + picocli + ${picocli.version} + org.slf4j slf4j-api From 5cf21b135fb0931c69704e8c6b33c05913d93979 Mon Sep 17 00:00:00 2001 From: Valentyn Berezin Date: Thu, 29 Aug 2019 18:49:47 +0300 Subject: [PATCH 010/255] Wrapping into picocli inbox and privatespace --- datasafe-cli/pom.xml | 1 + .../java/de/adorsys/datasafe/cli/Cli.java | 85 +++++++++++++++++-- .../java/de/adorsys/datasafe/cli/CliOld.java | 2 +- .../adorsys/datasafe/cli/commands/Help.java | 15 ++++ .../datasafe/cli/commands/inbox/Cat.java | 17 +++- .../datasafe/cli/commands/inbox/Copy.java | 17 ---- .../datasafe/cli/commands/inbox/Delete.java | 11 ++- .../datasafe/cli/commands/inbox/Inbox.java | 12 ++- .../datasafe/cli/commands/inbox/List.java | 25 ++++++ .../datasafe/cli/commands/inbox/Share.java | 70 +++++++++++++++ .../cli/commands/privatespace/Cat.java | 21 ++++- .../cli/commands/privatespace/Copy.java | 53 ++++++++++++ .../cli/commands/privatespace/Delete.java | 14 ++- .../cli/commands/privatespace/List.java | 29 +++++++ .../commands/privatespace/Privatespace.java | 11 ++- .../datasafe/cli/commands/profile/Create.java | 3 + .../datasafe/cli/commands/profile/Delete.java | 3 + .../cli/commands/profile/Profile.java | 9 +- .../datasafe/cli/commands/profile/Read.java | 3 + .../datasafe/cli/commands/profile/Update.java | 3 + .../datasafe/cli/config/DatasafeFactory.java | 79 +++++++++++++++++ .../adorsys/datasafe/cli/dto/Credentials.java | 19 +++++ 22 files changed, 468 insertions(+), 34 deletions(-) create mode 100644 datasafe-cli/src/main/java/de/adorsys/datasafe/cli/commands/Help.java delete mode 100644 datasafe-cli/src/main/java/de/adorsys/datasafe/cli/commands/inbox/Copy.java create mode 100644 datasafe-cli/src/main/java/de/adorsys/datasafe/cli/commands/inbox/List.java create mode 100644 datasafe-cli/src/main/java/de/adorsys/datasafe/cli/commands/inbox/Share.java create mode 100644 datasafe-cli/src/main/java/de/adorsys/datasafe/cli/commands/privatespace/List.java create mode 100644 datasafe-cli/src/main/java/de/adorsys/datasafe/cli/config/DatasafeFactory.java create mode 100644 datasafe-cli/src/main/java/de/adorsys/datasafe/cli/dto/Credentials.java diff --git a/datasafe-cli/pom.xml b/datasafe-cli/pom.xml index 8cf817a9c..c96cd4920 100644 --- a/datasafe-cli/pom.xml +++ b/datasafe-cli/pom.xml @@ -31,6 +31,7 @@ datasafe-storage-impl-s3 ${project.version} + info.picocli picocli diff --git a/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/Cli.java b/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/Cli.java index a434f21d0..c1b7a9428 100644 --- a/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/Cli.java +++ b/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/Cli.java @@ -1,17 +1,45 @@ package de.adorsys.datasafe.cli; +import com.google.gson.Gson; +import de.adorsys.datasafe.business.impl.service.DefaultDatasafeServices; +import de.adorsys.datasafe.cli.commands.Help; import de.adorsys.datasafe.cli.commands.inbox.Inbox; import de.adorsys.datasafe.cli.commands.privatespace.Privatespace; import de.adorsys.datasafe.cli.commands.profile.Profile; +import de.adorsys.datasafe.cli.config.DatasafeFactory; +import de.adorsys.datasafe.cli.dto.Credentials; +import de.adorsys.datasafe.encrypiton.api.types.UserIDAuth; +import lombok.RequiredArgsConstructor; +import lombok.SneakyThrows; import picocli.CommandLine; -@CommandLine.Command(subcommands = { - Profile.class, - Privatespace.class, - Inbox.class -}) +import java.io.Reader; +import java.nio.file.Files; +import java.nio.file.Path; +import java.nio.file.Paths; + +@CommandLine.Command( + name = "datasafe-cli", + subcommands = { + Help.class, + Profile.class, + Privatespace.class, + Inbox.class + } +) +@RequiredArgsConstructor public class Cli implements Runnable { + @CommandLine.Option( + names = {"--root-dir", "-rd"}, + description = "Folder with user profiles, default is current directory" + ) + private Path profilesRoot = Paths.get(""); + + @CommandLine.ArgGroup(multiplicity = "1") + private CredentialsExclusive credentials; + + @SneakyThrows public static void main(String[] args) { int exitCode = new CommandLine(new Cli()).execute(args); System.exit(exitCode); @@ -21,4 +49,51 @@ public static void main(String[] args) { public void run() { CommandLine.usage(new Cli(), System.out); } + + public DefaultDatasafeServices datasafe() { + return DatasafeFactory.datasafe(profilesRoot, credentials.getSystemPassword()); + } + + public UserIDAuth auth() { + return new UserIDAuth(credentials.getUsername(), credentials.getPassword()); + } + + private static class CredentialsExclusive { + + @CommandLine.Option( + names = {"--credentials", "-c"}, + description = "File with credentials location. It contains JSON: " + + "{" + + "\"username\": \"\", " + + "\"password\": \"\", " + + "\"systemPassword\": \"\"" + + "}") + private Path credentialsFile; + + @CommandLine.ArgGroup(exclusive = false) + private Credentials credentials; + + String getUsername() { + return credentials().getUsername(); + } + + String getPassword() { + return credentials().getPassword(); + } + + String getSystemPassword() { + return credentials().getSystemPassword(); + } + + @SneakyThrows + private Credentials credentials() { + if (null != credentials) { + return credentials; + } + + try (Reader is = Files.newBufferedReader(credentialsFile)) { + return new Gson().fromJson(is, Credentials.class); + } + } + } } diff --git a/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/CliOld.java b/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/CliOld.java index 86b279679..59f651eee 100644 --- a/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/CliOld.java +++ b/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/CliOld.java @@ -49,7 +49,7 @@ public static void main(String[] args) { Security.addProvider(new BouncyCastleProvider()); // To register provider you need to: /* - Copy the JCE provider JAR file to java-home/jre/lib/ext/. + Share the JCE provider JAR file to java-home/jre/lib/ext/. Stop the Application Server. If the Application Server is not stopped and then restarted later in this process, the JCE provider will not be recognized by the Application Server. Edit the java-home/jre/lib/security/java.security properties file in any text editor. Add the JCE provider you’ve just downloaded to this file. diff --git a/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/commands/Help.java b/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/commands/Help.java new file mode 100644 index 000000000..5c28663d3 --- /dev/null +++ b/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/commands/Help.java @@ -0,0 +1,15 @@ +package de.adorsys.datasafe.cli.commands; + +import picocli.CommandLine; + +@CommandLine.Command(name = "--help", aliases = {"-h"}, helpCommand = true, description = "Show basic help") +public class Help implements Runnable { + + @CommandLine.ParentCommand + private Object parent; + + @Override + public void run() { + CommandLine.usage(parent, System.out); + } +} diff --git a/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/commands/inbox/Cat.java b/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/commands/inbox/Cat.java index cc6acf01f..89c557e20 100644 --- a/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/commands/inbox/Cat.java +++ b/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/commands/inbox/Cat.java @@ -1,15 +1,30 @@ package de.adorsys.datasafe.cli.commands.inbox; +import com.google.common.io.ByteStreams; +import de.adorsys.datasafe.types.api.actions.ReadRequest; +import lombok.SneakyThrows; import picocli.CommandLine; +import java.io.InputStream; + @CommandLine.Command( name = "cat", description = "Decrypts inbox file contents and prints it to STDOUT" ) public class Cat implements Runnable { + @CommandLine.ParentCommand + private Inbox inbox; + + @CommandLine.Parameters(description = "Filename to print") + private String path; + @Override + @SneakyThrows public void run() { - + try (InputStream is = inbox.getCli().datasafe().inboxService() + .read(ReadRequest.forDefaultPrivate(inbox.getCli().auth(), path))) { + ByteStreams.copy(is, System.out); + } } } diff --git a/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/commands/inbox/Copy.java b/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/commands/inbox/Copy.java deleted file mode 100644 index 5b248cba0..000000000 --- a/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/commands/inbox/Copy.java +++ /dev/null @@ -1,17 +0,0 @@ -package de.adorsys.datasafe.cli.commands.inbox; - -import picocli.CommandLine; - -@CommandLine.Command( - name = "copy", - aliases = "cp", - description = "Shares file with other users, " + - "file will be encrypted using recipient public key - only recipient can read it" -) -public class Copy implements Runnable { - - @Override - public void run() { - - } -} diff --git a/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/commands/inbox/Delete.java b/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/commands/inbox/Delete.java index ca140afda..3528610d9 100644 --- a/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/commands/inbox/Delete.java +++ b/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/commands/inbox/Delete.java @@ -1,5 +1,7 @@ package de.adorsys.datasafe.cli.commands.inbox; +import de.adorsys.datasafe.types.api.actions.RemoveRequest; +import de.adorsys.datasafe.types.api.resource.Uri; import picocli.CommandLine; @CommandLine.Command( @@ -9,8 +11,15 @@ ) public class Delete implements Runnable { + @CommandLine.ParentCommand + private Inbox inbox; + + @CommandLine.Parameters(description = "Filename to remove") + private String path; + @Override public void run() { - + inbox.getCli().datasafe().inboxService() + .remove(RemoveRequest.forDefaultPrivate(inbox.getCli().auth(), new Uri(path))); } } diff --git a/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/commands/inbox/Inbox.java b/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/commands/inbox/Inbox.java index eaf6eee0b..b40cbe28d 100644 --- a/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/commands/inbox/Inbox.java +++ b/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/commands/inbox/Inbox.java @@ -1,5 +1,7 @@ package de.adorsys.datasafe.cli.commands.inbox; +import de.adorsys.datasafe.cli.Cli; +import lombok.Getter; import picocli.CommandLine; @CommandLine.Command( @@ -8,13 +10,17 @@ "Allows user to read encrypted files that are shared with him and to share his files with other users", subcommands = { Cat.class, - Copy.class, + Share.class, Delete.class, - }) +}) public class Inbox implements Runnable { + @Getter + @CommandLine.ParentCommand + private Cli cli; + @Override public void run() { - + CommandLine.usage(new Inbox(), System.out); } } diff --git a/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/commands/inbox/List.java b/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/commands/inbox/List.java new file mode 100644 index 000000000..83c4b70ea --- /dev/null +++ b/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/commands/inbox/List.java @@ -0,0 +1,25 @@ +package de.adorsys.datasafe.cli.commands.inbox; + +import de.adorsys.datasafe.types.api.actions.ListRequest; +import picocli.CommandLine; + +@CommandLine.Command( + name = "list", + aliases = "ls", + description = "Lists file in INBOX" +) +public class List implements Runnable { + + @CommandLine.ParentCommand + private Inbox inbox; + + @CommandLine.Parameters(arity = "0..1") + private String prefix = ""; + + @Override + public void run() { + inbox.getCli().datasafe().inboxService() + .list(ListRequest.forDefaultPrivate(inbox.getCli().auth(), prefix)) + .forEach(it -> System.out.println(it.location().asString())); + } +} diff --git a/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/commands/inbox/Share.java b/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/commands/inbox/Share.java new file mode 100644 index 000000000..af3fbf4c8 --- /dev/null +++ b/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/commands/inbox/Share.java @@ -0,0 +1,70 @@ +package de.adorsys.datasafe.cli.commands.inbox; + +import com.google.common.io.ByteStreams; +import com.google.common.io.MoreFiles; +import de.adorsys.datasafe.encrypiton.api.types.UserID; +import de.adorsys.datasafe.types.api.actions.WriteRequest; +import lombok.SneakyThrows; +import picocli.CommandLine; + +import java.io.IOException; +import java.io.InputStream; +import java.io.OutputStream; +import java.nio.file.Path; +import java.nio.file.StandardOpenOption; +import java.util.List; +import java.util.stream.Collectors; + +@CommandLine.Command( + name = "copy", + aliases = "cp", + description = "Shares file with other users, " + + "file will be encrypted using recipient public key - only recipient can read it" +) +public class Share implements Runnable { + + @CommandLine.ParentCommand + private Inbox inbox; + + @CommandLine.Option(names = {"--share", "-s"}, description = "Which file to share, will read from STDIN if absent") + private Path path; + + @CommandLine.Option(names = {"--filename", "-f"}, description = "How to name file in recipients' INBOX") + private String filename; + + @CommandLine.Option(names = {"--recipients", "-r"}, description = "Recipients of the file") + private List recipients; + + @Override + @SneakyThrows + public void run() { + String destinationName = getFilename(); + try (OutputStream os = inbox.getCli().datasafe().inboxService() + .write( + WriteRequest.forDefaultPublic( + recipients.stream().map(UserID::new).collect(Collectors.toSet()), + destinationName + ) + ); + InputStream is = getInputStream() + ) { + ByteStreams.copy(is, os); + } + } + + private String getFilename() { + return null == filename ? getFilenameFromPath() : filename; + } + + private String getFilenameFromPath() { + if (null == path) { + throw new IllegalArgumentException("Filename is required"); + } + + return path.getFileName().toString(); + } + + private InputStream getInputStream() throws IOException { + return null != path ? MoreFiles.asByteSource(path, StandardOpenOption.READ).openStream() : System.in; + } +} diff --git a/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/commands/privatespace/Cat.java b/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/commands/privatespace/Cat.java index e108c220a..739ce4e14 100644 --- a/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/commands/privatespace/Cat.java +++ b/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/commands/privatespace/Cat.java @@ -1,15 +1,34 @@ package de.adorsys.datasafe.cli.commands.privatespace; +import com.google.common.io.ByteStreams; +import de.adorsys.datasafe.types.api.actions.ReadRequest; +import de.adorsys.datasafe.types.api.resource.StorageIdentifier; +import lombok.SneakyThrows; import picocli.CommandLine; +import java.io.InputStream; + @CommandLine.Command( name = "cat", description = "Decrypts private file contents and prints it to STDOUT" ) public class Cat implements Runnable { + @CommandLine.ParentCommand + private Privatespace privatespace; + + @CommandLine.Option(names = {"--storage", "-s"}, description = "Storage identifier") + private String storageId = StorageIdentifier.DEFAULT_ID; + + @CommandLine.Parameters(description = "Filename to decrypt and print") + private String path; + @Override + @SneakyThrows public void run() { - + try (InputStream is = privatespace.getCli().datasafe().privateService() + .read(ReadRequest.forPrivate(privatespace.getCli().auth(), new StorageIdentifier(storageId), path))) { + ByteStreams.copy(is, System.out); + } } } diff --git a/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/commands/privatespace/Copy.java b/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/commands/privatespace/Copy.java index ef4b8cb09..9433b4127 100644 --- a/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/commands/privatespace/Copy.java +++ b/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/commands/privatespace/Copy.java @@ -1,7 +1,18 @@ package de.adorsys.datasafe.cli.commands.privatespace; +import com.google.common.io.ByteStreams; +import com.google.common.io.MoreFiles; +import de.adorsys.datasafe.types.api.actions.WriteRequest; +import de.adorsys.datasafe.types.api.resource.StorageIdentifier; +import lombok.SneakyThrows; import picocli.CommandLine; +import java.io.IOException; +import java.io.InputStream; +import java.io.OutputStream; +import java.nio.file.Path; +import java.nio.file.StandardOpenOption; + @CommandLine.Command( name = "copy", aliases = "cp", @@ -9,8 +20,50 @@ ) public class Copy implements Runnable { + @CommandLine.ParentCommand + private Privatespace privatespace; + + @CommandLine.Option(names = {"--storage", "-s"}, description = "Storage identifier") + private String storageId = StorageIdentifier.DEFAULT_ID; + + @CommandLine.Parameters(description = "Path to copy from, will read from STDIN if absent", arity = "0..1") + private Path from; + + @CommandLine.Parameters(description = "Path in privatespace to copy to") + private String to; + @Override + @SneakyThrows public void run() { + String path = getDestinationPath(); + + try (OutputStream os = privatespace.getCli().datasafe().privateService() + .write( + WriteRequest.forPrivate( + privatespace.getCli().auth(), + new StorageIdentifier(storageId), + path + ) + ); + InputStream is = getInputStream() + ) { + ByteStreams.copy(is, os); + } + } + + private String getDestinationPath() { + return null == to ? getDestinationPathFromFilename() : to; + } + + private String getDestinationPathFromFilename() { + if (null == from) { + throw new IllegalArgumentException("Path is required"); + } + + return from.getFileName().toString(); + } + private InputStream getInputStream() throws IOException { + return null != from ? MoreFiles.asByteSource(from, StandardOpenOption.READ).openStream() : System.in; } } diff --git a/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/commands/privatespace/Delete.java b/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/commands/privatespace/Delete.java index bbc5f4744..c379016aa 100644 --- a/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/commands/privatespace/Delete.java +++ b/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/commands/privatespace/Delete.java @@ -1,5 +1,7 @@ package de.adorsys.datasafe.cli.commands.privatespace; +import de.adorsys.datasafe.types.api.actions.RemoveRequest; +import de.adorsys.datasafe.types.api.resource.StorageIdentifier; import picocli.CommandLine; @CommandLine.Command( @@ -9,8 +11,18 @@ ) public class Delete implements Runnable { + @CommandLine.ParentCommand + private Privatespace privatespace; + + @CommandLine.Option(names = {"--storage", "-s"}, description = "Storage identifier") + private String storageId = StorageIdentifier.DEFAULT_ID; + + @CommandLine.Parameters(description = "Filename to remove") + private String path; + @Override public void run() { - + privatespace.getCli().datasafe().privateService() + .remove(RemoveRequest.forPrivate(privatespace.getCli().auth(), new StorageIdentifier(storageId), path)); } } diff --git a/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/commands/privatespace/List.java b/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/commands/privatespace/List.java new file mode 100644 index 000000000..b0c688dd8 --- /dev/null +++ b/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/commands/privatespace/List.java @@ -0,0 +1,29 @@ +package de.adorsys.datasafe.cli.commands.privatespace; + +import de.adorsys.datasafe.types.api.actions.ListRequest; +import de.adorsys.datasafe.types.api.resource.StorageIdentifier; +import picocli.CommandLine; + +@CommandLine.Command( + name = "list", + aliases = "ls", + description = "Lists file in your privatespace" +) +public class List implements Runnable { + + @CommandLine.ParentCommand + private Privatespace privatespace; + + @CommandLine.Option(names = {"--storage", "-s"}, description = "Storage identifier") + private String storageId = StorageIdentifier.DEFAULT_ID; + + @CommandLine.Parameters(arity = "0..1") + private String prefix = ""; + + @Override + public void run() { + privatespace.getCli().datasafe().privateService() + .list(ListRequest.forPrivate(privatespace.getCli().auth(), new StorageIdentifier(storageId), prefix)) + .forEach(it -> System.out.println(it.location().asString())); + } +} diff --git a/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/commands/privatespace/Privatespace.java b/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/commands/privatespace/Privatespace.java index 5cd623636..c60753d9c 100644 --- a/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/commands/privatespace/Privatespace.java +++ b/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/commands/privatespace/Privatespace.java @@ -1,5 +1,7 @@ package de.adorsys.datasafe.cli.commands.privatespace; +import de.adorsys.datasafe.cli.Cli; +import lombok.Getter; import picocli.CommandLine; @CommandLine.Command( @@ -8,12 +10,17 @@ subcommands = { Cat.class, Copy.class, + List.class, Delete.class, - }) +}) public class Privatespace implements Runnable { + @Getter + @CommandLine.ParentCommand + private Cli cli; + @Override public void run() { - + CommandLine.usage(new Privatespace(), System.out); } } diff --git a/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/commands/profile/Create.java b/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/commands/profile/Create.java index 78512ad92..97893d782 100644 --- a/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/commands/profile/Create.java +++ b/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/commands/profile/Create.java @@ -8,6 +8,9 @@ ) public class Create implements Runnable { + @CommandLine.ParentCommand + private Profile profile; + @Override public void run() { diff --git a/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/commands/profile/Delete.java b/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/commands/profile/Delete.java index 1bf6e620f..89e17f03b 100644 --- a/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/commands/profile/Delete.java +++ b/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/commands/profile/Delete.java @@ -9,6 +9,9 @@ ) public class Delete implements Runnable { + @CommandLine.ParentCommand + private Profile profile; + @Override public void run() { diff --git a/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/commands/profile/Profile.java b/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/commands/profile/Profile.java index 7aae97bc4..62d6a4116 100644 --- a/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/commands/profile/Profile.java +++ b/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/commands/profile/Profile.java @@ -1,6 +1,7 @@ package de.adorsys.datasafe.cli.commands.profile; -import de.adorsys.datasafe.cli.commands.inbox.Delete; +import de.adorsys.datasafe.cli.Cli; +import lombok.Getter; import picocli.CommandLine; @CommandLine.Command( @@ -14,8 +15,12 @@ }) public class Profile implements Runnable { + @Getter + @CommandLine.ParentCommand + private Cli cli; + @Override public void run() { - + CommandLine.usage(new Profile(), System.out); } } diff --git a/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/commands/profile/Read.java b/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/commands/profile/Read.java index 3b74cbef4..28063c2be 100644 --- a/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/commands/profile/Read.java +++ b/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/commands/profile/Read.java @@ -8,6 +8,9 @@ ) public class Read implements Runnable { + @CommandLine.ParentCommand + private Profile profile; + @Override public void run() { diff --git a/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/commands/profile/Update.java b/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/commands/profile/Update.java index 7743c2640..6ccfa8ae4 100644 --- a/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/commands/profile/Update.java +++ b/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/commands/profile/Update.java @@ -8,6 +8,9 @@ ) public class Update implements Runnable { + @CommandLine.ParentCommand + private Profile profile; + @Override public void run() { diff --git a/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/config/DatasafeFactory.java b/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/config/DatasafeFactory.java new file mode 100644 index 000000000..7bb5b1fa3 --- /dev/null +++ b/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/config/DatasafeFactory.java @@ -0,0 +1,79 @@ +package de.adorsys.datasafe.cli.config; + +import com.google.common.collect.ImmutableMap; +import dagger.Lazy; +import de.adorsys.datasafe.business.impl.service.DaggerDefaultDatasafeServices; +import de.adorsys.datasafe.business.impl.service.DefaultDatasafeServices; +import de.adorsys.datasafe.directory.api.profile.keys.StorageKeyStoreOperations; +import de.adorsys.datasafe.directory.impl.profile.config.DefaultDFSConfig; +import de.adorsys.datasafe.directory.impl.profile.dfs.BucketAccessServiceImpl; +import de.adorsys.datasafe.directory.impl.profile.dfs.BucketAccessServiceImplRuntimeDelegatable; +import de.adorsys.datasafe.directory.impl.profile.dfs.RegexAccessServiceWithStorageCredentialsImpl; +import de.adorsys.datasafe.storage.api.RegexDelegatingStorage; +import de.adorsys.datasafe.storage.api.StorageService; +import de.adorsys.datasafe.storage.api.UriBasedAuthStorageService; +import de.adorsys.datasafe.storage.impl.fs.FileSystemStorageService; +import de.adorsys.datasafe.storage.impl.s3.S3ClientFactory; +import de.adorsys.datasafe.storage.impl.s3.S3StorageService; +import de.adorsys.datasafe.types.api.context.BaseOverridesRegistry; +import de.adorsys.datasafe.types.api.context.overrides.OverridesRegistry; +import de.adorsys.datasafe.types.api.utils.ExecutorServiceUtil; +import lombok.experimental.Delegate; + +import java.nio.file.Path; +import java.util.regex.Pattern; + +public class DatasafeFactory { + + public static DefaultDatasafeServices datasafe(Path fsRoot, String systemPassword) { + OverridesRegistry registry = new BaseOverridesRegistry(); + DefaultDatasafeServices multiDfsDatasafe = DaggerDefaultDatasafeServices + .builder() + .config(new DefaultDFSConfig(fsRoot.toUri(), systemPassword)) + .storage( + new RegexDelegatingStorage( + ImmutableMap.builder() + .put(Pattern.compile("file:/.+"), localFs(fsRoot)) + .put(Pattern.compile("s3://.+"), amazonS3()).build() + ) + ) + .overridesRegistry(registry) + .build(); + + BucketAccessServiceImplRuntimeDelegatable.overrideWith( + registry, args -> new WithCredentialProvider(args.getStorageKeyStoreOperations()) + ); + + return multiDfsDatasafe; + } + + private static StorageService localFs(Path fsRoot) { + return new FileSystemStorageService(fsRoot); + } + + private static StorageService amazonS3() { + return new UriBasedAuthStorageService( + acc -> new S3StorageService( + S3ClientFactory.getClientByRegion( + acc.getOnlyHostPart().toString().split("://")[1], + acc.getAccessKey(), + acc.getSecretKey() + ), + // Bucket name is encoded in first path segment + acc.getBucketName(), + ExecutorServiceUtil.submitterExecutesOnStarvationExecutingService() + ) + ); + } + + private static class WithCredentialProvider extends BucketAccessServiceImpl { + + @Delegate + private final RegexAccessServiceWithStorageCredentialsImpl delegate; + + private WithCredentialProvider(Lazy storageKeyStoreOperations) { + super(null); + this.delegate = new RegexAccessServiceWithStorageCredentialsImpl(storageKeyStoreOperations); + } + } +} diff --git a/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/dto/Credentials.java b/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/dto/Credentials.java new file mode 100644 index 000000000..18f736861 --- /dev/null +++ b/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/dto/Credentials.java @@ -0,0 +1,19 @@ +package de.adorsys.datasafe.cli.dto; + +import lombok.Data; +import picocli.CommandLine; + +@Data +public class Credentials { + + @CommandLine.Option(names = {"--username", "-u"}, description = "Username", required = true) + private String username; + + @CommandLine.Option(names = {"--password", "-p"}, description = "Users' password", interactive = true, + required = true) + private String password; + + @CommandLine.Option(names = {"--system-password", "-sp"}, description = "System password", interactive = true, + required = true) + private String systemPassword; +} From 8672bfdf5a49dcf15dc4181f0314ce212ae75828 Mon Sep 17 00:00:00 2001 From: Valentyn Berezin Date: Thu, 29 Aug 2019 20:10:36 +0300 Subject: [PATCH 011/255] Completed profile operations from command line --- .../java/de/adorsys/datasafe/cli/Cli.java | 2 + .../datasafe/cli/commands/profile/Create.java | 41 ++++++++++++++++ .../datasafe/cli/commands/profile/Delete.java | 2 +- .../cli/commands/profile/InputUtil.java | 38 +++++++++++++++ .../cli/commands/profile/Profile.java | 3 ++ .../datasafe/cli/commands/profile/Read.java | 11 +++++ .../datasafe/cli/commands/profile/Update.java | 18 ------- .../cli/commands/profile/storage/Add.java | 47 ++++++++++++++++++ .../cli/commands/profile/storage/List.java | 26 ++++++++++ .../cli/commands/profile/storage/Remove.java | 33 +++++++++++++ .../cli/commands/profile/storage/Storage.java | 26 ++++++++++ .../profile/update/PrivateProfile.java | 48 +++++++++++++++++++ .../profile/update/PublicProfile.java | 40 ++++++++++++++++ .../cli/commands/profile/update/Update.java | 25 ++++++++++ 14 files changed, 341 insertions(+), 19 deletions(-) create mode 100644 datasafe-cli/src/main/java/de/adorsys/datasafe/cli/commands/profile/InputUtil.java delete mode 100644 datasafe-cli/src/main/java/de/adorsys/datasafe/cli/commands/profile/Update.java create mode 100644 datasafe-cli/src/main/java/de/adorsys/datasafe/cli/commands/profile/storage/Add.java create mode 100644 datasafe-cli/src/main/java/de/adorsys/datasafe/cli/commands/profile/storage/List.java create mode 100644 datasafe-cli/src/main/java/de/adorsys/datasafe/cli/commands/profile/storage/Remove.java create mode 100644 datasafe-cli/src/main/java/de/adorsys/datasafe/cli/commands/profile/storage/Storage.java create mode 100644 datasafe-cli/src/main/java/de/adorsys/datasafe/cli/commands/profile/update/PrivateProfile.java create mode 100644 datasafe-cli/src/main/java/de/adorsys/datasafe/cli/commands/profile/update/PublicProfile.java create mode 100644 datasafe-cli/src/main/java/de/adorsys/datasafe/cli/commands/profile/update/Update.java diff --git a/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/Cli.java b/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/Cli.java index c1b7a9428..a0521e52c 100644 --- a/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/Cli.java +++ b/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/Cli.java @@ -9,6 +9,7 @@ import de.adorsys.datasafe.cli.config.DatasafeFactory; import de.adorsys.datasafe.cli.dto.Credentials; import de.adorsys.datasafe.encrypiton.api.types.UserIDAuth; +import lombok.Getter; import lombok.RequiredArgsConstructor; import lombok.SneakyThrows; import picocli.CommandLine; @@ -30,6 +31,7 @@ @RequiredArgsConstructor public class Cli implements Runnable { + @Getter @CommandLine.Option( names = {"--root-dir", "-rd"}, description = "Folder with user profiles, default is current directory" diff --git a/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/commands/profile/Create.java b/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/commands/profile/Create.java index 97893d782..feb9e7b0b 100644 --- a/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/commands/profile/Create.java +++ b/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/commands/profile/Create.java @@ -1,7 +1,15 @@ package de.adorsys.datasafe.cli.commands.profile; +import de.adorsys.datasafe.directory.api.types.CreateUserPrivateProfile; +import de.adorsys.datasafe.directory.api.types.CreateUserPublicProfile; +import de.adorsys.datasafe.types.api.resource.BasePrivateResource; +import de.adorsys.datasafe.types.api.resource.BasePublicResource; import picocli.CommandLine; +import java.util.Collections; + +import static de.adorsys.datasafe.cli.commands.profile.InputUtil.inpPath; + @CommandLine.Command( name = "create", description = "Creates new user profile (new user)" @@ -13,6 +21,39 @@ public class Create implements Runnable { @Override public void run() { + String publicKeys = inpPath("Public keys", atRoot("pubkeys")); + String inbox = inpPath("Your INBOX folder", atRoot("inbox/")); + + CreateUserPublicProfile publicProfile = CreateUserPublicProfile.builder() + .id(profile.getCli().auth().getUserID()) + .publicKeys(BasePublicResource.forAbsolutePublic(publicKeys)) + .inbox(BasePublicResource.forAbsolutePublic(inbox)) + .build(); + + profile.getCli().datasafe().userProfile().registerPublic(publicProfile); + + CreateUserPrivateProfile privateProfile = CreateUserPrivateProfile.builder() + .id(profile.getCli().auth()) + .keystore(BasePrivateResource.forAbsolutePrivate(inpPath("Keystore", atRoot("keystore")))) + .privateStorage(BasePrivateResource.forAbsolutePrivate(inpPath("Private files", atRoot("private/")))) + .inboxWithWriteAccess(BasePrivateResource.forAbsolutePrivate(inbox)) + .storageCredentialsKeystore( + BasePrivateResource.forAbsolutePrivate( + inpPath("Storage credentials keystore", atRoot("storage.keystore")) + ) + ) + .associatedResources(Collections.emptyList()) + .publishPubKeysTo(BasePublicResource.forAbsolutePublic(publicKeys)) + .build(); + + profile.getCli().datasafe().userProfile().registerPrivate(privateProfile); + profile.getCli().datasafe().userProfile().createAllAllowableKeystores( + profile.getCli().auth(), + privateProfile.removeAccess() + ); + } + private String atRoot(String name) { + return profile.getCli().getProfilesRoot().resolve(name).toAbsolutePath().toUri().toASCIIString(); } } diff --git a/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/commands/profile/Delete.java b/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/commands/profile/Delete.java index 89e17f03b..faaae105e 100644 --- a/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/commands/profile/Delete.java +++ b/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/commands/profile/Delete.java @@ -14,6 +14,6 @@ public class Delete implements Runnable { @Override public void run() { - + profile.getCli().datasafe().userProfile().deregister(profile.getCli().auth()); } } diff --git a/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/commands/profile/InputUtil.java b/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/commands/profile/InputUtil.java new file mode 100644 index 000000000..3bf6ed2ac --- /dev/null +++ b/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/commands/profile/InputUtil.java @@ -0,0 +1,38 @@ +package de.adorsys.datasafe.cli.commands.profile; + +import com.google.common.base.Strings; +import lombok.experimental.UtilityClass; + +import java.net.URI; +import java.nio.file.Paths; +import java.util.Scanner; + +@UtilityClass +public class InputUtil { + + private static final Scanner sc = new Scanner(System.in); + + public static String input(String text, String defaultValue) { + System.out.println(text + " (" + defaultValue + "):"); + String input = sc.hasNextLine() ? sc.nextLine() : null; + + if (Strings.isNullOrEmpty(input)) { + return defaultValue; + } + return input; + } + + public static String inpPath(String text, String defaultValue) { + String result = input(text, defaultValue); + + if (URI.create(result).isAbsolute()) { + return result; + } + + if (result.startsWith("~/")) { + result = result.replaceFirst("^~", System.getProperty("user.home")); + } + + return Paths.get(result).toUri().toASCIIString(); + } +} diff --git a/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/commands/profile/Profile.java b/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/commands/profile/Profile.java index 62d6a4116..684a632ad 100644 --- a/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/commands/profile/Profile.java +++ b/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/commands/profile/Profile.java @@ -1,6 +1,8 @@ package de.adorsys.datasafe.cli.commands.profile; import de.adorsys.datasafe.cli.Cli; +import de.adorsys.datasafe.cli.commands.profile.storage.Storage; +import de.adorsys.datasafe.cli.commands.profile.update.Update; import lombok.Getter; import picocli.CommandLine; @@ -12,6 +14,7 @@ Update.class, Read.class, Delete.class, + Storage.class }) public class Profile implements Runnable { diff --git a/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/commands/profile/Read.java b/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/commands/profile/Read.java index 28063c2be..f1bf31521 100644 --- a/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/commands/profile/Read.java +++ b/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/commands/profile/Read.java @@ -1,5 +1,7 @@ package de.adorsys.datasafe.cli.commands.profile; +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; import picocli.CommandLine; @CommandLine.Command( @@ -13,6 +15,15 @@ public class Read implements Runnable { @Override public void run() { + Gson gson = new GsonBuilder().setPrettyPrinting().create(); + System.out.println(" ==== Public profile: ===="); + System.out.println(gson.toJson( + profile.getCli().datasafe().userProfile().publicProfile(profile.getCli().auth().getUserID()) + )); + System.out.println(" ==== Private profile: ===="); + System.out.println(gson.toJson( + profile.getCli().datasafe().userProfile().privateProfile(profile.getCli().auth()) + )); } } diff --git a/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/commands/profile/Update.java b/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/commands/profile/Update.java deleted file mode 100644 index 6ccfa8ae4..000000000 --- a/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/commands/profile/Update.java +++ /dev/null @@ -1,18 +0,0 @@ -package de.adorsys.datasafe.cli.commands.profile; - -import picocli.CommandLine; - -@CommandLine.Command( - name = "update", - description = "Updates user profile - i.e. adds another private storage" -) -public class Update implements Runnable { - - @CommandLine.ParentCommand - private Profile profile; - - @Override - public void run() { - - } -} diff --git a/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/commands/profile/storage/Add.java b/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/commands/profile/storage/Add.java new file mode 100644 index 000000000..d6ccdca05 --- /dev/null +++ b/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/commands/profile/storage/Add.java @@ -0,0 +1,47 @@ +package de.adorsys.datasafe.cli.commands.profile.storage; + +import de.adorsys.datasafe.cli.Cli; +import de.adorsys.datasafe.directory.api.types.StorageCredentials; +import de.adorsys.datasafe.types.api.resource.StorageIdentifier; +import lombok.Getter; +import picocli.CommandLine; + +@CommandLine.Command( + name = "add", + description = "Adds path mapping and credentials to access user storage" +) +public class Add implements Runnable { + + @Getter + @CommandLine.ParentCommand + private Storage storage; + + @CommandLine.Option( + names = {"--mapping", "-m"}, + description = "Storage mapping regex (i.e. 's3://.+' will route all requests with s3 protocol to this storage)", + required = true) + private String mapping; + + @CommandLine.Option( + names = {"--username", "-u"}, + description = "Storage username (i.e. AWS_ACCESS_KEY)", + required = true) + private String username; + + @CommandLine.Option( + names = {"--password", "-p"}, + description = "Storage password (i.e. AWS_SECRET_KEY)", + interactive = true, + required = true) + private String password; + + @Override + public void run() { + Cli cli = storage.getProfile().getCli(); + cli.datasafe().userProfile().registerStorageCredentials( + cli.auth(), + new StorageIdentifier(mapping), + new StorageCredentials(username, password) + ); + } +} diff --git a/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/commands/profile/storage/List.java b/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/commands/profile/storage/List.java new file mode 100644 index 000000000..b48ba6499 --- /dev/null +++ b/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/commands/profile/storage/List.java @@ -0,0 +1,26 @@ +package de.adorsys.datasafe.cli.commands.profile.storage; + +import de.adorsys.datasafe.cli.Cli; +import lombok.Getter; +import picocli.CommandLine; + +@CommandLine.Command( + name = "list", + aliases = "ls", + description = "Lists path mapping aliases to access user storage" +) +public class List implements Runnable { + + @Getter + @CommandLine.ParentCommand + private Storage storage; + + @Override + public void run() { + Cli cli = storage.getProfile().getCli(); + + cli.datasafe().userProfile().privateProfile( + cli.auth() + ).getPrivateStorage().keySet().forEach(it -> System.out.println(it.getId())); + } +} diff --git a/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/commands/profile/storage/Remove.java b/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/commands/profile/storage/Remove.java new file mode 100644 index 000000000..454dd1cfa --- /dev/null +++ b/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/commands/profile/storage/Remove.java @@ -0,0 +1,33 @@ +package de.adorsys.datasafe.cli.commands.profile.storage; + +import de.adorsys.datasafe.cli.Cli; +import de.adorsys.datasafe.types.api.resource.StorageIdentifier; +import lombok.Getter; +import picocli.CommandLine; + +@CommandLine.Command( + name = "remove", + aliases = "rm", + description = "Removes path mapping alias" +) +public class Remove implements Runnable { + + @Getter + @CommandLine.ParentCommand + private Storage storage; + + @CommandLine.Option( + names = {"--mapping", "-m"}, + description = "Storage mapping regex/id (i.e. 's3://.+' will route all requests with s3 protocol to this storage)", + required = true) + private String mapping; + + @Override + public void run() { + Cli cli = storage.getProfile().getCli(); + cli.datasafe().userProfile().deregisterStorageCredentials( + cli.auth(), + new StorageIdentifier(mapping) + ); + } +} diff --git a/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/commands/profile/storage/Storage.java b/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/commands/profile/storage/Storage.java new file mode 100644 index 000000000..7e3276556 --- /dev/null +++ b/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/commands/profile/storage/Storage.java @@ -0,0 +1,26 @@ +package de.adorsys.datasafe.cli.commands.profile.storage; + +import de.adorsys.datasafe.cli.commands.profile.Profile; +import lombok.Getter; +import picocli.CommandLine; + +@CommandLine.Command( + name = "storage", + description = "Updates user storage list (i.e. adds another s3 storage definition)", + subcommands = { + Add.class, + List.class, + Remove.class + } +) +public class Storage implements Runnable { + + @Getter + @CommandLine.ParentCommand + private Profile profile; + + @Override + public void run() { + CommandLine.usage(new Storage(), System.out); + } +} diff --git a/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/commands/profile/update/PrivateProfile.java b/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/commands/profile/update/PrivateProfile.java new file mode 100644 index 000000000..1294e7fab --- /dev/null +++ b/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/commands/profile/update/PrivateProfile.java @@ -0,0 +1,48 @@ +package de.adorsys.datasafe.cli.commands.profile.update; + +import de.adorsys.datasafe.cli.Cli; +import de.adorsys.datasafe.directory.api.types.UserPrivateProfile; +import de.adorsys.datasafe.types.api.resource.AbsoluteLocation; +import de.adorsys.datasafe.types.api.resource.BasePrivateResource; +import lombok.Getter; +import picocli.CommandLine; + +import java.util.Collections; + +import static de.adorsys.datasafe.cli.commands.profile.InputUtil.inpPath; + +@CommandLine.Command( + name = "private", + description = "Updates user private part of user profile" +) +public class PrivateProfile implements Runnable { + + @Getter + @CommandLine.ParentCommand + private Update update; + + @Override + public void run() { + Cli cli = update.getProfile().getCli(); + UserPrivateProfile current = cli.datasafe().userProfile().privateProfile(cli.auth()); + + UserPrivateProfile privateProfile = UserPrivateProfile.builder() + .keystore(BasePrivateResource.forAbsolutePrivate(inpPath("Keystore", asStr(current.getKeystore())))) + .privateStorage(current.getPrivateStorage()) + .inboxWithFullAccess(BasePrivateResource.forAbsolutePrivate(inpPath("Inbox", asStr(current.getInboxWithFullAccess())))) + .storageCredentialsKeystore( + BasePrivateResource.forAbsolutePrivate( + inpPath("Storage credentials keystore", asStr(current.getStorageCredentialsKeystore())) + ) + ) + .associatedResources(Collections.emptyList()) + .publishPublicKeysTo(current.getPublishPublicKeysTo()) + .build(); + + cli.datasafe().userProfile().updatePrivateProfile(cli.auth(), privateProfile); + } + + private String asStr(AbsoluteLocation location) { + return location.location().asString(); + } +} diff --git a/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/commands/profile/update/PublicProfile.java b/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/commands/profile/update/PublicProfile.java new file mode 100644 index 000000000..dabc21344 --- /dev/null +++ b/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/commands/profile/update/PublicProfile.java @@ -0,0 +1,40 @@ +package de.adorsys.datasafe.cli.commands.profile.update; + +import de.adorsys.datasafe.cli.Cli; +import de.adorsys.datasafe.directory.api.types.UserPublicProfile; +import de.adorsys.datasafe.types.api.resource.AbsoluteLocation; +import de.adorsys.datasafe.types.api.resource.BasePublicResource; +import lombok.Getter; +import picocli.CommandLine; + +import static de.adorsys.datasafe.cli.commands.profile.InputUtil.inpPath; + +@CommandLine.Command( + name = "public", + description = "Updates user public part of user profile" +) +public class PublicProfile implements Runnable { + + @Getter + @CommandLine.ParentCommand + private Update update; + + @Override + public void run() { + Cli cli = update.getProfile().getCli(); + UserPublicProfile current = cli.datasafe().userProfile().publicProfile(cli.auth().getUserID()); + + UserPublicProfile publicProfile = UserPublicProfile.builder() + .inbox(BasePublicResource.forAbsolutePublic(inpPath("Inbox", asStr(current.getPublicKeys())))) + .publicKeys(BasePublicResource.forAbsolutePublic(inpPath("Public keys", asStr(current.getInbox())))) + .build(); + + cli.datasafe().userProfile().updatePublicProfile(cli.auth(), publicProfile); + } + + private String asStr(AbsoluteLocation location) { + return location.location().asString(); + } + +} + diff --git a/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/commands/profile/update/Update.java b/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/commands/profile/update/Update.java new file mode 100644 index 000000000..4abb9eac9 --- /dev/null +++ b/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/commands/profile/update/Update.java @@ -0,0 +1,25 @@ +package de.adorsys.datasafe.cli.commands.profile.update; + +import de.adorsys.datasafe.cli.commands.profile.Profile; +import lombok.Getter; +import picocli.CommandLine; + +@CommandLine.Command( + name = "update", + description = "Updates user profile - i.e. adds another private storage", + subcommands = { + PrivateProfile.class, + PublicProfile.class + } +) +public class Update implements Runnable { + + @Getter + @CommandLine.ParentCommand + private Profile profile; + + @Override + public void run() { + CommandLine.usage(new Update(), System.out); + } +} From 2577069080e5882c96a575d6779c46586bf0a8f5 Mon Sep 17 00:00:00 2001 From: Valentyn Berezin Date: Thu, 29 Aug 2019 20:38:07 +0300 Subject: [PATCH 012/255] Another set of bugfixes related to CLI --- .../datasafe/cli/commands/inbox/Cat.java | 2 +- .../datasafe/cli/commands/inbox/Delete.java | 2 +- .../datasafe/cli/commands/inbox/Inbox.java | 1 + .../datasafe/cli/commands/inbox/List.java | 2 +- .../datasafe/cli/commands/inbox/Share.java | 34 +++++-------------- .../cli/commands/privatespace/Cat.java | 2 +- .../cli/commands/privatespace/Copy.java | 27 +++------------ .../cli/commands/privatespace/Delete.java | 2 +- .../cli/commands/privatespace/List.java | 2 +- .../datasafe/cli/commands/profile/Create.java | 3 +- 10 files changed, 22 insertions(+), 55 deletions(-) diff --git a/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/commands/inbox/Cat.java b/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/commands/inbox/Cat.java index 89c557e20..dc2c3b7eb 100644 --- a/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/commands/inbox/Cat.java +++ b/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/commands/inbox/Cat.java @@ -16,7 +16,7 @@ public class Cat implements Runnable { @CommandLine.ParentCommand private Inbox inbox; - @CommandLine.Parameters(description = "Filename to print") + @CommandLine.Parameters(description = "Filename to print", arity = "1") private String path; @Override diff --git a/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/commands/inbox/Delete.java b/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/commands/inbox/Delete.java index 3528610d9..246b6d576 100644 --- a/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/commands/inbox/Delete.java +++ b/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/commands/inbox/Delete.java @@ -14,7 +14,7 @@ public class Delete implements Runnable { @CommandLine.ParentCommand private Inbox inbox; - @CommandLine.Parameters(description = "Filename to remove") + @CommandLine.Parameters(description = "Filename to remove", arity = "1") private String path; @Override diff --git a/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/commands/inbox/Inbox.java b/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/commands/inbox/Inbox.java index b40cbe28d..6bcb4c664 100644 --- a/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/commands/inbox/Inbox.java +++ b/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/commands/inbox/Inbox.java @@ -10,6 +10,7 @@ "Allows user to read encrypted files that are shared with him and to share his files with other users", subcommands = { Cat.class, + List.class, Share.class, Delete.class, }) diff --git a/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/commands/inbox/List.java b/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/commands/inbox/List.java index 83c4b70ea..4ca3c87a7 100644 --- a/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/commands/inbox/List.java +++ b/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/commands/inbox/List.java @@ -20,6 +20,6 @@ public class List implements Runnable { public void run() { inbox.getCli().datasafe().inboxService() .list(ListRequest.forDefaultPrivate(inbox.getCli().auth(), prefix)) - .forEach(it -> System.out.println(it.location().asString())); + .forEach(it -> System.out.println(it.getResource().asPrivate().decryptedPath().asString())); } } diff --git a/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/commands/inbox/Share.java b/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/commands/inbox/Share.java index af3fbf4c8..244bdf4d0 100644 --- a/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/commands/inbox/Share.java +++ b/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/commands/inbox/Share.java @@ -7,7 +7,6 @@ import lombok.SneakyThrows; import picocli.CommandLine; -import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; import java.nio.file.Path; @@ -16,8 +15,7 @@ import java.util.stream.Collectors; @CommandLine.Command( - name = "copy", - aliases = "cp", + name = "share", description = "Shares file with other users, " + "file will be encrypted using recipient public key - only recipient can read it" ) @@ -26,45 +24,31 @@ public class Share implements Runnable { @CommandLine.ParentCommand private Inbox inbox; - @CommandLine.Option(names = {"--share", "-s"}, description = "Which file to share, will read from STDIN if absent") + @CommandLine.Option(names = {"--share", "-s"}, description = "Which file to share", required = true) private Path path; - @CommandLine.Option(names = {"--filename", "-f"}, description = "How to name file in recipients' INBOX") + @CommandLine.Option( + names = {"--filename", "-f"}, + description = "How to name file in recipients' INBOX", + required = true) private String filename; - @CommandLine.Option(names = {"--recipients", "-r"}, description = "Recipients of the file") + @CommandLine.Option(names = {"--recipients", "-r"}, description = "Recipients of the file", required = true) private List recipients; @Override @SneakyThrows public void run() { - String destinationName = getFilename(); try (OutputStream os = inbox.getCli().datasafe().inboxService() .write( WriteRequest.forDefaultPublic( recipients.stream().map(UserID::new).collect(Collectors.toSet()), - destinationName + filename ) ); - InputStream is = getInputStream() + InputStream is = MoreFiles.asByteSource(path, StandardOpenOption.READ).openStream() ) { ByteStreams.copy(is, os); } } - - private String getFilename() { - return null == filename ? getFilenameFromPath() : filename; - } - - private String getFilenameFromPath() { - if (null == path) { - throw new IllegalArgumentException("Filename is required"); - } - - return path.getFileName().toString(); - } - - private InputStream getInputStream() throws IOException { - return null != path ? MoreFiles.asByteSource(path, StandardOpenOption.READ).openStream() : System.in; - } } diff --git a/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/commands/privatespace/Cat.java b/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/commands/privatespace/Cat.java index 739ce4e14..430a3c2dd 100644 --- a/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/commands/privatespace/Cat.java +++ b/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/commands/privatespace/Cat.java @@ -20,7 +20,7 @@ public class Cat implements Runnable { @CommandLine.Option(names = {"--storage", "-s"}, description = "Storage identifier") private String storageId = StorageIdentifier.DEFAULT_ID; - @CommandLine.Parameters(description = "Filename to decrypt and print") + @CommandLine.Parameters(description = "Filename to decrypt and print", arity = "1") private String path; @Override diff --git a/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/commands/privatespace/Copy.java b/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/commands/privatespace/Copy.java index 9433b4127..3455fecb0 100644 --- a/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/commands/privatespace/Copy.java +++ b/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/commands/privatespace/Copy.java @@ -7,7 +7,6 @@ import lombok.SneakyThrows; import picocli.CommandLine; -import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; import java.nio.file.Path; @@ -26,44 +25,26 @@ public class Copy implements Runnable { @CommandLine.Option(names = {"--storage", "-s"}, description = "Storage identifier") private String storageId = StorageIdentifier.DEFAULT_ID; - @CommandLine.Parameters(description = "Path to copy from, will read from STDIN if absent", arity = "0..1") + @CommandLine.Parameters(description = "Path to copy from", index = "0", arity = "1") private Path from; - @CommandLine.Parameters(description = "Path in privatespace to copy to") + @CommandLine.Parameters(description = "Path in privatespace to copy to", index = "1", arity = "1") private String to; @Override @SneakyThrows public void run() { - String path = getDestinationPath(); - try (OutputStream os = privatespace.getCli().datasafe().privateService() .write( WriteRequest.forPrivate( privatespace.getCli().auth(), new StorageIdentifier(storageId), - path + to ) ); - InputStream is = getInputStream() + InputStream is = MoreFiles.asByteSource(from, StandardOpenOption.READ).openStream() ) { ByteStreams.copy(is, os); } } - - private String getDestinationPath() { - return null == to ? getDestinationPathFromFilename() : to; - } - - private String getDestinationPathFromFilename() { - if (null == from) { - throw new IllegalArgumentException("Path is required"); - } - - return from.getFileName().toString(); - } - - private InputStream getInputStream() throws IOException { - return null != from ? MoreFiles.asByteSource(from, StandardOpenOption.READ).openStream() : System.in; - } } diff --git a/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/commands/privatespace/Delete.java b/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/commands/privatespace/Delete.java index c379016aa..5ed5bf019 100644 --- a/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/commands/privatespace/Delete.java +++ b/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/commands/privatespace/Delete.java @@ -17,7 +17,7 @@ public class Delete implements Runnable { @CommandLine.Option(names = {"--storage", "-s"}, description = "Storage identifier") private String storageId = StorageIdentifier.DEFAULT_ID; - @CommandLine.Parameters(description = "Filename to remove") + @CommandLine.Parameters(description = "Filename to remove", arity = "1") private String path; @Override diff --git a/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/commands/privatespace/List.java b/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/commands/privatespace/List.java index b0c688dd8..eef064a4f 100644 --- a/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/commands/privatespace/List.java +++ b/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/commands/privatespace/List.java @@ -24,6 +24,6 @@ public class List implements Runnable { public void run() { privatespace.getCli().datasafe().privateService() .list(ListRequest.forPrivate(privatespace.getCli().auth(), new StorageIdentifier(storageId), prefix)) - .forEach(it -> System.out.println(it.location().asString())); + .forEach(it -> System.out.println(it.getResource().asPrivate().decryptedPath().asString())); } } diff --git a/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/commands/profile/Create.java b/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/commands/profile/Create.java index feb9e7b0b..39fb27863 100644 --- a/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/commands/profile/Create.java +++ b/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/commands/profile/Create.java @@ -54,6 +54,7 @@ public void run() { } private String atRoot(String name) { - return profile.getCli().getProfilesRoot().resolve(name).toAbsolutePath().toUri().toASCIIString(); + return profile.getCli().getProfilesRoot().resolve(name).toAbsolutePath().toUri().toASCIIString() + + (name.endsWith("/") ? "/" : ""); } } From 86a02b50a6fb6d952808087962d65122b0d189bf Mon Sep 17 00:00:00 2001 From: Valentyn Berezin Date: Fri, 30 Aug 2019 13:06:57 +0300 Subject: [PATCH 013/255] Additional set of fixes for CLI to work --- .../impl/directory/DefaultProfileModule.java | 17 +++---- datasafe-cli/pom.xml | 19 +++++++ .../cli/commands/profile/storage/Add.java | 42 +++++++++------- .../cli/commands/profile/storage/List.java | 4 +- .../cli/commands/profile/storage/Remove.java | 25 +++++++--- .../cli/commands/profile/storage/Storage.java | 6 ++- .../profile/storage/credentials/Add.java | 47 +++++++++++++++++ .../storage/credentials/Credentials.java | 26 ++++++++++ .../profile/storage/credentials/List.java | 27 ++++++++++ .../profile/storage/credentials/Remove.java | 33 ++++++++++++ .../profile/operations/ProfileOperations.java | 2 +- .../ProfileStorageCredentialsService.java | 34 +++++++++++++ .../operations/ProfileUpdatingService.java | 17 ------- .../DFSBasedProfileStorageImpl.java | 13 ++--- .../ProfileStorageCredentialsServiceImpl.java | 50 +++++++++++++++++++ .../actions/ProfileUpdatingServiceImpl.java | 15 ------ ...fileStorageCredentialsServiceImplTest.java | 50 +++++++++++++++++++ .../ProfileUpdatingServiceImplTest.java | 24 --------- ...domActionsOnSimpleDatasafeAdapterTest.java | 5 ++ 19 files changed, 357 insertions(+), 99 deletions(-) create mode 100644 datasafe-cli/src/main/java/de/adorsys/datasafe/cli/commands/profile/storage/credentials/Add.java create mode 100644 datasafe-cli/src/main/java/de/adorsys/datasafe/cli/commands/profile/storage/credentials/Credentials.java create mode 100644 datasafe-cli/src/main/java/de/adorsys/datasafe/cli/commands/profile/storage/credentials/List.java create mode 100644 datasafe-cli/src/main/java/de/adorsys/datasafe/cli/commands/profile/storage/credentials/Remove.java create mode 100644 datasafe-directory/datasafe-directory-api/src/main/java/de/adorsys/datasafe/directory/api/profile/operations/ProfileStorageCredentialsService.java create mode 100644 datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/operations/actions/ProfileStorageCredentialsServiceImpl.java create mode 100644 datasafe-directory/datasafe-directory-impl/src/test/java/de/adorsys/datasafe/directory/impl/profile/operations/actions/ProfileStorageCredentialsServiceImplTest.java diff --git a/datasafe-business/src/main/java/de/adorsys/datasafe/business/impl/directory/DefaultProfileModule.java b/datasafe-business/src/main/java/de/adorsys/datasafe/business/impl/directory/DefaultProfileModule.java index af8bee226..d319a1917 100644 --- a/datasafe-business/src/main/java/de/adorsys/datasafe/business/impl/directory/DefaultProfileModule.java +++ b/datasafe-business/src/main/java/de/adorsys/datasafe/business/impl/directory/DefaultProfileModule.java @@ -5,21 +5,14 @@ import dagger.Binds; import dagger.Module; import dagger.Provides; -import de.adorsys.datasafe.directory.api.profile.operations.ProfileOperations; -import de.adorsys.datasafe.directory.api.profile.operations.ProfileRegistrationService; -import de.adorsys.datasafe.directory.api.profile.operations.ProfileRemovalService; -import de.adorsys.datasafe.directory.api.profile.operations.ProfileRetrievalService; -import de.adorsys.datasafe.directory.api.profile.operations.ProfileUpdatingService; +import de.adorsys.datasafe.directory.api.profile.operations.*; import de.adorsys.datasafe.directory.api.resource.ResourceResolver; import de.adorsys.datasafe.directory.api.types.UserPrivateProfile; import de.adorsys.datasafe.directory.api.types.UserPublicProfile; import de.adorsys.datasafe.directory.impl.profile.operations.DFSBasedProfileStorageImplRuntimeDelegatable; import de.adorsys.datasafe.directory.impl.profile.operations.DefaultUserProfileCacheRuntimeDelegatable; import de.adorsys.datasafe.directory.impl.profile.operations.UserProfileCache; -import de.adorsys.datasafe.directory.impl.profile.operations.actions.ProfileRegistrationServiceImplRuntimeDelegatable; -import de.adorsys.datasafe.directory.impl.profile.operations.actions.ProfileRemovalServiceImplRuntimeDelegatable; -import de.adorsys.datasafe.directory.impl.profile.operations.actions.ProfileRetrievalServiceImplRuntimeDelegatable; -import de.adorsys.datasafe.directory.impl.profile.operations.actions.ProfileUpdatingServiceImplRuntimeDelegatable; +import de.adorsys.datasafe.directory.impl.profile.operations.actions.*; import de.adorsys.datasafe.directory.impl.profile.resource.ResourceResolverImplRuntimeDelegatable; import de.adorsys.datasafe.encrypiton.api.types.UserID; import de.adorsys.datasafe.types.api.context.overrides.OverridesRegistry; @@ -81,6 +74,12 @@ static UserProfileCache userProfileCache(@Nullable OverridesRegistry registry) { @Binds abstract ProfileRemovalService removalService(ProfileRemovalServiceImplRuntimeDelegatable impl); + /** + * Storage credentials access. + */ + @Binds + abstract ProfileStorageCredentialsService profileStorageCredentialsService(ProfileStorageCredentialsServiceImplRuntimeDelegatable impl); + /** * Resource resolver that simply prepends relevant path segment from profile based on location type. */ diff --git a/datasafe-cli/pom.xml b/datasafe-cli/pom.xml index c96cd4920..26eac247a 100644 --- a/datasafe-cli/pom.xml +++ b/datasafe-cli/pom.xml @@ -119,6 +119,25 @@ native-image + + org.apache.maven.plugins + maven-compiler-plugin + + + + org.projectlombok + lombok + ${lombok.version} + + + info.picocli + picocli-codegen + ${picocli.version} + + + + + com.oracle.substratevm native-image-maven-plugin diff --git a/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/commands/profile/storage/Add.java b/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/commands/profile/storage/Add.java index d6ccdca05..bdbeb272f 100644 --- a/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/commands/profile/storage/Add.java +++ b/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/commands/profile/storage/Add.java @@ -1,14 +1,20 @@ package de.adorsys.datasafe.cli.commands.profile.storage; import de.adorsys.datasafe.cli.Cli; -import de.adorsys.datasafe.directory.api.types.StorageCredentials; +import de.adorsys.datasafe.directory.api.types.UserPrivateProfile; +import de.adorsys.datasafe.types.api.resource.AbsoluteLocation; +import de.adorsys.datasafe.types.api.resource.BasePrivateResource; +import de.adorsys.datasafe.types.api.resource.PrivateResource; import de.adorsys.datasafe.types.api.resource.StorageIdentifier; import lombok.Getter; import picocli.CommandLine; +import java.util.HashMap; +import java.util.Map; + @CommandLine.Command( name = "add", - description = "Adds path mapping and credentials to access user storage" + description = "Adds private storage" ) public class Add implements Runnable { @@ -17,31 +23,31 @@ public class Add implements Runnable { private Storage storage; @CommandLine.Option( - names = {"--mapping", "-m"}, - description = "Storage mapping regex (i.e. 's3://.+' will route all requests with s3 protocol to this storage)", - required = true) - private String mapping; - - @CommandLine.Option( - names = {"--username", "-u"}, - description = "Storage username (i.e. AWS_ACCESS_KEY)", + names = {"--identifier", "-i"}, + description = "Storage identifier to be associated with this path", required = true) - private String username; + private String identifier; @CommandLine.Option( - names = {"--password", "-p"}, - description = "Storage password (i.e. AWS_SECRET_KEY)", - interactive = true, + names = {"--path", "-p"}, + description = "Absolute path (with protocol) that is associated with this identifier", required = true) - private String password; + private String path; @Override public void run() { Cli cli = storage.getProfile().getCli(); - cli.datasafe().userProfile().registerStorageCredentials( + + UserPrivateProfile privateProfile = cli.datasafe().userProfile().privateProfile(cli.auth()); + Map> pathsMap = new HashMap<>( + privateProfile.getPrivateStorage() + ); + + pathsMap.put(new StorageIdentifier(identifier), BasePrivateResource.forAbsolutePrivate(path)); + + cli.datasafe().userProfile().updatePrivateProfile( cli.auth(), - new StorageIdentifier(mapping), - new StorageCredentials(username, password) + privateProfile.toBuilder().privateStorage(pathsMap).build() ); } } diff --git a/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/commands/profile/storage/List.java b/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/commands/profile/storage/List.java index b48ba6499..93c5b212c 100644 --- a/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/commands/profile/storage/List.java +++ b/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/commands/profile/storage/List.java @@ -21,6 +21,8 @@ public void run() { cli.datasafe().userProfile().privateProfile( cli.auth() - ).getPrivateStorage().keySet().forEach(it -> System.out.println(it.getId())); + ).getPrivateStorage().forEach( + (key, value) -> System.out.println(key.getId() + "\t" + value.location().asString()) + ); } } diff --git a/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/commands/profile/storage/Remove.java b/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/commands/profile/storage/Remove.java index 454dd1cfa..def903c59 100644 --- a/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/commands/profile/storage/Remove.java +++ b/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/commands/profile/storage/Remove.java @@ -1,14 +1,20 @@ package de.adorsys.datasafe.cli.commands.profile.storage; import de.adorsys.datasafe.cli.Cli; +import de.adorsys.datasafe.directory.api.types.UserPrivateProfile; +import de.adorsys.datasafe.types.api.resource.AbsoluteLocation; +import de.adorsys.datasafe.types.api.resource.PrivateResource; import de.adorsys.datasafe.types.api.resource.StorageIdentifier; import lombok.Getter; import picocli.CommandLine; +import java.util.HashMap; +import java.util.Map; + @CommandLine.Command( name = "remove", aliases = "rm", - description = "Removes path mapping alias" + description = "Removes path access credentials" ) public class Remove implements Runnable { @@ -17,17 +23,24 @@ public class Remove implements Runnable { private Storage storage; @CommandLine.Option( - names = {"--mapping", "-m"}, - description = "Storage mapping regex/id (i.e. 's3://.+' will route all requests with s3 protocol to this storage)", + names = {"--identifier", "-i"}, + description = "Storage identifier to be associated with this path", required = true) - private String mapping; + private String identifier; @Override public void run() { Cli cli = storage.getProfile().getCli(); - cli.datasafe().userProfile().deregisterStorageCredentials( + + UserPrivateProfile privateProfile = cli.datasafe().userProfile().privateProfile(cli.auth()); + Map> pathsMap = new HashMap<>( + privateProfile.getPrivateStorage() + ); + pathsMap.remove(new StorageIdentifier(identifier)); + + cli.datasafe().userProfile().updatePrivateProfile( cli.auth(), - new StorageIdentifier(mapping) + privateProfile.toBuilder().privateStorage(pathsMap).build() ); } } diff --git a/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/commands/profile/storage/Storage.java b/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/commands/profile/storage/Storage.java index 7e3276556..9599357d7 100644 --- a/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/commands/profile/storage/Storage.java +++ b/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/commands/profile/storage/Storage.java @@ -1,16 +1,18 @@ package de.adorsys.datasafe.cli.commands.profile.storage; import de.adorsys.datasafe.cli.commands.profile.Profile; +import de.adorsys.datasafe.cli.commands.profile.storage.credentials.Credentials; import lombok.Getter; import picocli.CommandLine; @CommandLine.Command( name = "storage", - description = "Updates user storage list (i.e. adds another s3 storage definition)", + description = "Manages user storage list (i.e. adds another s3 storage path)", subcommands = { Add.class, List.class, - Remove.class + Remove.class, + Credentials.class } ) public class Storage implements Runnable { diff --git a/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/commands/profile/storage/credentials/Add.java b/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/commands/profile/storage/credentials/Add.java new file mode 100644 index 000000000..e9ba6ccfe --- /dev/null +++ b/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/commands/profile/storage/credentials/Add.java @@ -0,0 +1,47 @@ +package de.adorsys.datasafe.cli.commands.profile.storage.credentials; + +import de.adorsys.datasafe.cli.Cli; +import de.adorsys.datasafe.directory.api.types.StorageCredentials; +import de.adorsys.datasafe.types.api.resource.StorageIdentifier; +import lombok.Getter; +import picocli.CommandLine; + +@CommandLine.Command( + name = "add", + description = "Adds path mapping and credentials for it (i.e. credentials to access s3://.+)" +) +public class Add implements Runnable { + + @Getter + @CommandLine.ParentCommand + private Credentials credentials; + + @CommandLine.Option( + names = {"--mapping", "-m"}, + description = "Storage mapping regex (i.e. 's3://.+' will route all requests with s3 protocol to this storage)", + required = true) + private String mapping; + + @CommandLine.Option( + names = {"--username", "-u"}, + description = "Storage username (i.e. AWS_ACCESS_KEY)", + required = true) + private String username; + + @CommandLine.Option( + names = {"--password", "-p"}, + description = "Storage password (i.e. AWS_SECRET_KEY)", + interactive = true, + required = true) + private String password; + + @Override + public void run() { + Cli cli = credentials.getStorage().getProfile().getCli(); + cli.datasafe().userProfile().registerStorageCredentials( + cli.auth(), + new StorageIdentifier(mapping), + new StorageCredentials(username, password) + ); + } +} diff --git a/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/commands/profile/storage/credentials/Credentials.java b/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/commands/profile/storage/credentials/Credentials.java new file mode 100644 index 000000000..8a97fab10 --- /dev/null +++ b/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/commands/profile/storage/credentials/Credentials.java @@ -0,0 +1,26 @@ +package de.adorsys.datasafe.cli.commands.profile.storage.credentials; + +import de.adorsys.datasafe.cli.commands.profile.storage.Storage; +import lombok.Getter; +import picocli.CommandLine; + +@CommandLine.Command( + name = "credentials", + description = "Manages user storage credentials (i.e. your credentials to access S3 bucket)", + subcommands = { + Add.class, + List.class, + Remove.class + } +) +public class Credentials implements Runnable { + + @Getter + @CommandLine.ParentCommand + private Storage storage; + + @Override + public void run() { + CommandLine.usage(new Credentials(), System.out); + } +} diff --git a/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/commands/profile/storage/credentials/List.java b/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/commands/profile/storage/credentials/List.java new file mode 100644 index 000000000..79a2f8102 --- /dev/null +++ b/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/commands/profile/storage/credentials/List.java @@ -0,0 +1,27 @@ +package de.adorsys.datasafe.cli.commands.profile.storage.credentials; + +import de.adorsys.datasafe.cli.Cli; +import lombok.Getter; +import picocli.CommandLine; + +@CommandLine.Command( + name = "list", + aliases = "ls", + description = "Adds path mapping and credentials for it (i.e. credentials to access s3://.+)" +) +public class List implements Runnable { + + @Getter + @CommandLine.ParentCommand + private Credentials credentials; + + @Override + public void run() { + Cli cli = credentials.getStorage().getProfile().getCli(); + cli.datasafe().userProfile().listRegisteredStorageCredentials(cli.auth()) + // Omit values that exists by default in keystore FIXME - remove these from storage keystore: + .stream() + .filter(it -> !it.getId().startsWith("PRIVATE_SECRET") && !it.getId().startsWith("PATH_SECRET")) + .forEach(it -> System.out.println(it.getId())); + } +} diff --git a/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/commands/profile/storage/credentials/Remove.java b/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/commands/profile/storage/credentials/Remove.java new file mode 100644 index 000000000..e15a2f1c8 --- /dev/null +++ b/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/commands/profile/storage/credentials/Remove.java @@ -0,0 +1,33 @@ +package de.adorsys.datasafe.cli.commands.profile.storage.credentials; + +import de.adorsys.datasafe.cli.Cli; +import de.adorsys.datasafe.types.api.resource.StorageIdentifier; +import lombok.Getter; +import picocli.CommandLine; + +@CommandLine.Command( + name = "remove", + aliases = "rm", + description = "Removes path access credentials" +) +public class Remove implements Runnable { + + @Getter + @CommandLine.ParentCommand + private Credentials credentials; + + @CommandLine.Option( + names = {"--mapping", "-m"}, + description = "Storage mapping regex/id (i.e. 's3://.+' will route all requests with s3 protocol to this storage)", + required = true) + private String mapping; + + @Override + public void run() { + Cli cli = credentials.getStorage().getProfile().getCli(); + cli.datasafe().userProfile().deregisterStorageCredentials( + cli.auth(), + new StorageIdentifier(mapping) + ); + } +} diff --git a/datasafe-directory/datasafe-directory-api/src/main/java/de/adorsys/datasafe/directory/api/profile/operations/ProfileOperations.java b/datasafe-directory/datasafe-directory-api/src/main/java/de/adorsys/datasafe/directory/api/profile/operations/ProfileOperations.java index e344f342a..b9ba15123 100644 --- a/datasafe-directory/datasafe-directory-api/src/main/java/de/adorsys/datasafe/directory/api/profile/operations/ProfileOperations.java +++ b/datasafe-directory/datasafe-directory-api/src/main/java/de/adorsys/datasafe/directory/api/profile/operations/ProfileOperations.java @@ -4,5 +4,5 @@ * Aggregate interface for all profile operations. */ public interface ProfileOperations extends ProfileRegistrationService, ProfileUpdatingService, ProfileRetrievalService, - ProfileRemovalService { + ProfileRemovalService, ProfileStorageCredentialsService { } diff --git a/datasafe-directory/datasafe-directory-api/src/main/java/de/adorsys/datasafe/directory/api/profile/operations/ProfileStorageCredentialsService.java b/datasafe-directory/datasafe-directory-api/src/main/java/de/adorsys/datasafe/directory/api/profile/operations/ProfileStorageCredentialsService.java new file mode 100644 index 000000000..6b3b290b9 --- /dev/null +++ b/datasafe-directory/datasafe-directory-api/src/main/java/de/adorsys/datasafe/directory/api/profile/operations/ProfileStorageCredentialsService.java @@ -0,0 +1,34 @@ +package de.adorsys.datasafe.directory.api.profile.operations; + +import de.adorsys.datasafe.directory.api.types.StorageCredentials; +import de.adorsys.datasafe.encrypiton.api.types.UserIDAuth; +import de.adorsys.datasafe.types.api.resource.StorageIdentifier; + +import java.util.Set; + +/** + * Defines storage credentials management operations. + */ +public interface ProfileStorageCredentialsService { + + /** + * Registers credentials that allows user to access remote filesystems (i.e. Amazon S3 bucket) + * @param user Owner of storage credentials + * @param storageId Storage identifier - will be used to match URI in access request to storage credentials + * @param credentials Access credentials for storage. + */ + void registerStorageCredentials(UserIDAuth user, StorageIdentifier storageId, StorageCredentials credentials); + + /** + * Removes storeds credentials that allows user to access remote filesystems (i.e. Amazon S3 bucket) + * @param user Owner of storage credentials + * @param storageId Storage identifier - will be used to match URI in access request to storage credentials + */ + void deregisterStorageCredentials(UserIDAuth user, StorageIdentifier storageId); + + /** + * Lists storage credentials identifiers (regex-mappings) + * @param user storage credentials owner + */ + Set listRegisteredStorageCredentials(UserIDAuth user); +} diff --git a/datasafe-directory/datasafe-directory-api/src/main/java/de/adorsys/datasafe/directory/api/profile/operations/ProfileUpdatingService.java b/datasafe-directory/datasafe-directory-api/src/main/java/de/adorsys/datasafe/directory/api/profile/operations/ProfileUpdatingService.java index 44d4cba83..1e2e6ba12 100644 --- a/datasafe-directory/datasafe-directory-api/src/main/java/de/adorsys/datasafe/directory/api/profile/operations/ProfileUpdatingService.java +++ b/datasafe-directory/datasafe-directory-api/src/main/java/de/adorsys/datasafe/directory/api/profile/operations/ProfileUpdatingService.java @@ -1,11 +1,9 @@ package de.adorsys.datasafe.directory.api.profile.operations; -import de.adorsys.datasafe.directory.api.types.StorageCredentials; import de.adorsys.datasafe.directory.api.types.UserPrivateProfile; import de.adorsys.datasafe.directory.api.types.UserPublicProfile; import de.adorsys.datasafe.encrypiton.api.types.UserIDAuth; import de.adorsys.datasafe.encrypiton.api.types.keystore.ReadKeyPassword; -import de.adorsys.datasafe.types.api.resource.StorageIdentifier; /** * Updates users' profile in a system. @@ -34,19 +32,4 @@ public interface ProfileUpdatingService { * some requests using new password will fail until storage propagates data. */ void updateReadKeyPassword(UserIDAuth forUser, ReadKeyPassword newPassword); - - /** - * Registers credentials that allows user to access remote filesystems (i.e. Amazon S3 bucket) - * @param user Owner of storage credentials - * @param storageId Storage identifier - will be used to match URI in access request to storage credentials - * @param credentials Access credentials for storage. - */ - void registerStorageCredentials(UserIDAuth user, StorageIdentifier storageId, StorageCredentials credentials); - - /** - * Removes storeds credentials that allows user to access remote filesystems (i.e. Amazon S3 bucket) - * @param user Owner of storage credentials - * @param storageId Storage identifier - will be used to match URI in access request to storage credentials - */ - void deregisterStorageCredentials(UserIDAuth user, StorageIdentifier storageId); } diff --git a/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/operations/DFSBasedProfileStorageImpl.java b/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/operations/DFSBasedProfileStorageImpl.java index 2be9aab9f..686c97366 100644 --- a/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/operations/DFSBasedProfileStorageImpl.java +++ b/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/operations/DFSBasedProfileStorageImpl.java @@ -1,10 +1,6 @@ package de.adorsys.datasafe.directory.impl.profile.operations; -import de.adorsys.datasafe.directory.api.profile.operations.ProfileOperations; -import de.adorsys.datasafe.directory.api.profile.operations.ProfileRegistrationService; -import de.adorsys.datasafe.directory.api.profile.operations.ProfileRemovalService; -import de.adorsys.datasafe.directory.api.profile.operations.ProfileRetrievalService; -import de.adorsys.datasafe.directory.api.profile.operations.ProfileUpdatingService; +import de.adorsys.datasafe.directory.api.profile.operations.*; import de.adorsys.datasafe.types.api.context.annotations.RuntimeDelegate; import lombok.experimental.Delegate; import lombok.extern.slf4j.Slf4j; @@ -30,13 +26,18 @@ public class DFSBasedProfileStorageImpl implements ProfileOperations { @Delegate private final ProfileUpdatingService updatingService; + @Delegate + private final ProfileStorageCredentialsService storageCredentialsService; + @Inject public DFSBasedProfileStorageImpl(ProfileRegistrationService registrationService, ProfileRetrievalService retrievalService, ProfileRemovalService removalService, - ProfileUpdatingService updatingService) { + ProfileUpdatingService updatingService, + ProfileStorageCredentialsService storageCredentialsService) { this.registrationService = registrationService; this.retrievalService = retrievalService; this.removalService = removalService; this.updatingService = updatingService; + this.storageCredentialsService = storageCredentialsService; } } diff --git a/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/operations/actions/ProfileStorageCredentialsServiceImpl.java b/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/operations/actions/ProfileStorageCredentialsServiceImpl.java new file mode 100644 index 000000000..662da6d9a --- /dev/null +++ b/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/operations/actions/ProfileStorageCredentialsServiceImpl.java @@ -0,0 +1,50 @@ +package de.adorsys.datasafe.directory.impl.profile.operations.actions; + +import de.adorsys.datasafe.directory.api.profile.keys.PrivateKeyService; +import de.adorsys.datasafe.directory.api.profile.keys.StorageKeyStoreOperations; +import de.adorsys.datasafe.directory.api.profile.operations.ProfileStorageCredentialsService; +import de.adorsys.datasafe.directory.api.types.StorageCredentials; +import de.adorsys.datasafe.encrypiton.api.types.UserIDAuth; +import de.adorsys.datasafe.types.api.context.annotations.RuntimeDelegate; +import de.adorsys.datasafe.types.api.resource.StorageIdentifier; + +import javax.inject.Inject; +import java.util.Set; + +@RuntimeDelegate +public class ProfileStorageCredentialsServiceImpl implements ProfileStorageCredentialsService { + + private final StorageKeyStoreOperations keyStoreOper; + private final PrivateKeyService privateKeyService; + + @Inject + public ProfileStorageCredentialsServiceImpl(StorageKeyStoreOperations keyStoreOper, + PrivateKeyService privateKeyService) { + this.keyStoreOper = keyStoreOper; + this.privateKeyService = privateKeyService; + } + + @Override + public Set listRegisteredStorageCredentials(UserIDAuth user) { + validateKeystoreAccess(user); + return keyStoreOper.readAliases(user); + } + + @Override + public void registerStorageCredentials( + UserIDAuth user, StorageIdentifier storageId, StorageCredentials credentials) { + validateKeystoreAccess(user); + keyStoreOper.addStorageCredentials(user, storageId, credentials); + } + + @Override + public void deregisterStorageCredentials(UserIDAuth user, StorageIdentifier storageId) { + validateKeystoreAccess(user); + keyStoreOper.removeStorageCredentials(user, storageId); + } + + private void validateKeystoreAccess(UserIDAuth user) { + // avoid only unauthorized access + privateKeyService.documentEncryptionSecretKey(user); // for access check + } +} diff --git a/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/operations/actions/ProfileUpdatingServiceImpl.java b/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/operations/actions/ProfileUpdatingServiceImpl.java index f096eb57f..dc9acd21d 100644 --- a/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/operations/actions/ProfileUpdatingServiceImpl.java +++ b/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/operations/actions/ProfileUpdatingServiceImpl.java @@ -4,13 +4,11 @@ import de.adorsys.datasafe.directory.api.profile.keys.PrivateKeyService; import de.adorsys.datasafe.directory.api.profile.keys.StorageKeyStoreOperations; import de.adorsys.datasafe.directory.api.profile.operations.ProfileUpdatingService; -import de.adorsys.datasafe.directory.api.types.StorageCredentials; import de.adorsys.datasafe.directory.api.types.UserPrivateProfile; import de.adorsys.datasafe.directory.api.types.UserPublicProfile; import de.adorsys.datasafe.encrypiton.api.types.UserIDAuth; import de.adorsys.datasafe.encrypiton.api.types.keystore.ReadKeyPassword; import de.adorsys.datasafe.types.api.context.annotations.RuntimeDelegate; -import de.adorsys.datasafe.types.api.resource.StorageIdentifier; import lombok.SneakyThrows; import lombok.extern.slf4j.Slf4j; @@ -61,19 +59,6 @@ public void updateReadKeyPassword(UserIDAuth forUser, ReadKeyPassword newPasswor storageKeyStoreOper.updateReadKeyPassword(forUser, newPassword); } - @Override - public void registerStorageCredentials( - UserIDAuth user, StorageIdentifier storageId, StorageCredentials credentials) { - validateKeystoreAccess(user); - storageKeyStoreOper.addStorageCredentials(user, storageId, credentials); - } - - @Override - public void deregisterStorageCredentials(UserIDAuth user, StorageIdentifier storageId) { - validateKeystoreAccess(user); - storageKeyStoreOper.removeStorageCredentials(user, storageId); - } - @SneakyThrows private void validateKeystoreAccess(UserIDAuth user) { // avoid only unauthorized access diff --git a/datasafe-directory/datasafe-directory-impl/src/test/java/de/adorsys/datasafe/directory/impl/profile/operations/actions/ProfileStorageCredentialsServiceImplTest.java b/datasafe-directory/datasafe-directory-impl/src/test/java/de/adorsys/datasafe/directory/impl/profile/operations/actions/ProfileStorageCredentialsServiceImplTest.java new file mode 100644 index 000000000..ef4d4308e --- /dev/null +++ b/datasafe-directory/datasafe-directory-impl/src/test/java/de/adorsys/datasafe/directory/impl/profile/operations/actions/ProfileStorageCredentialsServiceImplTest.java @@ -0,0 +1,50 @@ +package de.adorsys.datasafe.directory.impl.profile.operations.actions; + +import de.adorsys.datasafe.directory.api.profile.keys.PrivateKeyService; +import de.adorsys.datasafe.directory.api.profile.keys.StorageKeyStoreOperations; +import de.adorsys.datasafe.directory.api.types.StorageCredentials; +import de.adorsys.datasafe.encrypiton.api.types.UserIDAuth; +import de.adorsys.datasafe.types.api.resource.StorageIdentifier; +import de.adorsys.datasafe.types.api.shared.BaseMockitoTest; +import org.junit.jupiter.api.Test; +import org.mockito.InjectMocks; +import org.mockito.Mock; + +import static org.mockito.Mockito.verify; + +class ProfileStorageCredentialsServiceImplTest extends BaseMockitoTest { + + @Mock + private PrivateKeyService privateKeyService; + + @Mock + private StorageKeyStoreOperations storageKeyStoreOper; + + @InjectMocks + private ProfileStorageCredentialsServiceImpl tested; + + @Mock + private UserIDAuth user; + + @Mock + private StorageIdentifier storageIdentifier; + + @Mock + private StorageCredentials storageCredentials; + + @Test + void registerStorageCredentials() { + tested.registerStorageCredentials(user, storageIdentifier, storageCredentials); + + verify(privateKeyService).documentEncryptionSecretKey(user); + verify(storageKeyStoreOper).addStorageCredentials(user, storageIdentifier, storageCredentials); + } + + @Test + void deregisterStorageCredentials() { + tested.deregisterStorageCredentials(user, storageIdentifier); + + verify(privateKeyService).documentEncryptionSecretKey(user); + verify(storageKeyStoreOper).removeStorageCredentials(user, storageIdentifier); + } +} diff --git a/datasafe-directory/datasafe-directory-impl/src/test/java/de/adorsys/datasafe/directory/impl/profile/operations/actions/ProfileUpdatingServiceImplTest.java b/datasafe-directory/datasafe-directory-impl/src/test/java/de/adorsys/datasafe/directory/impl/profile/operations/actions/ProfileUpdatingServiceImplTest.java index 3bc9e7eb9..ba217abce 100644 --- a/datasafe-directory/datasafe-directory-impl/src/test/java/de/adorsys/datasafe/directory/impl/profile/operations/actions/ProfileUpdatingServiceImplTest.java +++ b/datasafe-directory/datasafe-directory-impl/src/test/java/de/adorsys/datasafe/directory/impl/profile/operations/actions/ProfileUpdatingServiceImplTest.java @@ -3,12 +3,10 @@ import de.adorsys.datasafe.directory.api.profile.keys.DocumentKeyStoreOperations; import de.adorsys.datasafe.directory.api.profile.keys.PrivateKeyService; import de.adorsys.datasafe.directory.api.profile.keys.StorageKeyStoreOperations; -import de.adorsys.datasafe.directory.api.types.StorageCredentials; import de.adorsys.datasafe.directory.api.types.UserPrivateProfile; import de.adorsys.datasafe.directory.api.types.UserPublicProfile; import de.adorsys.datasafe.encrypiton.api.types.UserIDAuth; import de.adorsys.datasafe.encrypiton.api.types.keystore.ReadKeyPassword; -import de.adorsys.datasafe.types.api.resource.StorageIdentifier; import de.adorsys.datasafe.types.api.shared.BaseMockitoTest; import org.junit.jupiter.api.Test; import org.mockito.InjectMocks; @@ -46,12 +44,6 @@ class ProfileUpdatingServiceImplTest extends BaseMockitoTest { @Mock private ReadKeyPassword readKeyPassword; - @Mock - private StorageIdentifier storageIdentifier; - - @Mock - private StorageCredentials storageCredentials; - @Test void updatePublicProfile() { tested.updatePublicProfile(user, publicProfile); @@ -75,20 +67,4 @@ void updateReadKeyPassword() { verify(privateKeyService, never()).documentEncryptionSecretKey(user); verify(keyStoreOper).updateReadKeyPassword(user, readKeyPassword); } - - @Test - void registerStorageCredentials() { - tested.registerStorageCredentials(user, storageIdentifier, storageCredentials); - - verify(privateKeyService).documentEncryptionSecretKey(user); - verify(storageKeyStoreOper).addStorageCredentials(user, storageIdentifier, storageCredentials); - } - - @Test - void deregisterStorageCredentials() { - tested.deregisterStorageCredentials(user, storageIdentifier); - - verify(privateKeyService).documentEncryptionSecretKey(user); - verify(storageKeyStoreOper).removeStorageCredentials(user, storageIdentifier); - } } diff --git a/datasafe-long-run-tests/datasafe-business-tests-random-actions/src/test/java/de/adorsys/datasafe/business/impl/e2e/randomactions/RandomActionsOnSimpleDatasafeAdapterTest.java b/datasafe-long-run-tests/datasafe-business-tests-random-actions/src/test/java/de/adorsys/datasafe/business/impl/e2e/randomactions/RandomActionsOnSimpleDatasafeAdapterTest.java index 3e2775d72..ac39d6c9c 100644 --- a/datasafe-long-run-tests/datasafe-business-tests-random-actions/src/test/java/de/adorsys/datasafe/business/impl/e2e/randomactions/RandomActionsOnSimpleDatasafeAdapterTest.java +++ b/datasafe-long-run-tests/datasafe-business-tests-random-actions/src/test/java/de/adorsys/datasafe/business/impl/e2e/randomactions/RandomActionsOnSimpleDatasafeAdapterTest.java @@ -217,6 +217,11 @@ public void deregisterStorageCredentials(UserIDAuth user, StorageIdentifier stor throw new IllegalStateException("Not implemented"); } + @Override + public Set listRegisteredStorageCredentials(UserIDAuth user) { + throw new IllegalStateException("Not implemented"); + } + @Override public boolean userExists(UserID ofUser) { throw new IllegalStateException("Not implemented"); From 70d32e5393a3e158f5aa58a850476aca1360c135 Mon Sep 17 00:00:00 2001 From: Valentyn Berezin Date: Fri, 30 Aug 2019 14:37:41 +0300 Subject: [PATCH 014/255] More notes on CLI --- .../src/main/java/de/adorsys/datasafe/cli/Cli.java | 3 +++ .../de.adorsys/datasafe-cli/reflect-config.json | 11 ++++++++++- .../de.adorsys/datasafe-cli/resource-config.json | 6 ------ 3 files changed, 13 insertions(+), 7 deletions(-) diff --git a/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/Cli.java b/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/Cli.java index a0521e52c..2315cb59e 100644 --- a/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/Cli.java +++ b/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/Cli.java @@ -43,6 +43,9 @@ public class Cli implements Runnable { @SneakyThrows public static void main(String[] args) { + // silencing AWS SDK: + System.setProperty("org.apache.commons.logging.Log", "org.apache.commons.logging.impl.NoOpLog"); + int exitCode = new CommandLine(new Cli()).execute(args); System.exit(exitCode); } diff --git a/datasafe-cli/src/main/resources/META-INF/native-image/de.adorsys/datasafe-cli/reflect-config.json b/datasafe-cli/src/main/resources/META-INF/native-image/de.adorsys/datasafe-cli/reflect-config.json index a16bf51e6..11e39bada 100644 --- a/datasafe-cli/src/main/resources/META-INF/native-image/de.adorsys/datasafe-cli/reflect-config.json +++ b/datasafe-cli/src/main/resources/META-INF/native-image/de.adorsys/datasafe-cli/reflect-config.json @@ -343,7 +343,7 @@ "name": "org.apache.commons.logging.LogFactory" }, { - "name": "org.apache.commons.logging.impl.Jdk14Logger", + "name": "org.apache.commons.logging.impl.NoOpLog", "methods": [ { "name": "", @@ -1098,6 +1098,15 @@ } ] }, + { + "name": "java.security.KeyStoreSpi", + "methods": [ + { + "name": "", + "parameterTypes": [] + } + ] + }, { "name": "sun.security.provider.SecureRandom", "methods": [ diff --git a/datasafe-cli/src/main/resources/META-INF/native-image/de.adorsys/datasafe-cli/resource-config.json b/datasafe-cli/src/main/resources/META-INF/native-image/de.adorsys/datasafe-cli/resource-config.json index b610f856b..deb3a0f1d 100644 --- a/datasafe-cli/src/main/resources/META-INF/native-image/de.adorsys/datasafe-cli/resource-config.json +++ b/datasafe-cli/src/main/resources/META-INF/native-image/de.adorsys/datasafe-cli/resource-config.json @@ -1325,12 +1325,6 @@ }, { "pattern": "org/slf4j/impl/StaticLoggerBinder.class" - }, - { - "pattern": "sun/net/idn/uidna.spp" - }, - { - "pattern": "sun/text/resources/unorm.icu" } ] } From a01f236c36a8c5c718e2bb0a3e4d4a486908489a Mon Sep 17 00:00:00 2001 From: Valentyn Berezin Date: Fri, 30 Aug 2019 14:38:01 +0300 Subject: [PATCH 015/255] More notes on CLI --- datasafe-cli/README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/datasafe-cli/README.md b/datasafe-cli/README.md index 5eb3ca753..f79d8c297 100644 --- a/datasafe-cli/README.md +++ b/datasafe-cli/README.md @@ -2,6 +2,7 @@ 1. You need GraalVM compiler and BouncyCastle in java-home/jre/lib/ext/ of this compiler. 1. Edit the java-home/jre/lib/security/java.security properties file in any text editor. 1. Add the JCE provider you’ve just downloaded to this file. -1. The java.security file contains detailed instructions for adding this provider. +1. The java.security file contains detailed instructions for adding this provider. +1. add org.bouncycastle.jsse.provider.BouncyCastleJsseProvider to java.security as SSL provider (bctls jar) Basically, you need to add a line of the following format in a location with similar properties: security.provider.n=provider-class-name From 9a3dfd22dc256b3ec015c21fc7061fa0f3e5e642 Mon Sep 17 00:00:00 2001 From: Valentyn Berezin Date: Fri, 30 Aug 2019 17:59:18 +0300 Subject: [PATCH 016/255] Datasafe-CLI support for Travis --- .travis.yml | 134 +++++++++++------- .travis/enable_bouncycastle_security.sh | 14 ++ ...l_custom_jdk_and_add_security_providers.sh | 24 ++++ .travis_old.yml | 53 +++++++ Dockerfile | 19 +++ 5 files changed, 191 insertions(+), 53 deletions(-) create mode 100644 .travis/enable_bouncycastle_security.sh create mode 100755 .travis/install_custom_jdk_and_add_security_providers.sh create mode 100644 .travis_old.yml create mode 100644 Dockerfile diff --git a/.travis.yml b/.travis.yml index 9d77a3fa2..094184359 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,53 +1,81 @@ -language: java - -jdk: - - oraclejdk8 - -sudo: required - -services: - - docker - -# travis is quite limited for multi-language projects when one needs to share artifacts: -# https://github.com/travis-ci/travis-ci/issues/4090 - -script: - - mvn --settings .travis/settings.xml clean verify -B -V -DAWS_BUCKET=${AWS_BUCKET} -# make frontend available for REST-docker - - cd frontend/datasafe-ui && ng build --deploy-url /static/ --base-href /static/ && mv dist ../../datasafe-rest-impl/target/dist && cd ../.. - -deploy: - - provider: script - skip_cleanup: true - script: /bin/bash .travis/deploy.sh - on: - tags: true - condition: "$TRAVIS_TAG =~ ^v([[:digit:]]+\\.)+[[:digit:]]+(-[[:digit:]]+)?(-SNAPSHOT)?$" - - - provider: script - skip_cleanup: true - script: /bin/bash .travis/deploy_develop_to_openshift.sh - on: - branch: develop - - - provider: script - skip_cleanup: true - script: /bin/bash .travis/upload_dockerhub.sh - on: - all_branches: true - tags: true - condition: "$TRAVIS_TAG =~ ^v([[:digit:]]+\\.)+[[:digit:]]+(-[[:digit:]]+)?(-SNAPSHOT)?$" - -before_install: - - curl -L https://github.com/openshift/origin/releases/download/v3.11.0/openshift-origin-client-tools-v3.11.0-0cbc58b-linux-64bit.tar.gz > oc-cli.tar.gz - - tar -xzf oc-cli.tar.gz - - sudo mv ./openshift-origin-client-tools-v3.11.0-0cbc58b-linux-64bit/oc /usr/local/bin - -# preparations to build frontend -install: - - nvm install 11.12.0 - - npm install -g @angular/cli - - cd frontend/datasafe-ui && npm install && cd ../.. - -after_success: - - /bin/bash .travis/codecov_bash.sh +# Using bash because Travis CI does not support Java on Windows + +branches: + except: + - gh-pages + +# Common env. vars: +env: + # This is a convenience variable for shortening download commands + - GRAVIS="https://raw.githubusercontent.com/DanySK/Gravis-CI/master/" + - JDK="graalvm@19.2.0" + +matrix: + include: + # This is original build and deploy, that runs E2E tests and deploys docker images + - os: linux + language: java + stages: + - Build-core + - Test-core + - Deploy-core + + # These are CLI-only builds: + # CLI for Linux: + - os: linux + language: bash + stages: + - Build-core + - Build-cli + - Test-cli + - Deploy-cli + before_install: + - /bin/bash .travis/install_custom_jdk_and_add_security_providers.sh + + # CLI for MacOS: + - os: osx + language: bash + stages: + - Build-core + - Build-cli + - Test-cli + - Deploy-cli + before_install: + - /bin/bash .travis/install_custom_jdk_and_add_security_providers.sh + + # CLI for Windows: + - os: windows + language: bash + stages: + - Build-core + - Build-cli + - Test-cli + - Deploy-cli + env: + - NO_WIN_DEFENDER=$(curl "${GRAVIS}.disable-windows-defender.sh" --output .no-defender.sh && source .no-defender.sh) + before_install: + - /bin/bash .travis/install_custom_jdk_and_add_security_providers.sh + + +stages: + - Build-core + - Test-core + - Build-cli + - Test-cli + - Deploy-core + - Deploy-cli + +jobs: + include: + - stage: Build-core + script: echo "BUILD CORE" + - stage: Test-core + script: echo "TEST CORE" + - stage: Build-cli + script: echo "BUILD CLI" + - stage: Test-cli + script: echo "TEST CLI" + - stage: Deploy-core + script: echo "DEPLOY CORE" + - stage: Deploy-cli + script: echo "DEPLOY CLI" diff --git a/.travis/enable_bouncycastle_security.sh b/.travis/enable_bouncycastle_security.sh new file mode 100644 index 000000000..3bc826889 --- /dev/null +++ b/.travis/enable_bouncycastle_security.sh @@ -0,0 +1,14 @@ +#!/bin/bash + +# 3. Adds BouncyCastle Provider to JDK security providers +# 4. Adds BouncyCastle TLS to JDK security providers +# 5. Removes SunEC security provider to use SSL from BouncyCastle + +# 3. Add BouncyCastle Provider to JDK security providers at place 2 (should replace sun.security.rsa.SunRsaSign) +sed -i "s/security\.provider\.2=.*/security.provider.2=org.bouncycastle.jce.provider.BouncyCastleProvider/g" "$JAVA_HOME/jre/lib/security/java.security" + +# 4. Add BouncyCastle TLS to JDK security providers at place 3 (should replace sun.security.ec.SunEC and come before com.sun.net.ssl.internal.ssl.Provider) +sed -i "s/security\.provider\.3=.*/security.provider.3=org.bouncycastle.jsse.provider.BouncyCastleJsseProvider/g" "$JAVA_HOME/jre/lib/security/java.security" + +# 5. Remove SunEC security provider (if it still exists) +sed -i "s/security\.provider\..*=sun\.security\.ec\.SunEC//g" "$JAVA_HOME/jre/lib/security/java.security" diff --git a/.travis/install_custom_jdk_and_add_security_providers.sh b/.travis/install_custom_jdk_and_add_security_providers.sh new file mode 100755 index 000000000..61f04ec33 --- /dev/null +++ b/.travis/install_custom_jdk_and_add_security_providers.sh @@ -0,0 +1,24 @@ +#!/bin/bash + +# This script: +# 1. Installs custom JDK. +# 2. Downloads BouncyCastle security provider and TLS libs. (to use native java SSL) + +REPO_ROOT=`pwd` + +# 1. Custom JDK +curl "${GRAVIS}.install-jdk-travis.sh" --output ~/.install-jdk-travis.sh +source ~/.install-jdk-travis.sh + +cd "$REPO_ROOT" + +# 2. BC libs - download +# 2.1 Parse BouncyCastle version +BC_VERSION=`grep ".*" pom.xml | cut -d">" -f2 | cut -d"<" -f1` + +# 2.2 Download BC jars needed +curl "https://repo1.maven.org/maven2/org/bouncycastle/bcprov-jdk15on/${BC_VERSION}/bcprov-jdk15on-${BC_VERSION}.jar" \ + --output "$JAVA_HOME/jre/lib/ext/bcprov-jdk15on-${BC_VERSION}.jar" + +curl "https://repo1.maven.org/maven2/org/bouncycastle/bctls-jdk15on/${BC_VERSION}/bctls-jdk15on-${BC_VERSION}.jar" \ + --output "$JAVA_HOME/jre/lib/ext/bctls-jdk15on-${BC_VERSION}.jar" diff --git a/.travis_old.yml b/.travis_old.yml new file mode 100644 index 000000000..9d77a3fa2 --- /dev/null +++ b/.travis_old.yml @@ -0,0 +1,53 @@ +language: java + +jdk: + - oraclejdk8 + +sudo: required + +services: + - docker + +# travis is quite limited for multi-language projects when one needs to share artifacts: +# https://github.com/travis-ci/travis-ci/issues/4090 + +script: + - mvn --settings .travis/settings.xml clean verify -B -V -DAWS_BUCKET=${AWS_BUCKET} +# make frontend available for REST-docker + - cd frontend/datasafe-ui && ng build --deploy-url /static/ --base-href /static/ && mv dist ../../datasafe-rest-impl/target/dist && cd ../.. + +deploy: + - provider: script + skip_cleanup: true + script: /bin/bash .travis/deploy.sh + on: + tags: true + condition: "$TRAVIS_TAG =~ ^v([[:digit:]]+\\.)+[[:digit:]]+(-[[:digit:]]+)?(-SNAPSHOT)?$" + + - provider: script + skip_cleanup: true + script: /bin/bash .travis/deploy_develop_to_openshift.sh + on: + branch: develop + + - provider: script + skip_cleanup: true + script: /bin/bash .travis/upload_dockerhub.sh + on: + all_branches: true + tags: true + condition: "$TRAVIS_TAG =~ ^v([[:digit:]]+\\.)+[[:digit:]]+(-[[:digit:]]+)?(-SNAPSHOT)?$" + +before_install: + - curl -L https://github.com/openshift/origin/releases/download/v3.11.0/openshift-origin-client-tools-v3.11.0-0cbc58b-linux-64bit.tar.gz > oc-cli.tar.gz + - tar -xzf oc-cli.tar.gz + - sudo mv ./openshift-origin-client-tools-v3.11.0-0cbc58b-linux-64bit/oc /usr/local/bin + +# preparations to build frontend +install: + - nvm install 11.12.0 + - npm install -g @angular/cli + - cd frontend/datasafe-ui && npm install && cd ../.. + +after_success: + - /bin/bash .travis/codecov_bash.sh diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 000000000..00fdd0136 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,19 @@ +FROM ubuntu:xenial + +RUN apt-get update && apt-get install curl -y + +ENV GRAVIS="https://raw.githubusercontent.com/DanySK/Gravis-CI/master/" +ENV JDK="graalvm@19.2.0" + +### +ENV TRAVIS_OS_NAME=linux + +# A +RUN curl "${GRAVIS}.install-jdk-travis.sh" --output ~/.install-jdk-travis.sh +RUN chmod +x ~/.install-jdk-travis.sh +RUN ~/.install-jdk-travis.sh + +RUN apt-get install maven -y && apt-get install git -y + +RUN git clone https://github.com/adorsys/datasafe && cd datasafe && git checkout -t origin/feature/datasafe-cli-w-s3 +RUN cd datasafe From f34acf008b29284ab610612d731555ecdf72957e Mon Sep 17 00:00:00 2001 From: Valentyn Berezin Date: Fri, 30 Aug 2019 18:02:59 +0300 Subject: [PATCH 017/255] Datasafe-CLI support for Travis --- .travis.yml | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/.travis.yml b/.travis.yml index 094184359..364928c5d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -64,18 +64,3 @@ stages: - Test-cli - Deploy-core - Deploy-cli - -jobs: - include: - - stage: Build-core - script: echo "BUILD CORE" - - stage: Test-core - script: echo "TEST CORE" - - stage: Build-cli - script: echo "BUILD CLI" - - stage: Test-cli - script: echo "TEST CLI" - - stage: Deploy-core - script: echo "DEPLOY CORE" - - stage: Deploy-cli - script: echo "DEPLOY CLI" From 493336b2c090d11e10f5f7635f3f8b7498d4c4f7 Mon Sep 17 00:00:00 2001 From: Valentyn Berezin Date: Fri, 30 Aug 2019 18:11:38 +0300 Subject: [PATCH 018/255] Datasafe-CLI support for Travis --- .travis.yml | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/.travis.yml b/.travis.yml index 364928c5d..deedac310 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,12 +4,6 @@ branches: except: - gh-pages -# Common env. vars: -env: - # This is a convenience variable for shortening download commands - - GRAVIS="https://raw.githubusercontent.com/DanySK/Gravis-CI/master/" - - JDK="graalvm@19.2.0" - matrix: include: # This is original build and deploy, that runs E2E tests and deploys docker images @@ -23,6 +17,10 @@ matrix: # These are CLI-only builds: # CLI for Linux: - os: linux + env: + # This is a convenience variable for shortening download commands + - GRAVIS="https://raw.githubusercontent.com/DanySK/Gravis-CI/master/" + - JDK="graalvm@19.2.0" language: bash stages: - Build-core @@ -34,6 +32,10 @@ matrix: # CLI for MacOS: - os: osx + env: + # This is a convenience variable for shortening download commands + - GRAVIS="https://raw.githubusercontent.com/DanySK/Gravis-CI/master/" + - JDK="graalvm@19.2.0" language: bash stages: - Build-core @@ -45,14 +47,17 @@ matrix: # CLI for Windows: - os: windows + env: + # This is a convenience variable for shortening download commands + - GRAVIS="https://raw.githubusercontent.com/DanySK/Gravis-CI/master/" + - JDK="graalvm@19.2.0" + - NO_WIN_DEFENDER=$(curl "${GRAVIS}.disable-windows-defender.sh" --output .no-defender.sh && source .no-defender.sh) language: bash stages: - Build-core - Build-cli - Test-cli - Deploy-cli - env: - - NO_WIN_DEFENDER=$(curl "${GRAVIS}.disable-windows-defender.sh" --output .no-defender.sh && source .no-defender.sh) before_install: - /bin/bash .travis/install_custom_jdk_and_add_security_providers.sh From 2113b19ada4bba1c36357d766761f1a155906209 Mon Sep 17 00:00:00 2001 From: Valentyn Berezin Date: Fri, 30 Aug 2019 18:14:15 +0300 Subject: [PATCH 019/255] Datasafe-CLI support for Travis --- .travis.yml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/.travis.yml b/.travis.yml index deedac310..453231e71 100644 --- a/.travis.yml +++ b/.travis.yml @@ -69,3 +69,18 @@ stages: - Test-cli - Deploy-core - Deploy-cli + +jobs: + include: + - stage: Build-core + script: echo "BUILD CORE" + - stage: Test-core + script: echo "TEST CORE" + - stage: Build-cli + script: echo "BUILD CLI" + - stage: Test-cli + script: echo "TEST CLI" + - stage: Deploy-core + script: echo "DEPLOY CORE" + - stage: Deploy-cli + script: echo "DEPLOY CLI" From acd34a218e82141ab8bae3f85f7f917bb98c2e93 Mon Sep 17 00:00:00 2001 From: Valentyn Berezin Date: Fri, 30 Aug 2019 18:38:29 +0300 Subject: [PATCH 020/255] Datasafe-CLI support for Travis --- .travis.yml | 75 +++++++++++++++-------------------------------------- 1 file changed, 21 insertions(+), 54 deletions(-) diff --git a/.travis.yml b/.travis.yml index 453231e71..03e1efd01 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,84 +3,51 @@ branches: except: - gh-pages +env: + global: + # This is a convenience variable for shortening download commands + - GRAVIS="https://raw.githubusercontent.com/DanySK/Gravis-CI/master/" + - JDK="graalvm@19.2.0" matrix: include: # This is original build and deploy, that runs E2E tests and deploys docker images - os: linux language: java - stages: - - Build-core - - Test-core - - Deploy-core - # These are CLI-only builds: + # These are CLI-only builds that produce Datasafe cli executable for each OS: # CLI for Linux: - os: linux - env: - # This is a convenience variable for shortening download commands - - GRAVIS="https://raw.githubusercontent.com/DanySK/Gravis-CI/master/" - - JDK="graalvm@19.2.0" language: bash - stages: - - Build-core - - Build-cli - - Test-cli - - Deploy-cli before_install: - /bin/bash .travis/install_custom_jdk_and_add_security_providers.sh - # CLI for MacOS: - os: osx - env: - # This is a convenience variable for shortening download commands - - GRAVIS="https://raw.githubusercontent.com/DanySK/Gravis-CI/master/" - - JDK="graalvm@19.2.0" language: bash - stages: - - Build-core - - Build-cli - - Test-cli - - Deploy-cli before_install: - /bin/bash .travis/install_custom_jdk_and_add_security_providers.sh - # CLI for Windows: - os: windows env: - # This is a convenience variable for shortening download commands - - GRAVIS="https://raw.githubusercontent.com/DanySK/Gravis-CI/master/" - - JDK="graalvm@19.2.0" - NO_WIN_DEFENDER=$(curl "${GRAVIS}.disable-windows-defender.sh" --output .no-defender.sh && source .no-defender.sh) language: bash - stages: - - Build-core - - Build-cli - - Test-cli - - Deploy-cli before_install: - /bin/bash .travis/install_custom_jdk_and_add_security_providers.sh -stages: - - Build-core - - Test-core - - Build-cli - - Test-cli - - Deploy-core - - Deploy-cli +before_install: + - echo "Before install" -jobs: - include: - - stage: Build-core - script: echo "BUILD CORE" - - stage: Test-core - script: echo "TEST CORE" - - stage: Build-cli - script: echo "BUILD CLI" - - stage: Test-cli - script: echo "TEST CLI" - - stage: Deploy-core - script: echo "DEPLOY CORE" - - stage: Deploy-cli - script: echo "DEPLOY CLI" +install: + - echo "Install" + +script: + - echo "Script" + +deploy: + - provider: script + skip_cleanup: true + script: echo "Deploy" + +after_success: + - echo "Success" From 7fecde7bc8cd7b2efbd3b95290a9dc27778a2dbe Mon Sep 17 00:00:00 2001 From: Valentyn Berezin Date: Fri, 30 Aug 2019 18:52:25 +0300 Subject: [PATCH 021/255] Datasafe-CLI support for Travis --- .travis.yml | 48 ++++++++++++++++++++++++++++++------------------ 1 file changed, 30 insertions(+), 18 deletions(-) diff --git a/.travis.yml b/.travis.yml index 03e1efd01..fc2ffde22 100644 --- a/.travis.yml +++ b/.travis.yml @@ -9,6 +9,33 @@ env: - GRAVIS="https://raw.githubusercontent.com/DanySK/Gravis-CI/master/" - JDK="graalvm@19.2.0" +build-cli: &build-cli + script: + # Prepare everything + - mvn --settings .travis/settings.xml clean verify -B -V -DAWS_BUCKET=${AWS_BUCKET} -DskipTests + # Change security provides of JDK + - /bin/bash .travis/enable_bouncycastle_security.sh + # Build binaries + - mvn --settings .travis/settings.xml -f datasafe-cli/pom.xml -Pnative-image clean package -B -V -DAWS_BUCKET=${AWS_BUCKET} -DskipTests + +before_install: + - echo "Before install" + +install: + - echo "Install" + +script: + - echo "Script" + - mvn --settings .travis/settings.xml clean verify -B -V -DAWS_BUCKET=${AWS_BUCKET} -DskipTests # FIXME remove skipTests + +deploy: + - provider: script + skip_cleanup: true + script: echo "Deploy" + +after_success: + - echo "Success" + matrix: include: # This is original build and deploy, that runs E2E tests and deploys docker images @@ -21,11 +48,13 @@ matrix: language: bash before_install: - /bin/bash .travis/install_custom_jdk_and_add_security_providers.sh + <<: *build-cli # CLI for MacOS: - os: osx language: bash before_install: - /bin/bash .travis/install_custom_jdk_and_add_security_providers.sh + <<: *build-cli # CLI for Windows: - os: windows env: @@ -33,21 +62,4 @@ matrix: language: bash before_install: - /bin/bash .travis/install_custom_jdk_and_add_security_providers.sh - - -before_install: - - echo "Before install" - -install: - - echo "Install" - -script: - - echo "Script" - -deploy: - - provider: script - skip_cleanup: true - script: echo "Deploy" - -after_success: - - echo "Success" + <<: *build-cli From 0795762ee7b67ecdfa04e2e33181aa7a3f0afed0 Mon Sep 17 00:00:00 2001 From: Valentyn Berezin Date: Fri, 30 Aug 2019 19:09:01 +0300 Subject: [PATCH 022/255] Added maven wrapper for images without it --- .mvn/wrapper/MavenWrapperDownloader.java | 117 +++++++++ .mvn/wrapper/maven-wrapper.properties | 2 + .travis.yml | 9 +- mvnw | 310 +++++++++++++++++++++++ mvnw.cmd | 182 +++++++++++++ 5 files changed, 616 insertions(+), 4 deletions(-) create mode 100644 .mvn/wrapper/MavenWrapperDownloader.java create mode 100644 .mvn/wrapper/maven-wrapper.properties create mode 100755 mvnw create mode 100644 mvnw.cmd diff --git a/.mvn/wrapper/MavenWrapperDownloader.java b/.mvn/wrapper/MavenWrapperDownloader.java new file mode 100644 index 000000000..c32394f14 --- /dev/null +++ b/.mvn/wrapper/MavenWrapperDownloader.java @@ -0,0 +1,117 @@ +/* + * Copyright 2007-present the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import java.net.*; +import java.io.*; +import java.nio.channels.*; +import java.util.Properties; + +public class MavenWrapperDownloader { + + private static final String WRAPPER_VERSION = "0.5.5"; + /** + * Default URL to download the maven-wrapper.jar from, if no 'downloadUrl' is provided. + */ + private static final String DEFAULT_DOWNLOAD_URL = "https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/" + + WRAPPER_VERSION + "/maven-wrapper-" + WRAPPER_VERSION + ".jar"; + + /** + * Path to the maven-wrapper.properties file, which might contain a downloadUrl property to + * use instead of the default one. + */ + private static final String MAVEN_WRAPPER_PROPERTIES_PATH = + ".mvn/wrapper/maven-wrapper.properties"; + + /** + * Path where the maven-wrapper.jar will be saved to. + */ + private static final String MAVEN_WRAPPER_JAR_PATH = + ".mvn/wrapper/maven-wrapper.jar"; + + /** + * Name of the property which should be used to override the default download url for the wrapper. + */ + private static final String PROPERTY_NAME_WRAPPER_URL = "wrapperUrl"; + + public static void main(String args[]) { + System.out.println("- Downloader started"); + File baseDirectory = new File(args[0]); + System.out.println("- Using base directory: " + baseDirectory.getAbsolutePath()); + + // If the maven-wrapper.properties exists, read it and check if it contains a custom + // wrapperUrl parameter. + File mavenWrapperPropertyFile = new File(baseDirectory, MAVEN_WRAPPER_PROPERTIES_PATH); + String url = DEFAULT_DOWNLOAD_URL; + if(mavenWrapperPropertyFile.exists()) { + FileInputStream mavenWrapperPropertyFileInputStream = null; + try { + mavenWrapperPropertyFileInputStream = new FileInputStream(mavenWrapperPropertyFile); + Properties mavenWrapperProperties = new Properties(); + mavenWrapperProperties.load(mavenWrapperPropertyFileInputStream); + url = mavenWrapperProperties.getProperty(PROPERTY_NAME_WRAPPER_URL, url); + } catch (IOException e) { + System.out.println("- ERROR loading '" + MAVEN_WRAPPER_PROPERTIES_PATH + "'"); + } finally { + try { + if(mavenWrapperPropertyFileInputStream != null) { + mavenWrapperPropertyFileInputStream.close(); + } + } catch (IOException e) { + // Ignore ... + } + } + } + System.out.println("- Downloading from: " + url); + + File outputFile = new File(baseDirectory.getAbsolutePath(), MAVEN_WRAPPER_JAR_PATH); + if(!outputFile.getParentFile().exists()) { + if(!outputFile.getParentFile().mkdirs()) { + System.out.println( + "- ERROR creating output directory '" + outputFile.getParentFile().getAbsolutePath() + "'"); + } + } + System.out.println("- Downloading to: " + outputFile.getAbsolutePath()); + try { + downloadFileFromURL(url, outputFile); + System.out.println("Done"); + System.exit(0); + } catch (Throwable e) { + System.out.println("- Error downloading"); + e.printStackTrace(); + System.exit(1); + } + } + + private static void downloadFileFromURL(String urlString, File destination) throws Exception { + if (System.getenv("MVNW_USERNAME") != null && System.getenv("MVNW_PASSWORD") != null) { + String username = System.getenv("MVNW_USERNAME"); + char[] password = System.getenv("MVNW_PASSWORD").toCharArray(); + Authenticator.setDefault(new Authenticator() { + @Override + protected PasswordAuthentication getPasswordAuthentication() { + return new PasswordAuthentication(username, password); + } + }); + } + URL website = new URL(urlString); + ReadableByteChannel rbc; + rbc = Channels.newChannel(website.openStream()); + FileOutputStream fos = new FileOutputStream(destination); + fos.getChannel().transferFrom(rbc, 0, Long.MAX_VALUE); + fos.close(); + rbc.close(); + } + +} diff --git a/.mvn/wrapper/maven-wrapper.properties b/.mvn/wrapper/maven-wrapper.properties new file mode 100644 index 000000000..cc805cc5e --- /dev/null +++ b/.mvn/wrapper/maven-wrapper.properties @@ -0,0 +1,2 @@ +distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.5.2/apache-maven-3.5.2-bin.zip +wrapperUrl=https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.5/maven-wrapper-0.5.5.jar diff --git a/.travis.yml b/.travis.yml index fc2ffde22..3b2ef1d25 100644 --- a/.travis.yml +++ b/.travis.yml @@ -9,14 +9,15 @@ env: - GRAVIS="https://raw.githubusercontent.com/DanySK/Gravis-CI/master/" - JDK="graalvm@19.2.0" +# Special test-skipping stage to build CLI, using maven-wrapper build-cli: &build-cli script: # Prepare everything - - mvn --settings .travis/settings.xml clean verify -B -V -DAWS_BUCKET=${AWS_BUCKET} -DskipTests - # Change security provides of JDK + - ./mvnw --settings .travis/settings.xml clean install -B -V -DskipTests + # Change security providers of JDK - /bin/bash .travis/enable_bouncycastle_security.sh - # Build binaries - - mvn --settings .travis/settings.xml -f datasafe-cli/pom.xml -Pnative-image clean package -B -V -DAWS_BUCKET=${AWS_BUCKET} -DskipTests + # Build native image + - ./mvnw --settings .travis/settings.xml -f datasafe-cli/pom.xml clean package -B -V -Pnative-image -DskipTests before_install: - echo "Before install" diff --git a/mvnw b/mvnw new file mode 100755 index 000000000..d2f0ea380 --- /dev/null +++ b/mvnw @@ -0,0 +1,310 @@ +#!/bin/sh +# ---------------------------------------------------------------------------- +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +# ---------------------------------------------------------------------------- + +# ---------------------------------------------------------------------------- +# Maven2 Start Up Batch script +# +# Required ENV vars: +# ------------------ +# JAVA_HOME - location of a JDK home dir +# +# Optional ENV vars +# ----------------- +# M2_HOME - location of maven2's installed home dir +# MAVEN_OPTS - parameters passed to the Java VM when running Maven +# e.g. to debug Maven itself, use +# set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000 +# MAVEN_SKIP_RC - flag to disable loading of mavenrc files +# ---------------------------------------------------------------------------- + +if [ -z "$MAVEN_SKIP_RC" ] ; then + + if [ -f /etc/mavenrc ] ; then + . /etc/mavenrc + fi + + if [ -f "$HOME/.mavenrc" ] ; then + . "$HOME/.mavenrc" + fi + +fi + +# OS specific support. $var _must_ be set to either true or false. +cygwin=false; +darwin=false; +mingw=false +case "`uname`" in + CYGWIN*) cygwin=true ;; + MINGW*) mingw=true;; + Darwin*) darwin=true + # Use /usr/libexec/java_home if available, otherwise fall back to /Library/Java/Home + # See https://developer.apple.com/library/mac/qa/qa1170/_index.html + if [ -z "$JAVA_HOME" ]; then + if [ -x "/usr/libexec/java_home" ]; then + export JAVA_HOME="`/usr/libexec/java_home`" + else + export JAVA_HOME="/Library/Java/Home" + fi + fi + ;; +esac + +if [ -z "$JAVA_HOME" ] ; then + if [ -r /etc/gentoo-release ] ; then + JAVA_HOME=`java-config --jre-home` + fi +fi + +if [ -z "$M2_HOME" ] ; then + ## resolve links - $0 may be a link to maven's home + PRG="$0" + + # need this for relative symlinks + while [ -h "$PRG" ] ; do + ls=`ls -ld "$PRG"` + link=`expr "$ls" : '.*-> \(.*\)$'` + if expr "$link" : '/.*' > /dev/null; then + PRG="$link" + else + PRG="`dirname "$PRG"`/$link" + fi + done + + saveddir=`pwd` + + M2_HOME=`dirname "$PRG"`/.. + + # make it fully qualified + M2_HOME=`cd "$M2_HOME" && pwd` + + cd "$saveddir" + # echo Using m2 at $M2_HOME +fi + +# For Cygwin, ensure paths are in UNIX format before anything is touched +if $cygwin ; then + [ -n "$M2_HOME" ] && + M2_HOME=`cygpath --unix "$M2_HOME"` + [ -n "$JAVA_HOME" ] && + JAVA_HOME=`cygpath --unix "$JAVA_HOME"` + [ -n "$CLASSPATH" ] && + CLASSPATH=`cygpath --path --unix "$CLASSPATH"` +fi + +# For Mingw, ensure paths are in UNIX format before anything is touched +if $mingw ; then + [ -n "$M2_HOME" ] && + M2_HOME="`(cd "$M2_HOME"; pwd)`" + [ -n "$JAVA_HOME" ] && + JAVA_HOME="`(cd "$JAVA_HOME"; pwd)`" +fi + +if [ -z "$JAVA_HOME" ]; then + javaExecutable="`which javac`" + if [ -n "$javaExecutable" ] && ! [ "`expr \"$javaExecutable\" : '\([^ ]*\)'`" = "no" ]; then + # readlink(1) is not available as standard on Solaris 10. + readLink=`which readlink` + if [ ! `expr "$readLink" : '\([^ ]*\)'` = "no" ]; then + if $darwin ; then + javaHome="`dirname \"$javaExecutable\"`" + javaExecutable="`cd \"$javaHome\" && pwd -P`/javac" + else + javaExecutable="`readlink -f \"$javaExecutable\"`" + fi + javaHome="`dirname \"$javaExecutable\"`" + javaHome=`expr "$javaHome" : '\(.*\)/bin'` + JAVA_HOME="$javaHome" + export JAVA_HOME + fi + fi +fi + +if [ -z "$JAVACMD" ] ; then + if [ -n "$JAVA_HOME" ] ; then + if [ -x "$JAVA_HOME/jre/sh/java" ] ; then + # IBM's JDK on AIX uses strange locations for the executables + JAVACMD="$JAVA_HOME/jre/sh/java" + else + JAVACMD="$JAVA_HOME/bin/java" + fi + else + JAVACMD="`which java`" + fi +fi + +if [ ! -x "$JAVACMD" ] ; then + echo "Error: JAVA_HOME is not defined correctly." >&2 + echo " We cannot execute $JAVACMD" >&2 + exit 1 +fi + +if [ -z "$JAVA_HOME" ] ; then + echo "Warning: JAVA_HOME environment variable is not set." +fi + +CLASSWORLDS_LAUNCHER=org.codehaus.plexus.classworlds.launcher.Launcher + +# traverses directory structure from process work directory to filesystem root +# first directory with .mvn subdirectory is considered project base directory +find_maven_basedir() { + + if [ -z "$1" ] + then + echo "Path not specified to find_maven_basedir" + return 1 + fi + + basedir="$1" + wdir="$1" + while [ "$wdir" != '/' ] ; do + if [ -d "$wdir"/.mvn ] ; then + basedir=$wdir + break + fi + # workaround for JBEAP-8937 (on Solaris 10/Sparc) + if [ -d "${wdir}" ]; then + wdir=`cd "$wdir/.."; pwd` + fi + # end of workaround + done + echo "${basedir}" +} + +# concatenates all lines of a file +concat_lines() { + if [ -f "$1" ]; then + echo "$(tr -s '\n' ' ' < "$1")" + fi +} + +BASE_DIR=`find_maven_basedir "$(pwd)"` +if [ -z "$BASE_DIR" ]; then + exit 1; +fi + +########################################################################################## +# Extension to allow automatically downloading the maven-wrapper.jar from Maven-central +# This allows using the maven wrapper in projects that prohibit checking in binary data. +########################################################################################## +if [ -r "$BASE_DIR/.mvn/wrapper/maven-wrapper.jar" ]; then + if [ "$MVNW_VERBOSE" = true ]; then + echo "Found .mvn/wrapper/maven-wrapper.jar" + fi +else + if [ "$MVNW_VERBOSE" = true ]; then + echo "Couldn't find .mvn/wrapper/maven-wrapper.jar, downloading it ..." + fi + if [ -n "$MVNW_REPOURL" ]; then + jarUrl="$MVNW_REPOURL/io/takari/maven-wrapper/0.5.5/maven-wrapper-0.5.5.jar" + else + jarUrl="https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.5/maven-wrapper-0.5.5.jar" + fi + while IFS="=" read key value; do + case "$key" in (wrapperUrl) jarUrl="$value"; break ;; + esac + done < "$BASE_DIR/.mvn/wrapper/maven-wrapper.properties" + if [ "$MVNW_VERBOSE" = true ]; then + echo "Downloading from: $jarUrl" + fi + wrapperJarPath="$BASE_DIR/.mvn/wrapper/maven-wrapper.jar" + if $cygwin; then + wrapperJarPath=`cygpath --path --windows "$wrapperJarPath"` + fi + + if command -v wget > /dev/null; then + if [ "$MVNW_VERBOSE" = true ]; then + echo "Found wget ... using wget" + fi + if [ -z "$MVNW_USERNAME" ] || [ -z "$MVNW_PASSWORD" ]; then + wget "$jarUrl" -O "$wrapperJarPath" + else + wget --http-user=$MVNW_USERNAME --http-password=$MVNW_PASSWORD "$jarUrl" -O "$wrapperJarPath" + fi + elif command -v curl > /dev/null; then + if [ "$MVNW_VERBOSE" = true ]; then + echo "Found curl ... using curl" + fi + if [ -z "$MVNW_USERNAME" ] || [ -z "$MVNW_PASSWORD" ]; then + curl -o "$wrapperJarPath" "$jarUrl" -f + else + curl --user $MVNW_USERNAME:$MVNW_PASSWORD -o "$wrapperJarPath" "$jarUrl" -f + fi + + else + if [ "$MVNW_VERBOSE" = true ]; then + echo "Falling back to using Java to download" + fi + javaClass="$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.java" + # For Cygwin, switch paths to Windows format before running javac + if $cygwin; then + javaClass=`cygpath --path --windows "$javaClass"` + fi + if [ -e "$javaClass" ]; then + if [ ! -e "$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.class" ]; then + if [ "$MVNW_VERBOSE" = true ]; then + echo " - Compiling MavenWrapperDownloader.java ..." + fi + # Compiling the Java class + ("$JAVA_HOME/bin/javac" "$javaClass") + fi + if [ -e "$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.class" ]; then + # Running the downloader + if [ "$MVNW_VERBOSE" = true ]; then + echo " - Running MavenWrapperDownloader.java ..." + fi + ("$JAVA_HOME/bin/java" -cp .mvn/wrapper MavenWrapperDownloader "$MAVEN_PROJECTBASEDIR") + fi + fi + fi +fi +########################################################################################## +# End of extension +########################################################################################## + +export MAVEN_PROJECTBASEDIR=${MAVEN_BASEDIR:-"$BASE_DIR"} +if [ "$MVNW_VERBOSE" = true ]; then + echo $MAVEN_PROJECTBASEDIR +fi +MAVEN_OPTS="$(concat_lines "$MAVEN_PROJECTBASEDIR/.mvn/jvm.config") $MAVEN_OPTS" + +# For Cygwin, switch paths to Windows format before running java +if $cygwin; then + [ -n "$M2_HOME" ] && + M2_HOME=`cygpath --path --windows "$M2_HOME"` + [ -n "$JAVA_HOME" ] && + JAVA_HOME=`cygpath --path --windows "$JAVA_HOME"` + [ -n "$CLASSPATH" ] && + CLASSPATH=`cygpath --path --windows "$CLASSPATH"` + [ -n "$MAVEN_PROJECTBASEDIR" ] && + MAVEN_PROJECTBASEDIR=`cygpath --path --windows "$MAVEN_PROJECTBASEDIR"` +fi + +# Provide a "standardized" way to retrieve the CLI args that will +# work with both Windows and non-Windows executions. +MAVEN_CMD_LINE_ARGS="$MAVEN_CONFIG $@" +export MAVEN_CMD_LINE_ARGS + +WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain + +exec "$JAVACMD" \ + $MAVEN_OPTS \ + -classpath "$MAVEN_PROJECTBASEDIR/.mvn/wrapper/maven-wrapper.jar" \ + "-Dmaven.home=${M2_HOME}" "-Dmaven.multiModuleProjectDirectory=${MAVEN_PROJECTBASEDIR}" \ + ${WRAPPER_LAUNCHER} $MAVEN_CONFIG "$@" diff --git a/mvnw.cmd b/mvnw.cmd new file mode 100644 index 000000000..b26ab24f0 --- /dev/null +++ b/mvnw.cmd @@ -0,0 +1,182 @@ +@REM ---------------------------------------------------------------------------- +@REM Licensed to the Apache Software Foundation (ASF) under one +@REM or more contributor license agreements. See the NOTICE file +@REM distributed with this work for additional information +@REM regarding copyright ownership. The ASF licenses this file +@REM to you under the Apache License, Version 2.0 (the +@REM "License"); you may not use this file except in compliance +@REM with the License. You may obtain a copy of the License at +@REM +@REM http://www.apache.org/licenses/LICENSE-2.0 +@REM +@REM Unless required by applicable law or agreed to in writing, +@REM software distributed under the License is distributed on an +@REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +@REM KIND, either express or implied. See the License for the +@REM specific language governing permissions and limitations +@REM under the License. +@REM ---------------------------------------------------------------------------- + +@REM ---------------------------------------------------------------------------- +@REM Maven2 Start Up Batch script +@REM +@REM Required ENV vars: +@REM JAVA_HOME - location of a JDK home dir +@REM +@REM Optional ENV vars +@REM M2_HOME - location of maven2's installed home dir +@REM MAVEN_BATCH_ECHO - set to 'on' to enable the echoing of the batch commands +@REM MAVEN_BATCH_PAUSE - set to 'on' to wait for a key stroke before ending +@REM MAVEN_OPTS - parameters passed to the Java VM when running Maven +@REM e.g. to debug Maven itself, use +@REM set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000 +@REM MAVEN_SKIP_RC - flag to disable loading of mavenrc files +@REM ---------------------------------------------------------------------------- + +@REM Begin all REM lines with '@' in case MAVEN_BATCH_ECHO is 'on' +@echo off +@REM set title of command window +title %0 +@REM enable echoing by setting MAVEN_BATCH_ECHO to 'on' +@if "%MAVEN_BATCH_ECHO%" == "on" echo %MAVEN_BATCH_ECHO% + +@REM set %HOME% to equivalent of $HOME +if "%HOME%" == "" (set "HOME=%HOMEDRIVE%%HOMEPATH%") + +@REM Execute a user defined script before this one +if not "%MAVEN_SKIP_RC%" == "" goto skipRcPre +@REM check for pre script, once with legacy .bat ending and once with .cmd ending +if exist "%HOME%\mavenrc_pre.bat" call "%HOME%\mavenrc_pre.bat" +if exist "%HOME%\mavenrc_pre.cmd" call "%HOME%\mavenrc_pre.cmd" +:skipRcPre + +@setlocal + +set ERROR_CODE=0 + +@REM To isolate internal variables from possible post scripts, we use another setlocal +@setlocal + +@REM ==== START VALIDATION ==== +if not "%JAVA_HOME%" == "" goto OkJHome + +echo. +echo Error: JAVA_HOME not found in your environment. >&2 +echo Please set the JAVA_HOME variable in your environment to match the >&2 +echo location of your Java installation. >&2 +echo. +goto error + +:OkJHome +if exist "%JAVA_HOME%\bin\java.exe" goto init + +echo. +echo Error: JAVA_HOME is set to an invalid directory. >&2 +echo JAVA_HOME = "%JAVA_HOME%" >&2 +echo Please set the JAVA_HOME variable in your environment to match the >&2 +echo location of your Java installation. >&2 +echo. +goto error + +@REM ==== END VALIDATION ==== + +:init + +@REM Find the project base dir, i.e. the directory that contains the folder ".mvn". +@REM Fallback to current working directory if not found. + +set MAVEN_PROJECTBASEDIR=%MAVEN_BASEDIR% +IF NOT "%MAVEN_PROJECTBASEDIR%"=="" goto endDetectBaseDir + +set EXEC_DIR=%CD% +set WDIR=%EXEC_DIR% +:findBaseDir +IF EXIST "%WDIR%"\.mvn goto baseDirFound +cd .. +IF "%WDIR%"=="%CD%" goto baseDirNotFound +set WDIR=%CD% +goto findBaseDir + +:baseDirFound +set MAVEN_PROJECTBASEDIR=%WDIR% +cd "%EXEC_DIR%" +goto endDetectBaseDir + +:baseDirNotFound +set MAVEN_PROJECTBASEDIR=%EXEC_DIR% +cd "%EXEC_DIR%" + +:endDetectBaseDir + +IF NOT EXIST "%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config" goto endReadAdditionalConfig + +@setlocal EnableExtensions EnableDelayedExpansion +for /F "usebackq delims=" %%a in ("%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config") do set JVM_CONFIG_MAVEN_PROPS=!JVM_CONFIG_MAVEN_PROPS! %%a +@endlocal & set JVM_CONFIG_MAVEN_PROPS=%JVM_CONFIG_MAVEN_PROPS% + +:endReadAdditionalConfig + +SET MAVEN_JAVA_EXE="%JAVA_HOME%\bin\java.exe" +set WRAPPER_JAR="%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.jar" +set WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain + +set DOWNLOAD_URL="https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.5/maven-wrapper-0.5.5.jar" + +FOR /F "tokens=1,2 delims==" %%A IN ("%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.properties") DO ( + IF "%%A"=="wrapperUrl" SET DOWNLOAD_URL=%%B +) + +@REM Extension to allow automatically downloading the maven-wrapper.jar from Maven-central +@REM This allows using the maven wrapper in projects that prohibit checking in binary data. +if exist %WRAPPER_JAR% ( + if "%MVNW_VERBOSE%" == "true" ( + echo Found %WRAPPER_JAR% + ) +) else ( + if not "%MVNW_REPOURL%" == "" ( + SET DOWNLOAD_URL="%MVNW_REPOURL%/io/takari/maven-wrapper/0.5.5/maven-wrapper-0.5.5.jar" + ) + if "%MVNW_VERBOSE%" == "true" ( + echo Couldn't find %WRAPPER_JAR%, downloading it ... + echo Downloading from: %DOWNLOAD_URL% + ) + + powershell -Command "&{"^ + "$webclient = new-object System.Net.WebClient;"^ + "if (-not ([string]::IsNullOrEmpty('%MVNW_USERNAME%') -and [string]::IsNullOrEmpty('%MVNW_PASSWORD%'))) {"^ + "$webclient.Credentials = new-object System.Net.NetworkCredential('%MVNW_USERNAME%', '%MVNW_PASSWORD%');"^ + "}"^ + "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; $webclient.DownloadFile('%DOWNLOAD_URL%', '%WRAPPER_JAR%')"^ + "}" + if "%MVNW_VERBOSE%" == "true" ( + echo Finished downloading %WRAPPER_JAR% + ) +) +@REM End of extension + +@REM Provide a "standardized" way to retrieve the CLI args that will +@REM work with both Windows and non-Windows executions. +set MAVEN_CMD_LINE_ARGS=%* + +%MAVEN_JAVA_EXE% %JVM_CONFIG_MAVEN_PROPS% %MAVEN_OPTS% %MAVEN_DEBUG_OPTS% -classpath %WRAPPER_JAR% "-Dmaven.multiModuleProjectDirectory=%MAVEN_PROJECTBASEDIR%" %WRAPPER_LAUNCHER% %MAVEN_CONFIG% %* +if ERRORLEVEL 1 goto error +goto end + +:error +set ERROR_CODE=1 + +:end +@endlocal & set ERROR_CODE=%ERROR_CODE% + +if not "%MAVEN_SKIP_RC%" == "" goto skipRcPost +@REM check for post script, once with legacy .bat ending and once with .cmd ending +if exist "%HOME%\mavenrc_post.bat" call "%HOME%\mavenrc_post.bat" +if exist "%HOME%\mavenrc_post.cmd" call "%HOME%\mavenrc_post.cmd" +:skipRcPost + +@REM pause the script if MAVEN_BATCH_PAUSE is set to 'on' +if "%MAVEN_BATCH_PAUSE%" == "on" pause + +if "%MAVEN_TERMINATE_CMD%" == "on" exit %ERROR_CODE% + +exit /B %ERROR_CODE% From ea812c336f911141f2e6ca4ab3f550a392308102 Mon Sep 17 00:00:00 2001 From: Valentyn Berezin Date: Fri, 30 Aug 2019 19:11:21 +0300 Subject: [PATCH 023/255] Use correct JAVA_HOME --- .travis.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.travis.yml b/.travis.yml index 3b2ef1d25..98a552864 100644 --- a/.travis.yml +++ b/.travis.yml @@ -12,6 +12,8 @@ env: # Special test-skipping stage to build CLI, using maven-wrapper build-cli: &build-cli script: + # Ensure we use correct Java - one that is set by Jabba + - source ~/.jdk_config # Prepare everything - ./mvnw --settings .travis/settings.xml clean install -B -V -DskipTests # Change security providers of JDK From b840daea4002e02922bd618e2109eacd7e766aa2 Mon Sep 17 00:00:00 2001 From: Valentyn Berezin Date: Fri, 30 Aug 2019 19:22:01 +0300 Subject: [PATCH 024/255] Use correct JAVA_HOME --- .travis.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.travis.yml b/.travis.yml index 98a552864..43439c916 100644 --- a/.travis.yml +++ b/.travis.yml @@ -14,6 +14,7 @@ build-cli: &build-cli script: # Ensure we use correct Java - one that is set by Jabba - source ~/.jdk_config + - cat ~/.jdk_config # Prepare everything - ./mvnw --settings .travis/settings.xml clean install -B -V -DskipTests # Change security providers of JDK @@ -44,6 +45,7 @@ matrix: # This is original build and deploy, that runs E2E tests and deploys docker images - os: linux language: java + jdk: oraclejdk8 # These are CLI-only builds that produce Datasafe cli executable for each OS: # CLI for Linux: @@ -65,4 +67,6 @@ matrix: language: bash before_install: - /bin/bash .travis/install_custom_jdk_and_add_security_providers.sh + before_script: + - cp mvnw.cmd mvnw <<: *build-cli From 4863c1e47ab5b5263fbfb2a4908c02ec0be813a1 Mon Sep 17 00:00:00 2001 From: Valentyn Berezin Date: Fri, 30 Aug 2019 19:35:09 +0300 Subject: [PATCH 025/255] Debug logging --- .travis.yml | 12 +++++++++--- .../install_custom_jdk_and_add_security_providers.sh | 4 ++++ 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 43439c916..05018c571 100644 --- a/.travis.yml +++ b/.travis.yml @@ -12,9 +12,15 @@ env: # Special test-skipping stage to build CLI, using maven-wrapper build-cli: &build-cli script: + - echo "$JAVA_HOME" + - java -version + - which java # Ensure we use correct Java - one that is set by Jabba - source ~/.jdk_config - cat ~/.jdk_config + - echo "$JAVA_HOME" + - java -version + - which java # Prepare everything - ./mvnw --settings .travis/settings.xml clean install -B -V -DskipTests # Change security providers of JDK @@ -42,11 +48,13 @@ after_success: matrix: include: + #### ORIGINAL BUILD #### # This is original build and deploy, that runs E2E tests and deploys docker images - os: linux language: java - jdk: oraclejdk8 + jdk: openjdk8 + #### CLI-ORIENTED BUILD #### # These are CLI-only builds that produce Datasafe cli executable for each OS: # CLI for Linux: - os: linux @@ -67,6 +75,4 @@ matrix: language: bash before_install: - /bin/bash .travis/install_custom_jdk_and_add_security_providers.sh - before_script: - - cp mvnw.cmd mvnw <<: *build-cli diff --git a/.travis/install_custom_jdk_and_add_security_providers.sh b/.travis/install_custom_jdk_and_add_security_providers.sh index 61f04ec33..7da657f15 100755 --- a/.travis/install_custom_jdk_and_add_security_providers.sh +++ b/.travis/install_custom_jdk_and_add_security_providers.sh @@ -22,3 +22,7 @@ curl "https://repo1.maven.org/maven2/org/bouncycastle/bcprov-jdk15on/${BC_VERSIO curl "https://repo1.maven.org/maven2/org/bouncycastle/bctls-jdk15on/${BC_VERSION}/bctls-jdk15on-${BC_VERSION}.jar" \ --output "$JAVA_HOME/jre/lib/ext/bctls-jdk15on-${BC_VERSION}.jar" + +echo "$JAVA_HOME" +java -version +which java From faeaaec7e8ce7b759928b8e49b6e879e5089c162 Mon Sep 17 00:00:00 2001 From: Valentyn Berezin Date: Fri, 30 Aug 2019 19:57:25 +0300 Subject: [PATCH 026/255] Removed logging and added Graal Updater --- .travis.yml | 9 --------- .travis/install_custom_jdk_and_add_security_providers.sh | 5 ++--- 2 files changed, 2 insertions(+), 12 deletions(-) diff --git a/.travis.yml b/.travis.yml index 05018c571..f6f4043c2 100644 --- a/.travis.yml +++ b/.travis.yml @@ -12,15 +12,6 @@ env: # Special test-skipping stage to build CLI, using maven-wrapper build-cli: &build-cli script: - - echo "$JAVA_HOME" - - java -version - - which java - # Ensure we use correct Java - one that is set by Jabba - - source ~/.jdk_config - - cat ~/.jdk_config - - echo "$JAVA_HOME" - - java -version - - which java # Prepare everything - ./mvnw --settings .travis/settings.xml clean install -B -V -DskipTests # Change security providers of JDK diff --git a/.travis/install_custom_jdk_and_add_security_providers.sh b/.travis/install_custom_jdk_and_add_security_providers.sh index 7da657f15..f4a9710c4 100755 --- a/.travis/install_custom_jdk_and_add_security_providers.sh +++ b/.travis/install_custom_jdk_and_add_security_providers.sh @@ -23,6 +23,5 @@ curl "https://repo1.maven.org/maven2/org/bouncycastle/bcprov-jdk15on/${BC_VERSIO curl "https://repo1.maven.org/maven2/org/bouncycastle/bctls-jdk15on/${BC_VERSION}/bctls-jdk15on-${BC_VERSION}.jar" \ --output "$JAVA_HOME/jre/lib/ext/bctls-jdk15on-${BC_VERSION}.jar" -echo "$JAVA_HOME" -java -version -which java +# Install native image builder +gu install native-image From 42ac0b3c6ff440872c620520538526b6e0880249 Mon Sep 17 00:00:00 2001 From: Valentyn Berezin Date: Fri, 30 Aug 2019 20:05:43 +0300 Subject: [PATCH 027/255] Re-export JAVA_HOME - it gets lost --- .travis.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.travis.yml b/.travis.yml index f6f4043c2..c75dc96df 100644 --- a/.travis.yml +++ b/.travis.yml @@ -12,6 +12,8 @@ env: # Special test-skipping stage to build CLI, using maven-wrapper build-cli: &build-cli script: + # re-export JAVA_HOME + - source ~/.jdk_config # Prepare everything - ./mvnw --settings .travis/settings.xml clean install -B -V -DskipTests # Change security providers of JDK From c23083b0e06300874bc39033d4e917607fc87373 Mon Sep 17 00:00:00 2001 From: Valentyn Berezin Date: Fri, 30 Aug 2019 20:06:50 +0300 Subject: [PATCH 028/255] Attempt to fix Windows downloader --- .mvn/wrapper/MavenWrapperDownloader.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.mvn/wrapper/MavenWrapperDownloader.java b/.mvn/wrapper/MavenWrapperDownloader.java index c32394f14..d841b3b7e 100644 --- a/.mvn/wrapper/MavenWrapperDownloader.java +++ b/.mvn/wrapper/MavenWrapperDownloader.java @@ -60,7 +60,8 @@ public static void main(String args[]) { mavenWrapperPropertyFileInputStream = new FileInputStream(mavenWrapperPropertyFile); Properties mavenWrapperProperties = new Properties(); mavenWrapperProperties.load(mavenWrapperPropertyFileInputStream); - url = mavenWrapperProperties.getProperty(PROPERTY_NAME_WRAPPER_URL, url); + // Windows downloader fix + url = mavenWrapperProperties.getProperty(PROPERTY_NAME_WRAPPER_URL, url).replaceAll("\r", ""); } catch (IOException e) { System.out.println("- ERROR loading '" + MAVEN_WRAPPER_PROPERTIES_PATH + "'"); } finally { From fb68ab9bdf1aafe9bd2aae3c9c2fe25a33e0597e Mon Sep 17 00:00:00 2001 From: Valentyn Berezin Date: Sat, 31 Aug 2019 11:51:15 +0300 Subject: [PATCH 029/255] Deployment and fixes for MacOS sed --- .travis.yml | 55 ++++++++++++++++--------- .travis/deploy.sh | 1 + .travis/enable_bouncycastle_security.sh | 13 ++++-- 3 files changed, 47 insertions(+), 22 deletions(-) diff --git a/.travis.yml b/.travis.yml index c75dc96df..cf5c638cb 100644 --- a/.travis.yml +++ b/.travis.yml @@ -9,28 +9,18 @@ env: - GRAVIS="https://raw.githubusercontent.com/DanySK/Gravis-CI/master/" - JDK="graalvm@19.2.0" -# Special test-skipping stage to build CLI, using maven-wrapper -build-cli: &build-cli - script: - # re-export JAVA_HOME - - source ~/.jdk_config - # Prepare everything - - ./mvnw --settings .travis/settings.xml clean install -B -V -DskipTests - # Change security providers of JDK - - /bin/bash .travis/enable_bouncycastle_security.sh - # Build native image - - ./mvnw --settings .travis/settings.xml -f datasafe-cli/pom.xml clean package -B -V -Pnative-image -DskipTests - before_install: - echo "Before install" install: - echo "Install" +# Original build script: - echo "Script" - mvn --settings .travis/settings.xml clean verify -B -V -DAWS_BUCKET=${AWS_BUCKET} -DskipTests # FIXME remove skipTests +# Original deploy deploy: - provider: script skip_cleanup: true @@ -39,6 +29,31 @@ deploy: after_success: - echo "Success" +# Special test-skipping stage to build CLI, using maven-wrapper +build-cli: &build-cli + script: + # re-export JAVA_HOME + - source ~/.jdk_config + # Prepare everything + - ./mvnw --settings .travis/settings.xml clean install -B -V -DskipTests + # Change security providers of JDK + - /bin/bash .travis/enable_bouncycastle_security.sh + # Build native image + - ./mvnw --settings .travis/settings.xml -f datasafe-cli/pom.xml clean package -B -V -Pnative-image -DskipTests + +# CLI artifacts publishing: +deploy-cli: &deploy-cli + deploy: + provider: s3 + access_key_id: ${AWS_ACCESS_KEY_ID} + secret_access_key: ${AWS_SECRET_ACCESS_KEY} + bucket: ${AWS_BUCKET} + region: eu-central-1 + skip_cleanup: true + local_dir: datasafe-cli/target + upload-dir: datasafe-cli/${OSTYPE}/${TRAVIS_COMMIT} + +# Build configuration definition: matrix: include: #### ORIGINAL BUILD #### @@ -55,17 +70,19 @@ matrix: before_install: - /bin/bash .travis/install_custom_jdk_and_add_security_providers.sh <<: *build-cli + <<: *deploy-cli # CLI for MacOS: - os: osx language: bash before_install: - /bin/bash .travis/install_custom_jdk_and_add_security_providers.sh <<: *build-cli + <<: *deploy-cli # CLI for Windows: - - os: windows - env: - - NO_WIN_DEFENDER=$(curl "${GRAVIS}.disable-windows-defender.sh" --output .no-defender.sh && source .no-defender.sh) - language: bash - before_install: - - /bin/bash .travis/install_custom_jdk_and_add_security_providers.sh - <<: *build-cli + #- os: windows + # env: + # - NO_WIN_DEFENDER=$(curl "${GRAVIS}.disable-windows-defender.sh" --output .no-defender.sh && source .no-defender.sh) + # language: bash + # before_install: + # - /bin/bash .travis/install_custom_jdk_and_add_security_providers.sh + # <<: *build-cli diff --git a/.travis/deploy.sh b/.travis/deploy.sh index b99f0bb14..3f1052e59 100644 --- a/.travis/deploy.sh +++ b/.travis/deploy.sh @@ -1,4 +1,5 @@ #!/usr/bin/env bash + echo "$GPG_SECRET_KEY" | base64 --decode | "$GPG_EXECUTABLE" --import echo "$GPG_OWNERTRUST" | base64 --decode | "$GPG_EXECUTABLE" --import-ownertrust diff --git a/.travis/enable_bouncycastle_security.sh b/.travis/enable_bouncycastle_security.sh index 3bc826889..21e8714e3 100644 --- a/.travis/enable_bouncycastle_security.sh +++ b/.travis/enable_bouncycastle_security.sh @@ -1,14 +1,21 @@ #!/bin/bash +SED_EXEC="sed" +if [[ "$OSTYPE" == "darwin"* ]]; then + # Mac OSX + SED_EXEC="gsed" +fi + # 3. Adds BouncyCastle Provider to JDK security providers # 4. Adds BouncyCastle TLS to JDK security providers # 5. Removes SunEC security provider to use SSL from BouncyCastle + # 3. Add BouncyCastle Provider to JDK security providers at place 2 (should replace sun.security.rsa.SunRsaSign) -sed -i "s/security\.provider\.2=.*/security.provider.2=org.bouncycastle.jce.provider.BouncyCastleProvider/g" "$JAVA_HOME/jre/lib/security/java.security" +$SED_EXEC -i "s/security\.provider\.2=.*/security.provider.2=org.bouncycastle.jce.provider.BouncyCastleProvider/g" "$JAVA_HOME/jre/lib/security/java.security" # 4. Add BouncyCastle TLS to JDK security providers at place 3 (should replace sun.security.ec.SunEC and come before com.sun.net.ssl.internal.ssl.Provider) -sed -i "s/security\.provider\.3=.*/security.provider.3=org.bouncycastle.jsse.provider.BouncyCastleJsseProvider/g" "$JAVA_HOME/jre/lib/security/java.security" +$SED_EXEC -i "s/security\.provider\.3=.*/security.provider.3=org.bouncycastle.jsse.provider.BouncyCastleJsseProvider/g" "$JAVA_HOME/jre/lib/security/java.security" # 5. Remove SunEC security provider (if it still exists) -sed -i "s/security\.provider\..*=sun\.security\.ec\.SunEC//g" "$JAVA_HOME/jre/lib/security/java.security" +$SED_EXEC -i "s/security\.provider\..*=sun\.security\.ec\.SunEC//g" "$JAVA_HOME/jre/lib/security/java.security" From ec4babb77bca57af6266126843a7ee55c8bd18af Mon Sep 17 00:00:00 2001 From: Valentyn Berezin Date: Sat, 31 Aug 2019 12:05:19 +0300 Subject: [PATCH 030/255] Another fix attempt for sed and enabling deploy on custom branch --- .travis.yml | 5 ++++- .travis/enable_bouncycastle_security.sh | 11 ++++++----- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/.travis.yml b/.travis.yml index cf5c638cb..5c2f0f4d2 100644 --- a/.travis.yml +++ b/.travis.yml @@ -43,12 +43,15 @@ build-cli: &build-cli # CLI artifacts publishing: deploy-cli: &deploy-cli + # FIXME Enabling temporary deploy rule deploy: + on: + branch: feature/datasafe-cli-w-s3 provider: s3 access_key_id: ${AWS_ACCESS_KEY_ID} secret_access_key: ${AWS_SECRET_ACCESS_KEY} bucket: ${AWS_BUCKET} - region: eu-central-1 + region: ${AWS_REGION} skip_cleanup: true local_dir: datasafe-cli/target upload-dir: datasafe-cli/${OSTYPE}/${TRAVIS_COMMIT} diff --git a/.travis/enable_bouncycastle_security.sh b/.travis/enable_bouncycastle_security.sh index 21e8714e3..9f7f5664c 100644 --- a/.travis/enable_bouncycastle_security.sh +++ b/.travis/enable_bouncycastle_security.sh @@ -1,9 +1,10 @@ #!/bin/bash -SED_EXEC="sed" +# SED flavors in-place replacement handling: +SED_I_EXEC="sed -i" if [[ "$OSTYPE" == "darwin"* ]]; then # Mac OSX - SED_EXEC="gsed" + SED_I_EXEC="sed -i ''" fi # 3. Adds BouncyCastle Provider to JDK security providers @@ -12,10 +13,10 @@ fi # 3. Add BouncyCastle Provider to JDK security providers at place 2 (should replace sun.security.rsa.SunRsaSign) -$SED_EXEC -i "s/security\.provider\.2=.*/security.provider.2=org.bouncycastle.jce.provider.BouncyCastleProvider/g" "$JAVA_HOME/jre/lib/security/java.security" +$SED_I_EXEC "s/security\.provider\.2=.*/security.provider.2=org.bouncycastle.jce.provider.BouncyCastleProvider/g" "$JAVA_HOME/jre/lib/security/java.security" # 4. Add BouncyCastle TLS to JDK security providers at place 3 (should replace sun.security.ec.SunEC and come before com.sun.net.ssl.internal.ssl.Provider) -$SED_EXEC -i "s/security\.provider\.3=.*/security.provider.3=org.bouncycastle.jsse.provider.BouncyCastleJsseProvider/g" "$JAVA_HOME/jre/lib/security/java.security" +$SED_I_EXEC "s/security\.provider\.3=.*/security.provider.3=org.bouncycastle.jsse.provider.BouncyCastleJsseProvider/g" "$JAVA_HOME/jre/lib/security/java.security" # 5. Remove SunEC security provider (if it still exists) -$SED_EXEC -i "s/security\.provider\..*=sun\.security\.ec\.SunEC//g" "$JAVA_HOME/jre/lib/security/java.security" +$SED_I_EXEC "s/security\.provider\..*=sun\.security\.ec\.SunEC//g" "$JAVA_HOME/jre/lib/security/java.security" From b0c14bc8a520081fd565ab0c1c12dd2bc59769ed Mon Sep 17 00:00:00 2001 From: Valentyn Berezin Date: Sat, 31 Aug 2019 12:20:18 +0300 Subject: [PATCH 031/255] Re-enabling windows --- .travis.yml | 15 ++++++++------- ...stall_custom_jdk_and_add_security_providers.sh | 12 ++++++++++-- 2 files changed, 18 insertions(+), 9 deletions(-) diff --git a/.travis.yml b/.travis.yml index 5c2f0f4d2..2badf01ca 100644 --- a/.travis.yml +++ b/.travis.yml @@ -82,10 +82,11 @@ matrix: <<: *build-cli <<: *deploy-cli # CLI for Windows: - #- os: windows - # env: - # - NO_WIN_DEFENDER=$(curl "${GRAVIS}.disable-windows-defender.sh" --output .no-defender.sh && source .no-defender.sh) - # language: bash - # before_install: - # - /bin/bash .travis/install_custom_jdk_and_add_security_providers.sh - # <<: *build-cli + - os: windows + env: + - NO_WIN_DEFENDER=$(curl "${GRAVIS}.disable-windows-defender.sh" --output .no-defender.sh && source .no-defender.sh) + language: bash + before_install: + - /bin/bash .travis/install_custom_jdk_and_add_security_providers.sh + <<: *build-cli + <<: *deploy-cli diff --git a/.travis/install_custom_jdk_and_add_security_providers.sh b/.travis/install_custom_jdk_and_add_security_providers.sh index f4a9710c4..879be3696 100755 --- a/.travis/install_custom_jdk_and_add_security_providers.sh +++ b/.travis/install_custom_jdk_and_add_security_providers.sh @@ -23,5 +23,13 @@ curl "https://repo1.maven.org/maven2/org/bouncycastle/bcprov-jdk15on/${BC_VERSIO curl "https://repo1.maven.org/maven2/org/bouncycastle/bctls-jdk15on/${BC_VERSION}/bctls-jdk15on-${BC_VERSION}.jar" \ --output "$JAVA_HOME/jre/lib/ext/bctls-jdk15on-${BC_VERSION}.jar" -# Install native image builder -gu install native-image +# Windows does not have Graal Updater (gu) tool, so we install native-image manually +if [[ "$OSTYPE" == "windows"* ]]; then + # TODO + echo "Windows, nothing to do" +else + # Install native image builder + gu install native-image +fi + + From 088d7e9ac203bf0f01d25e8cbdd7c4845b5bf7e5 Mon Sep 17 00:00:00 2001 From: Valentyn Berezin Date: Sat, 31 Aug 2019 12:27:42 +0300 Subject: [PATCH 032/255] Fixed os type check --- .travis/install_custom_jdk_and_add_security_providers.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis/install_custom_jdk_and_add_security_providers.sh b/.travis/install_custom_jdk_and_add_security_providers.sh index 879be3696..a91310225 100755 --- a/.travis/install_custom_jdk_and_add_security_providers.sh +++ b/.travis/install_custom_jdk_and_add_security_providers.sh @@ -24,7 +24,7 @@ curl "https://repo1.maven.org/maven2/org/bouncycastle/bctls-jdk15on/${BC_VERSION --output "$JAVA_HOME/jre/lib/ext/bctls-jdk15on-${BC_VERSION}.jar" # Windows does not have Graal Updater (gu) tool, so we install native-image manually -if [[ "$OSTYPE" == "windows"* ]]; then +if [[ "$TRAVIS_OS_NAME" == "windows"* ]]; then # TODO echo "Windows, nothing to do" else From f7fb61639b6838d605979a7b2fd6bfed0e9266a0 Mon Sep 17 00:00:00 2001 From: Valentyn Berezin Date: Sat, 31 Aug 2019 12:44:47 +0300 Subject: [PATCH 033/255] Windows build fixes --- .travis.yml | 42 +++++++++++++++++++++--------------------- mvnw | 2 +- 2 files changed, 22 insertions(+), 22 deletions(-) diff --git a/.travis.yml b/.travis.yml index 2badf01ca..05dea103b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -54,33 +54,33 @@ deploy-cli: &deploy-cli region: ${AWS_REGION} skip_cleanup: true local_dir: datasafe-cli/target - upload-dir: datasafe-cli/${OSTYPE}/${TRAVIS_COMMIT} + upload-dir: datasafe-cli/${$TRAVIS_OS_NAME}/${TRAVIS_COMMIT} # Build configuration definition: matrix: include: #### ORIGINAL BUILD #### # This is original build and deploy, that runs E2E tests and deploys docker images - - os: linux - language: java - jdk: openjdk8 - - #### CLI-ORIENTED BUILD #### - # These are CLI-only builds that produce Datasafe cli executable for each OS: - # CLI for Linux: - - os: linux - language: bash - before_install: - - /bin/bash .travis/install_custom_jdk_and_add_security_providers.sh - <<: *build-cli - <<: *deploy-cli - # CLI for MacOS: - - os: osx - language: bash - before_install: - - /bin/bash .travis/install_custom_jdk_and_add_security_providers.sh - <<: *build-cli - <<: *deploy-cli +# - os: linux +# language: java +# jdk: openjdk8 +# +# #### CLI-ORIENTED BUILD #### +# # These are CLI-only builds that produce Datasafe cli executable for each OS: +# # CLI for Linux: +# - os: linux +# language: bash +# before_install: +# - /bin/bash .travis/install_custom_jdk_and_add_security_providers.sh +# <<: *build-cli +# <<: *deploy-cli +# # CLI for MacOS: +# - os: osx +# language: bash +# before_install: +# - /bin/bash .travis/install_custom_jdk_and_add_security_providers.sh +# <<: *build-cli +# <<: *deploy-cli # CLI for Windows: - os: windows env: diff --git a/mvnw b/mvnw index d2f0ea380..17fa9ce16 100755 --- a/mvnw +++ b/mvnw @@ -217,7 +217,7 @@ else jarUrl="https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.5/maven-wrapper-0.5.5.jar" fi while IFS="=" read key value; do - case "$key" in (wrapperUrl) jarUrl="$value"; break ;; + case "$key" in (wrapperUrl) jarUrl="${value/'\r'/}"; break ;; esac done < "$BASE_DIR/.mvn/wrapper/maven-wrapper.properties" if [ "$MVNW_VERBOSE" = true ]; then From 8401d28c87f4e0ebd821ecef738eb579313933c7 Mon Sep 17 00:00:00 2001 From: Valentyn Berezin Date: Sat, 31 Aug 2019 12:57:37 +0300 Subject: [PATCH 034/255] Windows build fixes --- mvnw | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/mvnw b/mvnw index 17fa9ce16..a533b5cf5 100755 --- a/mvnw +++ b/mvnw @@ -216,8 +216,13 @@ else else jarUrl="https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.5/maven-wrapper-0.5.5.jar" fi + + # FIXME: Fix windows bash: + tr -d '\r' "$BASE_DIR/.mvn/wrapper/maven-wrapper.properties" "$BASE_DIR/.mvn/wrapper/maven-wrapper.properties.new" \ + && mv "$BASE_DIR/.mvn/wrapper/maven-wrapper.properties.new" "$BASE_DIR/.mvn/wrapper/maven-wrapper.properties" + while IFS="=" read key value; do - case "$key" in (wrapperUrl) jarUrl="${value/'\r'/}"; break ;; + case "$key" in (wrapperUrl) jarUrl="$value"; break ;; esac done < "$BASE_DIR/.mvn/wrapper/maven-wrapper.properties" if [ "$MVNW_VERBOSE" = true ]; then From d623754b26c86e22a23a11f5eeb3ba17152db1cd Mon Sep 17 00:00:00 2001 From: Valentyn Berezin Date: Sat, 31 Aug 2019 13:00:26 +0300 Subject: [PATCH 035/255] Windows build fixes --- mvnw | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/mvnw b/mvnw index a533b5cf5..caac1d76f 100755 --- a/mvnw +++ b/mvnw @@ -218,8 +218,9 @@ else fi # FIXME: Fix windows bash: - tr -d '\r' "$BASE_DIR/.mvn/wrapper/maven-wrapper.properties" "$BASE_DIR/.mvn/wrapper/maven-wrapper.properties.new" \ - && mv "$BASE_DIR/.mvn/wrapper/maven-wrapper.properties.new" "$BASE_DIR/.mvn/wrapper/maven-wrapper.properties" + tr -d '\r' < "$BASE_DIR/.mvn/wrapper/maven-wrapper.properties" > \ + "$BASE_DIR/.mvn/wrapper/maven-wrapper.properties.new" \ + && mv "$BASE_DIR/.mvn/wrapper/maven-wrapper.properties.new" "$BASE_DIR/.mvn/wrapper/maven-wrapper.properties" while IFS="=" read key value; do case "$key" in (wrapperUrl) jarUrl="$value"; break ;; From 5dd620f221de4b776a940eeff70186131df133c0 Mon Sep 17 00:00:00 2001 From: Valentyn Berezin Date: Sat, 31 Aug 2019 14:47:03 +0300 Subject: [PATCH 036/255] Windows build fixes --- .travis.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.travis.yml b/.travis.yml index 05dea103b..6750cd543 100644 --- a/.travis.yml +++ b/.travis.yml @@ -38,6 +38,8 @@ build-cli: &build-cli - ./mvnw --settings .travis/settings.xml clean install -B -V -DskipTests # Change security providers of JDK - /bin/bash .travis/enable_bouncycastle_security.sh + - echo $JAVA_HOME + - java -version # Build native image - ./mvnw --settings .travis/settings.xml -f datasafe-cli/pom.xml clean package -B -V -Pnative-image -DskipTests From 7f034eefe35f79d1afb711c03a279aeea5c10e24 Mon Sep 17 00:00:00 2001 From: Valentyn Berezin Date: Sat, 31 Aug 2019 15:07:13 +0300 Subject: [PATCH 037/255] Windows build fixes --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index 6750cd543..7edf30d69 100644 --- a/.travis.yml +++ b/.travis.yml @@ -40,6 +40,7 @@ build-cli: &build-cli - /bin/bash .travis/enable_bouncycastle_security.sh - echo $JAVA_HOME - java -version + - ls $JAVA_HOME/jre/lib/jvmci # Build native image - ./mvnw --settings .travis/settings.xml -f datasafe-cli/pom.xml clean package -B -V -Pnative-image -DskipTests From f9d8f9aae3e787e14972fcdf4b1d5472afe1919c Mon Sep 17 00:00:00 2001 From: Valentyn Berezin Date: Sat, 31 Aug 2019 15:19:23 +0300 Subject: [PATCH 038/255] Windows build fixes --- .travis.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 7edf30d69..0d0d6e9a8 100644 --- a/.travis.yml +++ b/.travis.yml @@ -41,8 +41,10 @@ build-cli: &build-cli - echo $JAVA_HOME - java -version - ls $JAVA_HOME/jre/lib/jvmci + - find "$JAVA_HOME/jre/lib/jvmci" -type f ! -name '*.jar' -delete + - ls $JAVA_HOME/jre/lib/jvmci # Build native image - - ./mvnw --settings .travis/settings.xml -f datasafe-cli/pom.xml clean package -B -V -Pnative-image -DskipTests + - ./mvnw -X --settings .travis/settings.xml -f datasafe-cli/pom.xml clean package -B -V -Pnative-image -DskipTests # CLI artifacts publishing: deploy-cli: &deploy-cli From 6dde46ff0177ae3b50d56c3220ecd4136a61c2c0 Mon Sep 17 00:00:00 2001 From: Valentyn Berezin Date: Sat, 31 Aug 2019 15:37:34 +0300 Subject: [PATCH 039/255] Windows build fixes --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 0d0d6e9a8..ef348321d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -44,7 +44,7 @@ build-cli: &build-cli - find "$JAVA_HOME/jre/lib/jvmci" -type f ! -name '*.jar' -delete - ls $JAVA_HOME/jre/lib/jvmci # Build native image - - ./mvnw -X --settings .travis/settings.xml -f datasafe-cli/pom.xml clean package -B -V -Pnative-image -DskipTests + - ./mvnw --settings .travis/settings.xml -f datasafe-cli/pom.xml clean package -B -V -Pnative-image -DskipTests # CLI artifacts publishing: deploy-cli: &deploy-cli From e8995a1056b1fcb31283f681540b27beafb9d479 Mon Sep 17 00:00:00 2001 From: Valentyn Berezin Date: Sat, 31 Aug 2019 15:43:49 +0300 Subject: [PATCH 040/255] Windows build fixes --- .travis.yml | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/.travis.yml b/.travis.yml index ef348321d..7ddabc63b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -34,17 +34,12 @@ build-cli: &build-cli script: # re-export JAVA_HOME - source ~/.jdk_config - # Prepare everything - - ./mvnw --settings .travis/settings.xml clean install -B -V -DskipTests + # Prepare everything, no settings.xml needed + - ./mvnw clean install -B -V -DskipTests # Change security providers of JDK - /bin/bash .travis/enable_bouncycastle_security.sh - - echo $JAVA_HOME - - java -version - - ls $JAVA_HOME/jre/lib/jvmci - - find "$JAVA_HOME/jre/lib/jvmci" -type f ! -name '*.jar' -delete - - ls $JAVA_HOME/jre/lib/jvmci - # Build native image - - ./mvnw --settings .travis/settings.xml -f datasafe-cli/pom.xml clean package -B -V -Pnative-image -DskipTests + # Build native image, no settings.xml needed + - ./mvnw -f datasafe-cli/pom.xml clean package -B -V -Pnative-image -DskipTests # CLI artifacts publishing: deploy-cli: &deploy-cli From b91dde6700a5bb9c0bd70b0055869064c51f27a9 Mon Sep 17 00:00:00 2001 From: Valentyn Berezin Date: Sat, 31 Aug 2019 16:48:27 +0300 Subject: [PATCH 041/255] Windows build fixes --- datasafe-cli/pom.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/datasafe-cli/pom.xml b/datasafe-cli/pom.xml index 26eac247a..8418e8c02 100644 --- a/datasafe-cli/pom.xml +++ b/datasafe-cli/pom.xml @@ -153,6 +153,7 @@ datasafe-cli + -XX:+UseJVMCICompiler --no-server --no-fallback --enable-all-security-services From b53d1ca011b452acd16c1f4b996de8a3679b9052 Mon Sep 17 00:00:00 2001 From: Valentyn Berezin Date: Sat, 31 Aug 2019 17:19:28 +0300 Subject: [PATCH 042/255] Windows build fixes - unlock experimental --- datasafe-cli/pom.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/datasafe-cli/pom.xml b/datasafe-cli/pom.xml index 8418e8c02..30620b61a 100644 --- a/datasafe-cli/pom.xml +++ b/datasafe-cli/pom.xml @@ -153,6 +153,7 @@ datasafe-cli + -XX:+UnlockExperimentalVMOptions -XX:+UseJVMCICompiler --no-server --no-fallback From 410269f4e0bb25e91241685ab3523be193531f65 Mon Sep 17 00:00:00 2001 From: Valentyn Berezin Date: Sat, 31 Aug 2019 17:29:01 +0300 Subject: [PATCH 043/255] Windows build fixes - unlock experimental --- datasafe-cli/pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/datasafe-cli/pom.xml b/datasafe-cli/pom.xml index 30620b61a..60e9a319b 100644 --- a/datasafe-cli/pom.xml +++ b/datasafe-cli/pom.xml @@ -153,8 +153,8 @@ datasafe-cli - -XX:+UnlockExperimentalVMOptions - -XX:+UseJVMCICompiler + -J-XX:+UnlockExperimentalVMOptions + -J-XX:+UseJVMCICompiler --no-server --no-fallback --enable-all-security-services From 9829195441a2831cf6b4e49a6d82ef548250c0ca Mon Sep 17 00:00:00 2001 From: Valentyn Berezin Date: Sat, 31 Aug 2019 17:41:03 +0300 Subject: [PATCH 044/255] Disable windows build --- .travis.yml | 48 ++++++++++++++++++++++---------------------- datasafe-cli/pom.xml | 2 -- 2 files changed, 24 insertions(+), 26 deletions(-) diff --git a/.travis.yml b/.travis.yml index 7ddabc63b..3ca6bb8c1 100644 --- a/.travis.yml +++ b/.travis.yml @@ -61,32 +61,32 @@ matrix: include: #### ORIGINAL BUILD #### # This is original build and deploy, that runs E2E tests and deploys docker images -# - os: linux -# language: java -# jdk: openjdk8 -# -# #### CLI-ORIENTED BUILD #### -# # These are CLI-only builds that produce Datasafe cli executable for each OS: -# # CLI for Linux: -# - os: linux -# language: bash -# before_install: -# - /bin/bash .travis/install_custom_jdk_and_add_security_providers.sh -# <<: *build-cli -# <<: *deploy-cli -# # CLI for MacOS: -# - os: osx -# language: bash -# before_install: -# - /bin/bash .travis/install_custom_jdk_and_add_security_providers.sh -# <<: *build-cli -# <<: *deploy-cli - # CLI for Windows: - - os: windows - env: - - NO_WIN_DEFENDER=$(curl "${GRAVIS}.disable-windows-defender.sh" --output .no-defender.sh && source .no-defender.sh) + - os: linux + language: java + jdk: openjdk8 + + #### CLI-ORIENTED BUILD #### + # These are CLI-only builds that produce Datasafe cli executable for each OS: + # CLI for Linux: + - os: linux language: bash before_install: - /bin/bash .travis/install_custom_jdk_and_add_security_providers.sh <<: *build-cli <<: *deploy-cli + # CLI for MacOS: + - os: osx + language: bash + before_install: + - /bin/bash .travis/install_custom_jdk_and_add_security_providers.sh + <<: *build-cli + <<: *deploy-cli + # CLI for Windows (disabled as of now): +# - os: windows +# env: +# - NO_WIN_DEFENDER=$(curl "${GRAVIS}.disable-windows-defender.sh" --output .no-defender.sh && source .no-defender.sh) +# language: bash +# before_install: +# - /bin/bash .travis/install_custom_jdk_and_add_security_providers.sh +# <<: *build-cli +# <<: *deploy-cli diff --git a/datasafe-cli/pom.xml b/datasafe-cli/pom.xml index 60e9a319b..26eac247a 100644 --- a/datasafe-cli/pom.xml +++ b/datasafe-cli/pom.xml @@ -153,8 +153,6 @@ datasafe-cli - -J-XX:+UnlockExperimentalVMOptions - -J-XX:+UseJVMCICompiler --no-server --no-fallback --enable-all-security-services From ca44211e770af36039c68a69864ca9f822d7e144 Mon Sep 17 00:00:00 2001 From: Valentyn Berezin Date: Sat, 31 Aug 2019 21:00:15 +0300 Subject: [PATCH 045/255] Fixed environment variable name --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 3ca6bb8c1..af79c7d7a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -54,7 +54,7 @@ deploy-cli: &deploy-cli region: ${AWS_REGION} skip_cleanup: true local_dir: datasafe-cli/target - upload-dir: datasafe-cli/${$TRAVIS_OS_NAME}/${TRAVIS_COMMIT} + upload-dir: datasafe-cli/${TRAVIS_OS_NAME}/${TRAVIS_COMMIT} # Build configuration definition: matrix: From 74f61f646ba6d46684293b15a385b7707e401e1a Mon Sep 17 00:00:00 2001 From: Valentyn Berezin Date: Sun, 1 Sep 2019 12:01:44 +0300 Subject: [PATCH 046/255] Use bundled maven --- .mvn/wrapper/MavenWrapperDownloader.java | 118 ------- .mvn/wrapper/maven-wrapper.properties | 2 - .travis.yml | 40 +-- ..._custom_jdk_and_add_security_providers.sh} | 0 mvnw | 316 ------------------ mvnw.cmd | 182 ---------- 6 files changed, 20 insertions(+), 638 deletions(-) delete mode 100644 .mvn/wrapper/MavenWrapperDownloader.java delete mode 100644 .mvn/wrapper/maven-wrapper.properties rename .travis/{install_custom_jdk_and_add_security_providers.sh => install_maven_custom_jdk_and_add_security_providers.sh} (100%) delete mode 100755 mvnw delete mode 100644 mvnw.cmd diff --git a/.mvn/wrapper/MavenWrapperDownloader.java b/.mvn/wrapper/MavenWrapperDownloader.java deleted file mode 100644 index d841b3b7e..000000000 --- a/.mvn/wrapper/MavenWrapperDownloader.java +++ /dev/null @@ -1,118 +0,0 @@ -/* - * Copyright 2007-present the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -import java.net.*; -import java.io.*; -import java.nio.channels.*; -import java.util.Properties; - -public class MavenWrapperDownloader { - - private static final String WRAPPER_VERSION = "0.5.5"; - /** - * Default URL to download the maven-wrapper.jar from, if no 'downloadUrl' is provided. - */ - private static final String DEFAULT_DOWNLOAD_URL = "https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/" - + WRAPPER_VERSION + "/maven-wrapper-" + WRAPPER_VERSION + ".jar"; - - /** - * Path to the maven-wrapper.properties file, which might contain a downloadUrl property to - * use instead of the default one. - */ - private static final String MAVEN_WRAPPER_PROPERTIES_PATH = - ".mvn/wrapper/maven-wrapper.properties"; - - /** - * Path where the maven-wrapper.jar will be saved to. - */ - private static final String MAVEN_WRAPPER_JAR_PATH = - ".mvn/wrapper/maven-wrapper.jar"; - - /** - * Name of the property which should be used to override the default download url for the wrapper. - */ - private static final String PROPERTY_NAME_WRAPPER_URL = "wrapperUrl"; - - public static void main(String args[]) { - System.out.println("- Downloader started"); - File baseDirectory = new File(args[0]); - System.out.println("- Using base directory: " + baseDirectory.getAbsolutePath()); - - // If the maven-wrapper.properties exists, read it and check if it contains a custom - // wrapperUrl parameter. - File mavenWrapperPropertyFile = new File(baseDirectory, MAVEN_WRAPPER_PROPERTIES_PATH); - String url = DEFAULT_DOWNLOAD_URL; - if(mavenWrapperPropertyFile.exists()) { - FileInputStream mavenWrapperPropertyFileInputStream = null; - try { - mavenWrapperPropertyFileInputStream = new FileInputStream(mavenWrapperPropertyFile); - Properties mavenWrapperProperties = new Properties(); - mavenWrapperProperties.load(mavenWrapperPropertyFileInputStream); - // Windows downloader fix - url = mavenWrapperProperties.getProperty(PROPERTY_NAME_WRAPPER_URL, url).replaceAll("\r", ""); - } catch (IOException e) { - System.out.println("- ERROR loading '" + MAVEN_WRAPPER_PROPERTIES_PATH + "'"); - } finally { - try { - if(mavenWrapperPropertyFileInputStream != null) { - mavenWrapperPropertyFileInputStream.close(); - } - } catch (IOException e) { - // Ignore ... - } - } - } - System.out.println("- Downloading from: " + url); - - File outputFile = new File(baseDirectory.getAbsolutePath(), MAVEN_WRAPPER_JAR_PATH); - if(!outputFile.getParentFile().exists()) { - if(!outputFile.getParentFile().mkdirs()) { - System.out.println( - "- ERROR creating output directory '" + outputFile.getParentFile().getAbsolutePath() + "'"); - } - } - System.out.println("- Downloading to: " + outputFile.getAbsolutePath()); - try { - downloadFileFromURL(url, outputFile); - System.out.println("Done"); - System.exit(0); - } catch (Throwable e) { - System.out.println("- Error downloading"); - e.printStackTrace(); - System.exit(1); - } - } - - private static void downloadFileFromURL(String urlString, File destination) throws Exception { - if (System.getenv("MVNW_USERNAME") != null && System.getenv("MVNW_PASSWORD") != null) { - String username = System.getenv("MVNW_USERNAME"); - char[] password = System.getenv("MVNW_PASSWORD").toCharArray(); - Authenticator.setDefault(new Authenticator() { - @Override - protected PasswordAuthentication getPasswordAuthentication() { - return new PasswordAuthentication(username, password); - } - }); - } - URL website = new URL(urlString); - ReadableByteChannel rbc; - rbc = Channels.newChannel(website.openStream()); - FileOutputStream fos = new FileOutputStream(destination); - fos.getChannel().transferFrom(rbc, 0, Long.MAX_VALUE); - fos.close(); - rbc.close(); - } - -} diff --git a/.mvn/wrapper/maven-wrapper.properties b/.mvn/wrapper/maven-wrapper.properties deleted file mode 100644 index cc805cc5e..000000000 --- a/.mvn/wrapper/maven-wrapper.properties +++ /dev/null @@ -1,2 +0,0 @@ -distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.5.2/apache-maven-3.5.2-bin.zip -wrapperUrl=https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.5/maven-wrapper-0.5.5.jar diff --git a/.travis.yml b/.travis.yml index af79c7d7a..984eccbd2 100644 --- a/.travis.yml +++ b/.travis.yml @@ -35,11 +35,11 @@ build-cli: &build-cli # re-export JAVA_HOME - source ~/.jdk_config # Prepare everything, no settings.xml needed - - ./mvnw clean install -B -V -DskipTests + - mvn clean install -B -V -DskipTests # Change security providers of JDK - /bin/bash .travis/enable_bouncycastle_security.sh # Build native image, no settings.xml needed - - ./mvnw -f datasafe-cli/pom.xml clean package -B -V -Pnative-image -DskipTests + - mvn -f datasafe-cli/pom.xml clean package -B -V -Pnative-image -DskipTests # CLI artifacts publishing: deploy-cli: &deploy-cli @@ -68,25 +68,25 @@ matrix: #### CLI-ORIENTED BUILD #### # These are CLI-only builds that produce Datasafe cli executable for each OS: # CLI for Linux: - - os: linux - language: bash - before_install: - - /bin/bash .travis/install_custom_jdk_and_add_security_providers.sh - <<: *build-cli - <<: *deploy-cli - # CLI for MacOS: - - os: osx - language: bash - before_install: - - /bin/bash .travis/install_custom_jdk_and_add_security_providers.sh - <<: *build-cli - <<: *deploy-cli - # CLI for Windows (disabled as of now): -# - os: windows -# env: -# - NO_WIN_DEFENDER=$(curl "${GRAVIS}.disable-windows-defender.sh" --output .no-defender.sh && source .no-defender.sh) +# - os: linux # language: bash # before_install: -# - /bin/bash .travis/install_custom_jdk_and_add_security_providers.sh +# - /bin/bash .travis/install_maven_custom_jdk_and_add_security_providers.sh # <<: *build-cli # <<: *deploy-cli +# # CLI for MacOS: +# - os: osx +# language: bash +# before_install: +# - /bin/bash .travis/install_maven_custom_jdk_and_add_security_providers.sh +# <<: *build-cli +# <<: *deploy-cli + # CLI for Windows (disabled as of now): + - os: windows + env: + - NO_WIN_DEFENDER=$(curl "${GRAVIS}.disable-windows-defender.sh" --output .no-defender.sh && source .no-defender.sh) + language: bash + before_install: + - /bin/bash .travis/install_maven_custom_jdk_and_add_security_providers.sh + <<: *build-cli + <<: *deploy-cli diff --git a/.travis/install_custom_jdk_and_add_security_providers.sh b/.travis/install_maven_custom_jdk_and_add_security_providers.sh similarity index 100% rename from .travis/install_custom_jdk_and_add_security_providers.sh rename to .travis/install_maven_custom_jdk_and_add_security_providers.sh diff --git a/mvnw b/mvnw deleted file mode 100755 index caac1d76f..000000000 --- a/mvnw +++ /dev/null @@ -1,316 +0,0 @@ -#!/bin/sh -# ---------------------------------------------------------------------------- -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -# ---------------------------------------------------------------------------- - -# ---------------------------------------------------------------------------- -# Maven2 Start Up Batch script -# -# Required ENV vars: -# ------------------ -# JAVA_HOME - location of a JDK home dir -# -# Optional ENV vars -# ----------------- -# M2_HOME - location of maven2's installed home dir -# MAVEN_OPTS - parameters passed to the Java VM when running Maven -# e.g. to debug Maven itself, use -# set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000 -# MAVEN_SKIP_RC - flag to disable loading of mavenrc files -# ---------------------------------------------------------------------------- - -if [ -z "$MAVEN_SKIP_RC" ] ; then - - if [ -f /etc/mavenrc ] ; then - . /etc/mavenrc - fi - - if [ -f "$HOME/.mavenrc" ] ; then - . "$HOME/.mavenrc" - fi - -fi - -# OS specific support. $var _must_ be set to either true or false. -cygwin=false; -darwin=false; -mingw=false -case "`uname`" in - CYGWIN*) cygwin=true ;; - MINGW*) mingw=true;; - Darwin*) darwin=true - # Use /usr/libexec/java_home if available, otherwise fall back to /Library/Java/Home - # See https://developer.apple.com/library/mac/qa/qa1170/_index.html - if [ -z "$JAVA_HOME" ]; then - if [ -x "/usr/libexec/java_home" ]; then - export JAVA_HOME="`/usr/libexec/java_home`" - else - export JAVA_HOME="/Library/Java/Home" - fi - fi - ;; -esac - -if [ -z "$JAVA_HOME" ] ; then - if [ -r /etc/gentoo-release ] ; then - JAVA_HOME=`java-config --jre-home` - fi -fi - -if [ -z "$M2_HOME" ] ; then - ## resolve links - $0 may be a link to maven's home - PRG="$0" - - # need this for relative symlinks - while [ -h "$PRG" ] ; do - ls=`ls -ld "$PRG"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - PRG="$link" - else - PRG="`dirname "$PRG"`/$link" - fi - done - - saveddir=`pwd` - - M2_HOME=`dirname "$PRG"`/.. - - # make it fully qualified - M2_HOME=`cd "$M2_HOME" && pwd` - - cd "$saveddir" - # echo Using m2 at $M2_HOME -fi - -# For Cygwin, ensure paths are in UNIX format before anything is touched -if $cygwin ; then - [ -n "$M2_HOME" ] && - M2_HOME=`cygpath --unix "$M2_HOME"` - [ -n "$JAVA_HOME" ] && - JAVA_HOME=`cygpath --unix "$JAVA_HOME"` - [ -n "$CLASSPATH" ] && - CLASSPATH=`cygpath --path --unix "$CLASSPATH"` -fi - -# For Mingw, ensure paths are in UNIX format before anything is touched -if $mingw ; then - [ -n "$M2_HOME" ] && - M2_HOME="`(cd "$M2_HOME"; pwd)`" - [ -n "$JAVA_HOME" ] && - JAVA_HOME="`(cd "$JAVA_HOME"; pwd)`" -fi - -if [ -z "$JAVA_HOME" ]; then - javaExecutable="`which javac`" - if [ -n "$javaExecutable" ] && ! [ "`expr \"$javaExecutable\" : '\([^ ]*\)'`" = "no" ]; then - # readlink(1) is not available as standard on Solaris 10. - readLink=`which readlink` - if [ ! `expr "$readLink" : '\([^ ]*\)'` = "no" ]; then - if $darwin ; then - javaHome="`dirname \"$javaExecutable\"`" - javaExecutable="`cd \"$javaHome\" && pwd -P`/javac" - else - javaExecutable="`readlink -f \"$javaExecutable\"`" - fi - javaHome="`dirname \"$javaExecutable\"`" - javaHome=`expr "$javaHome" : '\(.*\)/bin'` - JAVA_HOME="$javaHome" - export JAVA_HOME - fi - fi -fi - -if [ -z "$JAVACMD" ] ; then - if [ -n "$JAVA_HOME" ] ; then - if [ -x "$JAVA_HOME/jre/sh/java" ] ; then - # IBM's JDK on AIX uses strange locations for the executables - JAVACMD="$JAVA_HOME/jre/sh/java" - else - JAVACMD="$JAVA_HOME/bin/java" - fi - else - JAVACMD="`which java`" - fi -fi - -if [ ! -x "$JAVACMD" ] ; then - echo "Error: JAVA_HOME is not defined correctly." >&2 - echo " We cannot execute $JAVACMD" >&2 - exit 1 -fi - -if [ -z "$JAVA_HOME" ] ; then - echo "Warning: JAVA_HOME environment variable is not set." -fi - -CLASSWORLDS_LAUNCHER=org.codehaus.plexus.classworlds.launcher.Launcher - -# traverses directory structure from process work directory to filesystem root -# first directory with .mvn subdirectory is considered project base directory -find_maven_basedir() { - - if [ -z "$1" ] - then - echo "Path not specified to find_maven_basedir" - return 1 - fi - - basedir="$1" - wdir="$1" - while [ "$wdir" != '/' ] ; do - if [ -d "$wdir"/.mvn ] ; then - basedir=$wdir - break - fi - # workaround for JBEAP-8937 (on Solaris 10/Sparc) - if [ -d "${wdir}" ]; then - wdir=`cd "$wdir/.."; pwd` - fi - # end of workaround - done - echo "${basedir}" -} - -# concatenates all lines of a file -concat_lines() { - if [ -f "$1" ]; then - echo "$(tr -s '\n' ' ' < "$1")" - fi -} - -BASE_DIR=`find_maven_basedir "$(pwd)"` -if [ -z "$BASE_DIR" ]; then - exit 1; -fi - -########################################################################################## -# Extension to allow automatically downloading the maven-wrapper.jar from Maven-central -# This allows using the maven wrapper in projects that prohibit checking in binary data. -########################################################################################## -if [ -r "$BASE_DIR/.mvn/wrapper/maven-wrapper.jar" ]; then - if [ "$MVNW_VERBOSE" = true ]; then - echo "Found .mvn/wrapper/maven-wrapper.jar" - fi -else - if [ "$MVNW_VERBOSE" = true ]; then - echo "Couldn't find .mvn/wrapper/maven-wrapper.jar, downloading it ..." - fi - if [ -n "$MVNW_REPOURL" ]; then - jarUrl="$MVNW_REPOURL/io/takari/maven-wrapper/0.5.5/maven-wrapper-0.5.5.jar" - else - jarUrl="https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.5/maven-wrapper-0.5.5.jar" - fi - - # FIXME: Fix windows bash: - tr -d '\r' < "$BASE_DIR/.mvn/wrapper/maven-wrapper.properties" > \ - "$BASE_DIR/.mvn/wrapper/maven-wrapper.properties.new" \ - && mv "$BASE_DIR/.mvn/wrapper/maven-wrapper.properties.new" "$BASE_DIR/.mvn/wrapper/maven-wrapper.properties" - - while IFS="=" read key value; do - case "$key" in (wrapperUrl) jarUrl="$value"; break ;; - esac - done < "$BASE_DIR/.mvn/wrapper/maven-wrapper.properties" - if [ "$MVNW_VERBOSE" = true ]; then - echo "Downloading from: $jarUrl" - fi - wrapperJarPath="$BASE_DIR/.mvn/wrapper/maven-wrapper.jar" - if $cygwin; then - wrapperJarPath=`cygpath --path --windows "$wrapperJarPath"` - fi - - if command -v wget > /dev/null; then - if [ "$MVNW_VERBOSE" = true ]; then - echo "Found wget ... using wget" - fi - if [ -z "$MVNW_USERNAME" ] || [ -z "$MVNW_PASSWORD" ]; then - wget "$jarUrl" -O "$wrapperJarPath" - else - wget --http-user=$MVNW_USERNAME --http-password=$MVNW_PASSWORD "$jarUrl" -O "$wrapperJarPath" - fi - elif command -v curl > /dev/null; then - if [ "$MVNW_VERBOSE" = true ]; then - echo "Found curl ... using curl" - fi - if [ -z "$MVNW_USERNAME" ] || [ -z "$MVNW_PASSWORD" ]; then - curl -o "$wrapperJarPath" "$jarUrl" -f - else - curl --user $MVNW_USERNAME:$MVNW_PASSWORD -o "$wrapperJarPath" "$jarUrl" -f - fi - - else - if [ "$MVNW_VERBOSE" = true ]; then - echo "Falling back to using Java to download" - fi - javaClass="$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.java" - # For Cygwin, switch paths to Windows format before running javac - if $cygwin; then - javaClass=`cygpath --path --windows "$javaClass"` - fi - if [ -e "$javaClass" ]; then - if [ ! -e "$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.class" ]; then - if [ "$MVNW_VERBOSE" = true ]; then - echo " - Compiling MavenWrapperDownloader.java ..." - fi - # Compiling the Java class - ("$JAVA_HOME/bin/javac" "$javaClass") - fi - if [ -e "$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.class" ]; then - # Running the downloader - if [ "$MVNW_VERBOSE" = true ]; then - echo " - Running MavenWrapperDownloader.java ..." - fi - ("$JAVA_HOME/bin/java" -cp .mvn/wrapper MavenWrapperDownloader "$MAVEN_PROJECTBASEDIR") - fi - fi - fi -fi -########################################################################################## -# End of extension -########################################################################################## - -export MAVEN_PROJECTBASEDIR=${MAVEN_BASEDIR:-"$BASE_DIR"} -if [ "$MVNW_VERBOSE" = true ]; then - echo $MAVEN_PROJECTBASEDIR -fi -MAVEN_OPTS="$(concat_lines "$MAVEN_PROJECTBASEDIR/.mvn/jvm.config") $MAVEN_OPTS" - -# For Cygwin, switch paths to Windows format before running java -if $cygwin; then - [ -n "$M2_HOME" ] && - M2_HOME=`cygpath --path --windows "$M2_HOME"` - [ -n "$JAVA_HOME" ] && - JAVA_HOME=`cygpath --path --windows "$JAVA_HOME"` - [ -n "$CLASSPATH" ] && - CLASSPATH=`cygpath --path --windows "$CLASSPATH"` - [ -n "$MAVEN_PROJECTBASEDIR" ] && - MAVEN_PROJECTBASEDIR=`cygpath --path --windows "$MAVEN_PROJECTBASEDIR"` -fi - -# Provide a "standardized" way to retrieve the CLI args that will -# work with both Windows and non-Windows executions. -MAVEN_CMD_LINE_ARGS="$MAVEN_CONFIG $@" -export MAVEN_CMD_LINE_ARGS - -WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain - -exec "$JAVACMD" \ - $MAVEN_OPTS \ - -classpath "$MAVEN_PROJECTBASEDIR/.mvn/wrapper/maven-wrapper.jar" \ - "-Dmaven.home=${M2_HOME}" "-Dmaven.multiModuleProjectDirectory=${MAVEN_PROJECTBASEDIR}" \ - ${WRAPPER_LAUNCHER} $MAVEN_CONFIG "$@" diff --git a/mvnw.cmd b/mvnw.cmd deleted file mode 100644 index b26ab24f0..000000000 --- a/mvnw.cmd +++ /dev/null @@ -1,182 +0,0 @@ -@REM ---------------------------------------------------------------------------- -@REM Licensed to the Apache Software Foundation (ASF) under one -@REM or more contributor license agreements. See the NOTICE file -@REM distributed with this work for additional information -@REM regarding copyright ownership. The ASF licenses this file -@REM to you under the Apache License, Version 2.0 (the -@REM "License"); you may not use this file except in compliance -@REM with the License. You may obtain a copy of the License at -@REM -@REM http://www.apache.org/licenses/LICENSE-2.0 -@REM -@REM Unless required by applicable law or agreed to in writing, -@REM software distributed under the License is distributed on an -@REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -@REM KIND, either express or implied. See the License for the -@REM specific language governing permissions and limitations -@REM under the License. -@REM ---------------------------------------------------------------------------- - -@REM ---------------------------------------------------------------------------- -@REM Maven2 Start Up Batch script -@REM -@REM Required ENV vars: -@REM JAVA_HOME - location of a JDK home dir -@REM -@REM Optional ENV vars -@REM M2_HOME - location of maven2's installed home dir -@REM MAVEN_BATCH_ECHO - set to 'on' to enable the echoing of the batch commands -@REM MAVEN_BATCH_PAUSE - set to 'on' to wait for a key stroke before ending -@REM MAVEN_OPTS - parameters passed to the Java VM when running Maven -@REM e.g. to debug Maven itself, use -@REM set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000 -@REM MAVEN_SKIP_RC - flag to disable loading of mavenrc files -@REM ---------------------------------------------------------------------------- - -@REM Begin all REM lines with '@' in case MAVEN_BATCH_ECHO is 'on' -@echo off -@REM set title of command window -title %0 -@REM enable echoing by setting MAVEN_BATCH_ECHO to 'on' -@if "%MAVEN_BATCH_ECHO%" == "on" echo %MAVEN_BATCH_ECHO% - -@REM set %HOME% to equivalent of $HOME -if "%HOME%" == "" (set "HOME=%HOMEDRIVE%%HOMEPATH%") - -@REM Execute a user defined script before this one -if not "%MAVEN_SKIP_RC%" == "" goto skipRcPre -@REM check for pre script, once with legacy .bat ending and once with .cmd ending -if exist "%HOME%\mavenrc_pre.bat" call "%HOME%\mavenrc_pre.bat" -if exist "%HOME%\mavenrc_pre.cmd" call "%HOME%\mavenrc_pre.cmd" -:skipRcPre - -@setlocal - -set ERROR_CODE=0 - -@REM To isolate internal variables from possible post scripts, we use another setlocal -@setlocal - -@REM ==== START VALIDATION ==== -if not "%JAVA_HOME%" == "" goto OkJHome - -echo. -echo Error: JAVA_HOME not found in your environment. >&2 -echo Please set the JAVA_HOME variable in your environment to match the >&2 -echo location of your Java installation. >&2 -echo. -goto error - -:OkJHome -if exist "%JAVA_HOME%\bin\java.exe" goto init - -echo. -echo Error: JAVA_HOME is set to an invalid directory. >&2 -echo JAVA_HOME = "%JAVA_HOME%" >&2 -echo Please set the JAVA_HOME variable in your environment to match the >&2 -echo location of your Java installation. >&2 -echo. -goto error - -@REM ==== END VALIDATION ==== - -:init - -@REM Find the project base dir, i.e. the directory that contains the folder ".mvn". -@REM Fallback to current working directory if not found. - -set MAVEN_PROJECTBASEDIR=%MAVEN_BASEDIR% -IF NOT "%MAVEN_PROJECTBASEDIR%"=="" goto endDetectBaseDir - -set EXEC_DIR=%CD% -set WDIR=%EXEC_DIR% -:findBaseDir -IF EXIST "%WDIR%"\.mvn goto baseDirFound -cd .. -IF "%WDIR%"=="%CD%" goto baseDirNotFound -set WDIR=%CD% -goto findBaseDir - -:baseDirFound -set MAVEN_PROJECTBASEDIR=%WDIR% -cd "%EXEC_DIR%" -goto endDetectBaseDir - -:baseDirNotFound -set MAVEN_PROJECTBASEDIR=%EXEC_DIR% -cd "%EXEC_DIR%" - -:endDetectBaseDir - -IF NOT EXIST "%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config" goto endReadAdditionalConfig - -@setlocal EnableExtensions EnableDelayedExpansion -for /F "usebackq delims=" %%a in ("%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config") do set JVM_CONFIG_MAVEN_PROPS=!JVM_CONFIG_MAVEN_PROPS! %%a -@endlocal & set JVM_CONFIG_MAVEN_PROPS=%JVM_CONFIG_MAVEN_PROPS% - -:endReadAdditionalConfig - -SET MAVEN_JAVA_EXE="%JAVA_HOME%\bin\java.exe" -set WRAPPER_JAR="%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.jar" -set WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain - -set DOWNLOAD_URL="https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.5/maven-wrapper-0.5.5.jar" - -FOR /F "tokens=1,2 delims==" %%A IN ("%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.properties") DO ( - IF "%%A"=="wrapperUrl" SET DOWNLOAD_URL=%%B -) - -@REM Extension to allow automatically downloading the maven-wrapper.jar from Maven-central -@REM This allows using the maven wrapper in projects that prohibit checking in binary data. -if exist %WRAPPER_JAR% ( - if "%MVNW_VERBOSE%" == "true" ( - echo Found %WRAPPER_JAR% - ) -) else ( - if not "%MVNW_REPOURL%" == "" ( - SET DOWNLOAD_URL="%MVNW_REPOURL%/io/takari/maven-wrapper/0.5.5/maven-wrapper-0.5.5.jar" - ) - if "%MVNW_VERBOSE%" == "true" ( - echo Couldn't find %WRAPPER_JAR%, downloading it ... - echo Downloading from: %DOWNLOAD_URL% - ) - - powershell -Command "&{"^ - "$webclient = new-object System.Net.WebClient;"^ - "if (-not ([string]::IsNullOrEmpty('%MVNW_USERNAME%') -and [string]::IsNullOrEmpty('%MVNW_PASSWORD%'))) {"^ - "$webclient.Credentials = new-object System.Net.NetworkCredential('%MVNW_USERNAME%', '%MVNW_PASSWORD%');"^ - "}"^ - "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; $webclient.DownloadFile('%DOWNLOAD_URL%', '%WRAPPER_JAR%')"^ - "}" - if "%MVNW_VERBOSE%" == "true" ( - echo Finished downloading %WRAPPER_JAR% - ) -) -@REM End of extension - -@REM Provide a "standardized" way to retrieve the CLI args that will -@REM work with both Windows and non-Windows executions. -set MAVEN_CMD_LINE_ARGS=%* - -%MAVEN_JAVA_EXE% %JVM_CONFIG_MAVEN_PROPS% %MAVEN_OPTS% %MAVEN_DEBUG_OPTS% -classpath %WRAPPER_JAR% "-Dmaven.multiModuleProjectDirectory=%MAVEN_PROJECTBASEDIR%" %WRAPPER_LAUNCHER% %MAVEN_CONFIG% %* -if ERRORLEVEL 1 goto error -goto end - -:error -set ERROR_CODE=1 - -:end -@endlocal & set ERROR_CODE=%ERROR_CODE% - -if not "%MAVEN_SKIP_RC%" == "" goto skipRcPost -@REM check for post script, once with legacy .bat ending and once with .cmd ending -if exist "%HOME%\mavenrc_post.bat" call "%HOME%\mavenrc_post.bat" -if exist "%HOME%\mavenrc_post.cmd" call "%HOME%\mavenrc_post.cmd" -:skipRcPost - -@REM pause the script if MAVEN_BATCH_PAUSE is set to 'on' -if "%MAVEN_BATCH_PAUSE%" == "on" pause - -if "%MAVEN_TERMINATE_CMD%" == "on" exit %ERROR_CODE% - -exit /B %ERROR_CODE% From f0edd70be0e02ca06a1d901931b28652de2120bf Mon Sep 17 00:00:00 2001 From: Valentyn Berezin Date: Sun, 1 Sep 2019 12:07:17 +0300 Subject: [PATCH 047/255] Use bundled maven --- .../install_maven_custom_jdk_and_add_security_providers.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.travis/install_maven_custom_jdk_and_add_security_providers.sh b/.travis/install_maven_custom_jdk_and_add_security_providers.sh index a91310225..f0f48279f 100755 --- a/.travis/install_maven_custom_jdk_and_add_security_providers.sh +++ b/.travis/install_maven_custom_jdk_and_add_security_providers.sh @@ -6,10 +6,12 @@ REPO_ROOT=`pwd` -# 1. Custom JDK +# 1. Custom JDK and standard maven curl "${GRAVIS}.install-jdk-travis.sh" --output ~/.install-jdk-travis.sh source ~/.install-jdk-travis.sh +apt-get install maven -y + cd "$REPO_ROOT" # 2. BC libs - download From 83e1ef8ebe1c4cbd4a38faeb68431c2515006850 Mon Sep 17 00:00:00 2001 From: Valentyn Berezin Date: Sun, 1 Sep 2019 12:15:30 +0300 Subject: [PATCH 048/255] Bundled maven - add message --- .travis/install_maven_custom_jdk_and_add_security_providers.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis/install_maven_custom_jdk_and_add_security_providers.sh b/.travis/install_maven_custom_jdk_and_add_security_providers.sh index f0f48279f..fb8b4b9ad 100755 --- a/.travis/install_maven_custom_jdk_and_add_security_providers.sh +++ b/.travis/install_maven_custom_jdk_and_add_security_providers.sh @@ -10,6 +10,7 @@ REPO_ROOT=`pwd` curl "${GRAVIS}.install-jdk-travis.sh" --output ~/.install-jdk-travis.sh source ~/.install-jdk-travis.sh +echo "Installing maven" apt-get install maven -y cd "$REPO_ROOT" From b0b1ca2d7ab75b7dd009d5a2d378d011fcefe878 Mon Sep 17 00:00:00 2001 From: Ihor Yatsenko Date: Wed, 4 Sep 2019 12:38:26 +0200 Subject: [PATCH 049/255] DOC-239: Draft version of AES GCM SIV mode for path encryption --- .../directory/DefaultCredentialsModule.java | 4 +- .../DefaultPathEncryptionModule.java | 2 +- .../keys/DocumentKeyStoreOperations.java | 4 +- .../api/profile/keys/PublicKeyService.java | 4 +- .../operations/ProfileRetrievalService.java | 2 +- .../api/types/CreateUserPrivateProfile.java | 12 ++- .../api/types/CreateUserPublicProfile.java | 5 +- .../api/types/UserPrivateProfile.java | 3 + .../api/types/UserPublicProfile.java | 1 + .../keys/DFSPrivateKeyServiceImpl.java | 4 +- .../profile/keys/DFSPublicKeyServiceImpl.java | 8 +- .../profile/keys/DefaultKeyStoreCache.java | 6 +- .../keys/DocumentKeyStoreOperationsImpl.java | 4 +- .../impl/profile/keys/KeyStoreCache.java | 4 +- .../ProfileRegistrationServiceImpl.java | 10 +-- .../actions/ProfileStoreService.java | 1 + .../actions/ProfileStoreServiceTest.java | 6 ++ .../cmsencryption/CMSEncryptionService.java | 4 +- .../EncryptedDocumentWriteService.java | 4 +- .../api/keystore/KeyStoreService.java | 2 +- .../SymmetricPathEncryptionService.java | 12 +-- .../api/types/keystore/Counter.java | 16 ++++ ...WithPublicKey.java => PublicKeyEntry.java} | 2 +- .../types/keystore/SecretKeyIDWithKey.java | 2 + .../datasafe-encryption-impl/pom.xml | 12 +++ .../CMSEncryptionServiceImpl.java | 4 +- .../document/CMSDocumentWriteService.java | 4 +- .../impl/keystore/KeyStoreServiceImpl.java | 6 +- .../DefaultPathDigestConfig.java | 9 ++- .../pathencryption/DefaultPathEncryption.java | 62 ---------------- .../pathencryption/DefaultPathEncryptor.java | 39 ++++++++++ .../pathencryption/PathEncryptionConfig.java | 36 --------- .../pathencryption/PathEncryptionImpl.java | 4 +- .../impl/pathencryption/PathEncryptor.java | 22 ++++++ .../SymmetricPathEncryptionServiceImpl.java | 74 +++++++++++-------- .../CmsEncryptionServiceImplTest.java | 46 ++++++------ .../impl/keystore/KeyStoreServiceTest.java | 2 +- ...ymmetricPathEncryptionServiceImplTest.java | 33 ++++++--- .../MultiDfsWithCredentialsExampleTest.java | 3 +- .../api/actions/WriteToInboxImplTest.java | 6 +- .../framework/BaseRandomActions.java | 50 ++++--------- .../impl/actions/WriteToPrivateImplTest.java | 3 +- .../impl/SwitchableCmsEncryptionImpl.java | 4 +- ...FSRelativeProfileRetrievalServiceImpl.java | 4 +- 44 files changed, 285 insertions(+), 260 deletions(-) create mode 100644 datasafe-encryption/datasafe-encryption-api/src/main/java/de/adorsys/datasafe/encrypiton/api/types/keystore/Counter.java rename datasafe-encryption/datasafe-encryption-api/src/main/java/de/adorsys/datasafe/encrypiton/api/types/keystore/{PublicKeyIDWithPublicKey.java => PublicKeyEntry.java} (92%) delete mode 100644 datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/pathencryption/DefaultPathEncryption.java create mode 100644 datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/pathencryption/DefaultPathEncryptor.java delete mode 100644 datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/pathencryption/PathEncryptionConfig.java create mode 100644 datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/pathencryption/PathEncryptor.java diff --git a/datasafe-business/src/main/java/de/adorsys/datasafe/business/impl/directory/DefaultCredentialsModule.java b/datasafe-business/src/main/java/de/adorsys/datasafe/business/impl/directory/DefaultCredentialsModule.java index c8eb88cf2..9c35df28b 100644 --- a/datasafe-business/src/main/java/de/adorsys/datasafe/business/impl/directory/DefaultCredentialsModule.java +++ b/datasafe-business/src/main/java/de/adorsys/datasafe/business/impl/directory/DefaultCredentialsModule.java @@ -13,7 +13,7 @@ import de.adorsys.datasafe.directory.impl.profile.dfs.BucketAccessServiceImplRuntimeDelegatable; import de.adorsys.datasafe.directory.impl.profile.keys.*; import de.adorsys.datasafe.encrypiton.api.types.UserID; -import de.adorsys.datasafe.encrypiton.api.types.keystore.PublicKeyIDWithPublicKey; +import de.adorsys.datasafe.encrypiton.api.types.keystore.PublicKeyEntry; import de.adorsys.datasafe.types.api.context.overrides.OverridesRegistry; import javax.annotation.Nullable; @@ -46,7 +46,7 @@ static KeyStoreCache keyStoreCache(@Nullable OverridesRegistry registry) { .build(); // These are actually static, so we can afford longer expiry time - Supplier>> cachePubKeys = () -> CacheBuilder.newBuilder() + Supplier>> cachePubKeys = () -> CacheBuilder.newBuilder() .initialCapacity(1000) .expireAfterWrite(60, TimeUnit.MINUTES) .build(); diff --git a/datasafe-business/src/main/java/de/adorsys/datasafe/business/impl/pathencryption/DefaultPathEncryptionModule.java b/datasafe-business/src/main/java/de/adorsys/datasafe/business/impl/pathencryption/DefaultPathEncryptionModule.java index b96ced840..8647e0f8b 100644 --- a/datasafe-business/src/main/java/de/adorsys/datasafe/business/impl/pathencryption/DefaultPathEncryptionModule.java +++ b/datasafe-business/src/main/java/de/adorsys/datasafe/business/impl/pathencryption/DefaultPathEncryptionModule.java @@ -25,7 +25,7 @@ static DefaultPathDigestConfig digestConfig() { * Default path encryption that uses Base64-urlsafe path serialization */ @Binds - abstract PathEncryptionConfig config(DefaultPathEncryptionRuntimeDelegatable config); + abstract PathEncryptor config(DefaultPathEncryptorRuntimeDelegatable config); /** * By default simply use diff --git a/datasafe-directory/datasafe-directory-api/src/main/java/de/adorsys/datasafe/directory/api/profile/keys/DocumentKeyStoreOperations.java b/datasafe-directory/datasafe-directory-api/src/main/java/de/adorsys/datasafe/directory/api/profile/keys/DocumentKeyStoreOperations.java index 48e15a33c..ef95b99c0 100644 --- a/datasafe-directory/datasafe-directory-api/src/main/java/de/adorsys/datasafe/directory/api/profile/keys/DocumentKeyStoreOperations.java +++ b/datasafe-directory/datasafe-directory-api/src/main/java/de/adorsys/datasafe/directory/api/profile/keys/DocumentKeyStoreOperations.java @@ -1,7 +1,7 @@ package de.adorsys.datasafe.directory.api.profile.keys; import de.adorsys.datasafe.encrypiton.api.types.UserIDAuth; -import de.adorsys.datasafe.encrypiton.api.types.keystore.PublicKeyIDWithPublicKey; +import de.adorsys.datasafe.encrypiton.api.types.keystore.PublicKeyEntry; import de.adorsys.datasafe.encrypiton.api.types.keystore.ReadKeyPassword; import java.security.Key; @@ -19,7 +19,7 @@ public interface DocumentKeyStoreOperations { * @param forUser Keystore owner * @return Created public keys from keystore. */ - List createAndWriteKeyStore(UserIDAuth forUser); + List createAndWriteKeyStore(UserIDAuth forUser); /** * Updates ReadKeyPassword for users' keystore. Clears ALL cached keystores. diff --git a/datasafe-directory/datasafe-directory-api/src/main/java/de/adorsys/datasafe/directory/api/profile/keys/PublicKeyService.java b/datasafe-directory/datasafe-directory-api/src/main/java/de/adorsys/datasafe/directory/api/profile/keys/PublicKeyService.java index d0dc4c158..cb2c45cad 100644 --- a/datasafe-directory/datasafe-directory-api/src/main/java/de/adorsys/datasafe/directory/api/profile/keys/PublicKeyService.java +++ b/datasafe-directory/datasafe-directory-api/src/main/java/de/adorsys/datasafe/directory/api/profile/keys/PublicKeyService.java @@ -1,7 +1,7 @@ package de.adorsys.datasafe.directory.api.profile.keys; import de.adorsys.datasafe.encrypiton.api.types.UserID; -import de.adorsys.datasafe.encrypiton.api.types.keystore.PublicKeyIDWithPublicKey; +import de.adorsys.datasafe.encrypiton.api.types.keystore.PublicKeyEntry; /** * Acts as a public keys database. @@ -13,5 +13,5 @@ public interface PublicKeyService { * @param forUser User who owns public key (and has its private key pair) * @return Public key for document sharing. */ - PublicKeyIDWithPublicKey publicKey(UserID forUser); + PublicKeyEntry publicKey(UserID forUser); } diff --git a/datasafe-directory/datasafe-directory-api/src/main/java/de/adorsys/datasafe/directory/api/profile/operations/ProfileRetrievalService.java b/datasafe-directory/datasafe-directory-api/src/main/java/de/adorsys/datasafe/directory/api/profile/operations/ProfileRetrievalService.java index 9dde46322..1cbabf9e0 100644 --- a/datasafe-directory/datasafe-directory-api/src/main/java/de/adorsys/datasafe/directory/api/profile/operations/ProfileRetrievalService.java +++ b/datasafe-directory/datasafe-directory-api/src/main/java/de/adorsys/datasafe/directory/api/profile/operations/ProfileRetrievalService.java @@ -19,7 +19,7 @@ public interface ProfileRetrievalService { UserPublicProfile publicProfile(UserID ofUser); /** - * Resolves user's private meta-information like privatespace,keystore, etc. folder mapping. + * Resolves user's private meta-information like privatespace, keystore, etc. folder mapping. * @param ofUser resolve request * @return resolved user's profile */ diff --git a/datasafe-directory/datasafe-directory-api/src/main/java/de/adorsys/datasafe/directory/api/types/CreateUserPrivateProfile.java b/datasafe-directory/datasafe-directory-api/src/main/java/de/adorsys/datasafe/directory/api/types/CreateUserPrivateProfile.java index e942ab40b..8c6438153 100644 --- a/datasafe-directory/datasafe-directory-api/src/main/java/de/adorsys/datasafe/directory/api/types/CreateUserPrivateProfile.java +++ b/datasafe-directory/datasafe-directory-api/src/main/java/de/adorsys/datasafe/directory/api/types/CreateUserPrivateProfile.java @@ -1,14 +1,17 @@ package de.adorsys.datasafe.directory.api.types; import de.adorsys.datasafe.encrypiton.api.types.UserIDAuth; +import de.adorsys.datasafe.encrypiton.api.types.keystore.Counter; import de.adorsys.datasafe.types.api.resource.AbsoluteLocation; import de.adorsys.datasafe.types.api.resource.PrivateResource; import de.adorsys.datasafe.types.api.resource.PublicResource; import de.adorsys.datasafe.types.api.resource.StorageIdentifier; import lombok.Builder; import lombok.NonNull; +import lombok.SneakyThrows; import lombok.Value; +import java.security.SecureRandom; import java.util.Collections; import java.util.HashMap; import java.util.List; @@ -65,9 +68,13 @@ public class CreateUserPrivateProfile { */ private final AbsoluteLocation publishPubKeysTo; - public UserPrivateProfile removeAccess() { + @SneakyThrows + public UserPrivateProfile buildPrivateProfile() { + SecureRandom strongRNG = SecureRandom.getInstanceStrong(); + byte counterValue[] = new byte[16];//16 - block size + strongRNG.nextBytes(counterValue); + return UserPrivateProfile.builder() - // FIXME - remove access ? .keystore(keystore) .privateStorage(new HashMap<>(Collections.singletonMap(StorageIdentifier.DEFAULT, privateStorage))) .storageCredentialsKeystore(storageCredentialsKeystore) @@ -75,6 +82,7 @@ public UserPrivateProfile removeAccess() { .documentVersionStorage(documentVersionStorage) .associatedResources(associatedResources) .publishPublicKeysTo(publishPubKeysTo) + .counter(new Counter(counterValue)) .build(); } } diff --git a/datasafe-directory/datasafe-directory-api/src/main/java/de/adorsys/datasafe/directory/api/types/CreateUserPublicProfile.java b/datasafe-directory/datasafe-directory-api/src/main/java/de/adorsys/datasafe/directory/api/types/CreateUserPublicProfile.java index 502650322..015a2dc91 100644 --- a/datasafe-directory/datasafe-directory-api/src/main/java/de/adorsys/datasafe/directory/api/types/CreateUserPublicProfile.java +++ b/datasafe-directory/datasafe-directory-api/src/main/java/de/adorsys/datasafe/directory/api/types/CreateUserPublicProfile.java @@ -5,6 +5,7 @@ import de.adorsys.datasafe.types.api.resource.PublicResource; import lombok.Builder; import lombok.NonNull; +import lombok.SneakyThrows; import lombok.Value; /** @@ -32,9 +33,9 @@ public class CreateUserPublicProfile { @NonNull private final AbsoluteLocation inbox; - public UserPublicProfile removeAccess() { + @SneakyThrows + public UserPublicProfile buildPublicProfile() { return UserPublicProfile.builder() - // FIXME - remove access ? .inbox(inbox) .publicKeys(publicKeys) .build(); diff --git a/datasafe-directory/datasafe-directory-api/src/main/java/de/adorsys/datasafe/directory/api/types/UserPrivateProfile.java b/datasafe-directory/datasafe-directory-api/src/main/java/de/adorsys/datasafe/directory/api/types/UserPrivateProfile.java index 4eb86f1ff..274540a93 100644 --- a/datasafe-directory/datasafe-directory-api/src/main/java/de/adorsys/datasafe/directory/api/types/UserPrivateProfile.java +++ b/datasafe-directory/datasafe-directory-api/src/main/java/de/adorsys/datasafe/directory/api/types/UserPrivateProfile.java @@ -1,5 +1,6 @@ package de.adorsys.datasafe.directory.api.types; +import de.adorsys.datasafe.encrypiton.api.types.keystore.Counter; import de.adorsys.datasafe.types.api.resource.AbsoluteLocation; import de.adorsys.datasafe.types.api.resource.PrivateResource; import de.adorsys.datasafe.types.api.resource.PublicResource; @@ -61,4 +62,6 @@ public class UserPrivateProfile { * Optional field used for getting storage credentials using default flow. */ private final AbsoluteLocation storageCredentialsKeystore; + + private final Counter counter; } diff --git a/datasafe-directory/datasafe-directory-api/src/main/java/de/adorsys/datasafe/directory/api/types/UserPublicProfile.java b/datasafe-directory/datasafe-directory-api/src/main/java/de/adorsys/datasafe/directory/api/types/UserPublicProfile.java index 502ebe13e..9f5279362 100644 --- a/datasafe-directory/datasafe-directory-api/src/main/java/de/adorsys/datasafe/directory/api/types/UserPublicProfile.java +++ b/datasafe-directory/datasafe-directory-api/src/main/java/de/adorsys/datasafe/directory/api/types/UserPublicProfile.java @@ -24,4 +24,5 @@ public class UserPublicProfile { */ @NonNull private final AbsoluteLocation inbox; + } diff --git a/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/keys/DFSPrivateKeyServiceImpl.java b/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/keys/DFSPrivateKeyServiceImpl.java index 705f485cb..bb467e6eb 100644 --- a/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/keys/DFSPrivateKeyServiceImpl.java +++ b/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/keys/DFSPrivateKeyServiceImpl.java @@ -3,6 +3,7 @@ import de.adorsys.datasafe.directory.api.profile.keys.DocumentKeyStoreOperations; import de.adorsys.datasafe.directory.api.profile.keys.PrivateKeyService; import de.adorsys.datasafe.encrypiton.api.types.UserIDAuth; +import de.adorsys.datasafe.encrypiton.api.types.keystore.Counter; import de.adorsys.datasafe.encrypiton.api.types.keystore.KeyID; import de.adorsys.datasafe.encrypiton.api.types.keystore.SecretKeyIDWithKey; import de.adorsys.datasafe.types.api.context.annotations.RuntimeDelegate; @@ -72,7 +73,8 @@ private SecretKeyIDWithKey keyByPrefix(UserIDAuth forUser, String prefix) { return new SecretKeyIDWithKey( key, - (SecretKey) keyStoreOper.getKey(forUser, key.getValue()) + (SecretKey) keyStoreOper.getKey(forUser, key.getValue()), + new Counter() ); } } diff --git a/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/keys/DFSPublicKeyServiceImpl.java b/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/keys/DFSPublicKeyServiceImpl.java index ff24feda1..b2facd983 100644 --- a/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/keys/DFSPublicKeyServiceImpl.java +++ b/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/keys/DFSPublicKeyServiceImpl.java @@ -7,7 +7,7 @@ import de.adorsys.datasafe.directory.api.profile.operations.ProfileRetrievalService; import de.adorsys.datasafe.directory.impl.profile.serde.GsonSerde; import de.adorsys.datasafe.encrypiton.api.types.UserID; -import de.adorsys.datasafe.encrypiton.api.types.keystore.PublicKeyIDWithPublicKey; +import de.adorsys.datasafe.encrypiton.api.types.keystore.PublicKeyEntry; import de.adorsys.datasafe.storage.api.actions.StorageReadService; import de.adorsys.datasafe.types.api.context.annotations.RuntimeDelegate; import de.adorsys.datasafe.types.api.resource.AbsoluteLocation; @@ -45,7 +45,7 @@ public DFSPublicKeyServiceImpl(KeyStoreCache keystoreCache, * Reads users' public key from DFS and caches the result. */ @Override - public PublicKeyIDWithPublicKey publicKey(UserID forUser) { + public PublicKeyEntry publicKey(UserID forUser) { return keystoreCache.getPublicKeys().computeIfAbsent( forUser, id -> publicKeyList(forUser) @@ -53,14 +53,14 @@ public PublicKeyIDWithPublicKey publicKey(UserID forUser) { } @SneakyThrows - private List publicKeyList(UserID forUser) { + private List publicKeyList(UserID forUser) { AbsoluteLocation accessiblePublicKey = bucketAccessService.publicAccessFor( forUser, profiles.publicProfile(forUser).getPublicKeys().getResource() ); try (JsonReader is = new JsonReader(new InputStreamReader(readService.read(accessiblePublicKey)))) { - return serde.fromJson(is, new TypeToken>() {}.getType()); + return serde.fromJson(is, new TypeToken>() {}.getType()); } } } diff --git a/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/keys/DefaultKeyStoreCache.java b/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/keys/DefaultKeyStoreCache.java index 974c39e91..0147a433b 100644 --- a/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/keys/DefaultKeyStoreCache.java +++ b/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/keys/DefaultKeyStoreCache.java @@ -1,7 +1,7 @@ package de.adorsys.datasafe.directory.impl.profile.keys; import de.adorsys.datasafe.encrypiton.api.types.UserID; -import de.adorsys.datasafe.encrypiton.api.types.keystore.PublicKeyIDWithPublicKey; +import de.adorsys.datasafe.encrypiton.api.types.keystore.PublicKeyEntry; import de.adorsys.datasafe.types.api.context.annotations.RuntimeDelegate; import lombok.Getter; @@ -17,13 +17,13 @@ @RuntimeDelegate public class DefaultKeyStoreCache implements KeyStoreCache { - private final Map> publicKeys; + private final Map> publicKeys; private final Map keystore; private final Map storageAccess; @Inject public DefaultKeyStoreCache( - Map> publicKeys, + Map> publicKeys, Map keystore, Map storageAccess) { this.publicKeys = publicKeys; diff --git a/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/keys/DocumentKeyStoreOperationsImpl.java b/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/keys/DocumentKeyStoreOperationsImpl.java index b1c683aaa..57edd2351 100644 --- a/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/keys/DocumentKeyStoreOperationsImpl.java +++ b/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/keys/DocumentKeyStoreOperationsImpl.java @@ -73,7 +73,7 @@ public Set readAliases(UserIDAuth forUser) { @Override @SneakyThrows - public List createAndWriteKeyStore(UserIDAuth forUser) { + public List createAndWriteKeyStore(UserIDAuth forUser) { KeyStoreAuth auth = keystoreAuth(forUser, forUser.getReadKeyPassword()); KeyStore keystoreBlob = keyStoreService.createKeyStore( auth, @@ -114,7 +114,7 @@ private > void writeKeystore(UserID forUser, KeySt log.debug("Keystore created for user {} in path {}", forUser, keystore); } - private KeyStore keyStore(UserIDAuth forUser) { + public KeyStore keyStore(UserIDAuth forUser) { return keystoreCache.getKeystore().computeIfAbsent( forUser.getUserID(), userId -> { diff --git a/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/keys/KeyStoreCache.java b/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/keys/KeyStoreCache.java index eb4ad2905..6b31a01c3 100644 --- a/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/keys/KeyStoreCache.java +++ b/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/keys/KeyStoreCache.java @@ -1,7 +1,7 @@ package de.adorsys.datasafe.directory.impl.profile.keys; import de.adorsys.datasafe.encrypiton.api.types.UserID; -import de.adorsys.datasafe.encrypiton.api.types.keystore.PublicKeyIDWithPublicKey; +import de.adorsys.datasafe.encrypiton.api.types.keystore.PublicKeyEntry; import java.security.KeyStore; import java.util.List; @@ -15,7 +15,7 @@ public interface KeyStoreCache { /** * Cache for users' public keys */ - Map> getPublicKeys(); + Map> getPublicKeys(); /** * Cache for users' private/secret keys diff --git a/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/operations/actions/ProfileRegistrationServiceImpl.java b/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/operations/actions/ProfileRegistrationServiceImpl.java index 30b867560..85870c53b 100644 --- a/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/operations/actions/ProfileRegistrationServiceImpl.java +++ b/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/operations/actions/ProfileRegistrationServiceImpl.java @@ -10,7 +10,7 @@ import de.adorsys.datasafe.directory.api.types.UserPrivateProfile; import de.adorsys.datasafe.directory.impl.profile.serde.GsonSerde; import de.adorsys.datasafe.encrypiton.api.types.UserIDAuth; -import de.adorsys.datasafe.encrypiton.api.types.keystore.PublicKeyIDWithPublicKey; +import de.adorsys.datasafe.encrypiton.api.types.keystore.PublicKeyEntry; import de.adorsys.datasafe.storage.api.actions.StorageCheckService; import de.adorsys.datasafe.storage.api.actions.StorageWriteService; import de.adorsys.datasafe.types.api.context.annotations.RuntimeDelegate; @@ -61,7 +61,7 @@ public ProfileRegistrationServiceImpl(ProfileStoreService storeProfile, @SneakyThrows public void registerPublic(CreateUserPublicProfile profile) { log.debug("Register public {}", profile); - storeProfile.registerPublic(profile.getId(), profile.removeAccess()); + storeProfile.registerPublic(profile.getId(), profile.buildPublicProfile()); } /** @@ -74,7 +74,7 @@ public void registerPublic(CreateUserPublicProfile profile) { @SneakyThrows public void registerPrivate(CreateUserPrivateProfile profile) { log.debug("Register private {}", profile); - storeProfile.registerPrivate(profile.getId().getUserID(), profile.removeAccess()); + storeProfile.registerPrivate(profile.getId().getUserID(), profile.buildPrivateProfile()); } @Override @@ -115,12 +115,12 @@ public void registerUsingDefaults(UserIDAuth user) { registerPublic(dfsConfig.defaultPublicTemplate(user.getUserID())); CreateUserPrivateProfile privateProfile = dfsConfig.defaultPrivateTemplate(user); registerPrivate(privateProfile); - createAllAllowableKeystores(user, privateProfile.removeAccess()); + createAllAllowableKeystores(user, privateProfile.buildPrivateProfile()); } @SneakyThrows private void publishPublicKeysIfNeeded(AbsoluteLocation publishTo, - List publicKeys) { + List publicKeys) { if (null != publishTo && !checkService.objectExists(access.withSystemAccess(publishTo))) { try (OutputStream os = writeService.write(WithCallback.noCallback(access.withSystemAccess(publishTo)))) { diff --git a/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/operations/actions/ProfileStoreService.java b/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/operations/actions/ProfileStoreService.java index f7b867eec..b15a823af 100644 --- a/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/operations/actions/ProfileStoreService.java +++ b/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/operations/actions/ProfileStoreService.java @@ -27,6 +27,7 @@ public class ProfileStoreService { private final StorageWriteService writeService; @Inject + @SneakyThrows public ProfileStoreService(GsonSerde serde, UserProfileCache profileCache, DFSConfig dfsConfig, BucketAccessService access, StorageWriteService writeService) { this.serde = serde; diff --git a/datasafe-directory/datasafe-directory-impl/src/test/java/de/adorsys/datasafe/directory/impl/profile/operations/actions/ProfileStoreServiceTest.java b/datasafe-directory/datasafe-directory-impl/src/test/java/de/adorsys/datasafe/directory/impl/profile/operations/actions/ProfileStoreServiceTest.java index e0cff6aa0..08c3e9ed5 100644 --- a/datasafe-directory/datasafe-directory-impl/src/test/java/de/adorsys/datasafe/directory/impl/profile/operations/actions/ProfileStoreServiceTest.java +++ b/datasafe-directory/datasafe-directory-impl/src/test/java/de/adorsys/datasafe/directory/impl/profile/operations/actions/ProfileStoreServiceTest.java @@ -7,6 +7,7 @@ import de.adorsys.datasafe.directory.impl.profile.operations.UserProfileCache; import de.adorsys.datasafe.directory.impl.profile.serde.GsonSerde; import de.adorsys.datasafe.encrypiton.api.types.UserID; +import de.adorsys.datasafe.encrypiton.api.types.keystore.Counter; import de.adorsys.datasafe.storage.api.actions.StorageWriteService; import de.adorsys.datasafe.types.api.resource.AbsoluteLocation; import de.adorsys.datasafe.types.api.shared.BaseMockitoTest; @@ -69,8 +70,13 @@ class ProfileStoreServiceTest extends BaseMockitoTest { @Mock private OutputStream os; + @Mock + private Counter counter; + @BeforeEach void init() { + when(counter.getValue()).thenReturn(new byte[16]); + when(profilePriv.getCounter()).thenReturn(counter); when(serde.toJson(profilePriv)).thenReturn(PROFILE_STR); when(serde.toJson(profilePub)).thenReturn(PROFILE_STR); when(writeService.write(any())).thenReturn(os); diff --git a/datasafe-encryption/datasafe-encryption-api/src/main/java/de/adorsys/datasafe/encrypiton/api/cmsencryption/CMSEncryptionService.java b/datasafe-encryption/datasafe-encryption-api/src/main/java/de/adorsys/datasafe/encrypiton/api/cmsencryption/CMSEncryptionService.java index 6c051bd26..bb4a5e6cc 100644 --- a/datasafe-encryption/datasafe-encryption-api/src/main/java/de/adorsys/datasafe/encrypiton/api/cmsencryption/CMSEncryptionService.java +++ b/datasafe-encryption/datasafe-encryption-api/src/main/java/de/adorsys/datasafe/encrypiton/api/cmsencryption/CMSEncryptionService.java @@ -1,7 +1,7 @@ package de.adorsys.datasafe.encrypiton.api.cmsencryption; import de.adorsys.datasafe.encrypiton.api.types.keystore.KeyID; -import de.adorsys.datasafe.encrypiton.api.types.keystore.PublicKeyIDWithPublicKey; +import de.adorsys.datasafe.encrypiton.api.types.keystore.PublicKeyEntry; import javax.crypto.SecretKey; import java.io.InputStream; @@ -25,7 +25,7 @@ public interface CMSEncryptionService { * @return Encrypted stream that wraps {@code dataContentStream} * @apiNote Closes underlying stream when result is closed */ - OutputStream buildEncryptionOutputStream(OutputStream dataContentStream, Set publicKeys); + OutputStream buildEncryptionOutputStream(OutputStream dataContentStream, Set publicKeys); /** * Builds symmetrically encrypted stream. diff --git a/datasafe-encryption/datasafe-encryption-api/src/main/java/de/adorsys/datasafe/encrypiton/api/document/EncryptedDocumentWriteService.java b/datasafe-encryption/datasafe-encryption-api/src/main/java/de/adorsys/datasafe/encrypiton/api/document/EncryptedDocumentWriteService.java index 257dd77e9..786ebd473 100644 --- a/datasafe-encryption/datasafe-encryption-api/src/main/java/de/adorsys/datasafe/encrypiton/api/document/EncryptedDocumentWriteService.java +++ b/datasafe-encryption/datasafe-encryption-api/src/main/java/de/adorsys/datasafe/encrypiton/api/document/EncryptedDocumentWriteService.java @@ -1,6 +1,6 @@ package de.adorsys.datasafe.encrypiton.api.document; -import de.adorsys.datasafe.encrypiton.api.types.keystore.PublicKeyIDWithPublicKey; +import de.adorsys.datasafe.encrypiton.api.types.keystore.PublicKeyEntry; import de.adorsys.datasafe.encrypiton.api.types.keystore.SecretKeyIDWithKey; import de.adorsys.datasafe.types.api.callback.ResourceWriteCallback; import de.adorsys.datasafe.types.api.resource.AbsoluteLocation; @@ -22,7 +22,7 @@ public interface EncryptedDocumentWriteService { * @param recipientsWithInbox Map of (recipient public key - recipients' inbox) of users with whom to share file. * @return Sink where you can send unencrypted data that will be encrypted and stored */ - OutputStream write(Map recipientsWithInbox); + OutputStream write(Map recipientsWithInbox); /** * Writes and encrypts data using symmetric cryptography. diff --git a/datasafe-encryption/datasafe-encryption-api/src/main/java/de/adorsys/datasafe/encrypiton/api/keystore/KeyStoreService.java b/datasafe-encryption/datasafe-encryption-api/src/main/java/de/adorsys/datasafe/encrypiton/api/keystore/KeyStoreService.java index 0b55e9638..5f105fa68 100644 --- a/datasafe-encryption/datasafe-encryption-api/src/main/java/de/adorsys/datasafe/encrypiton/api/keystore/KeyStoreService.java +++ b/datasafe-encryption/datasafe-encryption-api/src/main/java/de/adorsys/datasafe/encrypiton/api/keystore/KeyStoreService.java @@ -56,7 +56,7 @@ KeyStore updateKeyStoreReadKeyPassword(KeyStore current, * @param keyStoreAccess Key to open keystore (only {@link KeyStoreAuth#getReadStorePassword()} is used) * @return List of public keys within the keystore */ - List getPublicKeys(KeyStoreAccess keyStoreAccess); + List getPublicKeys(KeyStoreAccess keyStoreAccess); /** * Reads private key from the keystore. diff --git a/datasafe-encryption/datasafe-encryption-api/src/main/java/de/adorsys/datasafe/encrypiton/api/pathencryption/encryption/SymmetricPathEncryptionService.java b/datasafe-encryption/datasafe-encryption-api/src/main/java/de/adorsys/datasafe/encrypiton/api/pathencryption/encryption/SymmetricPathEncryptionService.java index e99a04937..89d11e6d4 100644 --- a/datasafe-encryption/datasafe-encryption-api/src/main/java/de/adorsys/datasafe/encrypiton/api/pathencryption/encryption/SymmetricPathEncryptionService.java +++ b/datasafe-encryption/datasafe-encryption-api/src/main/java/de/adorsys/datasafe/encrypiton/api/pathencryption/encryption/SymmetricPathEncryptionService.java @@ -1,9 +1,8 @@ package de.adorsys.datasafe.encrypiton.api.pathencryption.encryption; +import de.adorsys.datasafe.encrypiton.api.types.keystore.SecretKeyIDWithKey; import de.adorsys.datasafe.types.api.resource.Uri; -import javax.crypto.SecretKey; - /** * Encrypts and decrypts relative URI's using symmetric cryptography. */ @@ -11,17 +10,18 @@ public interface SymmetricPathEncryptionService { /** * Encrypts relative URI using secret key and serializes it into URL-friendly format. - * @param secretKey Key to encrypt with + * @param secretKeyEntry Key to encrypt with * @param bucketPath Path to encrypt * @return Encrypted relative URI that can be safely published. */ - Uri encrypt(SecretKey secretKey, Uri bucketPath); + Uri encrypt(SecretKeyIDWithKey secretKeyEntry, Uri bucketPath); /** * Decrypts relative URI using secret key. - * @param secretKey Key to decrypt with + * @param secretKeyEntry Key to decrypt with * @param bucketPath Path to decrypt * @return Decrypted relative URI typically containing some sensitive information. */ - Uri decrypt(SecretKey secretKey, Uri bucketPath); + Uri decrypt(SecretKeyIDWithKey secretKeyEntry, Uri bucketPath); + } diff --git a/datasafe-encryption/datasafe-encryption-api/src/main/java/de/adorsys/datasafe/encrypiton/api/types/keystore/Counter.java b/datasafe-encryption/datasafe-encryption-api/src/main/java/de/adorsys/datasafe/encrypiton/api/types/keystore/Counter.java new file mode 100644 index 000000000..d562b26b3 --- /dev/null +++ b/datasafe-encryption/datasafe-encryption-api/src/main/java/de/adorsys/datasafe/encrypiton/api/types/keystore/Counter.java @@ -0,0 +1,16 @@ +package de.adorsys.datasafe.encrypiton.api.types.keystore; + +import lombok.AllArgsConstructor; +import lombok.Getter; + +@Getter +@AllArgsConstructor +public class Counter { + + private byte[] value; //size should be 16 bytes + + public Counter() { + value = new byte[16]; + } + +} \ No newline at end of file diff --git a/datasafe-encryption/datasafe-encryption-api/src/main/java/de/adorsys/datasafe/encrypiton/api/types/keystore/PublicKeyIDWithPublicKey.java b/datasafe-encryption/datasafe-encryption-api/src/main/java/de/adorsys/datasafe/encrypiton/api/types/keystore/PublicKeyEntry.java similarity index 92% rename from datasafe-encryption/datasafe-encryption-api/src/main/java/de/adorsys/datasafe/encrypiton/api/types/keystore/PublicKeyIDWithPublicKey.java rename to datasafe-encryption/datasafe-encryption-api/src/main/java/de/adorsys/datasafe/encrypiton/api/types/keystore/PublicKeyEntry.java index e7c76caef..43a130608 100644 --- a/datasafe-encryption/datasafe-encryption-api/src/main/java/de/adorsys/datasafe/encrypiton/api/types/keystore/PublicKeyIDWithPublicKey.java +++ b/datasafe-encryption/datasafe-encryption-api/src/main/java/de/adorsys/datasafe/encrypiton/api/types/keystore/PublicKeyEntry.java @@ -14,7 +14,7 @@ @ToString(of = "keyID") @RequiredArgsConstructor @EqualsAndHashCode -public class PublicKeyIDWithPublicKey { +public class PublicKeyEntry { private final KeyID keyID; private final PublicKey publicKey; } diff --git a/datasafe-encryption/datasafe-encryption-api/src/main/java/de/adorsys/datasafe/encrypiton/api/types/keystore/SecretKeyIDWithKey.java b/datasafe-encryption/datasafe-encryption-api/src/main/java/de/adorsys/datasafe/encrypiton/api/types/keystore/SecretKeyIDWithKey.java index 66f205c18..bb72576a0 100644 --- a/datasafe-encryption/datasafe-encryption-api/src/main/java/de/adorsys/datasafe/encrypiton/api/types/keystore/SecretKeyIDWithKey.java +++ b/datasafe-encryption/datasafe-encryption-api/src/main/java/de/adorsys/datasafe/encrypiton/api/types/keystore/SecretKeyIDWithKey.java @@ -13,7 +13,9 @@ @ToString @RequiredArgsConstructor public class SecretKeyIDWithKey { + //TODO: rename to SecretKeyEntry private final KeyID keyID; private final SecretKey secretKey; + private final Counter counter; } diff --git a/datasafe-encryption/datasafe-encryption-impl/pom.xml b/datasafe-encryption/datasafe-encryption-impl/pom.xml index 982f273dc..9ea2be891 100644 --- a/datasafe-encryption/datasafe-encryption-impl/pom.xml +++ b/datasafe-encryption/datasafe-encryption-impl/pom.xml @@ -92,5 +92,17 @@ test-jar test + + + org.cryptomator + siv-mode + 1.3.1 + test + + + org.cryptomator + siv-mode + 1.3.1 + diff --git a/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/cmsencryption/CMSEncryptionServiceImpl.java b/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/cmsencryption/CMSEncryptionServiceImpl.java index 985524817..a164dbfc3 100644 --- a/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/cmsencryption/CMSEncryptionServiceImpl.java +++ b/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/cmsencryption/CMSEncryptionServiceImpl.java @@ -2,7 +2,7 @@ import de.adorsys.datasafe.encrypiton.api.cmsencryption.CMSEncryptionService; import de.adorsys.datasafe.encrypiton.api.types.keystore.KeyID; -import de.adorsys.datasafe.encrypiton.api.types.keystore.PublicKeyIDWithPublicKey; +import de.adorsys.datasafe.encrypiton.api.types.keystore.PublicKeyEntry; import de.adorsys.datasafe.encrypiton.impl.cmsencryption.decryptors.Decryptor; import de.adorsys.datasafe.encrypiton.impl.cmsencryption.decryptors.DecryptorFactory; import de.adorsys.datasafe.encrypiton.impl.cmsencryption.exceptions.DecryptionException; @@ -52,7 +52,7 @@ public CMSEncryptionServiceImpl(CMSEncryptionConfig encryptionConfig) { @Override @SneakyThrows public OutputStream buildEncryptionOutputStream(OutputStream dataContentStream, - Set publicKeys) { + Set publicKeys) { return streamEncrypt( dataContentStream, publicKeys.stream().map( diff --git a/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/document/CMSDocumentWriteService.java b/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/document/CMSDocumentWriteService.java index ce592ddd7..234b8f1b2 100644 --- a/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/document/CMSDocumentWriteService.java +++ b/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/document/CMSDocumentWriteService.java @@ -3,7 +3,7 @@ import com.google.common.collect.ImmutableList; import de.adorsys.datasafe.encrypiton.api.cmsencryption.CMSEncryptionService; import de.adorsys.datasafe.encrypiton.api.document.EncryptedDocumentWriteService; -import de.adorsys.datasafe.encrypiton.api.types.keystore.PublicKeyIDWithPublicKey; +import de.adorsys.datasafe.encrypiton.api.types.keystore.PublicKeyEntry; import de.adorsys.datasafe.encrypiton.api.types.keystore.SecretKeyIDWithKey; import de.adorsys.datasafe.storage.api.actions.StorageWriteService; import de.adorsys.datasafe.types.api.callback.ResourceWriteCallback; @@ -41,7 +41,7 @@ public CMSDocumentWriteService(StorageWriteService writeService, } @Override - public OutputStream write(Map recipientsWithInbox) { + public OutputStream write(Map recipientsWithInbox) { int maxChunkSize = recipientsWithInbox.values().stream() .map(writeService::flushChunkSize) diff --git a/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/keystore/KeyStoreServiceImpl.java b/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/keystore/KeyStoreServiceImpl.java index 0b8ff18b5..661294dfb 100644 --- a/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/keystore/KeyStoreServiceImpl.java +++ b/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/keystore/KeyStoreServiceImpl.java @@ -102,9 +102,9 @@ public KeyStore updateKeyStoreReadKeyPassword(KeyStore current, @Override @SneakyThrows - public List getPublicKeys(KeyStoreAccess keyStoreAccess) { + public List getPublicKeys(KeyStoreAccess keyStoreAccess) { log.debug("get public keys"); - List result = new ArrayList<>(); + List result = new ArrayList<>(); KeyStore keyStore = keyStoreAccess.getKeyStore(); for (Enumeration keyAliases = keyStore.aliases(); keyAliases.hasMoreElements(); ) { final String keyAlias = keyAliases.nextElement(); @@ -114,7 +114,7 @@ public List getPublicKeys(KeyStoreAccess keyStoreAcces // digitalSignature (0), nonRepudiation (1), keyEncipherment (2), dataEncipherment (3), // keyAgreement (4), keyCertSign (5), cRLSign (6), encipherOnly (7), decipherOnly (8) if (keyUsage[2] || keyUsage[3] || keyUsage[4]) { - result.add(new PublicKeyIDWithPublicKey(new KeyID(keyAlias), cert.getPublicKey())); + result.add(new PublicKeyEntry(new KeyID(keyAlias), cert.getPublicKey())); } } return result; diff --git a/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/pathencryption/DefaultPathDigestConfig.java b/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/pathencryption/DefaultPathDigestConfig.java index 20c1914f9..7f9e502b9 100644 --- a/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/pathencryption/DefaultPathDigestConfig.java +++ b/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/pathencryption/DefaultPathDigestConfig.java @@ -5,18 +5,19 @@ /** * Configures document path encryption digest. + * By default using AES in GCM mode with SIV(synthetic input vector) */ @Data @AllArgsConstructor public class DefaultPathDigestConfig { - private final String messageDigest; - private final String algorithm; - private final int shaKeyPartSize; + String messageDigest; + String algorithm; + int shaKeyPartSize; public DefaultPathDigestConfig() { this.messageDigest = "SHA-256"; - this.algorithm = "AES"; + this.algorithm = "AES-GCM-SIV"; this.shaKeyPartSize = 16; } } diff --git a/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/pathencryption/DefaultPathEncryption.java b/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/pathencryption/DefaultPathEncryption.java deleted file mode 100644 index a5171b1b6..000000000 --- a/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/pathencryption/DefaultPathEncryption.java +++ /dev/null @@ -1,62 +0,0 @@ -package de.adorsys.datasafe.encrypiton.impl.pathencryption; - -import de.adorsys.datasafe.types.api.context.annotations.RuntimeDelegate; -import lombok.SneakyThrows; - -import javax.crypto.Cipher; -import javax.crypto.SecretKey; -import javax.crypto.spec.SecretKeySpec; -import javax.inject.Inject; -import java.security.MessageDigest; -import java.util.Arrays; -import java.util.Base64; - -/** - * Default path encryption/decryption that uses encryption specified by {@link DefaultPathDigestConfig} and - * encodes resulting bytes using Base64-urlsafe encoding. - */ -@RuntimeDelegate -public class DefaultPathEncryption implements PathEncryptionConfig { - - private final DefaultPathDigestConfig digestConfig; - - @Inject - public DefaultPathEncryption(DefaultPathDigestConfig config) { - this.digestConfig = config; - } - - @Override - public Cipher encryptionCipher(SecretKey secretKey) { - return createCipher(secretKey, digestConfig, Cipher.ENCRYPT_MODE); - } - - @Override - public Cipher decryptionCipher(SecretKey secretKey) { - return createCipher(secretKey, digestConfig, Cipher.DECRYPT_MODE); - } - - @Override - public String byteSerializer(byte[] bytes) { - return Base64.getUrlEncoder().encodeToString(bytes); - } - - @Override - public byte[] byteDeserializer(String input) { - return Base64.getUrlDecoder().decode(input); - } - - @SneakyThrows - private static Cipher createCipher(SecretKey secretKey, DefaultPathDigestConfig config, int cipherMode) { - byte[] key = secretKey.getEncoded(); - MessageDigest sha = MessageDigest.getInstance(config.getMessageDigest()); - key = sha.digest(key); - - key = Arrays.copyOf(key, config.getShaKeyPartSize()); - - SecretKeySpec secretKeySpec = new SecretKeySpec(key, config.getAlgorithm()); - - Cipher cipher = Cipher.getInstance(config.getAlgorithm()); - cipher.init(cipherMode, secretKeySpec); - return cipher; - } -} diff --git a/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/pathencryption/DefaultPathEncryptor.java b/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/pathencryption/DefaultPathEncryptor.java new file mode 100644 index 000000000..1a2399048 --- /dev/null +++ b/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/pathencryption/DefaultPathEncryptor.java @@ -0,0 +1,39 @@ +package de.adorsys.datasafe.encrypiton.impl.pathencryption; + +import de.adorsys.datasafe.encrypiton.api.types.keystore.SecretKeyIDWithKey; +import de.adorsys.datasafe.types.api.context.annotations.RuntimeDelegate; +import lombok.SneakyThrows; +import org.cryptomator.siv.SivMode; + +import javax.inject.Inject; + +/** + * Default path encryption/decryption that uses encryption specified by {@link DefaultPathDigestConfig} and + * encodes resulting bytes using Base64-urlsafe encoding. + */ +@RuntimeDelegate +public class DefaultPathEncryptor implements PathEncryptor { + + //TODO add link to RFC and Library on github + private final SivMode sivMode; + + @Inject + public DefaultPathEncryptor(){ + sivMode = new SivMode(); + } + + @Override + public byte[] encrypt(SecretKeyIDWithKey secretKeyEntry, byte[] rawData) { + return sivMode.encrypt(secretKeyEntry.getCounter().getValue(), + secretKeyEntry.getSecretKey().getEncoded(), + rawData); + } + + @Override + @SneakyThrows + public byte[] decrypt(SecretKeyIDWithKey secretKey, byte[] encryptedData) { + return sivMode.decrypt(secretKey.getCounter().getValue(), + secretKey.getSecretKey().getEncoded(), + encryptedData); + } +} diff --git a/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/pathencryption/PathEncryptionConfig.java b/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/pathencryption/PathEncryptionConfig.java deleted file mode 100644 index 4581ce89e..000000000 --- a/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/pathencryption/PathEncryptionConfig.java +++ /dev/null @@ -1,36 +0,0 @@ -package de.adorsys.datasafe.encrypiton.impl.pathencryption; - -import javax.crypto.Cipher; -import javax.crypto.SecretKey; - -/** - * Path encryption cipher configurer. - */ -public interface PathEncryptionConfig { - - /** - * @param secretKey Use this secret key - * @return Path encryption cipher that uses {@code secretKey} - */ - Cipher encryptionCipher(SecretKey secretKey); - - /** - * @param secretKey Use this secret key - * @return Path decryption cipher that uses {@code secretKey} - */ - Cipher decryptionCipher(SecretKey secretKey); - - /** - * Serializes encrypted bytes of document path. - * @param bytes Encrypted path as bytes - * @return String representation of encrypted path - */ - String byteSerializer(byte[] bytes); - - /** - * Deserializes encrypted bytes of document path. - * @param input String representation of encrypted path - * @return byte representation of path suitable for decryption - */ - byte[] byteDeserializer(String input); -} diff --git a/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/pathencryption/PathEncryptionImpl.java b/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/pathencryption/PathEncryptionImpl.java index b16d8d19a..ab5b0d757 100644 --- a/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/pathencryption/PathEncryptionImpl.java +++ b/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/pathencryption/PathEncryptionImpl.java @@ -36,7 +36,7 @@ public PathEncryptionImpl(SymmetricPathEncryptionService bucketPathEncryptionSer @Override public Uri encrypt(UserIDAuth forUser, Uri path) { SecretKeyIDWithKey keySpec = privateKeyService.pathEncryptionSecretKey(forUser); - Uri encrypt = bucketPathEncryptionService.encrypt(keySpec.getSecretKey(), path); + Uri encrypt = bucketPathEncryptionService.encrypt(keySpec, path); log.debug("encrypted path {} for user {} path {}", encrypt, forUser.getUserID(), path); return encrypt; } @@ -48,7 +48,7 @@ public Uri encrypt(UserIDAuth forUser, Uri path) { public Function decryptor(UserIDAuth forUser) { SecretKeyIDWithKey keySpec = privateKeyService.pathEncryptionSecretKey(forUser); return encryptedPath -> { - Uri decrypt = bucketPathEncryptionService.decrypt(keySpec.getSecretKey(), encryptedPath); + Uri decrypt = bucketPathEncryptionService.decrypt(keySpec, encryptedPath); log.debug("decrypted path {} for user {} path {}", decrypt, forUser.getUserID(), encryptedPath); return decrypt; }; diff --git a/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/pathencryption/PathEncryptor.java b/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/pathencryption/PathEncryptor.java new file mode 100644 index 000000000..f8122bfa9 --- /dev/null +++ b/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/pathencryption/PathEncryptor.java @@ -0,0 +1,22 @@ +package de.adorsys.datasafe.encrypiton.impl.pathencryption; + +import de.adorsys.datasafe.encrypiton.api.types.keystore.SecretKeyIDWithKey; + +/** + * Path encryption cipher configurer. + */ +public interface PathEncryptor { + + /** + * @param secretKeyEntry Use this secret key + * @return Path encryption cipher that uses {@code secretKey} + */ + byte[] encrypt(SecretKeyIDWithKey secretKeyEntry, byte[] rawData); + + /** + * @param secretKey Use this secret key + * @return Path decryption cipher that uses {@code secretKey} + */ + byte[] decrypt(SecretKeyIDWithKey secretKey, byte[] encryptedData); + +} diff --git a/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/pathencryption/SymmetricPathEncryptionServiceImpl.java b/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/pathencryption/SymmetricPathEncryptionServiceImpl.java index e8b2caa1e..eb28ea22f 100644 --- a/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/pathencryption/SymmetricPathEncryptionServiceImpl.java +++ b/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/pathencryption/SymmetricPathEncryptionServiceImpl.java @@ -1,16 +1,17 @@ package de.adorsys.datasafe.encrypiton.impl.pathencryption; import de.adorsys.datasafe.encrypiton.api.pathencryption.encryption.SymmetricPathEncryptionService; +import de.adorsys.datasafe.encrypiton.api.types.keystore.SecretKeyIDWithKey; import de.adorsys.datasafe.types.api.context.annotations.RuntimeDelegate; import de.adorsys.datasafe.types.api.resource.Uri; import lombok.SneakyThrows; import lombok.extern.slf4j.Slf4j; +import org.apache.commons.lang3.tuple.ImmutablePair; -import javax.crypto.Cipher; -import javax.crypto.SecretKey; import javax.inject.Inject; import java.net.URI; import java.util.Arrays; +import java.util.Base64; import java.util.function.Function; import java.util.stream.Collectors; @@ -27,11 +28,25 @@ public class SymmetricPathEncryptionServiceImpl implements SymmetricPathEncrypti private static final String PATH_SEPARATOR = "/"; - private final PathEncryptionConfig encryptionConfig; + private final PathEncryptor pathEncryptor; + private final Function, byte[]> encryptAndEncode; + private final Function, byte[]> decryptAndDecode; + + public SymmetricPathEncryptionServiceImpl(PathEncryptor pathEncryptor) { + this.pathEncryptor = pathEncryptor; + + encryptAndEncode = keyEntryEncryptedDataPair -> encode(pathEncryptor.encrypt( + keyEntryEncryptedDataPair.left, keyEntryEncryptedDataPair.right + )); + + decryptAndDecode = keyEntryDecryptedDataPair -> pathEncryptor.decrypt( + keyEntryDecryptedDataPair.left, decode(keyEntryDecryptedDataPair.right) + ); + } @Inject - public SymmetricPathEncryptionServiceImpl(PathEncryptionConfig encryptionConfig) { - this.encryptionConfig = encryptionConfig; + public SymmetricPathEncryptionServiceImpl() { + this(new DefaultPathEncryptor()); } /** @@ -39,15 +54,14 @@ public SymmetricPathEncryptionServiceImpl(PathEncryptionConfig encryptionConfig) */ @Override @SneakyThrows - public Uri encrypt(SecretKey secretKey, Uri bucketPath) { - validateArgs(secretKey, bucketPath); + public Uri encrypt(SecretKeyIDWithKey secretKeyEntry, Uri bucketPath) { + validateArgs(secretKeyEntry, bucketPath); validateUriIsRelative(bucketPath); - Cipher cipher = encryptionConfig.encryptionCipher(secretKey); - return processURIparts( + secretKeyEntry, bucketPath, - str -> encode(str, cipher) + encryptAndEncode ); } @@ -56,39 +70,39 @@ public Uri encrypt(SecretKey secretKey, Uri bucketPath) { */ @Override @SneakyThrows - public Uri decrypt(SecretKey secretKey, Uri bucketPath) { - validateArgs(secretKey, bucketPath); + public Uri decrypt(SecretKeyIDWithKey secretKeyEntry, Uri bucketPath) { + validateArgs(secretKeyEntry, bucketPath); validateUriIsRelative(bucketPath); - Cipher cipher = encryptionConfig.decryptionCipher(secretKey); - return processURIparts( + secretKeyEntry, bucketPath, - str -> decode(str, cipher) + decryptAndDecode ); } @SneakyThrows - private String decode(String str, Cipher cipher) { - if (str.isEmpty()) { - return str; + private static byte[] decode(byte[] encryptedData) { + if (null == encryptedData || encryptedData.length == 0) { + return encryptedData; } - return new String(cipher.doFinal(encryptionConfig.byteDeserializer(str)), UTF_8); + return Base64.getUrlDecoder().decode(encryptedData); } @SneakyThrows - private String encode(String str, Cipher cipher) { - if (str.isEmpty()) { - return str; + private static byte[] encode(byte[] encryptedData) { + if (null == encryptedData) { + return null; } - return encryptionConfig.byteSerializer(cipher.doFinal(str.getBytes(UTF_8))); + return Base64.getUrlEncoder().encodeToString(encryptedData).getBytes(UTF_8); } private static Uri processURIparts( + SecretKeyIDWithKey secretKeyEntry, Uri bucketPath, - Function process) { + Function, byte[]> process) { StringBuilder result = new StringBuilder(); String path = bucketPath.getRawPath(); @@ -105,14 +119,14 @@ private static Uri processURIparts( return new Uri( URI.create( Arrays.stream(path.split(PATH_SEPARATOR, -1)) - .map(process) - .collect(Collectors.joining(PATH_SEPARATOR)) - ) + .map(uriPart -> process.apply(new ImmutablePair<>(secretKeyEntry, uriPart.getBytes(UTF_8)))) + .map(String::new) // byte[] -> string + .collect(Collectors.joining(PATH_SEPARATOR))) ); } - private static void validateArgs(SecretKey secretKey, Uri bucketPath) { - if (null == secretKey) { + private static void validateArgs(SecretKeyIDWithKey secretKeyEntry, Uri bucketPath) { + if (null == secretKeyEntry || null == secretKeyEntry.getSecretKey()) { throw new IllegalArgumentException("Secret key should not be null"); } @@ -126,4 +140,4 @@ private static void validateUriIsRelative(Uri uri) { throw new IllegalArgumentException("URI should be relative"); } } -} +} \ No newline at end of file diff --git a/datasafe-encryption/datasafe-encryption-impl/src/test/java/de/adorsys/datasafe/encrypiton/impl/cmsencryption/CmsEncryptionServiceImplTest.java b/datasafe-encryption/datasafe-encryption-impl/src/test/java/de/adorsys/datasafe/encrypiton/impl/cmsencryption/CmsEncryptionServiceImplTest.java index 879e3a230..e5347e415 100644 --- a/datasafe-encryption/datasafe-encryption-impl/src/test/java/de/adorsys/datasafe/encrypiton/impl/cmsencryption/CmsEncryptionServiceImplTest.java +++ b/datasafe-encryption/datasafe-encryption-impl/src/test/java/de/adorsys/datasafe/encrypiton/impl/cmsencryption/CmsEncryptionServiceImplTest.java @@ -87,20 +87,20 @@ void testCmsStreamEnvelopeEncryptAndDecryptTestWithMultipleRecipients() { inputStream, keyIds -> getKeys(keyIds, keyStoreAccess3))); } - private PublicKeyIDWithPublicKey getPublicKeyIDWithPublicKey(KeyStoreAccess keyStoreAccess) { + private PublicKeyEntry getPublicKeyIDWithPublicKey(KeyStoreAccess keyStoreAccess) { return keyStoreService.getPublicKeys(keyStoreAccess).stream().findFirst().get(); } @Test @SneakyThrows void cmsStreamEnvelopeEncryptAndDecryptTest() { - PublicKeyIDWithPublicKey publicKeyIDWithPublicKey = keyStoreService.getPublicKeys(keyStoreAccess).get(0); + PublicKeyEntry publicKeyEntry = keyStoreService.getPublicKeys(keyStoreAccess).get(0); ByteArrayOutputStream outputStream = new ByteArrayOutputStream(); OutputStream encryptionStream = cmsEncryptionService.buildEncryptionOutputStream(outputStream, - Collections.singleton(new PublicKeyIDWithPublicKey( - publicKeyIDWithPublicKey.getKeyID(), - publicKeyIDWithPublicKey.getPublicKey() + Collections.singleton(new PublicKeyEntry( + publicKeyEntry.getKeyID(), + publicKeyEntry.getPublicKey() )) ); @@ -121,7 +121,7 @@ void cmsStreamEnvelopeEncryptAndDecryptTest() { @Test @SneakyThrows void cmsStreamEnvelopeZeroKeyPairFailTest() { - PublicKeyIDWithPublicKey publicKeyIDWithPublicKey = keyStoreService.getPublicKeys(keyStoreAccess).get(0); + PublicKeyEntry publicKeyEntry = keyStoreService.getPublicKeys(keyStoreAccess).get(0); ByteArrayOutputStream outputStream = new ByteArrayOutputStream(); CMSEnvelopedDataStreamGenerator gen = new CMSEnvelopedDataStreamGenerator(); @@ -129,9 +129,9 @@ void cmsStreamEnvelopeZeroKeyPairFailTest() { .setProvider(BouncyCastleProvider.PROVIDER_NAME).build()); OutputStream encryptionStream = cmsEncryptionService.buildEncryptionOutputStream(outputStream, - Collections.singleton(new PublicKeyIDWithPublicKey( - publicKeyIDWithPublicKey.getKeyID(), - publicKeyIDWithPublicKey.getPublicKey() + Collections.singleton(new PublicKeyEntry( + publicKeyEntry.getKeyID(), + publicKeyEntry.getPublicKey() )) ); @@ -147,11 +147,11 @@ void cmsStreamEnvelopeZeroKeyPairFailTest() { @Test @SneakyThrows void cmsStreamEnvelopeTwoKeysPairFailTest() { - PublicKeyIDWithPublicKey publicKeyIDWithPublicKey = keyStoreService.getPublicKeys(keyStoreAccess).get(0); + PublicKeyEntry publicKeyEntry = keyStoreService.getPublicKeys(keyStoreAccess).get(0); ByteArrayOutputStream outputStream = new ByteArrayOutputStream(); - RecipientInfoGenerator recipientInfo1 = new JceKeyTransRecipientInfoGenerator("key1".getBytes(), publicKeyIDWithPublicKey.getPublicKey()); - RecipientInfoGenerator recipientInfo2 = new JceKeyTransRecipientInfoGenerator("key2".getBytes(), publicKeyIDWithPublicKey.getPublicKey()); + RecipientInfoGenerator recipientInfo1 = new JceKeyTransRecipientInfoGenerator("key1".getBytes(), publicKeyEntry.getPublicKey()); + RecipientInfoGenerator recipientInfo2 = new JceKeyTransRecipientInfoGenerator("key2".getBytes(), publicKeyEntry.getPublicKey()); CMSEnvelopedDataStreamGenerator gen = new CMSEnvelopedDataStreamGenerator(); gen.addRecipientInfoGenerator(recipientInfo1); @@ -160,9 +160,9 @@ void cmsStreamEnvelopeTwoKeysPairFailTest() { .setProvider(BouncyCastleProvider.PROVIDER_NAME).build()); OutputStream encryptionStream = cmsEncryptionService.buildEncryptionOutputStream(outputStream, - Collections.singleton(new PublicKeyIDWithPublicKey( - publicKeyIDWithPublicKey.getKeyID(), - publicKeyIDWithPublicKey.getPublicKey() + Collections.singleton(new PublicKeyEntry( + publicKeyEntry.getKeyID(), + publicKeyEntry.getPublicKey() )) ); @@ -180,12 +180,12 @@ void cmsStreamEnvelopeTwoKeysPairFailTest() { void cmsStreamEnvelopeOneKeyPairFailTest() { KeyStoreAccess keyStoreAccess = getKeyStoreAccess(); - PublicKeyIDWithPublicKey publicKeyIDWithPublicKey = keyStoreService.getPublicKeys(keyStoreAccess).get(0); + PublicKeyEntry publicKeyEntry = keyStoreService.getPublicKeys(keyStoreAccess).get(0); ByteArrayOutputStream outputStream = new ByteArrayOutputStream(); OutputStream encryptionStream = cmsEncryptionService.buildEncryptionOutputStream(outputStream, - Collections.singleton(new PublicKeyIDWithPublicKey( - publicKeyIDWithPublicKey.getKeyID(), - publicKeyIDWithPublicKey.getPublicKey() + Collections.singleton(new PublicKeyEntry( + publicKeyEntry.getKeyID(), + publicKeyEntry.getPublicKey() )) ); @@ -237,16 +237,16 @@ void cmsEnvelopeEncryptAndDecryptFileStreamTest() { generateTestFile(testFilePath, testFileSizeInBytes); log.info("Test file with size {}Mb generated: {}", testFileSizeInBytes / _1MbInBytes, testFilePath); - PublicKeyIDWithPublicKey publicKeyIDWithPublicKey = keyStoreService.getPublicKeys(keyStoreAccess).get(0); + PublicKeyEntry publicKeyEntry = keyStoreService.getPublicKeys(keyStoreAccess).get(0); File encryptedFile = new File(encryptedFilePath); FileOutputStream fosEnFile = new FileOutputStream(encryptedFile); OutputStream encryptionStream = cmsEncryptionService.buildEncryptionOutputStream( fosEnFile, - Collections.singleton(new PublicKeyIDWithPublicKey( - publicKeyIDWithPublicKey.getKeyID(), - publicKeyIDWithPublicKey.getPublicKey() + Collections.singleton(new PublicKeyEntry( + publicKeyEntry.getKeyID(), + publicKeyEntry.getPublicKey() )) ); diff --git a/datasafe-encryption/datasafe-encryption-impl/src/test/java/de/adorsys/datasafe/encrypiton/impl/keystore/KeyStoreServiceTest.java b/datasafe-encryption/datasafe-encryption-impl/src/test/java/de/adorsys/datasafe/encrypiton/impl/keystore/KeyStoreServiceTest.java index 560f7a436..6aaf5c948 100644 --- a/datasafe-encryption/datasafe-encryption-impl/src/test/java/de/adorsys/datasafe/encrypiton/impl/keystore/KeyStoreServiceTest.java +++ b/datasafe-encryption/datasafe-encryption-impl/src/test/java/de/adorsys/datasafe/encrypiton/impl/keystore/KeyStoreServiceTest.java @@ -72,7 +72,7 @@ void createKeyStoreException() { void getPublicKeys() { KeyStore keyStore = keyStoreService.createKeyStore(keyStoreAuth, KeyStoreType.DEFAULT, null); KeyStoreAccess keyStoreAccess = new KeyStoreAccess(keyStore, keyStoreAuth); - List publicKeys = keyStoreService.getPublicKeys(keyStoreAccess); + List publicKeys = keyStoreService.getPublicKeys(keyStoreAccess); Assertions.assertEquals(5, publicKeys.size()); } diff --git a/datasafe-encryption/datasafe-encryption-impl/src/test/java/de/adorsys/datasafe/encrypiton/impl/pathencryption/SymmetricPathEncryptionServiceImplTest.java b/datasafe-encryption/datasafe-encryption-impl/src/test/java/de/adorsys/datasafe/encrypiton/impl/pathencryption/SymmetricPathEncryptionServiceImplTest.java index deef2250c..b9e108319 100644 --- a/datasafe-encryption/datasafe-encryption-impl/src/test/java/de/adorsys/datasafe/encrypiton/impl/pathencryption/SymmetricPathEncryptionServiceImplTest.java +++ b/datasafe-encryption/datasafe-encryption-impl/src/test/java/de/adorsys/datasafe/encrypiton/impl/pathencryption/SymmetricPathEncryptionServiceImplTest.java @@ -25,7 +25,7 @@ class SymmetricPathEncryptionServiceImplTest extends BaseMockitoTest { private SymmetricPathEncryptionServiceImpl bucketPathEncryptionService = new SymmetricPathEncryptionServiceImpl( - new DefaultPathEncryption(new DefaultPathDigestConfig()) + new DefaultPathEncryptor() ); private KeyStoreService keyStoreService = new KeyStoreServiceImpl(new DefaultPasswordBasedKeyConfig()); @@ -40,18 +40,21 @@ class SymmetricPathEncryptionServiceImplTest extends BaseMockitoTest { void testSuccessEncryptDecryptPath() { String testPath = "path/to/file"; - log.info("Test path: {}", testPath); - Uri testURI = new Uri(testPath); SecretKeySpec secretKey = keyStoreService.getSecretKey( keyStoreAccess, KeystoreUtil.keyIdByPrefix(keyStore, PATH_KEY_ID_PREFIX) ); - Uri encrypted = bucketPathEncryptionService.encrypt(secretKey, testURI); - Uri decrypted = bucketPathEncryptionService.decrypt(secretKey, encrypted); - log.debug("Encrypted path: {}", encrypted); + SecretKeyIDWithKey secretKeyIDWithKey = new SecretKeyIDWithKey( + KeystoreUtil.keyIdByPrefix(keyStore, PATH_KEY_ID_PREFIX), secretKey, new Counter()); + + Uri encrypted = bucketPathEncryptionService.encrypt(secretKeyIDWithKey, testURI); + log.debug("Encrypted path: {}"+ encrypted); + + Uri decrypted = bucketPathEncryptionService.decrypt(secretKeyIDWithKey, encrypted); + log.debug("Decrypted path: {}"+ decrypted); assertEquals(testPath, decrypted.toASCIIString()); } @@ -65,9 +68,13 @@ void testFailEncryptPathWithWrongKeyID() throws URISyntaxException { Uri testURI = new Uri(testPath); SecretKeySpec secretKey = keyStoreService.getSecretKey(keyStoreAccess, new KeyID("Invalid key")); + + SecretKeyIDWithKey secretKeyIDWithKey = new SecretKeyIDWithKey( + KeystoreUtil.keyIdByPrefix(keyStore, PATH_KEY_ID_PREFIX), secretKey, new Counter()); + // secret keys is null, because during key obtain was used incorrect KeyID, // so bucketPathEncryptionService#encrypt throw BaseException(was handled NullPointerException) - assertThrows(IllegalArgumentException.class, () -> bucketPathEncryptionService.encrypt(secretKey, testURI)); + assertThrows(IllegalArgumentException.class, () -> bucketPathEncryptionService.encrypt(secretKeyIDWithKey, testURI)); } @Test @@ -77,8 +84,11 @@ void testFailEncryptPathWithBrokenEncryptedPath() { KeystoreUtil.keyIdByPrefix(keyStore, PATH_KEY_ID_PREFIX) ); + SecretKeyIDWithKey secretKeyIDWithKey = new SecretKeyIDWithKey( + KeystoreUtil.keyIdByPrefix(keyStore, PATH_KEY_ID_PREFIX), secretKey, new Counter()); + assertThrows(BadPaddingException.class, - () -> bucketPathEncryptionService.decrypt(secretKey, + () -> bucketPathEncryptionService.decrypt(secretKeyIDWithKey, new Uri(URI.create("bRQiW8qLNPEy5tO7shfV0w==/k0HooCVlmhHkQFw8mc==")))); } @@ -89,8 +99,11 @@ void testFailEncryptPathWithTextPath() { KeystoreUtil.keyIdByPrefix(keyStore, PATH_KEY_ID_PREFIX) ); + SecretKeyIDWithKey secretKeyIDWithKey = new SecretKeyIDWithKey( + KeystoreUtil.keyIdByPrefix(keyStore, PATH_KEY_ID_PREFIX), secretKey, new Counter()); + assertThrows(IllegalBlockSizeException.class, - () -> bucketPathEncryptionService.decrypt(secretKey, + () -> bucketPathEncryptionService.decrypt(secretKeyIDWithKey, new Uri("/simple/text/path/"))); } -} +} \ No newline at end of file diff --git a/datasafe-examples/datasafe-examples-multidfs/src/test/java/de/adorsys/datasafe/examples/business/s3/MultiDfsWithCredentialsExampleTest.java b/datasafe-examples/datasafe-examples-multidfs/src/test/java/de/adorsys/datasafe/examples/business/s3/MultiDfsWithCredentialsExampleTest.java index fb443fdd5..145fb5695 100644 --- a/datasafe-examples/datasafe-examples-multidfs/src/test/java/de/adorsys/datasafe/examples/business/s3/MultiDfsWithCredentialsExampleTest.java +++ b/datasafe-examples/datasafe-examples-multidfs/src/test/java/de/adorsys/datasafe/examples/business/s3/MultiDfsWithCredentialsExampleTest.java @@ -58,8 +58,7 @@ @Slf4j class MultiDfsWithCredentialsExampleTest { - private static final ExecutorService EXECUTOR = ExecutorServiceUtil - .submitterExecutesOnStarvationExecutingService(4, 4); + private static final ExecutorService EXECUTOR = ExecutorServiceUtil.submitterExecutesOnStarvationExecutingService(4, 4); private static Map minios = new EnumMap<>(MinioContainerId.class); private static AmazonS3 directoryClient = null; diff --git a/datasafe-inbox/datasafe-inbox-impl/src/test/java/de/adorsys/datasafe/inbox/api/actions/WriteToInboxImplTest.java b/datasafe-inbox/datasafe-inbox-impl/src/test/java/de/adorsys/datasafe/inbox/api/actions/WriteToInboxImplTest.java index d78f864a3..24c18c9d9 100644 --- a/datasafe-inbox/datasafe-inbox-impl/src/test/java/de/adorsys/datasafe/inbox/api/actions/WriteToInboxImplTest.java +++ b/datasafe-inbox/datasafe-inbox-impl/src/test/java/de/adorsys/datasafe/inbox/api/actions/WriteToInboxImplTest.java @@ -5,7 +5,7 @@ import de.adorsys.datasafe.encrypiton.api.document.EncryptedDocumentWriteService; import de.adorsys.datasafe.encrypiton.api.types.UserID; import de.adorsys.datasafe.encrypiton.api.types.keystore.KeyID; -import de.adorsys.datasafe.encrypiton.api.types.keystore.PublicKeyIDWithPublicKey; +import de.adorsys.datasafe.encrypiton.api.types.keystore.PublicKeyEntry; import de.adorsys.datasafe.inbox.impl.actions.WriteToInboxImpl; import de.adorsys.datasafe.types.api.actions.WriteRequest; import de.adorsys.datasafe.types.api.resource.AbsoluteLocation; @@ -34,7 +34,7 @@ class WriteToInboxImplTest extends BaseMockitoTest { private UserID auth = new UserID(""); - private PublicKeyIDWithPublicKey publicKeyWithId; + private PublicKeyEntry publicKeyWithId; @Mock private PublicKey publicKey; @@ -53,7 +53,7 @@ class WriteToInboxImplTest extends BaseMockitoTest { @BeforeEach void init() { - this.publicKeyWithId = new PublicKeyIDWithPublicKey(new KeyID(""), publicKey); + this.publicKeyWithId = new PublicKeyEntry(new KeyID(""), publicKey); } @Test diff --git a/datasafe-long-run-tests/datasafe-business-tests-random-actions/src/test/java/de/adorsys/datasafe/business/impl/e2e/randomactions/framework/BaseRandomActions.java b/datasafe-long-run-tests/datasafe-business-tests-random-actions/src/test/java/de/adorsys/datasafe/business/impl/e2e/randomactions/framework/BaseRandomActions.java index 4e061e37c..a811a3b0f 100644 --- a/datasafe-long-run-tests/datasafe-business-tests-random-actions/src/test/java/de/adorsys/datasafe/business/impl/e2e/randomactions/framework/BaseRandomActions.java +++ b/datasafe-long-run-tests/datasafe-business-tests-random-actions/src/test/java/de/adorsys/datasafe/business/impl/e2e/randomactions/framework/BaseRandomActions.java @@ -42,15 +42,14 @@ public abstract class BaseRandomActions extends WithStorageProvider { public static final String DISABLE_RANDOM_ACTIONS_TEST = "DISABLE_RANDOM_ACTIONS_TEST"; - public static final String ENABLE_MULTI_BUCKET_TEST = "ENABLE_MULTI_BUCKET_TEST"; private final Logger log = LoggerFactory.getLogger(getClass()); private static final int KILOBYTE_TO_BYTE = 1024; private static final long TIMEOUT = 30L; - private static String THREADS = readPropOrEnv("THREADS", "2, 4, 8"); - private static String FILE_SIZES = readPropOrEnv("FILE_SIZES", "100, 1024, 10240"); // in KB + private static String THREADS = readPropOrEnv("THREADS", "8"); + private static String FILE_SIZES = readPropOrEnv("FILE_SIZES", "10240"); // in KB private static final Set THREAD_COUNT = ImmutableSet.copyOf( Stream.of(THREADS.split(",")).map(String::trim) @@ -62,11 +61,6 @@ public abstract class BaseRandomActions extends WithStorageProvider { .mapToInt(Integer::parseInt).boxed().collect(Collectors.toList()) ); - private static final List STORAGE_PROVIDERS = - Arrays.asList(readPropOrEnv("STORAGE_PROVIDERS", "MINIO").split(",")); - - private static final String FIXTURE_SIZE = readPropOrEnv("FIXTURE_SIZE", "SMALL"); - @BeforeEach void prepare() { // Enable logging obfuscation @@ -74,18 +68,22 @@ void prepare() { System.setProperty("SECURE_SENSITIVE", "on"); } - protected Fixture getFixture() { - switch(FIXTURE_SIZE) { - case "MEDIUM" : return fixture("fixture/fixture_1000_ops.json"); - case "BIG" : return fixture("fixture/fixture_10000_ops.json"); - default : return fixture("fixture/fixture_200_ops.json"); - } - } - protected Fixture smallSimpleDocusafeAdapterFixture() { return fixture("fixture/fixture_simple_datasafe_200_ops.json"); } + protected Fixture smallFixture() { + return fixture("fixture/fixture_200_ops.json"); + } + + protected Fixture mediumFixture() { + return fixture("fixture/fixture_1000_ops.json"); + } + + protected Fixture bigFixture() { + return fixture("fixture/fixture_10000_ops.json"); + } + @SneakyThrows protected Fixture fixture(String path) { try (Reader reader = Resources.asCharSource( @@ -96,30 +94,14 @@ protected Fixture fixture(String path) { } @ValueSource - protected static Stream actionsOnStoragesAndThreadsAndFilesizes() { + protected static Stream actionsOnSoragesAndThreadsAndFilesizes() { return Sets.cartesianProduct( - getStorageDescriptors(), + Collections.singleton(minio()), THREAD_COUNT, FILE_SIZE_K_BYTES ).stream().map(it -> Arguments.of(it.get(0), it.get(1), it.get(2))); } - private static Set getStorageDescriptors() { - return STORAGE_PROVIDERS.stream().map(it -> { - switch (it) { - case "AMAZON": - return s3(); - case "MINIO": - return minio(); - case "CEPH": - return cephVersioned(); - case "FILESYSTEM": - return fs(); - } - return null; - }).filter(Objects::nonNull).collect(Collectors.toSet()); - } - protected void executeTest( Fixture fixture, StorageDescriptorName storageName, diff --git a/datasafe-privatestore/datasafe-privatestore-impl/src/test/java/de/adorsys/datasafe/privatestore/impl/actions/WriteToPrivateImplTest.java b/datasafe-privatestore/datasafe-privatestore-impl/src/test/java/de/adorsys/datasafe/privatestore/impl/actions/WriteToPrivateImplTest.java index e5212bb5a..8303fb269 100644 --- a/datasafe-privatestore/datasafe-privatestore-impl/src/test/java/de/adorsys/datasafe/privatestore/impl/actions/WriteToPrivateImplTest.java +++ b/datasafe-privatestore/datasafe-privatestore-impl/src/test/java/de/adorsys/datasafe/privatestore/impl/actions/WriteToPrivateImplTest.java @@ -4,6 +4,7 @@ import de.adorsys.datasafe.encrypiton.api.document.EncryptedDocumentWriteService; import de.adorsys.datasafe.encrypiton.api.types.UserID; import de.adorsys.datasafe.encrypiton.api.types.UserIDAuth; +import de.adorsys.datasafe.encrypiton.api.types.keystore.Counter; import de.adorsys.datasafe.encrypiton.api.types.keystore.KeyID; import de.adorsys.datasafe.encrypiton.api.types.keystore.ReadKeyPassword; import de.adorsys.datasafe.encrypiton.api.types.keystore.SecretKeyIDWithKey; @@ -60,7 +61,7 @@ class WriteToPrivateImplTest extends BaseMockitoTest { @BeforeEach void init() { - this.secretKeyIDWithKey = new SecretKeyIDWithKey(new KeyID(""), secretKey); + this.secretKeyIDWithKey = new SecretKeyIDWithKey(new KeyID(""), secretKey, new Counter()); } @Test diff --git a/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/main/java/de/adorsys/datasafe/simple/adapter/impl/SwitchableCmsEncryptionImpl.java b/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/main/java/de/adorsys/datasafe/simple/adapter/impl/SwitchableCmsEncryptionImpl.java index 990d59008..967c3e9f7 100644 --- a/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/main/java/de/adorsys/datasafe/simple/adapter/impl/SwitchableCmsEncryptionImpl.java +++ b/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/main/java/de/adorsys/datasafe/simple/adapter/impl/SwitchableCmsEncryptionImpl.java @@ -1,7 +1,7 @@ package de.adorsys.datasafe.simple.adapter.impl; import de.adorsys.datasafe.encrypiton.api.types.keystore.KeyID; -import de.adorsys.datasafe.encrypiton.api.types.keystore.PublicKeyIDWithPublicKey; +import de.adorsys.datasafe.encrypiton.api.types.keystore.PublicKeyEntry; import de.adorsys.datasafe.encrypiton.impl.cmsencryption.CMSEncryptionConfig; import de.adorsys.datasafe.encrypiton.impl.cmsencryption.CMSEncryptionServiceImpl; import lombok.extern.slf4j.Slf4j; @@ -27,7 +27,7 @@ public SwitchableCmsEncryptionImpl(CMSEncryptionConfig encryptionConfig) { } @Override - public OutputStream buildEncryptionOutputStream(OutputStream dataContentStream, Set publicKeys) { + public OutputStream buildEncryptionOutputStream(OutputStream dataContentStream, Set publicKeys) { if (withCmsEncryption) { return super.buildEncryptionOutputStream(dataContentStream, publicKeys); } diff --git a/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/main/java/de/adorsys/datasafe/simple/adapter/impl/profile/DFSRelativeProfileRetrievalServiceImpl.java b/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/main/java/de/adorsys/datasafe/simple/adapter/impl/profile/DFSRelativeProfileRetrievalServiceImpl.java index 681e0af89..ce8a36148 100644 --- a/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/main/java/de/adorsys/datasafe/simple/adapter/impl/profile/DFSRelativeProfileRetrievalServiceImpl.java +++ b/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/main/java/de/adorsys/datasafe/simple/adapter/impl/profile/DFSRelativeProfileRetrievalServiceImpl.java @@ -35,7 +35,7 @@ public DFSRelativeProfileRetrievalServiceImpl(DFSConfig dfsConfig, StorageCheckS @Override public UserPublicProfile publicProfile(UserID ofUser) { CreateUserPublicProfile createUserPublicProfile = dfsConfig.defaultPublicTemplate(ofUser); - UserPublicProfile userPublicProfile = createUserPublicProfile.removeAccess(); + UserPublicProfile userPublicProfile = createUserPublicProfile.buildPublicProfile(); log.debug("get public profile {} for user {}", userPublicProfile, ofUser); return userPublicProfile; } @@ -44,7 +44,7 @@ public UserPublicProfile publicProfile(UserID ofUser) { public UserPrivateProfile privateProfile(UserIDAuth ofUser) { CreateUserPrivateProfile privateProfile = dfsConfig.defaultPrivateTemplate(ofUser); - UserPrivateProfile userPrivateProfile = privateProfile.removeAccess(); + UserPrivateProfile userPrivateProfile = privateProfile.buildPrivateProfile(); log.debug("get private profile {} for user {}", userPrivateProfile, ofUser); return userPrivateProfile; From 16f8cbf838cdc02b66b124bcf7de5a41a9308585 Mon Sep 17 00:00:00 2001 From: Ihor Yatsenko Date: Fri, 6 Sep 2019 15:27:36 +0200 Subject: [PATCH 050/255] DOC-239: Fixed path resolver in encryption service --- .../pathencryption/SymmetricPathEncryptionServiceImpl.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/pathencryption/SymmetricPathEncryptionServiceImpl.java b/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/pathencryption/SymmetricPathEncryptionServiceImpl.java index eb28ea22f..ca8f7c818 100644 --- a/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/pathencryption/SymmetricPathEncryptionServiceImpl.java +++ b/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/pathencryption/SymmetricPathEncryptionServiceImpl.java @@ -6,6 +6,7 @@ import de.adorsys.datasafe.types.api.resource.Uri; import lombok.SneakyThrows; import lombok.extern.slf4j.Slf4j; +import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.tuple.ImmutablePair; import javax.inject.Inject; @@ -118,7 +119,7 @@ private static Uri processURIparts( // Resulting value of `path` is URL-safe return new Uri( URI.create( - Arrays.stream(path.split(PATH_SEPARATOR, -1)) + Arrays.stream(StringUtils.split(path, PATH_SEPARATOR)) .map(uriPart -> process.apply(new ImmutablePair<>(secretKeyEntry, uriPart.getBytes(UTF_8)))) .map(String::new) // byte[] -> string .collect(Collectors.joining(PATH_SEPARATOR))) From 8cd25eb3761865d89c8a36d0fa89f2e65211cef1 Mon Sep 17 00:00:00 2001 From: Ihor Yatsenko Date: Sat, 7 Sep 2019 00:48:43 +0300 Subject: [PATCH 051/255] DOC-239: moved saving counter key to keystore --- .../impl/e2e/BasicFunctionalityTest.java | 8 +++---- .../keys/DFSPrivateKeyServiceImpl.java | 21 ++++++++++++++++--- .../actions/ProfileRetrievalServiceImpl.java | 1 + .../api/types/keystore/Counter.java | 1 + .../keystore/KeyStoreCreationConfig.java | 2 ++ .../types/keystore/SecretKeyIDWithKey.java | 3 ++- .../impl/keystore/KeyStoreServiceImpl.java | 4 ++-- .../pathencryption/DefaultPathEncryptor.java | 8 +++---- ...ymmetricPathEncryptionServiceImplTest.java | 13 ++++++++---- .../impl/actions/WriteToPrivateImplTest.java | 5 ++++- .../teststorage/WithStorageProvider.java | 8 +++---- 11 files changed, 51 insertions(+), 23 deletions(-) diff --git a/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/BasicFunctionalityTest.java b/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/BasicFunctionalityTest.java index 61281bb27..009ab569d 100644 --- a/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/BasicFunctionalityTest.java +++ b/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/BasicFunctionalityTest.java @@ -162,13 +162,13 @@ void listingValidation(WithStorageProvider.StorageDescriptor descriptor) { writeDataToPrivate(jane, "level1/file", MESSAGE_ONE); writeDataToPrivate(jane, "level1/level2/file", MESSAGE_ONE); - assertPrivateSpaceList(jane, "", "root.file", "level1/file", "level1/level2/file"); + /*assertPrivateSpaceList(jane, "", "root.file", "level1/file", "level1/level2/file"); assertPrivateSpaceList(jane, "./", "root.file", "level1/file", "level1/level2/file"); assertPrivateSpaceList(jane, ".", "root.file", "level1/file", "level1/level2/file"); - assertPrivateSpaceList(jane, "root.file", "root.file"); + assertPrivateSpaceList(jane, "root.file", "root.file");*/ assertPrivateSpaceList(jane, "./root.file", "root.file"); - +/* assertPrivateSpaceList(jane, "level1", "level1/file", "level1/level2/file"); assertPrivateSpaceList(jane, "level1/", "level1/file", "level1/level2/file"); assertPrivateSpaceList(jane, "./level1", "level1/file", "level1/level2/file"); @@ -177,7 +177,7 @@ void listingValidation(WithStorageProvider.StorageDescriptor descriptor) { assertPrivateSpaceList(jane, "./level1/level2", "level1/level2/file"); assertPrivateSpaceList(jane, "./level1/level2/", "level1/level2/file"); assertPrivateSpaceList(jane, "level1/level2", "level1/level2/file"); - assertPrivateSpaceList(jane, "level1/level2/", "level1/level2/file"); + assertPrivateSpaceList(jane, "level1/level2/", "level1/level2/file");*/ } diff --git a/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/keys/DFSPrivateKeyServiceImpl.java b/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/keys/DFSPrivateKeyServiceImpl.java index bb467e6eb..ebb0561ac 100644 --- a/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/keys/DFSPrivateKeyServiceImpl.java +++ b/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/keys/DFSPrivateKeyServiceImpl.java @@ -12,12 +12,12 @@ import javax.crypto.SecretKey; import javax.inject.Inject; import java.security.Key; +import java.util.List; import java.util.Map; import java.util.Set; import java.util.stream.Collectors; -import static de.adorsys.datasafe.encrypiton.api.types.keystore.KeyStoreCreationConfig.DOCUMENT_KEY_ID_PREFIX; -import static de.adorsys.datasafe.encrypiton.api.types.keystore.KeyStoreCreationConfig.PATH_KEY_ID_PREFIX; +import static de.adorsys.datasafe.encrypiton.api.types.keystore.KeyStoreCreationConfig.*; /** * Retrieves and opens private keystore associated with user location DFS storage. @@ -38,7 +38,21 @@ public DFSPrivateKeyServiceImpl(DocumentKeyStoreOperations keyStoreOper) { */ @Override public SecretKeyIDWithKey pathEncryptionSecretKey(UserIDAuth forUser) { - return keyByPrefix(forUser, PATH_KEY_ID_PREFIX); + List keyIds = keyStoreOper.readAliases(forUser).stream() + .filter(it -> it.startsWith(PATH_KEY_ID_PREFIX) || it.startsWith(PATH_KEY_ID_PREFIX_CRT)) + .map(KeyID::new) + .collect(Collectors.toList()); + + Map keys = keysByIds(forUser, keyIds.stream().map(it -> it.getValue()).collect(Collectors.toSet())); + + String secretPathKeyId = keys.keySet().stream().filter(it -> it.startsWith(PATH_KEY_ID_PREFIX)).findFirst().get(); + String secretPathCrtKeyId = keys.keySet().stream().filter(it -> it.startsWith(PATH_KEY_ID_PREFIX_CRT)).findFirst().get(); + + return new SecretKeyIDWithKey( + new KeyID(secretPathKeyId), + (SecretKey) keyStoreOper.getKey(forUser, secretPathKeyId), + (SecretKey) keyStoreOper.getKey(forUser, secretPathCrtKeyId), + null); } /** @@ -74,6 +88,7 @@ private SecretKeyIDWithKey keyByPrefix(UserIDAuth forUser, String prefix) { return new SecretKeyIDWithKey( key, (SecretKey) keyStoreOper.getKey(forUser, key.getValue()), + null, new Counter() ); } diff --git a/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/operations/actions/ProfileRetrievalServiceImpl.java b/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/operations/actions/ProfileRetrievalServiceImpl.java index b3dc053a8..a31266159 100644 --- a/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/operations/actions/ProfileRetrievalServiceImpl.java +++ b/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/operations/actions/ProfileRetrievalServiceImpl.java @@ -52,6 +52,7 @@ public UserPublicProfile publicProfile(UserID ofUser) { ofUser, id -> readProfile(dfsConfig.publicProfile(ofUser), UserPublicProfile.class) ); + log.debug("get public profile {} for user {}", userPublicProfile, ofUser); return userPublicProfile; } diff --git a/datasafe-encryption/datasafe-encryption-api/src/main/java/de/adorsys/datasafe/encrypiton/api/types/keystore/Counter.java b/datasafe-encryption/datasafe-encryption-api/src/main/java/de/adorsys/datasafe/encrypiton/api/types/keystore/Counter.java index d562b26b3..3f61fb6a1 100644 --- a/datasafe-encryption/datasafe-encryption-api/src/main/java/de/adorsys/datasafe/encrypiton/api/types/keystore/Counter.java +++ b/datasafe-encryption/datasafe-encryption-api/src/main/java/de/adorsys/datasafe/encrypiton/api/types/keystore/Counter.java @@ -9,6 +9,7 @@ public class Counter { private byte[] value; //size should be 16 bytes + //TODO: remove empty constructor? think about it public Counter() { value = new byte[16]; } diff --git a/datasafe-encryption/datasafe-encryption-api/src/main/java/de/adorsys/datasafe/encrypiton/api/types/keystore/KeyStoreCreationConfig.java b/datasafe-encryption/datasafe-encryption-api/src/main/java/de/adorsys/datasafe/encrypiton/api/types/keystore/KeyStoreCreationConfig.java index a078984b0..7a494658c 100644 --- a/datasafe-encryption/datasafe-encryption-api/src/main/java/de/adorsys/datasafe/encrypiton/api/types/keystore/KeyStoreCreationConfig.java +++ b/datasafe-encryption/datasafe-encryption-api/src/main/java/de/adorsys/datasafe/encrypiton/api/types/keystore/KeyStoreCreationConfig.java @@ -11,6 +11,8 @@ public class KeyStoreCreationConfig { public static final String PATH_KEY_ID_PREFIX = "PATH_SECRET"; + public static final String PATH_KEY_ID_PREFIX_CRT = "PATH_SECRET_CRT_"; + //public static final String PATH_KEY_ID_PREFIX_CRT = "PATH_CRT_KEY_"; public static final String DOCUMENT_KEY_ID_PREFIX = "PRIVATE_SECRET"; private final int encKeyNumber; diff --git a/datasafe-encryption/datasafe-encryption-api/src/main/java/de/adorsys/datasafe/encrypiton/api/types/keystore/SecretKeyIDWithKey.java b/datasafe-encryption/datasafe-encryption-api/src/main/java/de/adorsys/datasafe/encrypiton/api/types/keystore/SecretKeyIDWithKey.java index bb72576a0..1641329d0 100644 --- a/datasafe-encryption/datasafe-encryption-api/src/main/java/de/adorsys/datasafe/encrypiton/api/types/keystore/SecretKeyIDWithKey.java +++ b/datasafe-encryption/datasafe-encryption-api/src/main/java/de/adorsys/datasafe/encrypiton/api/types/keystore/SecretKeyIDWithKey.java @@ -17,5 +17,6 @@ public class SecretKeyIDWithKey { private final KeyID keyID; private final SecretKey secretKey; - private final Counter counter; + private final SecretKey counterSecretKey; + private final Counter counter;//TODO <- remove it } diff --git a/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/keystore/KeyStoreServiceImpl.java b/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/keystore/KeyStoreServiceImpl.java index 661294dfb..62182275f 100644 --- a/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/keystore/KeyStoreServiceImpl.java +++ b/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/keystore/KeyStoreServiceImpl.java @@ -21,8 +21,7 @@ import java.security.cert.X509Certificate; import java.util.*; -import static de.adorsys.datasafe.encrypiton.api.types.keystore.KeyStoreCreationConfig.DOCUMENT_KEY_ID_PREFIX; -import static de.adorsys.datasafe.encrypiton.api.types.keystore.KeyStoreCreationConfig.PATH_KEY_ID_PREFIX; +import static de.adorsys.datasafe.encrypiton.api.types.keystore.KeyStoreCreationConfig.*; @Slf4j @RuntimeDelegate @@ -46,6 +45,7 @@ public KeyStore createKeyStore(KeyStoreAuth keyStoreAuth, config, ImmutableMap.of( new KeyID(PATH_KEY_ID_PREFIX + UUID.randomUUID().toString()), Optional.empty(), + new KeyID(PATH_KEY_ID_PREFIX_CRT + UUID.randomUUID().toString()), Optional.empty(), new KeyID(DOCUMENT_KEY_ID_PREFIX + UUID.randomUUID().toString()), Optional.empty() ) ); diff --git a/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/pathencryption/DefaultPathEncryptor.java b/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/pathencryption/DefaultPathEncryptor.java index 1a2399048..53569c10b 100644 --- a/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/pathencryption/DefaultPathEncryptor.java +++ b/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/pathencryption/DefaultPathEncryptor.java @@ -23,16 +23,16 @@ public DefaultPathEncryptor(){ } @Override - public byte[] encrypt(SecretKeyIDWithKey secretKeyEntry, byte[] rawData) { - return sivMode.encrypt(secretKeyEntry.getCounter().getValue(), - secretKeyEntry.getSecretKey().getEncoded(), + public byte[] encrypt(SecretKeyIDWithKey secretKey, byte[] rawData) { + return sivMode.encrypt(secretKey.getCounterSecretKey().getEncoded(), + secretKey.getSecretKey().getEncoded(), rawData); } @Override @SneakyThrows public byte[] decrypt(SecretKeyIDWithKey secretKey, byte[] encryptedData) { - return sivMode.decrypt(secretKey.getCounter().getValue(), + return sivMode.decrypt(secretKey.getCounterSecretKey().getEncoded(), secretKey.getSecretKey().getEncoded(), encryptedData); } diff --git a/datasafe-encryption/datasafe-encryption-impl/src/test/java/de/adorsys/datasafe/encrypiton/impl/pathencryption/SymmetricPathEncryptionServiceImplTest.java b/datasafe-encryption/datasafe-encryption-impl/src/test/java/de/adorsys/datasafe/encrypiton/impl/pathencryption/SymmetricPathEncryptionServiceImplTest.java index b9e108319..17af4f913 100644 --- a/datasafe-encryption/datasafe-encryption-impl/src/test/java/de/adorsys/datasafe/encrypiton/impl/pathencryption/SymmetricPathEncryptionServiceImplTest.java +++ b/datasafe-encryption/datasafe-encryption-impl/src/test/java/de/adorsys/datasafe/encrypiton/impl/pathencryption/SymmetricPathEncryptionServiceImplTest.java @@ -47,8 +47,13 @@ void testSuccessEncryptDecryptPath() { KeystoreUtil.keyIdByPrefix(keyStore, PATH_KEY_ID_PREFIX) ); + SecretKeySpec secretKeyCrt = keyStoreService.getSecretKey( + keyStoreAccess, + KeystoreUtil.keyIdByPrefix(keyStore, PATH_KEY_ID_PREFIX) + ); + SecretKeyIDWithKey secretKeyIDWithKey = new SecretKeyIDWithKey( - KeystoreUtil.keyIdByPrefix(keyStore, PATH_KEY_ID_PREFIX), secretKey, new Counter()); + KeystoreUtil.keyIdByPrefix(keyStore, PATH_KEY_ID_PREFIX), secretKey, secretKeyCrt, new Counter()); Uri encrypted = bucketPathEncryptionService.encrypt(secretKeyIDWithKey, testURI); log.debug("Encrypted path: {}"+ encrypted); @@ -70,7 +75,7 @@ void testFailEncryptPathWithWrongKeyID() throws URISyntaxException { SecretKeySpec secretKey = keyStoreService.getSecretKey(keyStoreAccess, new KeyID("Invalid key")); SecretKeyIDWithKey secretKeyIDWithKey = new SecretKeyIDWithKey( - KeystoreUtil.keyIdByPrefix(keyStore, PATH_KEY_ID_PREFIX), secretKey, new Counter()); + KeystoreUtil.keyIdByPrefix(keyStore, PATH_KEY_ID_PREFIX), secretKey, secretKey, new Counter()); // secret keys is null, because during key obtain was used incorrect KeyID, // so bucketPathEncryptionService#encrypt throw BaseException(was handled NullPointerException) @@ -85,7 +90,7 @@ void testFailEncryptPathWithBrokenEncryptedPath() { ); SecretKeyIDWithKey secretKeyIDWithKey = new SecretKeyIDWithKey( - KeystoreUtil.keyIdByPrefix(keyStore, PATH_KEY_ID_PREFIX), secretKey, new Counter()); + KeystoreUtil.keyIdByPrefix(keyStore, PATH_KEY_ID_PREFIX), secretKey, secretKey, new Counter()); assertThrows(BadPaddingException.class, () -> bucketPathEncryptionService.decrypt(secretKeyIDWithKey, @@ -100,7 +105,7 @@ void testFailEncryptPathWithTextPath() { ); SecretKeyIDWithKey secretKeyIDWithKey = new SecretKeyIDWithKey( - KeystoreUtil.keyIdByPrefix(keyStore, PATH_KEY_ID_PREFIX), secretKey, new Counter()); + KeystoreUtil.keyIdByPrefix(keyStore, PATH_KEY_ID_PREFIX), secretKey, secretKey, new Counter()); assertThrows(IllegalBlockSizeException.class, () -> bucketPathEncryptionService.decrypt(secretKeyIDWithKey, diff --git a/datasafe-privatestore/datasafe-privatestore-impl/src/test/java/de/adorsys/datasafe/privatestore/impl/actions/WriteToPrivateImplTest.java b/datasafe-privatestore/datasafe-privatestore-impl/src/test/java/de/adorsys/datasafe/privatestore/impl/actions/WriteToPrivateImplTest.java index 8303fb269..47857481a 100644 --- a/datasafe-privatestore/datasafe-privatestore-impl/src/test/java/de/adorsys/datasafe/privatestore/impl/actions/WriteToPrivateImplTest.java +++ b/datasafe-privatestore/datasafe-privatestore-impl/src/test/java/de/adorsys/datasafe/privatestore/impl/actions/WriteToPrivateImplTest.java @@ -44,6 +44,9 @@ class WriteToPrivateImplTest extends BaseMockitoTest { @Mock private SecretKey secretKey; + @Mock + private SecretKey secretCrtKey; + @Mock private PrivateKeyService privateKeyService; @@ -61,7 +64,7 @@ class WriteToPrivateImplTest extends BaseMockitoTest { @BeforeEach void init() { - this.secretKeyIDWithKey = new SecretKeyIDWithKey(new KeyID(""), secretKey, new Counter()); + this.secretKeyIDWithKey = new SecretKeyIDWithKey(new KeyID(""), secretKey, secretCrtKey, new Counter()); } @Test diff --git a/datasafe-test-storages/src/main/java/de/adorsys/datasafe/teststorage/WithStorageProvider.java b/datasafe-test-storages/src/main/java/de/adorsys/datasafe/teststorage/WithStorageProvider.java index ee16a859f..ff1e06c8f 100644 --- a/datasafe-test-storages/src/main/java/de/adorsys/datasafe/teststorage/WithStorageProvider.java +++ b/datasafe-test-storages/src/main/java/de/adorsys/datasafe/teststorage/WithStorageProvider.java @@ -186,10 +186,10 @@ protected static Stream allDefaultStorages() { @ValueSource protected static Stream allStorages() { return Stream.of( - fs(), - minio(), - cephVersioned(), - s3() + fs()//, + //minio(), + //cephVersioned(), + //s3() ).filter(Objects::nonNull); } From e41c440263eb4a151d2760347baec50c55856cc1 Mon Sep 17 00:00:00 2001 From: Ihor Yatsenko Date: Sat, 7 Sep 2019 00:58:28 +0300 Subject: [PATCH 052/255] DOC-239: Clean up tests --- .../impl/e2e/BasicFunctionalityTest.java | 8 ++++---- .../api/types/CreateUserPrivateProfile.java | 6 ------ .../directory/api/types/UserPrivateProfile.java | 2 -- .../profile/keys/DFSPrivateKeyServiceImpl.java | 9 +++------ .../actions/ProfileStoreServiceTest.java | 6 ------ .../encrypiton/api/types/keystore/Counter.java | 17 ----------------- .../api/types/keystore/SecretKeyIDWithKey.java | 3 +-- .../SymmetricPathEncryptionServiceImplTest.java | 8 ++++---- .../impl/actions/WriteToPrivateImplTest.java | 3 +-- .../teststorage/WithStorageProvider.java | 8 ++++---- 10 files changed, 17 insertions(+), 53 deletions(-) delete mode 100644 datasafe-encryption/datasafe-encryption-api/src/main/java/de/adorsys/datasafe/encrypiton/api/types/keystore/Counter.java diff --git a/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/BasicFunctionalityTest.java b/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/BasicFunctionalityTest.java index 009ab569d..61281bb27 100644 --- a/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/BasicFunctionalityTest.java +++ b/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/BasicFunctionalityTest.java @@ -162,13 +162,13 @@ void listingValidation(WithStorageProvider.StorageDescriptor descriptor) { writeDataToPrivate(jane, "level1/file", MESSAGE_ONE); writeDataToPrivate(jane, "level1/level2/file", MESSAGE_ONE); - /*assertPrivateSpaceList(jane, "", "root.file", "level1/file", "level1/level2/file"); + assertPrivateSpaceList(jane, "", "root.file", "level1/file", "level1/level2/file"); assertPrivateSpaceList(jane, "./", "root.file", "level1/file", "level1/level2/file"); assertPrivateSpaceList(jane, ".", "root.file", "level1/file", "level1/level2/file"); - assertPrivateSpaceList(jane, "root.file", "root.file");*/ + assertPrivateSpaceList(jane, "root.file", "root.file"); assertPrivateSpaceList(jane, "./root.file", "root.file"); -/* + assertPrivateSpaceList(jane, "level1", "level1/file", "level1/level2/file"); assertPrivateSpaceList(jane, "level1/", "level1/file", "level1/level2/file"); assertPrivateSpaceList(jane, "./level1", "level1/file", "level1/level2/file"); @@ -177,7 +177,7 @@ void listingValidation(WithStorageProvider.StorageDescriptor descriptor) { assertPrivateSpaceList(jane, "./level1/level2", "level1/level2/file"); assertPrivateSpaceList(jane, "./level1/level2/", "level1/level2/file"); assertPrivateSpaceList(jane, "level1/level2", "level1/level2/file"); - assertPrivateSpaceList(jane, "level1/level2/", "level1/level2/file");*/ + assertPrivateSpaceList(jane, "level1/level2/", "level1/level2/file"); } diff --git a/datasafe-directory/datasafe-directory-api/src/main/java/de/adorsys/datasafe/directory/api/types/CreateUserPrivateProfile.java b/datasafe-directory/datasafe-directory-api/src/main/java/de/adorsys/datasafe/directory/api/types/CreateUserPrivateProfile.java index 8c6438153..0cfa25a90 100644 --- a/datasafe-directory/datasafe-directory-api/src/main/java/de/adorsys/datasafe/directory/api/types/CreateUserPrivateProfile.java +++ b/datasafe-directory/datasafe-directory-api/src/main/java/de/adorsys/datasafe/directory/api/types/CreateUserPrivateProfile.java @@ -1,7 +1,6 @@ package de.adorsys.datasafe.directory.api.types; import de.adorsys.datasafe.encrypiton.api.types.UserIDAuth; -import de.adorsys.datasafe.encrypiton.api.types.keystore.Counter; import de.adorsys.datasafe.types.api.resource.AbsoluteLocation; import de.adorsys.datasafe.types.api.resource.PrivateResource; import de.adorsys.datasafe.types.api.resource.PublicResource; @@ -70,10 +69,6 @@ public class CreateUserPrivateProfile { @SneakyThrows public UserPrivateProfile buildPrivateProfile() { - SecureRandom strongRNG = SecureRandom.getInstanceStrong(); - byte counterValue[] = new byte[16];//16 - block size - strongRNG.nextBytes(counterValue); - return UserPrivateProfile.builder() .keystore(keystore) .privateStorage(new HashMap<>(Collections.singletonMap(StorageIdentifier.DEFAULT, privateStorage))) @@ -82,7 +77,6 @@ public UserPrivateProfile buildPrivateProfile() { .documentVersionStorage(documentVersionStorage) .associatedResources(associatedResources) .publishPublicKeysTo(publishPubKeysTo) - .counter(new Counter(counterValue)) .build(); } } diff --git a/datasafe-directory/datasafe-directory-api/src/main/java/de/adorsys/datasafe/directory/api/types/UserPrivateProfile.java b/datasafe-directory/datasafe-directory-api/src/main/java/de/adorsys/datasafe/directory/api/types/UserPrivateProfile.java index 274540a93..016b45826 100644 --- a/datasafe-directory/datasafe-directory-api/src/main/java/de/adorsys/datasafe/directory/api/types/UserPrivateProfile.java +++ b/datasafe-directory/datasafe-directory-api/src/main/java/de/adorsys/datasafe/directory/api/types/UserPrivateProfile.java @@ -1,6 +1,5 @@ package de.adorsys.datasafe.directory.api.types; -import de.adorsys.datasafe.encrypiton.api.types.keystore.Counter; import de.adorsys.datasafe.types.api.resource.AbsoluteLocation; import de.adorsys.datasafe.types.api.resource.PrivateResource; import de.adorsys.datasafe.types.api.resource.PublicResource; @@ -63,5 +62,4 @@ public class UserPrivateProfile { */ private final AbsoluteLocation storageCredentialsKeystore; - private final Counter counter; } diff --git a/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/keys/DFSPrivateKeyServiceImpl.java b/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/keys/DFSPrivateKeyServiceImpl.java index ebb0561ac..2c97fd795 100644 --- a/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/keys/DFSPrivateKeyServiceImpl.java +++ b/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/keys/DFSPrivateKeyServiceImpl.java @@ -3,7 +3,6 @@ import de.adorsys.datasafe.directory.api.profile.keys.DocumentKeyStoreOperations; import de.adorsys.datasafe.directory.api.profile.keys.PrivateKeyService; import de.adorsys.datasafe.encrypiton.api.types.UserIDAuth; -import de.adorsys.datasafe.encrypiton.api.types.keystore.Counter; import de.adorsys.datasafe.encrypiton.api.types.keystore.KeyID; import de.adorsys.datasafe.encrypiton.api.types.keystore.SecretKeyIDWithKey; import de.adorsys.datasafe.types.api.context.annotations.RuntimeDelegate; @@ -48,11 +47,10 @@ public SecretKeyIDWithKey pathEncryptionSecretKey(UserIDAuth forUser) { String secretPathKeyId = keys.keySet().stream().filter(it -> it.startsWith(PATH_KEY_ID_PREFIX)).findFirst().get(); String secretPathCrtKeyId = keys.keySet().stream().filter(it -> it.startsWith(PATH_KEY_ID_PREFIX_CRT)).findFirst().get(); - return new SecretKeyIDWithKey( + return new SecretKeyIDWithKey( new KeyID(secretPathKeyId), (SecretKey) keyStoreOper.getKey(forUser, secretPathKeyId), - (SecretKey) keyStoreOper.getKey(forUser, secretPathCrtKeyId), - null); + (SecretKey) keyStoreOper.getKey(forUser, secretPathCrtKeyId)); } /** @@ -88,8 +86,7 @@ private SecretKeyIDWithKey keyByPrefix(UserIDAuth forUser, String prefix) { return new SecretKeyIDWithKey( key, (SecretKey) keyStoreOper.getKey(forUser, key.getValue()), - null, - new Counter() + null//TODO ); } } diff --git a/datasafe-directory/datasafe-directory-impl/src/test/java/de/adorsys/datasafe/directory/impl/profile/operations/actions/ProfileStoreServiceTest.java b/datasafe-directory/datasafe-directory-impl/src/test/java/de/adorsys/datasafe/directory/impl/profile/operations/actions/ProfileStoreServiceTest.java index 08c3e9ed5..e0cff6aa0 100644 --- a/datasafe-directory/datasafe-directory-impl/src/test/java/de/adorsys/datasafe/directory/impl/profile/operations/actions/ProfileStoreServiceTest.java +++ b/datasafe-directory/datasafe-directory-impl/src/test/java/de/adorsys/datasafe/directory/impl/profile/operations/actions/ProfileStoreServiceTest.java @@ -7,7 +7,6 @@ import de.adorsys.datasafe.directory.impl.profile.operations.UserProfileCache; import de.adorsys.datasafe.directory.impl.profile.serde.GsonSerde; import de.adorsys.datasafe.encrypiton.api.types.UserID; -import de.adorsys.datasafe.encrypiton.api.types.keystore.Counter; import de.adorsys.datasafe.storage.api.actions.StorageWriteService; import de.adorsys.datasafe.types.api.resource.AbsoluteLocation; import de.adorsys.datasafe.types.api.shared.BaseMockitoTest; @@ -70,13 +69,8 @@ class ProfileStoreServiceTest extends BaseMockitoTest { @Mock private OutputStream os; - @Mock - private Counter counter; - @BeforeEach void init() { - when(counter.getValue()).thenReturn(new byte[16]); - when(profilePriv.getCounter()).thenReturn(counter); when(serde.toJson(profilePriv)).thenReturn(PROFILE_STR); when(serde.toJson(profilePub)).thenReturn(PROFILE_STR); when(writeService.write(any())).thenReturn(os); diff --git a/datasafe-encryption/datasafe-encryption-api/src/main/java/de/adorsys/datasafe/encrypiton/api/types/keystore/Counter.java b/datasafe-encryption/datasafe-encryption-api/src/main/java/de/adorsys/datasafe/encrypiton/api/types/keystore/Counter.java deleted file mode 100644 index 3f61fb6a1..000000000 --- a/datasafe-encryption/datasafe-encryption-api/src/main/java/de/adorsys/datasafe/encrypiton/api/types/keystore/Counter.java +++ /dev/null @@ -1,17 +0,0 @@ -package de.adorsys.datasafe.encrypiton.api.types.keystore; - -import lombok.AllArgsConstructor; -import lombok.Getter; - -@Getter -@AllArgsConstructor -public class Counter { - - private byte[] value; //size should be 16 bytes - - //TODO: remove empty constructor? think about it - public Counter() { - value = new byte[16]; - } - -} \ No newline at end of file diff --git a/datasafe-encryption/datasafe-encryption-api/src/main/java/de/adorsys/datasafe/encrypiton/api/types/keystore/SecretKeyIDWithKey.java b/datasafe-encryption/datasafe-encryption-api/src/main/java/de/adorsys/datasafe/encrypiton/api/types/keystore/SecretKeyIDWithKey.java index 1641329d0..e6e20baaf 100644 --- a/datasafe-encryption/datasafe-encryption-api/src/main/java/de/adorsys/datasafe/encrypiton/api/types/keystore/SecretKeyIDWithKey.java +++ b/datasafe-encryption/datasafe-encryption-api/src/main/java/de/adorsys/datasafe/encrypiton/api/types/keystore/SecretKeyIDWithKey.java @@ -13,10 +13,9 @@ @ToString @RequiredArgsConstructor public class SecretKeyIDWithKey { - //TODO: rename to SecretKeyEntry private final KeyID keyID; private final SecretKey secretKey; private final SecretKey counterSecretKey; - private final Counter counter;//TODO <- remove it + } diff --git a/datasafe-encryption/datasafe-encryption-impl/src/test/java/de/adorsys/datasafe/encrypiton/impl/pathencryption/SymmetricPathEncryptionServiceImplTest.java b/datasafe-encryption/datasafe-encryption-impl/src/test/java/de/adorsys/datasafe/encrypiton/impl/pathencryption/SymmetricPathEncryptionServiceImplTest.java index 17af4f913..26a938078 100644 --- a/datasafe-encryption/datasafe-encryption-impl/src/test/java/de/adorsys/datasafe/encrypiton/impl/pathencryption/SymmetricPathEncryptionServiceImplTest.java +++ b/datasafe-encryption/datasafe-encryption-impl/src/test/java/de/adorsys/datasafe/encrypiton/impl/pathencryption/SymmetricPathEncryptionServiceImplTest.java @@ -53,7 +53,7 @@ void testSuccessEncryptDecryptPath() { ); SecretKeyIDWithKey secretKeyIDWithKey = new SecretKeyIDWithKey( - KeystoreUtil.keyIdByPrefix(keyStore, PATH_KEY_ID_PREFIX), secretKey, secretKeyCrt, new Counter()); + KeystoreUtil.keyIdByPrefix(keyStore, PATH_KEY_ID_PREFIX), secretKey, secretKeyCrt); Uri encrypted = bucketPathEncryptionService.encrypt(secretKeyIDWithKey, testURI); log.debug("Encrypted path: {}"+ encrypted); @@ -75,7 +75,7 @@ void testFailEncryptPathWithWrongKeyID() throws URISyntaxException { SecretKeySpec secretKey = keyStoreService.getSecretKey(keyStoreAccess, new KeyID("Invalid key")); SecretKeyIDWithKey secretKeyIDWithKey = new SecretKeyIDWithKey( - KeystoreUtil.keyIdByPrefix(keyStore, PATH_KEY_ID_PREFIX), secretKey, secretKey, new Counter()); + KeystoreUtil.keyIdByPrefix(keyStore, PATH_KEY_ID_PREFIX), secretKey, secretKey); // secret keys is null, because during key obtain was used incorrect KeyID, // so bucketPathEncryptionService#encrypt throw BaseException(was handled NullPointerException) @@ -90,7 +90,7 @@ void testFailEncryptPathWithBrokenEncryptedPath() { ); SecretKeyIDWithKey secretKeyIDWithKey = new SecretKeyIDWithKey( - KeystoreUtil.keyIdByPrefix(keyStore, PATH_KEY_ID_PREFIX), secretKey, secretKey, new Counter()); + KeystoreUtil.keyIdByPrefix(keyStore, PATH_KEY_ID_PREFIX), secretKey, secretKey); assertThrows(BadPaddingException.class, () -> bucketPathEncryptionService.decrypt(secretKeyIDWithKey, @@ -105,7 +105,7 @@ void testFailEncryptPathWithTextPath() { ); SecretKeyIDWithKey secretKeyIDWithKey = new SecretKeyIDWithKey( - KeystoreUtil.keyIdByPrefix(keyStore, PATH_KEY_ID_PREFIX), secretKey, secretKey, new Counter()); + KeystoreUtil.keyIdByPrefix(keyStore, PATH_KEY_ID_PREFIX), secretKey, secretKey); assertThrows(IllegalBlockSizeException.class, () -> bucketPathEncryptionService.decrypt(secretKeyIDWithKey, diff --git a/datasafe-privatestore/datasafe-privatestore-impl/src/test/java/de/adorsys/datasafe/privatestore/impl/actions/WriteToPrivateImplTest.java b/datasafe-privatestore/datasafe-privatestore-impl/src/test/java/de/adorsys/datasafe/privatestore/impl/actions/WriteToPrivateImplTest.java index 47857481a..a3fe8243b 100644 --- a/datasafe-privatestore/datasafe-privatestore-impl/src/test/java/de/adorsys/datasafe/privatestore/impl/actions/WriteToPrivateImplTest.java +++ b/datasafe-privatestore/datasafe-privatestore-impl/src/test/java/de/adorsys/datasafe/privatestore/impl/actions/WriteToPrivateImplTest.java @@ -4,7 +4,6 @@ import de.adorsys.datasafe.encrypiton.api.document.EncryptedDocumentWriteService; import de.adorsys.datasafe.encrypiton.api.types.UserID; import de.adorsys.datasafe.encrypiton.api.types.UserIDAuth; -import de.adorsys.datasafe.encrypiton.api.types.keystore.Counter; import de.adorsys.datasafe.encrypiton.api.types.keystore.KeyID; import de.adorsys.datasafe.encrypiton.api.types.keystore.ReadKeyPassword; import de.adorsys.datasafe.encrypiton.api.types.keystore.SecretKeyIDWithKey; @@ -64,7 +63,7 @@ class WriteToPrivateImplTest extends BaseMockitoTest { @BeforeEach void init() { - this.secretKeyIDWithKey = new SecretKeyIDWithKey(new KeyID(""), secretKey, secretCrtKey, new Counter()); + this.secretKeyIDWithKey = new SecretKeyIDWithKey(new KeyID(""), secretKey, secretCrtKey); } @Test diff --git a/datasafe-test-storages/src/main/java/de/adorsys/datasafe/teststorage/WithStorageProvider.java b/datasafe-test-storages/src/main/java/de/adorsys/datasafe/teststorage/WithStorageProvider.java index ff1e06c8f..ee16a859f 100644 --- a/datasafe-test-storages/src/main/java/de/adorsys/datasafe/teststorage/WithStorageProvider.java +++ b/datasafe-test-storages/src/main/java/de/adorsys/datasafe/teststorage/WithStorageProvider.java @@ -186,10 +186,10 @@ protected static Stream allDefaultStorages() { @ValueSource protected static Stream allStorages() { return Stream.of( - fs()//, - //minio(), - //cephVersioned(), - //s3() + fs(), + minio(), + cephVersioned(), + s3() ).filter(Objects::nonNull); } From 44d2a554c728d84194d1e6345cc4f8027de4063c Mon Sep 17 00:00:00 2001 From: Ihor Yatsenko Date: Sat, 7 Sep 2019 10:24:47 +0300 Subject: [PATCH 053/255] DOC-239: fixed tests --- .../api/types/keystore/KeyStoreCreationConfig.java | 1 - .../encrypiton/impl/keystore/KeyStoreServiceTest.java | 6 +++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/datasafe-encryption/datasafe-encryption-api/src/main/java/de/adorsys/datasafe/encrypiton/api/types/keystore/KeyStoreCreationConfig.java b/datasafe-encryption/datasafe-encryption-api/src/main/java/de/adorsys/datasafe/encrypiton/api/types/keystore/KeyStoreCreationConfig.java index 7a494658c..ddf31dde0 100644 --- a/datasafe-encryption/datasafe-encryption-api/src/main/java/de/adorsys/datasafe/encrypiton/api/types/keystore/KeyStoreCreationConfig.java +++ b/datasafe-encryption/datasafe-encryption-api/src/main/java/de/adorsys/datasafe/encrypiton/api/types/keystore/KeyStoreCreationConfig.java @@ -12,7 +12,6 @@ public class KeyStoreCreationConfig { public static final String PATH_KEY_ID_PREFIX = "PATH_SECRET"; public static final String PATH_KEY_ID_PREFIX_CRT = "PATH_SECRET_CRT_"; - //public static final String PATH_KEY_ID_PREFIX_CRT = "PATH_CRT_KEY_"; public static final String DOCUMENT_KEY_ID_PREFIX = "PRIVATE_SECRET"; private final int encKeyNumber; diff --git a/datasafe-encryption/datasafe-encryption-impl/src/test/java/de/adorsys/datasafe/encrypiton/impl/keystore/KeyStoreServiceTest.java b/datasafe-encryption/datasafe-encryption-impl/src/test/java/de/adorsys/datasafe/encrypiton/impl/keystore/KeyStoreServiceTest.java index 6aaf5c948..5822a132b 100644 --- a/datasafe-encryption/datasafe-encryption-impl/src/test/java/de/adorsys/datasafe/encrypiton/impl/keystore/KeyStoreServiceTest.java +++ b/datasafe-encryption/datasafe-encryption-impl/src/test/java/de/adorsys/datasafe/encrypiton/impl/keystore/KeyStoreServiceTest.java @@ -43,8 +43,8 @@ void createKeyStore() throws Exception { Assertions.assertNotNull(keyStore); List list = Collections.list(keyStore.aliases()); - // One additional secret key being generated for path encryption and one for private doc encryption. - Assertions.assertEquals(3, list.size()); + // Two additional secret key(key and counter key) being generated for path encryption and one for private doc encryption. + Assertions.assertEquals(4, list.size()); Assertions.assertEquals("UBER", keyStore.getType()); Assertions.assertEquals(Security.getProvider("BC"), keyStore.getProvider()); @@ -56,7 +56,7 @@ void createKeyStoreEmptyConfig() throws Exception { Assertions.assertNotNull(keyStore); List list = Collections.list(keyStore.aliases()); // One additional secret key being generated for path encryption and one for private doc encryption. - Assertions.assertEquals(12, list.size()); + Assertions.assertEquals(13, list.size()); } @Test From de0fc5160260da80c65066264e4c2bc56a2e32fc Mon Sep 17 00:00:00 2001 From: Ihor Yatsenko Date: Sun, 8 Sep 2019 17:34:31 +0300 Subject: [PATCH 054/255] DOC-239: fixed test --- .../de/adorsys/datasafe/business/impl/e2e/KeystoreE2ETest.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/KeystoreE2ETest.java b/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/KeystoreE2ETest.java index bb8e7edca..0f844f11a 100644 --- a/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/KeystoreE2ETest.java +++ b/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/KeystoreE2ETest.java @@ -57,8 +57,7 @@ void testDefaultKeystoreHasProperKeys() { new ReadStorePassword(STORE_PAZZWORD) ); - assertThat(aliases(keyStore)).filteredOn(it -> it.matches(PATH_KEY_ID_PREFIX + ".+")).hasSize(1); - assertThat(aliases(keyStore)).filteredOn(it -> it.matches(DOCUMENT_KEY_ID_PREFIX + ".+")).hasSize(1); + assertThat(aliases(keyStore)).filteredOn(it -> it.matches(PATH_KEY_ID_PREFIX + ".+")).hasSize(2); } @SneakyThrows From 38c8fc4fa9bdfb10e01a2f8d48f502c59f896f86 Mon Sep 17 00:00:00 2001 From: Ihor Yatsenko Date: Mon, 9 Sep 2019 14:44:22 +0300 Subject: [PATCH 055/255] DOC-239: fixed test --- .../framework/BaseRandomActions.java | 52 +++++++++++++------ 1 file changed, 35 insertions(+), 17 deletions(-) diff --git a/datasafe-long-run-tests/datasafe-business-tests-random-actions/src/test/java/de/adorsys/datasafe/business/impl/e2e/randomactions/framework/BaseRandomActions.java b/datasafe-long-run-tests/datasafe-business-tests-random-actions/src/test/java/de/adorsys/datasafe/business/impl/e2e/randomactions/framework/BaseRandomActions.java index a811a3b0f..da46fd9ca 100644 --- a/datasafe-long-run-tests/datasafe-business-tests-random-actions/src/test/java/de/adorsys/datasafe/business/impl/e2e/randomactions/framework/BaseRandomActions.java +++ b/datasafe-long-run-tests/datasafe-business-tests-random-actions/src/test/java/de/adorsys/datasafe/business/impl/e2e/randomactions/framework/BaseRandomActions.java @@ -42,14 +42,15 @@ public abstract class BaseRandomActions extends WithStorageProvider { public static final String DISABLE_RANDOM_ACTIONS_TEST = "DISABLE_RANDOM_ACTIONS_TEST"; + public static final String ENABLE_MULTI_BUCKET_TEST = "ENABLE_MULTI_BUCKET_TEST"; private final Logger log = LoggerFactory.getLogger(getClass()); private static final int KILOBYTE_TO_BYTE = 1024; private static final long TIMEOUT = 30L; - private static String THREADS = readPropOrEnv("THREADS", "8"); - private static String FILE_SIZES = readPropOrEnv("FILE_SIZES", "10240"); // in KB + private static String THREADS = readPropOrEnv("THREADS", "2, 4, 8"); + private static String FILE_SIZES = readPropOrEnv("FILE_SIZES", "100, 1024, 10240"); // in KB private static final Set THREAD_COUNT = ImmutableSet.copyOf( Stream.of(THREADS.split(",")).map(String::trim) @@ -61,6 +62,11 @@ public abstract class BaseRandomActions extends WithStorageProvider { .mapToInt(Integer::parseInt).boxed().collect(Collectors.toList()) ); + private static final List STORAGE_PROVIDERS = + Arrays.asList(readPropOrEnv("STORAGE_PROVIDERS", "MINIO").split(",")); + + private static final String FIXTURE_SIZE = readPropOrEnv("FIXTURE_SIZE", "SMALL"); + @BeforeEach void prepare() { // Enable logging obfuscation @@ -68,20 +74,16 @@ void prepare() { System.setProperty("SECURE_SENSITIVE", "on"); } - protected Fixture smallSimpleDocusafeAdapterFixture() { - return fixture("fixture/fixture_simple_datasafe_200_ops.json"); - } - - protected Fixture smallFixture() { - return fixture("fixture/fixture_200_ops.json"); - } - - protected Fixture mediumFixture() { - return fixture("fixture/fixture_1000_ops.json"); + protected Fixture getFixture() { + switch(FIXTURE_SIZE) { + case "MEDIUM" : return fixture("fixture/fixture_1000_ops.json"); + case "BIG" : return fixture("fixture/fixture_10000_ops.json"); + default : return fixture("fixture/fixture_200_ops.json"); + } } - protected Fixture bigFixture() { - return fixture("fixture/fixture_10000_ops.json"); + protected Fixture smallSimpleDocusafeAdapterFixture() { + return fixture("fixture/fixture_simple_datasafe_200_ops.json"); } @SneakyThrows @@ -94,14 +96,30 @@ protected Fixture fixture(String path) { } @ValueSource - protected static Stream actionsOnSoragesAndThreadsAndFilesizes() { + protected static Stream actionsOnStoragesAndThreadsAndFilesizes() { return Sets.cartesianProduct( - Collections.singleton(minio()), + getStorageDescriptors(), THREAD_COUNT, FILE_SIZE_K_BYTES ).stream().map(it -> Arguments.of(it.get(0), it.get(1), it.get(2))); } + private static Set getStorageDescriptors() { + return STORAGE_PROVIDERS.stream().map(it -> { + switch (it) { + case "AMAZON": + return s3(); + case "MINIO": + return minio(); + case "CEPH": + return cephVersioned(); + case "FILESYSTEM": + return fs(); + } + return null; + }).filter(Objects::nonNull).collect(Collectors.toSet()); + } + protected void executeTest( Fixture fixture, StorageDescriptorName storageName, @@ -271,4 +289,4 @@ private static Operation executionTaggedOperation(String execId, Operation opera private static String execUserId(String execId, String userId) { return execId + "--" + userId; } -} +} \ No newline at end of file From 15ecc20233792ef802dc4b4e5686c9ecbcdc9af8 Mon Sep 17 00:00:00 2001 From: Ihor Yatsenko Date: Mon, 9 Sep 2019 15:09:03 +0300 Subject: [PATCH 056/255] DOC-239: reduce code coverage minimum level --- last-module-codecoverage-check/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/last-module-codecoverage-check/pom.xml b/last-module-codecoverage-check/pom.xml index d9b586a8b..ff94b3b4e 100644 --- a/last-module-codecoverage-check/pom.xml +++ b/last-module-codecoverage-check/pom.xml @@ -188,7 +188,7 @@ lowerlimit - 90 + 85 outputdir From b69a5f06e632645de024a0c02dd1e0176b17f56d Mon Sep 17 00:00:00 2001 From: Ihor Yatsenko Date: Tue, 10 Sep 2019 13:58:25 +0300 Subject: [PATCH 057/255] DOC-239: Clean up code according to review notes --- .../directory/DefaultCredentialsModule.java | 4 +- .../DefaultPathEncryptionModule.java | 2 +- .../keys/DocumentKeyStoreOperations.java | 4 +- .../api/profile/keys/PublicKeyService.java | 4 +- .../keys/DFSPrivateKeyServiceImpl.java | 27 ++++++++--- .../profile/keys/DFSPublicKeyServiceImpl.java | 8 ++-- .../profile/keys/DefaultKeyStoreCache.java | 6 +-- .../keys/DocumentKeyStoreOperationsImpl.java | 2 +- .../impl/profile/keys/KeyStoreCache.java | 4 +- .../ProfileRegistrationServiceImpl.java | 4 +- .../cmsencryption/CMSEncryptionService.java | 4 +- .../EncryptedDocumentWriteService.java | 4 +- .../api/keystore/KeyStoreService.java | 2 +- ...try.java => PublicKeyIDWithPublicKey.java} | 2 +- .../datasafe-encryption-impl/pom.xml | 17 ++----- .../CMSEncryptionServiceImpl.java | 4 +- .../document/CMSDocumentWriteService.java | 4 +- .../impl/keystore/KeyStoreServiceImpl.java | 6 +-- .../DefaultPathDigestConfig.java | 23 ---------- ...ava => DefaultPathEncryptorDecryptor.java} | 12 +++-- ...yptor.java => PathEncryptorDecryptor.java} | 9 ++-- .../SymmetricPathEncryptionServiceImpl.java | 19 +++----- .../CmsEncryptionServiceImplTest.java | 46 +++++++++---------- .../impl/keystore/KeyStoreServiceTest.java | 2 +- ...ymmetricPathEncryptionServiceImplTest.java | 9 ++-- .../api/actions/WriteToInboxImplTest.java | 6 +-- .../impl/SwitchableCmsEncryptionImpl.java | 4 +- last-module-codecoverage-check/pom.xml | 2 +- pom.xml | 1 + 29 files changed, 109 insertions(+), 132 deletions(-) rename datasafe-encryption/datasafe-encryption-api/src/main/java/de/adorsys/datasafe/encrypiton/api/types/keystore/{PublicKeyEntry.java => PublicKeyIDWithPublicKey.java} (92%) delete mode 100644 datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/pathencryption/DefaultPathDigestConfig.java rename datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/pathencryption/{DefaultPathEncryptor.java => DefaultPathEncryptorDecryptor.java} (70%) rename datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/pathencryption/{PathEncryptor.java => PathEncryptorDecryptor.java} (66%) diff --git a/datasafe-business/src/main/java/de/adorsys/datasafe/business/impl/directory/DefaultCredentialsModule.java b/datasafe-business/src/main/java/de/adorsys/datasafe/business/impl/directory/DefaultCredentialsModule.java index 9c35df28b..c8eb88cf2 100644 --- a/datasafe-business/src/main/java/de/adorsys/datasafe/business/impl/directory/DefaultCredentialsModule.java +++ b/datasafe-business/src/main/java/de/adorsys/datasafe/business/impl/directory/DefaultCredentialsModule.java @@ -13,7 +13,7 @@ import de.adorsys.datasafe.directory.impl.profile.dfs.BucketAccessServiceImplRuntimeDelegatable; import de.adorsys.datasafe.directory.impl.profile.keys.*; import de.adorsys.datasafe.encrypiton.api.types.UserID; -import de.adorsys.datasafe.encrypiton.api.types.keystore.PublicKeyEntry; +import de.adorsys.datasafe.encrypiton.api.types.keystore.PublicKeyIDWithPublicKey; import de.adorsys.datasafe.types.api.context.overrides.OverridesRegistry; import javax.annotation.Nullable; @@ -46,7 +46,7 @@ static KeyStoreCache keyStoreCache(@Nullable OverridesRegistry registry) { .build(); // These are actually static, so we can afford longer expiry time - Supplier>> cachePubKeys = () -> CacheBuilder.newBuilder() + Supplier>> cachePubKeys = () -> CacheBuilder.newBuilder() .initialCapacity(1000) .expireAfterWrite(60, TimeUnit.MINUTES) .build(); diff --git a/datasafe-business/src/main/java/de/adorsys/datasafe/business/impl/pathencryption/DefaultPathEncryptionModule.java b/datasafe-business/src/main/java/de/adorsys/datasafe/business/impl/pathencryption/DefaultPathEncryptionModule.java index 8647e0f8b..0e703de4f 100644 --- a/datasafe-business/src/main/java/de/adorsys/datasafe/business/impl/pathencryption/DefaultPathEncryptionModule.java +++ b/datasafe-business/src/main/java/de/adorsys/datasafe/business/impl/pathencryption/DefaultPathEncryptionModule.java @@ -25,7 +25,7 @@ static DefaultPathDigestConfig digestConfig() { * Default path encryption that uses Base64-urlsafe path serialization */ @Binds - abstract PathEncryptor config(DefaultPathEncryptorRuntimeDelegatable config); + abstract PathEncryptorDecryptor config(DefaultPathEncryptorDecryptorRuntimeDelegatable config); /** * By default simply use diff --git a/datasafe-directory/datasafe-directory-api/src/main/java/de/adorsys/datasafe/directory/api/profile/keys/DocumentKeyStoreOperations.java b/datasafe-directory/datasafe-directory-api/src/main/java/de/adorsys/datasafe/directory/api/profile/keys/DocumentKeyStoreOperations.java index ef95b99c0..48e15a33c 100644 --- a/datasafe-directory/datasafe-directory-api/src/main/java/de/adorsys/datasafe/directory/api/profile/keys/DocumentKeyStoreOperations.java +++ b/datasafe-directory/datasafe-directory-api/src/main/java/de/adorsys/datasafe/directory/api/profile/keys/DocumentKeyStoreOperations.java @@ -1,7 +1,7 @@ package de.adorsys.datasafe.directory.api.profile.keys; import de.adorsys.datasafe.encrypiton.api.types.UserIDAuth; -import de.adorsys.datasafe.encrypiton.api.types.keystore.PublicKeyEntry; +import de.adorsys.datasafe.encrypiton.api.types.keystore.PublicKeyIDWithPublicKey; import de.adorsys.datasafe.encrypiton.api.types.keystore.ReadKeyPassword; import java.security.Key; @@ -19,7 +19,7 @@ public interface DocumentKeyStoreOperations { * @param forUser Keystore owner * @return Created public keys from keystore. */ - List createAndWriteKeyStore(UserIDAuth forUser); + List createAndWriteKeyStore(UserIDAuth forUser); /** * Updates ReadKeyPassword for users' keystore. Clears ALL cached keystores. diff --git a/datasafe-directory/datasafe-directory-api/src/main/java/de/adorsys/datasafe/directory/api/profile/keys/PublicKeyService.java b/datasafe-directory/datasafe-directory-api/src/main/java/de/adorsys/datasafe/directory/api/profile/keys/PublicKeyService.java index cb2c45cad..d0dc4c158 100644 --- a/datasafe-directory/datasafe-directory-api/src/main/java/de/adorsys/datasafe/directory/api/profile/keys/PublicKeyService.java +++ b/datasafe-directory/datasafe-directory-api/src/main/java/de/adorsys/datasafe/directory/api/profile/keys/PublicKeyService.java @@ -1,7 +1,7 @@ package de.adorsys.datasafe.directory.api.profile.keys; import de.adorsys.datasafe.encrypiton.api.types.UserID; -import de.adorsys.datasafe.encrypiton.api.types.keystore.PublicKeyEntry; +import de.adorsys.datasafe.encrypiton.api.types.keystore.PublicKeyIDWithPublicKey; /** * Acts as a public keys database. @@ -13,5 +13,5 @@ public interface PublicKeyService { * @param forUser User who owns public key (and has its private key pair) * @return Public key for document sharing. */ - PublicKeyEntry publicKey(UserID forUser); + PublicKeyIDWithPublicKey publicKey(UserID forUser); } diff --git a/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/keys/DFSPrivateKeyServiceImpl.java b/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/keys/DFSPrivateKeyServiceImpl.java index 2c97fd795..3decd3405 100644 --- a/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/keys/DFSPrivateKeyServiceImpl.java +++ b/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/keys/DFSPrivateKeyServiceImpl.java @@ -37,15 +37,13 @@ public DFSPrivateKeyServiceImpl(DocumentKeyStoreOperations keyStoreOper) { */ @Override public SecretKeyIDWithKey pathEncryptionSecretKey(UserIDAuth forUser) { - List keyIds = keyStoreOper.readAliases(forUser).stream() - .filter(it -> it.startsWith(PATH_KEY_ID_PREFIX) || it.startsWith(PATH_KEY_ID_PREFIX_CRT)) - .map(KeyID::new) - .collect(Collectors.toList()); + List secretKeyIds = getSecretKeyIds(forUser); - Map keys = keysByIds(forUser, keyIds.stream().map(it -> it.getValue()).collect(Collectors.toSet())); + Map keys = keysByIds(forUser, secretKeyIds.stream() + .map(it -> it.getValue()).collect(Collectors.toSet())); - String secretPathKeyId = keys.keySet().stream().filter(it -> it.startsWith(PATH_KEY_ID_PREFIX)).findFirst().get(); - String secretPathCrtKeyId = keys.keySet().stream().filter(it -> it.startsWith(PATH_KEY_ID_PREFIX_CRT)).findFirst().get(); + String secretPathKeyId = getSecretPathKeyIdByPrefix(keys, PATH_KEY_ID_PREFIX); + String secretPathCrtKeyId = getSecretPathKeyIdByPrefix(keys, PATH_KEY_ID_PREFIX_CRT); return new SecretKeyIDWithKey( new KeyID(secretPathKeyId), @@ -53,6 +51,21 @@ public SecretKeyIDWithKey pathEncryptionSecretKey(UserIDAuth forUser) { (SecretKey) keyStoreOper.getKey(forUser, secretPathCrtKeyId)); } + private String getSecretPathKeyIdByPrefix(Map keys, String pathKeyIdPrefix) { + return keys.keySet() + .stream() + .filter(it -> it.startsWith(pathKeyIdPrefix)) + .findFirst() + .get(); + } + + private List getSecretKeyIds(UserIDAuth forUser) { + return keyStoreOper.readAliases(forUser).stream() + .filter(it -> it.startsWith(PATH_KEY_ID_PREFIX) || it.startsWith(PATH_KEY_ID_PREFIX_CRT)) + .map(KeyID::new) + .collect(Collectors.toList()); + } + /** * Reads document encryption secret key from DFS and caches the result. */ diff --git a/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/keys/DFSPublicKeyServiceImpl.java b/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/keys/DFSPublicKeyServiceImpl.java index b2facd983..ff24feda1 100644 --- a/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/keys/DFSPublicKeyServiceImpl.java +++ b/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/keys/DFSPublicKeyServiceImpl.java @@ -7,7 +7,7 @@ import de.adorsys.datasafe.directory.api.profile.operations.ProfileRetrievalService; import de.adorsys.datasafe.directory.impl.profile.serde.GsonSerde; import de.adorsys.datasafe.encrypiton.api.types.UserID; -import de.adorsys.datasafe.encrypiton.api.types.keystore.PublicKeyEntry; +import de.adorsys.datasafe.encrypiton.api.types.keystore.PublicKeyIDWithPublicKey; import de.adorsys.datasafe.storage.api.actions.StorageReadService; import de.adorsys.datasafe.types.api.context.annotations.RuntimeDelegate; import de.adorsys.datasafe.types.api.resource.AbsoluteLocation; @@ -45,7 +45,7 @@ public DFSPublicKeyServiceImpl(KeyStoreCache keystoreCache, * Reads users' public key from DFS and caches the result. */ @Override - public PublicKeyEntry publicKey(UserID forUser) { + public PublicKeyIDWithPublicKey publicKey(UserID forUser) { return keystoreCache.getPublicKeys().computeIfAbsent( forUser, id -> publicKeyList(forUser) @@ -53,14 +53,14 @@ public PublicKeyEntry publicKey(UserID forUser) { } @SneakyThrows - private List publicKeyList(UserID forUser) { + private List publicKeyList(UserID forUser) { AbsoluteLocation accessiblePublicKey = bucketAccessService.publicAccessFor( forUser, profiles.publicProfile(forUser).getPublicKeys().getResource() ); try (JsonReader is = new JsonReader(new InputStreamReader(readService.read(accessiblePublicKey)))) { - return serde.fromJson(is, new TypeToken>() {}.getType()); + return serde.fromJson(is, new TypeToken>() {}.getType()); } } } diff --git a/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/keys/DefaultKeyStoreCache.java b/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/keys/DefaultKeyStoreCache.java index 0147a433b..974c39e91 100644 --- a/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/keys/DefaultKeyStoreCache.java +++ b/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/keys/DefaultKeyStoreCache.java @@ -1,7 +1,7 @@ package de.adorsys.datasafe.directory.impl.profile.keys; import de.adorsys.datasafe.encrypiton.api.types.UserID; -import de.adorsys.datasafe.encrypiton.api.types.keystore.PublicKeyEntry; +import de.adorsys.datasafe.encrypiton.api.types.keystore.PublicKeyIDWithPublicKey; import de.adorsys.datasafe.types.api.context.annotations.RuntimeDelegate; import lombok.Getter; @@ -17,13 +17,13 @@ @RuntimeDelegate public class DefaultKeyStoreCache implements KeyStoreCache { - private final Map> publicKeys; + private final Map> publicKeys; private final Map keystore; private final Map storageAccess; @Inject public DefaultKeyStoreCache( - Map> publicKeys, + Map> publicKeys, Map keystore, Map storageAccess) { this.publicKeys = publicKeys; diff --git a/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/keys/DocumentKeyStoreOperationsImpl.java b/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/keys/DocumentKeyStoreOperationsImpl.java index 57edd2351..127d86c0d 100644 --- a/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/keys/DocumentKeyStoreOperationsImpl.java +++ b/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/keys/DocumentKeyStoreOperationsImpl.java @@ -73,7 +73,7 @@ public Set readAliases(UserIDAuth forUser) { @Override @SneakyThrows - public List createAndWriteKeyStore(UserIDAuth forUser) { + public List createAndWriteKeyStore(UserIDAuth forUser) { KeyStoreAuth auth = keystoreAuth(forUser, forUser.getReadKeyPassword()); KeyStore keystoreBlob = keyStoreService.createKeyStore( auth, diff --git a/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/keys/KeyStoreCache.java b/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/keys/KeyStoreCache.java index 6b31a01c3..eb4ad2905 100644 --- a/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/keys/KeyStoreCache.java +++ b/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/keys/KeyStoreCache.java @@ -1,7 +1,7 @@ package de.adorsys.datasafe.directory.impl.profile.keys; import de.adorsys.datasafe.encrypiton.api.types.UserID; -import de.adorsys.datasafe.encrypiton.api.types.keystore.PublicKeyEntry; +import de.adorsys.datasafe.encrypiton.api.types.keystore.PublicKeyIDWithPublicKey; import java.security.KeyStore; import java.util.List; @@ -15,7 +15,7 @@ public interface KeyStoreCache { /** * Cache for users' public keys */ - Map> getPublicKeys(); + Map> getPublicKeys(); /** * Cache for users' private/secret keys diff --git a/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/operations/actions/ProfileRegistrationServiceImpl.java b/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/operations/actions/ProfileRegistrationServiceImpl.java index 85870c53b..3ee10a623 100644 --- a/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/operations/actions/ProfileRegistrationServiceImpl.java +++ b/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/operations/actions/ProfileRegistrationServiceImpl.java @@ -10,7 +10,7 @@ import de.adorsys.datasafe.directory.api.types.UserPrivateProfile; import de.adorsys.datasafe.directory.impl.profile.serde.GsonSerde; import de.adorsys.datasafe.encrypiton.api.types.UserIDAuth; -import de.adorsys.datasafe.encrypiton.api.types.keystore.PublicKeyEntry; +import de.adorsys.datasafe.encrypiton.api.types.keystore.PublicKeyIDWithPublicKey; import de.adorsys.datasafe.storage.api.actions.StorageCheckService; import de.adorsys.datasafe.storage.api.actions.StorageWriteService; import de.adorsys.datasafe.types.api.context.annotations.RuntimeDelegate; @@ -120,7 +120,7 @@ public void registerUsingDefaults(UserIDAuth user) { @SneakyThrows private void publishPublicKeysIfNeeded(AbsoluteLocation publishTo, - List publicKeys) { + List publicKeys) { if (null != publishTo && !checkService.objectExists(access.withSystemAccess(publishTo))) { try (OutputStream os = writeService.write(WithCallback.noCallback(access.withSystemAccess(publishTo)))) { diff --git a/datasafe-encryption/datasafe-encryption-api/src/main/java/de/adorsys/datasafe/encrypiton/api/cmsencryption/CMSEncryptionService.java b/datasafe-encryption/datasafe-encryption-api/src/main/java/de/adorsys/datasafe/encrypiton/api/cmsencryption/CMSEncryptionService.java index bb4a5e6cc..6c051bd26 100644 --- a/datasafe-encryption/datasafe-encryption-api/src/main/java/de/adorsys/datasafe/encrypiton/api/cmsencryption/CMSEncryptionService.java +++ b/datasafe-encryption/datasafe-encryption-api/src/main/java/de/adorsys/datasafe/encrypiton/api/cmsencryption/CMSEncryptionService.java @@ -1,7 +1,7 @@ package de.adorsys.datasafe.encrypiton.api.cmsencryption; import de.adorsys.datasafe.encrypiton.api.types.keystore.KeyID; -import de.adorsys.datasafe.encrypiton.api.types.keystore.PublicKeyEntry; +import de.adorsys.datasafe.encrypiton.api.types.keystore.PublicKeyIDWithPublicKey; import javax.crypto.SecretKey; import java.io.InputStream; @@ -25,7 +25,7 @@ public interface CMSEncryptionService { * @return Encrypted stream that wraps {@code dataContentStream} * @apiNote Closes underlying stream when result is closed */ - OutputStream buildEncryptionOutputStream(OutputStream dataContentStream, Set publicKeys); + OutputStream buildEncryptionOutputStream(OutputStream dataContentStream, Set publicKeys); /** * Builds symmetrically encrypted stream. diff --git a/datasafe-encryption/datasafe-encryption-api/src/main/java/de/adorsys/datasafe/encrypiton/api/document/EncryptedDocumentWriteService.java b/datasafe-encryption/datasafe-encryption-api/src/main/java/de/adorsys/datasafe/encrypiton/api/document/EncryptedDocumentWriteService.java index 786ebd473..257dd77e9 100644 --- a/datasafe-encryption/datasafe-encryption-api/src/main/java/de/adorsys/datasafe/encrypiton/api/document/EncryptedDocumentWriteService.java +++ b/datasafe-encryption/datasafe-encryption-api/src/main/java/de/adorsys/datasafe/encrypiton/api/document/EncryptedDocumentWriteService.java @@ -1,6 +1,6 @@ package de.adorsys.datasafe.encrypiton.api.document; -import de.adorsys.datasafe.encrypiton.api.types.keystore.PublicKeyEntry; +import de.adorsys.datasafe.encrypiton.api.types.keystore.PublicKeyIDWithPublicKey; import de.adorsys.datasafe.encrypiton.api.types.keystore.SecretKeyIDWithKey; import de.adorsys.datasafe.types.api.callback.ResourceWriteCallback; import de.adorsys.datasafe.types.api.resource.AbsoluteLocation; @@ -22,7 +22,7 @@ public interface EncryptedDocumentWriteService { * @param recipientsWithInbox Map of (recipient public key - recipients' inbox) of users with whom to share file. * @return Sink where you can send unencrypted data that will be encrypted and stored */ - OutputStream write(Map recipientsWithInbox); + OutputStream write(Map recipientsWithInbox); /** * Writes and encrypts data using symmetric cryptography. diff --git a/datasafe-encryption/datasafe-encryption-api/src/main/java/de/adorsys/datasafe/encrypiton/api/keystore/KeyStoreService.java b/datasafe-encryption/datasafe-encryption-api/src/main/java/de/adorsys/datasafe/encrypiton/api/keystore/KeyStoreService.java index 5f105fa68..0b55e9638 100644 --- a/datasafe-encryption/datasafe-encryption-api/src/main/java/de/adorsys/datasafe/encrypiton/api/keystore/KeyStoreService.java +++ b/datasafe-encryption/datasafe-encryption-api/src/main/java/de/adorsys/datasafe/encrypiton/api/keystore/KeyStoreService.java @@ -56,7 +56,7 @@ KeyStore updateKeyStoreReadKeyPassword(KeyStore current, * @param keyStoreAccess Key to open keystore (only {@link KeyStoreAuth#getReadStorePassword()} is used) * @return List of public keys within the keystore */ - List getPublicKeys(KeyStoreAccess keyStoreAccess); + List getPublicKeys(KeyStoreAccess keyStoreAccess); /** * Reads private key from the keystore. diff --git a/datasafe-encryption/datasafe-encryption-api/src/main/java/de/adorsys/datasafe/encrypiton/api/types/keystore/PublicKeyEntry.java b/datasafe-encryption/datasafe-encryption-api/src/main/java/de/adorsys/datasafe/encrypiton/api/types/keystore/PublicKeyIDWithPublicKey.java similarity index 92% rename from datasafe-encryption/datasafe-encryption-api/src/main/java/de/adorsys/datasafe/encrypiton/api/types/keystore/PublicKeyEntry.java rename to datasafe-encryption/datasafe-encryption-api/src/main/java/de/adorsys/datasafe/encrypiton/api/types/keystore/PublicKeyIDWithPublicKey.java index 43a130608..e7c76caef 100644 --- a/datasafe-encryption/datasafe-encryption-api/src/main/java/de/adorsys/datasafe/encrypiton/api/types/keystore/PublicKeyEntry.java +++ b/datasafe-encryption/datasafe-encryption-api/src/main/java/de/adorsys/datasafe/encrypiton/api/types/keystore/PublicKeyIDWithPublicKey.java @@ -14,7 +14,7 @@ @ToString(of = "keyID") @RequiredArgsConstructor @EqualsAndHashCode -public class PublicKeyEntry { +public class PublicKeyIDWithPublicKey { private final KeyID keyID; private final PublicKey publicKey; } diff --git a/datasafe-encryption/datasafe-encryption-impl/pom.xml b/datasafe-encryption/datasafe-encryption-impl/pom.xml index 9ea2be891..c1d6b4d77 100644 --- a/datasafe-encryption/datasafe-encryption-impl/pom.xml +++ b/datasafe-encryption/datasafe-encryption-impl/pom.xml @@ -69,6 +69,11 @@ jsr305 provided + + org.cryptomator + siv-mode + ${siv-mode.version} + org.junit.jupiter @@ -92,17 +97,5 @@ test-jar test - - - org.cryptomator - siv-mode - 1.3.1 - test - - - org.cryptomator - siv-mode - 1.3.1 - diff --git a/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/cmsencryption/CMSEncryptionServiceImpl.java b/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/cmsencryption/CMSEncryptionServiceImpl.java index a164dbfc3..985524817 100644 --- a/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/cmsencryption/CMSEncryptionServiceImpl.java +++ b/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/cmsencryption/CMSEncryptionServiceImpl.java @@ -2,7 +2,7 @@ import de.adorsys.datasafe.encrypiton.api.cmsencryption.CMSEncryptionService; import de.adorsys.datasafe.encrypiton.api.types.keystore.KeyID; -import de.adorsys.datasafe.encrypiton.api.types.keystore.PublicKeyEntry; +import de.adorsys.datasafe.encrypiton.api.types.keystore.PublicKeyIDWithPublicKey; import de.adorsys.datasafe.encrypiton.impl.cmsencryption.decryptors.Decryptor; import de.adorsys.datasafe.encrypiton.impl.cmsencryption.decryptors.DecryptorFactory; import de.adorsys.datasafe.encrypiton.impl.cmsencryption.exceptions.DecryptionException; @@ -52,7 +52,7 @@ public CMSEncryptionServiceImpl(CMSEncryptionConfig encryptionConfig) { @Override @SneakyThrows public OutputStream buildEncryptionOutputStream(OutputStream dataContentStream, - Set publicKeys) { + Set publicKeys) { return streamEncrypt( dataContentStream, publicKeys.stream().map( diff --git a/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/document/CMSDocumentWriteService.java b/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/document/CMSDocumentWriteService.java index 234b8f1b2..ce592ddd7 100644 --- a/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/document/CMSDocumentWriteService.java +++ b/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/document/CMSDocumentWriteService.java @@ -3,7 +3,7 @@ import com.google.common.collect.ImmutableList; import de.adorsys.datasafe.encrypiton.api.cmsencryption.CMSEncryptionService; import de.adorsys.datasafe.encrypiton.api.document.EncryptedDocumentWriteService; -import de.adorsys.datasafe.encrypiton.api.types.keystore.PublicKeyEntry; +import de.adorsys.datasafe.encrypiton.api.types.keystore.PublicKeyIDWithPublicKey; import de.adorsys.datasafe.encrypiton.api.types.keystore.SecretKeyIDWithKey; import de.adorsys.datasafe.storage.api.actions.StorageWriteService; import de.adorsys.datasafe.types.api.callback.ResourceWriteCallback; @@ -41,7 +41,7 @@ public CMSDocumentWriteService(StorageWriteService writeService, } @Override - public OutputStream write(Map recipientsWithInbox) { + public OutputStream write(Map recipientsWithInbox) { int maxChunkSize = recipientsWithInbox.values().stream() .map(writeService::flushChunkSize) diff --git a/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/keystore/KeyStoreServiceImpl.java b/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/keystore/KeyStoreServiceImpl.java index 62182275f..535fc5481 100644 --- a/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/keystore/KeyStoreServiceImpl.java +++ b/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/keystore/KeyStoreServiceImpl.java @@ -102,9 +102,9 @@ public KeyStore updateKeyStoreReadKeyPassword(KeyStore current, @Override @SneakyThrows - public List getPublicKeys(KeyStoreAccess keyStoreAccess) { + public List getPublicKeys(KeyStoreAccess keyStoreAccess) { log.debug("get public keys"); - List result = new ArrayList<>(); + List result = new ArrayList<>(); KeyStore keyStore = keyStoreAccess.getKeyStore(); for (Enumeration keyAliases = keyStore.aliases(); keyAliases.hasMoreElements(); ) { final String keyAlias = keyAliases.nextElement(); @@ -114,7 +114,7 @@ public List getPublicKeys(KeyStoreAccess keyStoreAccess) { // digitalSignature (0), nonRepudiation (1), keyEncipherment (2), dataEncipherment (3), // keyAgreement (4), keyCertSign (5), cRLSign (6), encipherOnly (7), decipherOnly (8) if (keyUsage[2] || keyUsage[3] || keyUsage[4]) { - result.add(new PublicKeyEntry(new KeyID(keyAlias), cert.getPublicKey())); + result.add(new PublicKeyIDWithPublicKey(new KeyID(keyAlias), cert.getPublicKey())); } } return result; diff --git a/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/pathencryption/DefaultPathDigestConfig.java b/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/pathencryption/DefaultPathDigestConfig.java deleted file mode 100644 index 7f9e502b9..000000000 --- a/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/pathencryption/DefaultPathDigestConfig.java +++ /dev/null @@ -1,23 +0,0 @@ -package de.adorsys.datasafe.encrypiton.impl.pathencryption; - -import lombok.AllArgsConstructor; -import lombok.Data; - -/** - * Configures document path encryption digest. - * By default using AES in GCM mode with SIV(synthetic input vector) - */ -@Data -@AllArgsConstructor -public class DefaultPathDigestConfig { - - String messageDigest; - String algorithm; - int shaKeyPartSize; - - public DefaultPathDigestConfig() { - this.messageDigest = "SHA-256"; - this.algorithm = "AES-GCM-SIV"; - this.shaKeyPartSize = 16; - } -} diff --git a/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/pathencryption/DefaultPathEncryptor.java b/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/pathencryption/DefaultPathEncryptorDecryptor.java similarity index 70% rename from datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/pathencryption/DefaultPathEncryptor.java rename to datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/pathencryption/DefaultPathEncryptorDecryptor.java index 53569c10b..d64776689 100644 --- a/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/pathencryption/DefaultPathEncryptor.java +++ b/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/pathencryption/DefaultPathEncryptorDecryptor.java @@ -8,17 +8,19 @@ import javax.inject.Inject; /** - * Default path encryption/decryption that uses encryption specified by {@link DefaultPathDigestConfig} and - * encodes resulting bytes using Base64-urlsafe encoding. + * Default path encryption/decryption that uses AES-GCM-SIV mode. + * + * @see RFC-845 + * Using @see SIV-MODE library for encryption and decryption + * Encodes resulting bytes using Base64-urlsafe encoding. */ @RuntimeDelegate -public class DefaultPathEncryptor implements PathEncryptor { +public class DefaultPathEncryptorDecryptor implements PathEncryptorDecryptor { - //TODO add link to RFC and Library on github private final SivMode sivMode; @Inject - public DefaultPathEncryptor(){ + public DefaultPathEncryptorDecryptor(){ sivMode = new SivMode(); } diff --git a/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/pathencryption/PathEncryptor.java b/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/pathencryption/PathEncryptorDecryptor.java similarity index 66% rename from datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/pathencryption/PathEncryptor.java rename to datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/pathencryption/PathEncryptorDecryptor.java index f8122bfa9..143b5ab8d 100644 --- a/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/pathencryption/PathEncryptor.java +++ b/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/pathencryption/PathEncryptorDecryptor.java @@ -2,20 +2,17 @@ import de.adorsys.datasafe.encrypiton.api.types.keystore.SecretKeyIDWithKey; -/** - * Path encryption cipher configurer. - */ -public interface PathEncryptor { +public interface PathEncryptorDecryptor { /** * @param secretKeyEntry Use this secret key - * @return Path encryption cipher that uses {@code secretKey} + * @return Encrypted path using {@code secretKey} (secretKey and counterSecretKey) */ byte[] encrypt(SecretKeyIDWithKey secretKeyEntry, byte[] rawData); /** * @param secretKey Use this secret key - * @return Path decryption cipher that uses {@code secretKey} + * @return Decrypted path using {@code secretKey} */ byte[] decrypt(SecretKeyIDWithKey secretKey, byte[] encryptedData); diff --git a/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/pathencryption/SymmetricPathEncryptionServiceImpl.java b/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/pathencryption/SymmetricPathEncryptionServiceImpl.java index ca8f7c818..1c4e1d14c 100644 --- a/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/pathencryption/SymmetricPathEncryptionServiceImpl.java +++ b/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/pathencryption/SymmetricPathEncryptionServiceImpl.java @@ -6,7 +6,6 @@ import de.adorsys.datasafe.types.api.resource.Uri; import lombok.SneakyThrows; import lombok.extern.slf4j.Slf4j; -import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.tuple.ImmutablePair; import javax.inject.Inject; @@ -29,27 +28,23 @@ public class SymmetricPathEncryptionServiceImpl implements SymmetricPathEncrypti private static final String PATH_SEPARATOR = "/"; - private final PathEncryptor pathEncryptor; + private final PathEncryptorDecryptor pathEncryptorDecryptor; private final Function, byte[]> encryptAndEncode; private final Function, byte[]> decryptAndDecode; - public SymmetricPathEncryptionServiceImpl(PathEncryptor pathEncryptor) { - this.pathEncryptor = pathEncryptor; + @Inject + public SymmetricPathEncryptionServiceImpl(PathEncryptorDecryptor pathEncryptorDecryptor) { + this.pathEncryptorDecryptor = pathEncryptorDecryptor; - encryptAndEncode = keyEntryEncryptedDataPair -> encode(pathEncryptor.encrypt( + encryptAndEncode = keyEntryEncryptedDataPair -> encode(pathEncryptorDecryptor.encrypt( keyEntryEncryptedDataPair.left, keyEntryEncryptedDataPair.right )); - decryptAndDecode = keyEntryDecryptedDataPair -> pathEncryptor.decrypt( + decryptAndDecode = keyEntryDecryptedDataPair -> pathEncryptorDecryptor.decrypt( keyEntryDecryptedDataPair.left, decode(keyEntryDecryptedDataPair.right) ); } - @Inject - public SymmetricPathEncryptionServiceImpl() { - this(new DefaultPathEncryptor()); - } - /** * Encrypts each URI segment separately and composes them back in same order. */ @@ -119,7 +114,7 @@ private static Uri processURIparts( // Resulting value of `path` is URL-safe return new Uri( URI.create( - Arrays.stream(StringUtils.split(path, PATH_SEPARATOR)) + Arrays.stream(path.split(PATH_SEPARATOR)) .map(uriPart -> process.apply(new ImmutablePair<>(secretKeyEntry, uriPart.getBytes(UTF_8)))) .map(String::new) // byte[] -> string .collect(Collectors.joining(PATH_SEPARATOR))) diff --git a/datasafe-encryption/datasafe-encryption-impl/src/test/java/de/adorsys/datasafe/encrypiton/impl/cmsencryption/CmsEncryptionServiceImplTest.java b/datasafe-encryption/datasafe-encryption-impl/src/test/java/de/adorsys/datasafe/encrypiton/impl/cmsencryption/CmsEncryptionServiceImplTest.java index e5347e415..879e3a230 100644 --- a/datasafe-encryption/datasafe-encryption-impl/src/test/java/de/adorsys/datasafe/encrypiton/impl/cmsencryption/CmsEncryptionServiceImplTest.java +++ b/datasafe-encryption/datasafe-encryption-impl/src/test/java/de/adorsys/datasafe/encrypiton/impl/cmsencryption/CmsEncryptionServiceImplTest.java @@ -87,20 +87,20 @@ void testCmsStreamEnvelopeEncryptAndDecryptTestWithMultipleRecipients() { inputStream, keyIds -> getKeys(keyIds, keyStoreAccess3))); } - private PublicKeyEntry getPublicKeyIDWithPublicKey(KeyStoreAccess keyStoreAccess) { + private PublicKeyIDWithPublicKey getPublicKeyIDWithPublicKey(KeyStoreAccess keyStoreAccess) { return keyStoreService.getPublicKeys(keyStoreAccess).stream().findFirst().get(); } @Test @SneakyThrows void cmsStreamEnvelopeEncryptAndDecryptTest() { - PublicKeyEntry publicKeyEntry = keyStoreService.getPublicKeys(keyStoreAccess).get(0); + PublicKeyIDWithPublicKey publicKeyIDWithPublicKey = keyStoreService.getPublicKeys(keyStoreAccess).get(0); ByteArrayOutputStream outputStream = new ByteArrayOutputStream(); OutputStream encryptionStream = cmsEncryptionService.buildEncryptionOutputStream(outputStream, - Collections.singleton(new PublicKeyEntry( - publicKeyEntry.getKeyID(), - publicKeyEntry.getPublicKey() + Collections.singleton(new PublicKeyIDWithPublicKey( + publicKeyIDWithPublicKey.getKeyID(), + publicKeyIDWithPublicKey.getPublicKey() )) ); @@ -121,7 +121,7 @@ void cmsStreamEnvelopeEncryptAndDecryptTest() { @Test @SneakyThrows void cmsStreamEnvelopeZeroKeyPairFailTest() { - PublicKeyEntry publicKeyEntry = keyStoreService.getPublicKeys(keyStoreAccess).get(0); + PublicKeyIDWithPublicKey publicKeyIDWithPublicKey = keyStoreService.getPublicKeys(keyStoreAccess).get(0); ByteArrayOutputStream outputStream = new ByteArrayOutputStream(); CMSEnvelopedDataStreamGenerator gen = new CMSEnvelopedDataStreamGenerator(); @@ -129,9 +129,9 @@ void cmsStreamEnvelopeZeroKeyPairFailTest() { .setProvider(BouncyCastleProvider.PROVIDER_NAME).build()); OutputStream encryptionStream = cmsEncryptionService.buildEncryptionOutputStream(outputStream, - Collections.singleton(new PublicKeyEntry( - publicKeyEntry.getKeyID(), - publicKeyEntry.getPublicKey() + Collections.singleton(new PublicKeyIDWithPublicKey( + publicKeyIDWithPublicKey.getKeyID(), + publicKeyIDWithPublicKey.getPublicKey() )) ); @@ -147,11 +147,11 @@ void cmsStreamEnvelopeZeroKeyPairFailTest() { @Test @SneakyThrows void cmsStreamEnvelopeTwoKeysPairFailTest() { - PublicKeyEntry publicKeyEntry = keyStoreService.getPublicKeys(keyStoreAccess).get(0); + PublicKeyIDWithPublicKey publicKeyIDWithPublicKey = keyStoreService.getPublicKeys(keyStoreAccess).get(0); ByteArrayOutputStream outputStream = new ByteArrayOutputStream(); - RecipientInfoGenerator recipientInfo1 = new JceKeyTransRecipientInfoGenerator("key1".getBytes(), publicKeyEntry.getPublicKey()); - RecipientInfoGenerator recipientInfo2 = new JceKeyTransRecipientInfoGenerator("key2".getBytes(), publicKeyEntry.getPublicKey()); + RecipientInfoGenerator recipientInfo1 = new JceKeyTransRecipientInfoGenerator("key1".getBytes(), publicKeyIDWithPublicKey.getPublicKey()); + RecipientInfoGenerator recipientInfo2 = new JceKeyTransRecipientInfoGenerator("key2".getBytes(), publicKeyIDWithPublicKey.getPublicKey()); CMSEnvelopedDataStreamGenerator gen = new CMSEnvelopedDataStreamGenerator(); gen.addRecipientInfoGenerator(recipientInfo1); @@ -160,9 +160,9 @@ void cmsStreamEnvelopeTwoKeysPairFailTest() { .setProvider(BouncyCastleProvider.PROVIDER_NAME).build()); OutputStream encryptionStream = cmsEncryptionService.buildEncryptionOutputStream(outputStream, - Collections.singleton(new PublicKeyEntry( - publicKeyEntry.getKeyID(), - publicKeyEntry.getPublicKey() + Collections.singleton(new PublicKeyIDWithPublicKey( + publicKeyIDWithPublicKey.getKeyID(), + publicKeyIDWithPublicKey.getPublicKey() )) ); @@ -180,12 +180,12 @@ void cmsStreamEnvelopeTwoKeysPairFailTest() { void cmsStreamEnvelopeOneKeyPairFailTest() { KeyStoreAccess keyStoreAccess = getKeyStoreAccess(); - PublicKeyEntry publicKeyEntry = keyStoreService.getPublicKeys(keyStoreAccess).get(0); + PublicKeyIDWithPublicKey publicKeyIDWithPublicKey = keyStoreService.getPublicKeys(keyStoreAccess).get(0); ByteArrayOutputStream outputStream = new ByteArrayOutputStream(); OutputStream encryptionStream = cmsEncryptionService.buildEncryptionOutputStream(outputStream, - Collections.singleton(new PublicKeyEntry( - publicKeyEntry.getKeyID(), - publicKeyEntry.getPublicKey() + Collections.singleton(new PublicKeyIDWithPublicKey( + publicKeyIDWithPublicKey.getKeyID(), + publicKeyIDWithPublicKey.getPublicKey() )) ); @@ -237,16 +237,16 @@ void cmsEnvelopeEncryptAndDecryptFileStreamTest() { generateTestFile(testFilePath, testFileSizeInBytes); log.info("Test file with size {}Mb generated: {}", testFileSizeInBytes / _1MbInBytes, testFilePath); - PublicKeyEntry publicKeyEntry = keyStoreService.getPublicKeys(keyStoreAccess).get(0); + PublicKeyIDWithPublicKey publicKeyIDWithPublicKey = keyStoreService.getPublicKeys(keyStoreAccess).get(0); File encryptedFile = new File(encryptedFilePath); FileOutputStream fosEnFile = new FileOutputStream(encryptedFile); OutputStream encryptionStream = cmsEncryptionService.buildEncryptionOutputStream( fosEnFile, - Collections.singleton(new PublicKeyEntry( - publicKeyEntry.getKeyID(), - publicKeyEntry.getPublicKey() + Collections.singleton(new PublicKeyIDWithPublicKey( + publicKeyIDWithPublicKey.getKeyID(), + publicKeyIDWithPublicKey.getPublicKey() )) ); diff --git a/datasafe-encryption/datasafe-encryption-impl/src/test/java/de/adorsys/datasafe/encrypiton/impl/keystore/KeyStoreServiceTest.java b/datasafe-encryption/datasafe-encryption-impl/src/test/java/de/adorsys/datasafe/encrypiton/impl/keystore/KeyStoreServiceTest.java index 5822a132b..a66c9384d 100644 --- a/datasafe-encryption/datasafe-encryption-impl/src/test/java/de/adorsys/datasafe/encrypiton/impl/keystore/KeyStoreServiceTest.java +++ b/datasafe-encryption/datasafe-encryption-impl/src/test/java/de/adorsys/datasafe/encrypiton/impl/keystore/KeyStoreServiceTest.java @@ -72,7 +72,7 @@ void createKeyStoreException() { void getPublicKeys() { KeyStore keyStore = keyStoreService.createKeyStore(keyStoreAuth, KeyStoreType.DEFAULT, null); KeyStoreAccess keyStoreAccess = new KeyStoreAccess(keyStore, keyStoreAuth); - List publicKeys = keyStoreService.getPublicKeys(keyStoreAccess); + List publicKeys = keyStoreService.getPublicKeys(keyStoreAccess); Assertions.assertEquals(5, publicKeys.size()); } diff --git a/datasafe-encryption/datasafe-encryption-impl/src/test/java/de/adorsys/datasafe/encrypiton/impl/pathencryption/SymmetricPathEncryptionServiceImplTest.java b/datasafe-encryption/datasafe-encryption-impl/src/test/java/de/adorsys/datasafe/encrypiton/impl/pathencryption/SymmetricPathEncryptionServiceImplTest.java index 26a938078..e1741420f 100644 --- a/datasafe-encryption/datasafe-encryption-impl/src/test/java/de/adorsys/datasafe/encrypiton/impl/pathencryption/SymmetricPathEncryptionServiceImplTest.java +++ b/datasafe-encryption/datasafe-encryption-impl/src/test/java/de/adorsys/datasafe/encrypiton/impl/pathencryption/SymmetricPathEncryptionServiceImplTest.java @@ -14,7 +14,6 @@ import javax.crypto.IllegalBlockSizeException; import javax.crypto.spec.SecretKeySpec; import java.net.URI; -import java.net.URISyntaxException; import java.security.KeyStore; import static de.adorsys.datasafe.encrypiton.api.types.keystore.KeyStoreCreationConfig.PATH_KEY_ID_PREFIX; @@ -25,7 +24,7 @@ class SymmetricPathEncryptionServiceImplTest extends BaseMockitoTest { private SymmetricPathEncryptionServiceImpl bucketPathEncryptionService = new SymmetricPathEncryptionServiceImpl( - new DefaultPathEncryptor() + new DefaultPathEncryptorDecryptor() ); private KeyStoreService keyStoreService = new KeyStoreServiceImpl(new DefaultPasswordBasedKeyConfig()); @@ -56,16 +55,16 @@ void testSuccessEncryptDecryptPath() { KeystoreUtil.keyIdByPrefix(keyStore, PATH_KEY_ID_PREFIX), secretKey, secretKeyCrt); Uri encrypted = bucketPathEncryptionService.encrypt(secretKeyIDWithKey, testURI); - log.debug("Encrypted path: {}"+ encrypted); + log.debug("Encrypted path: {}", encrypted); Uri decrypted = bucketPathEncryptionService.decrypt(secretKeyIDWithKey, encrypted); - log.debug("Decrypted path: {}"+ decrypted); + log.debug("Decrypted path: {}", decrypted); assertEquals(testPath, decrypted.toASCIIString()); } @Test - void testFailEncryptPathWithWrongKeyID() throws URISyntaxException { + void testFailEncryptPathWithWrongKeyID() { String testPath = "path/to/file/"; log.info("Test path: {}", testPath); diff --git a/datasafe-inbox/datasafe-inbox-impl/src/test/java/de/adorsys/datasafe/inbox/api/actions/WriteToInboxImplTest.java b/datasafe-inbox/datasafe-inbox-impl/src/test/java/de/adorsys/datasafe/inbox/api/actions/WriteToInboxImplTest.java index 24c18c9d9..d78f864a3 100644 --- a/datasafe-inbox/datasafe-inbox-impl/src/test/java/de/adorsys/datasafe/inbox/api/actions/WriteToInboxImplTest.java +++ b/datasafe-inbox/datasafe-inbox-impl/src/test/java/de/adorsys/datasafe/inbox/api/actions/WriteToInboxImplTest.java @@ -5,7 +5,7 @@ import de.adorsys.datasafe.encrypiton.api.document.EncryptedDocumentWriteService; import de.adorsys.datasafe.encrypiton.api.types.UserID; import de.adorsys.datasafe.encrypiton.api.types.keystore.KeyID; -import de.adorsys.datasafe.encrypiton.api.types.keystore.PublicKeyEntry; +import de.adorsys.datasafe.encrypiton.api.types.keystore.PublicKeyIDWithPublicKey; import de.adorsys.datasafe.inbox.impl.actions.WriteToInboxImpl; import de.adorsys.datasafe.types.api.actions.WriteRequest; import de.adorsys.datasafe.types.api.resource.AbsoluteLocation; @@ -34,7 +34,7 @@ class WriteToInboxImplTest extends BaseMockitoTest { private UserID auth = new UserID(""); - private PublicKeyEntry publicKeyWithId; + private PublicKeyIDWithPublicKey publicKeyWithId; @Mock private PublicKey publicKey; @@ -53,7 +53,7 @@ class WriteToInboxImplTest extends BaseMockitoTest { @BeforeEach void init() { - this.publicKeyWithId = new PublicKeyEntry(new KeyID(""), publicKey); + this.publicKeyWithId = new PublicKeyIDWithPublicKey(new KeyID(""), publicKey); } @Test diff --git a/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/main/java/de/adorsys/datasafe/simple/adapter/impl/SwitchableCmsEncryptionImpl.java b/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/main/java/de/adorsys/datasafe/simple/adapter/impl/SwitchableCmsEncryptionImpl.java index 967c3e9f7..990d59008 100644 --- a/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/main/java/de/adorsys/datasafe/simple/adapter/impl/SwitchableCmsEncryptionImpl.java +++ b/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/main/java/de/adorsys/datasafe/simple/adapter/impl/SwitchableCmsEncryptionImpl.java @@ -1,7 +1,7 @@ package de.adorsys.datasafe.simple.adapter.impl; import de.adorsys.datasafe.encrypiton.api.types.keystore.KeyID; -import de.adorsys.datasafe.encrypiton.api.types.keystore.PublicKeyEntry; +import de.adorsys.datasafe.encrypiton.api.types.keystore.PublicKeyIDWithPublicKey; import de.adorsys.datasafe.encrypiton.impl.cmsencryption.CMSEncryptionConfig; import de.adorsys.datasafe.encrypiton.impl.cmsencryption.CMSEncryptionServiceImpl; import lombok.extern.slf4j.Slf4j; @@ -27,7 +27,7 @@ public SwitchableCmsEncryptionImpl(CMSEncryptionConfig encryptionConfig) { } @Override - public OutputStream buildEncryptionOutputStream(OutputStream dataContentStream, Set publicKeys) { + public OutputStream buildEncryptionOutputStream(OutputStream dataContentStream, Set publicKeys) { if (withCmsEncryption) { return super.buildEncryptionOutputStream(dataContentStream, publicKeys); } diff --git a/last-module-codecoverage-check/pom.xml b/last-module-codecoverage-check/pom.xml index ff94b3b4e..d9b586a8b 100644 --- a/last-module-codecoverage-check/pom.xml +++ b/last-module-codecoverage-check/pom.xml @@ -188,7 +188,7 @@ lowerlimit - 85 + 90 outputdir diff --git a/pom.xml b/pom.xml index a54ead1ef..c8aad1740 100644 --- a/pom.xml +++ b/pom.xml @@ -118,6 +118,7 @@ 3.6.1 5.1.7.RELEASE 2.1.5.RELEASE + 1.3.1 From 38573fc72f414024d2a3e27bc848c17104c723c1 Mon Sep 17 00:00:00 2001 From: Ihor Yatsenko Date: Tue, 10 Sep 2019 14:10:50 +0300 Subject: [PATCH 058/255] DOC-239: Clean up code according to review notes --- .../DefaultPathEncryptionModule.java | 14 ++++---------- .../profile/keys/DFSPrivateKeyServiceImpl.java | 17 +++++++---------- 2 files changed, 11 insertions(+), 20 deletions(-) diff --git a/datasafe-business/src/main/java/de/adorsys/datasafe/business/impl/pathencryption/DefaultPathEncryptionModule.java b/datasafe-business/src/main/java/de/adorsys/datasafe/business/impl/pathencryption/DefaultPathEncryptionModule.java index 0e703de4f..e30294dc5 100644 --- a/datasafe-business/src/main/java/de/adorsys/datasafe/business/impl/pathencryption/DefaultPathEncryptionModule.java +++ b/datasafe-business/src/main/java/de/adorsys/datasafe/business/impl/pathencryption/DefaultPathEncryptionModule.java @@ -2,10 +2,12 @@ import dagger.Binds; import dagger.Module; -import dagger.Provides; import de.adorsys.datasafe.encrypiton.api.pathencryption.PathEncryption; import de.adorsys.datasafe.encrypiton.api.pathencryption.encryption.SymmetricPathEncryptionService; -import de.adorsys.datasafe.encrypiton.impl.pathencryption.*; +import de.adorsys.datasafe.encrypiton.impl.pathencryption.DefaultPathEncryptorDecryptorRuntimeDelegatable; +import de.adorsys.datasafe.encrypiton.impl.pathencryption.PathEncryptionImplRuntimeDelegatable; +import de.adorsys.datasafe.encrypiton.impl.pathencryption.PathEncryptorDecryptor; +import de.adorsys.datasafe.encrypiton.impl.pathencryption.SymmetricPathEncryptionServiceImplRuntimeDelegatable; /** * This module is responsible for providing pathencryption of document. @@ -13,14 +15,6 @@ @Module public abstract class DefaultPathEncryptionModule { - /** - * Default path digest that specifies AES and SHA-256 for path encryption. - */ - @Provides - static DefaultPathDigestConfig digestConfig() { - return new DefaultPathDigestConfig(); - } - /** * Default path encryption that uses Base64-urlsafe path serialization */ diff --git a/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/keys/DFSPrivateKeyServiceImpl.java b/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/keys/DFSPrivateKeyServiceImpl.java index 3decd3405..ac06156bb 100644 --- a/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/keys/DFSPrivateKeyServiceImpl.java +++ b/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/keys/DFSPrivateKeyServiceImpl.java @@ -39,11 +39,8 @@ public DFSPrivateKeyServiceImpl(DocumentKeyStoreOperations keyStoreOper) { public SecretKeyIDWithKey pathEncryptionSecretKey(UserIDAuth forUser) { List secretKeyIds = getSecretKeyIds(forUser); - Map keys = keysByIds(forUser, secretKeyIds.stream() - .map(it -> it.getValue()).collect(Collectors.toSet())); - - String secretPathKeyId = getSecretPathKeyIdByPrefix(keys, PATH_KEY_ID_PREFIX); - String secretPathCrtKeyId = getSecretPathKeyIdByPrefix(keys, PATH_KEY_ID_PREFIX_CRT); + String secretPathKeyId = getSecretPathKeyIdByPrefix(secretKeyIds, PATH_KEY_ID_PREFIX); + String secretPathCrtKeyId = getSecretPathKeyIdByPrefix(secretKeyIds, PATH_KEY_ID_PREFIX_CRT); return new SecretKeyIDWithKey( new KeyID(secretPathKeyId), @@ -51,12 +48,12 @@ public SecretKeyIDWithKey pathEncryptionSecretKey(UserIDAuth forUser) { (SecretKey) keyStoreOper.getKey(forUser, secretPathCrtKeyId)); } - private String getSecretPathKeyIdByPrefix(Map keys, String pathKeyIdPrefix) { - return keys.keySet() - .stream() - .filter(it -> it.startsWith(pathKeyIdPrefix)) + private String getSecretPathKeyIdByPrefix(List keys, String pathKeyIdPrefix) { + return keys.stream() + .filter(it -> it.getValue().startsWith(pathKeyIdPrefix)) .findFirst() - .get(); + .get() + .getValue(); } private List getSecretKeyIds(UserIDAuth forUser) { From 65cafb9d46d4dcbe1c896773c675b58d2a301800 Mon Sep 17 00:00:00 2001 From: Ihor Yatsenko Date: Tue, 10 Sep 2019 18:00:50 +0300 Subject: [PATCH 059/255] DOC-239: Clean up code & fixed review notes * Introduced new entity for path encryption(PathEncryptionSecretKey) --- .../impl/e2e/UserProfileWithUtf8Test.java | 5 ++-- .../api/profile/keys/PrivateKeyService.java | 5 ++-- .../keys/DFSPrivateKeyServiceImpl.java | 8 +++--- .../SymmetricPathEncryptionService.java | 10 +++---- .../keystore/PathEncryptionSecretKey.java | 17 ++++++++++++ .../types/keystore/SecretKeyIDWithKey.java | 1 - .../generator/CaSignedCertificateBuilder.java | 4 +-- .../DefaultPathEncryptorDecryptor.java | 14 +++++----- .../pathencryption/PathEncryptionImpl.java | 10 +++---- .../PathEncryptorDecryptor.java | 14 +++++----- .../SymmetricPathEncryptionServiceImpl.java | 26 +++++++++---------- ...ymmetricPathEncryptionServiceImplTest.java | 14 +++++----- .../impl/actions/WriteToPrivateImplTest.java | 2 +- .../impl/s3/S3SystemStorageServiceTest.java | 2 +- 14 files changed, 72 insertions(+), 60 deletions(-) create mode 100644 datasafe-encryption/datasafe-encryption-api/src/main/java/de/adorsys/datasafe/encrypiton/api/types/keystore/PathEncryptionSecretKey.java diff --git a/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/UserProfileWithUtf8Test.java b/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/UserProfileWithUtf8Test.java index bff805ffb..6426b081e 100644 --- a/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/UserProfileWithUtf8Test.java +++ b/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/UserProfileWithUtf8Test.java @@ -31,7 +31,6 @@ class UserProfileWithUtf8Test extends WithStorageProvider { private Path fsPath; private Uri minioPath; private StorageService minio; - private StorageService filesystem; private DefaultDatasafeServices datasafeServices; @BeforeEach @@ -39,12 +38,12 @@ void initialize(@TempDir Path tempDir) { StorageDescriptor minioDescriptor = minio(); this.fsPath = tempDir; this.minio = minioDescriptor.getStorageService().get(); - this.filesystem = new FileSystemStorageService(tempDir); this.minioPath = minioDescriptor.getLocation(); + StorageService multiDfs = new SchemeDelegatingStorage( ImmutableMap.of( "s3", minio, - "file", filesystem + "file", new FileSystemStorageService(tempDir) ) ); diff --git a/datasafe-directory/datasafe-directory-api/src/main/java/de/adorsys/datasafe/directory/api/profile/keys/PrivateKeyService.java b/datasafe-directory/datasafe-directory-api/src/main/java/de/adorsys/datasafe/directory/api/profile/keys/PrivateKeyService.java index 7d1bfda62..2fe948296 100644 --- a/datasafe-directory/datasafe-directory-api/src/main/java/de/adorsys/datasafe/directory/api/profile/keys/PrivateKeyService.java +++ b/datasafe-directory/datasafe-directory-api/src/main/java/de/adorsys/datasafe/directory/api/profile/keys/PrivateKeyService.java @@ -1,6 +1,7 @@ package de.adorsys.datasafe.directory.api.profile.keys; import de.adorsys.datasafe.encrypiton.api.types.UserIDAuth; +import de.adorsys.datasafe.encrypiton.api.types.keystore.PathEncryptionSecretKey; import de.adorsys.datasafe.encrypiton.api.types.keystore.SecretKeyIDWithKey; import java.security.Key; @@ -15,9 +16,9 @@ public interface PrivateKeyService { /** * Get path-encryption key that will be used to encrypt URI paths. * @param forUser Key owner - * @return Path encryption secret key. + * @return Path encryption entity which contain secret keys and key ID. */ - SecretKeyIDWithKey pathEncryptionSecretKey(UserIDAuth forUser); + PathEncryptionSecretKey pathEncryptionSecretKey(UserIDAuth forUser); /** * Get document-encryption key diff --git a/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/keys/DFSPrivateKeyServiceImpl.java b/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/keys/DFSPrivateKeyServiceImpl.java index ac06156bb..22da0dda7 100644 --- a/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/keys/DFSPrivateKeyServiceImpl.java +++ b/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/keys/DFSPrivateKeyServiceImpl.java @@ -4,6 +4,7 @@ import de.adorsys.datasafe.directory.api.profile.keys.PrivateKeyService; import de.adorsys.datasafe.encrypiton.api.types.UserIDAuth; import de.adorsys.datasafe.encrypiton.api.types.keystore.KeyID; +import de.adorsys.datasafe.encrypiton.api.types.keystore.PathEncryptionSecretKey; import de.adorsys.datasafe.encrypiton.api.types.keystore.SecretKeyIDWithKey; import de.adorsys.datasafe.types.api.context.annotations.RuntimeDelegate; import lombok.SneakyThrows; @@ -36,13 +37,13 @@ public DFSPrivateKeyServiceImpl(DocumentKeyStoreOperations keyStoreOper) { * Reads path encryption secret key from DFS and caches the result. */ @Override - public SecretKeyIDWithKey pathEncryptionSecretKey(UserIDAuth forUser) { + public PathEncryptionSecretKey pathEncryptionSecretKey(UserIDAuth forUser) { List secretKeyIds = getSecretKeyIds(forUser); String secretPathKeyId = getSecretPathKeyIdByPrefix(secretKeyIds, PATH_KEY_ID_PREFIX); String secretPathCrtKeyId = getSecretPathKeyIdByPrefix(secretKeyIds, PATH_KEY_ID_PREFIX_CRT); - return new SecretKeyIDWithKey( + return new PathEncryptionSecretKey( new KeyID(secretPathKeyId), (SecretKey) keyStoreOper.getKey(forUser, secretPathKeyId), (SecretKey) keyStoreOper.getKey(forUser, secretPathCrtKeyId)); @@ -95,8 +96,7 @@ private SecretKeyIDWithKey keyByPrefix(UserIDAuth forUser, String prefix) { return new SecretKeyIDWithKey( key, - (SecretKey) keyStoreOper.getKey(forUser, key.getValue()), - null//TODO + (SecretKey) keyStoreOper.getKey(forUser, key.getValue()) ); } } diff --git a/datasafe-encryption/datasafe-encryption-api/src/main/java/de/adorsys/datasafe/encrypiton/api/pathencryption/encryption/SymmetricPathEncryptionService.java b/datasafe-encryption/datasafe-encryption-api/src/main/java/de/adorsys/datasafe/encrypiton/api/pathencryption/encryption/SymmetricPathEncryptionService.java index 89d11e6d4..ee6f9a414 100644 --- a/datasafe-encryption/datasafe-encryption-api/src/main/java/de/adorsys/datasafe/encrypiton/api/pathencryption/encryption/SymmetricPathEncryptionService.java +++ b/datasafe-encryption/datasafe-encryption-api/src/main/java/de/adorsys/datasafe/encrypiton/api/pathencryption/encryption/SymmetricPathEncryptionService.java @@ -1,6 +1,6 @@ package de.adorsys.datasafe.encrypiton.api.pathencryption.encryption; -import de.adorsys.datasafe.encrypiton.api.types.keystore.SecretKeyIDWithKey; +import de.adorsys.datasafe.encrypiton.api.types.keystore.PathEncryptionSecretKey; import de.adorsys.datasafe.types.api.resource.Uri; /** @@ -10,18 +10,18 @@ public interface SymmetricPathEncryptionService { /** * Encrypts relative URI using secret key and serializes it into URL-friendly format. - * @param secretKeyEntry Key to encrypt with + * @param pathEncryptionSecretKey entity with keys for encrypt path * @param bucketPath Path to encrypt * @return Encrypted relative URI that can be safely published. */ - Uri encrypt(SecretKeyIDWithKey secretKeyEntry, Uri bucketPath); + Uri encrypt(PathEncryptionSecretKey pathEncryptionSecretKey, Uri bucketPath); /** * Decrypts relative URI using secret key. - * @param secretKeyEntry Key to decrypt with + * @param pathEncryptionSecretKey entity with keys for decrypt path * @param bucketPath Path to decrypt * @return Decrypted relative URI typically containing some sensitive information. */ - Uri decrypt(SecretKeyIDWithKey secretKeyEntry, Uri bucketPath); + Uri decrypt(PathEncryptionSecretKey pathEncryptionSecretKey, Uri bucketPath); } diff --git a/datasafe-encryption/datasafe-encryption-api/src/main/java/de/adorsys/datasafe/encrypiton/api/types/keystore/PathEncryptionSecretKey.java b/datasafe-encryption/datasafe-encryption-api/src/main/java/de/adorsys/datasafe/encrypiton/api/types/keystore/PathEncryptionSecretKey.java new file mode 100644 index 000000000..4528ff3a2 --- /dev/null +++ b/datasafe-encryption/datasafe-encryption-api/src/main/java/de/adorsys/datasafe/encrypiton/api/types/keystore/PathEncryptionSecretKey.java @@ -0,0 +1,17 @@ +package de.adorsys.datasafe.encrypiton.api.types.keystore; + +import lombok.Getter; +import lombok.RequiredArgsConstructor; +import lombok.ToString; + +import javax.crypto.SecretKey; + +@Getter +@ToString +@RequiredArgsConstructor +public class PathEncryptionSecretKey { + + private final KeyID keyID; + private final SecretKey secretKey; + private final SecretKey counterSecretKey; +} diff --git a/datasafe-encryption/datasafe-encryption-api/src/main/java/de/adorsys/datasafe/encrypiton/api/types/keystore/SecretKeyIDWithKey.java b/datasafe-encryption/datasafe-encryption-api/src/main/java/de/adorsys/datasafe/encrypiton/api/types/keystore/SecretKeyIDWithKey.java index e6e20baaf..d517ce79e 100644 --- a/datasafe-encryption/datasafe-encryption-api/src/main/java/de/adorsys/datasafe/encrypiton/api/types/keystore/SecretKeyIDWithKey.java +++ b/datasafe-encryption/datasafe-encryption-api/src/main/java/de/adorsys/datasafe/encrypiton/api/types/keystore/SecretKeyIDWithKey.java @@ -16,6 +16,5 @@ public class SecretKeyIDWithKey { private final KeyID keyID; private final SecretKey secretKey; - private final SecretKey counterSecretKey; } diff --git a/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/keystore/generator/CaSignedCertificateBuilder.java b/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/keystore/generator/CaSignedCertificateBuilder.java index 7b509f600..b22a46175 100644 --- a/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/keystore/generator/CaSignedCertificateBuilder.java +++ b/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/keystore/generator/CaSignedCertificateBuilder.java @@ -36,8 +36,6 @@ public class CaSignedCertificateBuilder { private X500Name subjectDN; - private boolean subjectOnlyInAlternativeName; - private Integer notAfterInDays; private Integer notBeforeInDays = 0; @@ -87,7 +85,7 @@ public X509CertificateHolder build(PrivateKey issuerPrivatekey) { // self signed ca certificate basicConstraints = new BasicConstraints(true); // in ca case, subject must subject must be set - subjectOnlyInAlternativeName = false; + boolean subjectOnlyInAlternativeName = false; } else { // not a ca certificate basicConstraints = new BasicConstraints(false); diff --git a/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/pathencryption/DefaultPathEncryptorDecryptor.java b/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/pathencryption/DefaultPathEncryptorDecryptor.java index d64776689..923074fb5 100644 --- a/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/pathencryption/DefaultPathEncryptorDecryptor.java +++ b/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/pathencryption/DefaultPathEncryptorDecryptor.java @@ -1,6 +1,6 @@ package de.adorsys.datasafe.encrypiton.impl.pathencryption; -import de.adorsys.datasafe.encrypiton.api.types.keystore.SecretKeyIDWithKey; +import de.adorsys.datasafe.encrypiton.api.types.keystore.PathEncryptionSecretKey; import de.adorsys.datasafe.types.api.context.annotations.RuntimeDelegate; import lombok.SneakyThrows; import org.cryptomator.siv.SivMode; @@ -25,17 +25,17 @@ public DefaultPathEncryptorDecryptor(){ } @Override - public byte[] encrypt(SecretKeyIDWithKey secretKey, byte[] rawData) { - return sivMode.encrypt(secretKey.getCounterSecretKey().getEncoded(), - secretKey.getSecretKey().getEncoded(), + public byte[] encrypt(PathEncryptionSecretKey pathSecretKey, byte[] rawData) { + return sivMode.encrypt(pathSecretKey.getCounterSecretKey().getEncoded(), + pathSecretKey.getSecretKey().getEncoded(), rawData); } @Override @SneakyThrows - public byte[] decrypt(SecretKeyIDWithKey secretKey, byte[] encryptedData) { - return sivMode.decrypt(secretKey.getCounterSecretKey().getEncoded(), - secretKey.getSecretKey().getEncoded(), + public byte[] decrypt(PathEncryptionSecretKey pathSecretKey, byte[] encryptedData) { + return sivMode.decrypt(pathSecretKey.getCounterSecretKey().getEncoded(), + pathSecretKey.getSecretKey().getEncoded(), encryptedData); } } diff --git a/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/pathencryption/PathEncryptionImpl.java b/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/pathencryption/PathEncryptionImpl.java index ab5b0d757..5774e58c8 100644 --- a/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/pathencryption/PathEncryptionImpl.java +++ b/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/pathencryption/PathEncryptionImpl.java @@ -4,7 +4,7 @@ import de.adorsys.datasafe.encrypiton.api.pathencryption.PathEncryption; import de.adorsys.datasafe.encrypiton.api.pathencryption.encryption.SymmetricPathEncryptionService; import de.adorsys.datasafe.encrypiton.api.types.UserIDAuth; -import de.adorsys.datasafe.encrypiton.api.types.keystore.SecretKeyIDWithKey; +import de.adorsys.datasafe.encrypiton.api.types.keystore.PathEncryptionSecretKey; import de.adorsys.datasafe.types.api.context.annotations.RuntimeDelegate; import de.adorsys.datasafe.types.api.resource.Uri; import lombok.extern.slf4j.Slf4j; @@ -35,8 +35,8 @@ public PathEncryptionImpl(SymmetricPathEncryptionService bucketPathEncryptionSer */ @Override public Uri encrypt(UserIDAuth forUser, Uri path) { - SecretKeyIDWithKey keySpec = privateKeyService.pathEncryptionSecretKey(forUser); - Uri encrypt = bucketPathEncryptionService.encrypt(keySpec, path); + PathEncryptionSecretKey pathEncryptionSecretKey = privateKeyService.pathEncryptionSecretKey(forUser); + Uri encrypt = bucketPathEncryptionService.encrypt(pathEncryptionSecretKey, path); log.debug("encrypted path {} for user {} path {}", encrypt, forUser.getUserID(), path); return encrypt; } @@ -46,9 +46,9 @@ public Uri encrypt(UserIDAuth forUser, Uri path) { */ @Override public Function decryptor(UserIDAuth forUser) { - SecretKeyIDWithKey keySpec = privateKeyService.pathEncryptionSecretKey(forUser); + PathEncryptionSecretKey pathEncryptionSecretKey = privateKeyService.pathEncryptionSecretKey(forUser); return encryptedPath -> { - Uri decrypt = bucketPathEncryptionService.decrypt(keySpec, encryptedPath); + Uri decrypt = bucketPathEncryptionService.decrypt(pathEncryptionSecretKey, encryptedPath); log.debug("decrypted path {} for user {} path {}", decrypt, forUser.getUserID(), encryptedPath); return decrypt; }; diff --git a/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/pathencryption/PathEncryptorDecryptor.java b/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/pathencryption/PathEncryptorDecryptor.java index 143b5ab8d..152d5ea44 100644 --- a/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/pathencryption/PathEncryptorDecryptor.java +++ b/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/pathencryption/PathEncryptorDecryptor.java @@ -1,19 +1,19 @@ package de.adorsys.datasafe.encrypiton.impl.pathencryption; -import de.adorsys.datasafe.encrypiton.api.types.keystore.SecretKeyIDWithKey; +import de.adorsys.datasafe.encrypiton.api.types.keystore.PathEncryptionSecretKey; public interface PathEncryptorDecryptor { /** - * @param secretKeyEntry Use this secret key - * @return Encrypted path using {@code secretKey} (secretKey and counterSecretKey) + * @param pathSecretKey entity that contains keys for encrypt path + * @return Encrypted path using {@code pathSecretKey} */ - byte[] encrypt(SecretKeyIDWithKey secretKeyEntry, byte[] rawData); + byte[] encrypt(PathEncryptionSecretKey pathSecretKey, byte[] rawData); /** - * @param secretKey Use this secret key - * @return Decrypted path using {@code secretKey} + * @param pathSecretKey entity that contains keys for decrypt path + * @return Decrypted path using {@code pathSecretKey} */ - byte[] decrypt(SecretKeyIDWithKey secretKey, byte[] encryptedData); + byte[] decrypt(PathEncryptionSecretKey pathSecretKey, byte[] encryptedData); } diff --git a/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/pathencryption/SymmetricPathEncryptionServiceImpl.java b/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/pathencryption/SymmetricPathEncryptionServiceImpl.java index 1c4e1d14c..2f085e773 100644 --- a/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/pathencryption/SymmetricPathEncryptionServiceImpl.java +++ b/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/pathencryption/SymmetricPathEncryptionServiceImpl.java @@ -1,7 +1,7 @@ package de.adorsys.datasafe.encrypiton.impl.pathencryption; import de.adorsys.datasafe.encrypiton.api.pathencryption.encryption.SymmetricPathEncryptionService; -import de.adorsys.datasafe.encrypiton.api.types.keystore.SecretKeyIDWithKey; +import de.adorsys.datasafe.encrypiton.api.types.keystore.PathEncryptionSecretKey; import de.adorsys.datasafe.types.api.context.annotations.RuntimeDelegate; import de.adorsys.datasafe.types.api.resource.Uri; import lombok.SneakyThrows; @@ -28,13 +28,11 @@ public class SymmetricPathEncryptionServiceImpl implements SymmetricPathEncrypti private static final String PATH_SEPARATOR = "/"; - private final PathEncryptorDecryptor pathEncryptorDecryptor; - private final Function, byte[]> encryptAndEncode; - private final Function, byte[]> decryptAndDecode; + private final Function, byte[]> encryptAndEncode; + private final Function, byte[]> decryptAndDecode; @Inject public SymmetricPathEncryptionServiceImpl(PathEncryptorDecryptor pathEncryptorDecryptor) { - this.pathEncryptorDecryptor = pathEncryptorDecryptor; encryptAndEncode = keyEntryEncryptedDataPair -> encode(pathEncryptorDecryptor.encrypt( keyEntryEncryptedDataPair.left, keyEntryEncryptedDataPair.right @@ -50,12 +48,12 @@ keyEntryDecryptedDataPair.left, decode(keyEntryDecryptedDataPair.right) */ @Override @SneakyThrows - public Uri encrypt(SecretKeyIDWithKey secretKeyEntry, Uri bucketPath) { - validateArgs(secretKeyEntry, bucketPath); + public Uri encrypt(PathEncryptionSecretKey pathEncryptionSecretKey, Uri bucketPath) { + validateArgs(pathEncryptionSecretKey, bucketPath); validateUriIsRelative(bucketPath); return processURIparts( - secretKeyEntry, + pathEncryptionSecretKey, bucketPath, encryptAndEncode ); @@ -66,12 +64,12 @@ public Uri encrypt(SecretKeyIDWithKey secretKeyEntry, Uri bucketPath) { */ @Override @SneakyThrows - public Uri decrypt(SecretKeyIDWithKey secretKeyEntry, Uri bucketPath) { - validateArgs(secretKeyEntry, bucketPath); + public Uri decrypt(PathEncryptionSecretKey pathEncryptionSecretKey, Uri bucketPath) { + validateArgs(pathEncryptionSecretKey, bucketPath); validateUriIsRelative(bucketPath); return processURIparts( - secretKeyEntry, + pathEncryptionSecretKey, bucketPath, decryptAndDecode ); @@ -96,9 +94,9 @@ private static byte[] encode(byte[] encryptedData) { } private static Uri processURIparts( - SecretKeyIDWithKey secretKeyEntry, + PathEncryptionSecretKey secretKeyEntry, Uri bucketPath, - Function, byte[]> process) { + Function, byte[]> process) { StringBuilder result = new StringBuilder(); String path = bucketPath.getRawPath(); @@ -121,7 +119,7 @@ private static Uri processURIparts( ); } - private static void validateArgs(SecretKeyIDWithKey secretKeyEntry, Uri bucketPath) { + private static void validateArgs(PathEncryptionSecretKey secretKeyEntry, Uri bucketPath) { if (null == secretKeyEntry || null == secretKeyEntry.getSecretKey()) { throw new IllegalArgumentException("Secret key should not be null"); } diff --git a/datasafe-encryption/datasafe-encryption-impl/src/test/java/de/adorsys/datasafe/encrypiton/impl/pathencryption/SymmetricPathEncryptionServiceImplTest.java b/datasafe-encryption/datasafe-encryption-impl/src/test/java/de/adorsys/datasafe/encrypiton/impl/pathencryption/SymmetricPathEncryptionServiceImplTest.java index e1741420f..5faccfc13 100644 --- a/datasafe-encryption/datasafe-encryption-impl/src/test/java/de/adorsys/datasafe/encrypiton/impl/pathencryption/SymmetricPathEncryptionServiceImplTest.java +++ b/datasafe-encryption/datasafe-encryption-impl/src/test/java/de/adorsys/datasafe/encrypiton/impl/pathencryption/SymmetricPathEncryptionServiceImplTest.java @@ -51,7 +51,7 @@ void testSuccessEncryptDecryptPath() { KeystoreUtil.keyIdByPrefix(keyStore, PATH_KEY_ID_PREFIX) ); - SecretKeyIDWithKey secretKeyIDWithKey = new SecretKeyIDWithKey( + PathEncryptionSecretKey secretKeyIDWithKey = new PathEncryptionSecretKey( KeystoreUtil.keyIdByPrefix(keyStore, PATH_KEY_ID_PREFIX), secretKey, secretKeyCrt); Uri encrypted = bucketPathEncryptionService.encrypt(secretKeyIDWithKey, testURI); @@ -73,12 +73,12 @@ void testFailEncryptPathWithWrongKeyID() { SecretKeySpec secretKey = keyStoreService.getSecretKey(keyStoreAccess, new KeyID("Invalid key")); - SecretKeyIDWithKey secretKeyIDWithKey = new SecretKeyIDWithKey( + PathEncryptionSecretKey pathEncryptionSecretKey = new PathEncryptionSecretKey( KeystoreUtil.keyIdByPrefix(keyStore, PATH_KEY_ID_PREFIX), secretKey, secretKey); // secret keys is null, because during key obtain was used incorrect KeyID, // so bucketPathEncryptionService#encrypt throw BaseException(was handled NullPointerException) - assertThrows(IllegalArgumentException.class, () -> bucketPathEncryptionService.encrypt(secretKeyIDWithKey, testURI)); + assertThrows(IllegalArgumentException.class, () -> bucketPathEncryptionService.encrypt(pathEncryptionSecretKey, testURI)); } @Test @@ -88,11 +88,11 @@ void testFailEncryptPathWithBrokenEncryptedPath() { KeystoreUtil.keyIdByPrefix(keyStore, PATH_KEY_ID_PREFIX) ); - SecretKeyIDWithKey secretKeyIDWithKey = new SecretKeyIDWithKey( + PathEncryptionSecretKey pathEncryptionSecretKey = new PathEncryptionSecretKey( KeystoreUtil.keyIdByPrefix(keyStore, PATH_KEY_ID_PREFIX), secretKey, secretKey); assertThrows(BadPaddingException.class, - () -> bucketPathEncryptionService.decrypt(secretKeyIDWithKey, + () -> bucketPathEncryptionService.decrypt(pathEncryptionSecretKey, new Uri(URI.create("bRQiW8qLNPEy5tO7shfV0w==/k0HooCVlmhHkQFw8mc==")))); } @@ -103,11 +103,11 @@ void testFailEncryptPathWithTextPath() { KeystoreUtil.keyIdByPrefix(keyStore, PATH_KEY_ID_PREFIX) ); - SecretKeyIDWithKey secretKeyIDWithKey = new SecretKeyIDWithKey( + PathEncryptionSecretKey pathEncryptionSecretKey = new PathEncryptionSecretKey( KeystoreUtil.keyIdByPrefix(keyStore, PATH_KEY_ID_PREFIX), secretKey, secretKey); assertThrows(IllegalBlockSizeException.class, - () -> bucketPathEncryptionService.decrypt(secretKeyIDWithKey, + () -> bucketPathEncryptionService.decrypt(pathEncryptionSecretKey, new Uri("/simple/text/path/"))); } } \ No newline at end of file diff --git a/datasafe-privatestore/datasafe-privatestore-impl/src/test/java/de/adorsys/datasafe/privatestore/impl/actions/WriteToPrivateImplTest.java b/datasafe-privatestore/datasafe-privatestore-impl/src/test/java/de/adorsys/datasafe/privatestore/impl/actions/WriteToPrivateImplTest.java index a3fe8243b..e9f203172 100644 --- a/datasafe-privatestore/datasafe-privatestore-impl/src/test/java/de/adorsys/datasafe/privatestore/impl/actions/WriteToPrivateImplTest.java +++ b/datasafe-privatestore/datasafe-privatestore-impl/src/test/java/de/adorsys/datasafe/privatestore/impl/actions/WriteToPrivateImplTest.java @@ -63,7 +63,7 @@ class WriteToPrivateImplTest extends BaseMockitoTest { @BeforeEach void init() { - this.secretKeyIDWithKey = new SecretKeyIDWithKey(new KeyID(""), secretKey, secretCrtKey); + this.secretKeyIDWithKey = new SecretKeyIDWithKey(new KeyID(""), secretKey); } @Test diff --git a/datasafe-storage/datasafe-storage-impl-s3/src/test/java/de/adorsys/datasafe/storage/impl/s3/S3SystemStorageServiceTest.java b/datasafe-storage/datasafe-storage-impl-s3/src/test/java/de/adorsys/datasafe/storage/impl/s3/S3SystemStorageServiceTest.java index bb0e06fa7..0cea6e983 100644 --- a/datasafe-storage/datasafe-storage-impl-s3/src/test/java/de/adorsys/datasafe/storage/impl/s3/S3SystemStorageServiceTest.java +++ b/datasafe-storage/datasafe-storage-impl-s3/src/test/java/de/adorsys/datasafe/storage/impl/s3/S3SystemStorageServiceTest.java @@ -31,7 +31,6 @@ class S3SystemStorageServiceTest extends BaseMockitoTest { private static String accessKeyID = "admin"; private static String secretAccessKey = "password"; - private static String region = "eu-central-1"; private static String url = "http://localhost"; private static BasicAWSCredentials creds = new BasicAWSCredentials(accessKeyID, secretAccessKey); private static AmazonS3 s3; @@ -56,6 +55,7 @@ static void beforeAll() { minio.start(); Integer mappedPort = minio.getMappedPort(9000); log.info("Mapped port: " + mappedPort); + String region = "eu-central-1"; s3 = AmazonS3ClientBuilder.standard() .withEndpointConfiguration(new AwsClientBuilder.EndpointConfiguration(url + ":" + mappedPort, region)) .withCredentials(new AWSStaticCredentialsProvider(creds)) From 57ddea4ac3cf3a8392ab0220e607f331e730e275 Mon Sep 17 00:00:00 2001 From: Ihor Yatsenko Date: Tue, 10 Sep 2019 18:13:37 +0300 Subject: [PATCH 060/255] DOC-239: Introduced new DTO which contains path secret key object and data for encryption or decryption --- .../SymmetricPathEncryptionServiceImpl.java | 16 +++++++-------- .../dto/PathSecretKeyWithData.java | 20 +++++++++++++++++++ 2 files changed, 28 insertions(+), 8 deletions(-) create mode 100644 datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/pathencryption/dto/PathSecretKeyWithData.java diff --git a/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/pathencryption/SymmetricPathEncryptionServiceImpl.java b/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/pathencryption/SymmetricPathEncryptionServiceImpl.java index 2f085e773..619bf04e9 100644 --- a/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/pathencryption/SymmetricPathEncryptionServiceImpl.java +++ b/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/pathencryption/SymmetricPathEncryptionServiceImpl.java @@ -2,11 +2,11 @@ import de.adorsys.datasafe.encrypiton.api.pathencryption.encryption.SymmetricPathEncryptionService; import de.adorsys.datasafe.encrypiton.api.types.keystore.PathEncryptionSecretKey; +import de.adorsys.datasafe.encrypiton.impl.pathencryption.dto.PathSecretKeyWithData; import de.adorsys.datasafe.types.api.context.annotations.RuntimeDelegate; import de.adorsys.datasafe.types.api.resource.Uri; import lombok.SneakyThrows; import lombok.extern.slf4j.Slf4j; -import org.apache.commons.lang3.tuple.ImmutablePair; import javax.inject.Inject; import java.net.URI; @@ -28,18 +28,17 @@ public class SymmetricPathEncryptionServiceImpl implements SymmetricPathEncrypti private static final String PATH_SEPARATOR = "/"; - private final Function, byte[]> encryptAndEncode; - private final Function, byte[]> decryptAndDecode; + private final Function encryptAndEncode; + private final Function decryptAndDecode; @Inject public SymmetricPathEncryptionServiceImpl(PathEncryptorDecryptor pathEncryptorDecryptor) { - encryptAndEncode = keyEntryEncryptedDataPair -> encode(pathEncryptorDecryptor.encrypt( - keyEntryEncryptedDataPair.left, keyEntryEncryptedDataPair.right + keyEntryEncryptedDataPair.getPathEncryptionSecretKey(), keyEntryEncryptedDataPair.getData() )); decryptAndDecode = keyEntryDecryptedDataPair -> pathEncryptorDecryptor.decrypt( - keyEntryDecryptedDataPair.left, decode(keyEntryDecryptedDataPair.right) + keyEntryDecryptedDataPair.getPathEncryptionSecretKey(), decode(keyEntryDecryptedDataPair.getData()) ); } @@ -96,7 +95,7 @@ private static byte[] encode(byte[] encryptedData) { private static Uri processURIparts( PathEncryptionSecretKey secretKeyEntry, Uri bucketPath, - Function, byte[]> process) { + Function process) { StringBuilder result = new StringBuilder(); String path = bucketPath.getRawPath(); @@ -113,7 +112,8 @@ private static Uri processURIparts( return new Uri( URI.create( Arrays.stream(path.split(PATH_SEPARATOR)) - .map(uriPart -> process.apply(new ImmutablePair<>(secretKeyEntry, uriPart.getBytes(UTF_8)))) + .map(uriPart -> process.apply( + new PathSecretKeyWithData(secretKeyEntry, uriPart.getBytes(UTF_8)))) .map(String::new) // byte[] -> string .collect(Collectors.joining(PATH_SEPARATOR))) ); diff --git a/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/pathencryption/dto/PathSecretKeyWithData.java b/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/pathencryption/dto/PathSecretKeyWithData.java new file mode 100644 index 000000000..f5ec1c94a --- /dev/null +++ b/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/pathencryption/dto/PathSecretKeyWithData.java @@ -0,0 +1,20 @@ +package de.adorsys.datasafe.encrypiton.impl.pathencryption.dto; + +import de.adorsys.datasafe.encrypiton.api.types.keystore.PathEncryptionSecretKey; +import lombok.AllArgsConstructor; +import lombok.Getter; +import lombok.Setter; + +/** + * Contains data for encryption or decryption and related secret key entity + * + * {@code pathEncryptionSecretKey} keys for encryption and decryption path + * {@code data} encrypted or decrypted data + */ +@Getter +@Setter +@AllArgsConstructor +public class PathSecretKeyWithData { + private final PathEncryptionSecretKey pathEncryptionSecretKey; + private final byte[] data; +} From d4af3bdf6f9e6e905d4a14faf1bd1aed11d7055a Mon Sep 17 00:00:00 2001 From: Ihor Yatsenko Date: Tue, 10 Sep 2019 18:18:20 +0300 Subject: [PATCH 061/255] DOC-239: Clean up code --- .../SymmetricPathEncryptionServiceImpl.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/pathencryption/SymmetricPathEncryptionServiceImpl.java b/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/pathencryption/SymmetricPathEncryptionServiceImpl.java index 619bf04e9..77b475a56 100644 --- a/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/pathencryption/SymmetricPathEncryptionServiceImpl.java +++ b/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/pathencryption/SymmetricPathEncryptionServiceImpl.java @@ -26,6 +26,8 @@ @RuntimeDelegate public class SymmetricPathEncryptionServiceImpl implements SymmetricPathEncryptionService { + private static final int DOT_SLASH_PREFIX_LENGTH = 2; + private static final String DOT_SLASH_PREFIX = "./"; private static final String PATH_SEPARATOR = "/"; private final Function encryptAndEncode; @@ -99,9 +101,9 @@ private static Uri processURIparts( StringBuilder result = new StringBuilder(); String path = bucketPath.getRawPath(); - if (bucketPath.getRawPath().startsWith("./")) { - result.append("./"); - path = bucketPath.getRawPath().substring(2); + if (bucketPath.getRawPath().startsWith(DOT_SLASH_PREFIX)) { + result.append(DOT_SLASH_PREFIX); + path = bucketPath.getRawPath().substring(DOT_SLASH_PREFIX_LENGTH); } if (path.isEmpty()) { From d41e4286c7b2710869efc0152a9c370937eea740 Mon Sep 17 00:00:00 2001 From: Ihor Yatsenko Date: Wed, 11 Sep 2019 00:53:08 +0300 Subject: [PATCH 062/255] DOC-239: Clean up code --- .../DefaultPathEncryptionModule.java | 10 ++++++-- .../DefaultPathEncryptorDecryptor.java | 24 +++++++++++-------- .../PathEncryptorDecryptor.java | 6 +++-- 3 files changed, 26 insertions(+), 14 deletions(-) diff --git a/datasafe-business/src/main/java/de/adorsys/datasafe/business/impl/pathencryption/DefaultPathEncryptionModule.java b/datasafe-business/src/main/java/de/adorsys/datasafe/business/impl/pathencryption/DefaultPathEncryptionModule.java index e30294dc5..a6d2c6792 100644 --- a/datasafe-business/src/main/java/de/adorsys/datasafe/business/impl/pathencryption/DefaultPathEncryptionModule.java +++ b/datasafe-business/src/main/java/de/adorsys/datasafe/business/impl/pathencryption/DefaultPathEncryptionModule.java @@ -2,12 +2,14 @@ import dagger.Binds; import dagger.Module; +import dagger.Provides; import de.adorsys.datasafe.encrypiton.api.pathencryption.PathEncryption; import de.adorsys.datasafe.encrypiton.api.pathencryption.encryption.SymmetricPathEncryptionService; import de.adorsys.datasafe.encrypiton.impl.pathencryption.DefaultPathEncryptorDecryptorRuntimeDelegatable; import de.adorsys.datasafe.encrypiton.impl.pathencryption.PathEncryptionImplRuntimeDelegatable; import de.adorsys.datasafe.encrypiton.impl.pathencryption.PathEncryptorDecryptor; import de.adorsys.datasafe.encrypiton.impl.pathencryption.SymmetricPathEncryptionServiceImplRuntimeDelegatable; +import org.cryptomator.siv.SivMode; /** * This module is responsible for providing pathencryption of document. @@ -15,11 +17,15 @@ @Module public abstract class DefaultPathEncryptionModule { + + + @Provides + abstract SivMode sivMode(SivMode siv); /** - * Default path encryption that uses Base64-urlsafe path serialization + * Default path encryption that uses Base64-urlsafe path serialization and AES-CGM-SIV mode for encryption */ @Binds - abstract PathEncryptorDecryptor config(DefaultPathEncryptorDecryptorRuntimeDelegatable config); + abstract PathEncryptorDecryptor pathEncryptorDecryptor(DefaultPathEncryptorDecryptorRuntimeDelegatable impl); /** * By default simply use diff --git a/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/pathencryption/DefaultPathEncryptorDecryptor.java b/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/pathencryption/DefaultPathEncryptorDecryptor.java index 923074fb5..8624b3552 100644 --- a/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/pathencryption/DefaultPathEncryptorDecryptor.java +++ b/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/pathencryption/DefaultPathEncryptorDecryptor.java @@ -7,6 +7,8 @@ import javax.inject.Inject; +import static java.nio.charset.StandardCharsets.UTF_8; + /** * Default path encryption/decryption that uses AES-GCM-SIV mode. * @@ -20,22 +22,24 @@ public class DefaultPathEncryptorDecryptor implements PathEncryptorDecryptor { private final SivMode sivMode; @Inject - public DefaultPathEncryptorDecryptor(){ - sivMode = new SivMode(); + public DefaultPathEncryptorDecryptor(SivMode sivMode){ + this.sivMode = sivMode; } @Override - public byte[] encrypt(PathEncryptionSecretKey pathSecretKey, byte[] rawData) { - return sivMode.encrypt(pathSecretKey.getCounterSecretKey().getEncoded(), - pathSecretKey.getSecretKey().getEncoded(), - rawData); + public String encrypt(PathEncryptionSecretKey pathSecretKey, String originalPath) { + return new String(sivMode.encrypt(pathSecretKey.getCounterSecretKey().getEncoded(), + pathSecretKey.getSecretKey().getEncoded(), + originalPath.getBytes(UTF_8)) + ); } @Override @SneakyThrows - public byte[] decrypt(PathEncryptionSecretKey pathSecretKey, byte[] encryptedData) { - return sivMode.decrypt(pathSecretKey.getCounterSecretKey().getEncoded(), - pathSecretKey.getSecretKey().getEncoded(), - encryptedData); + public String decrypt(PathEncryptionSecretKey pathSecretKey, String encryptedPath) { + return new String(sivMode.decrypt(pathSecretKey.getCounterSecretKey().getEncoded(), + pathSecretKey.getSecretKey().getEncoded(), + encryptedPath.getBytes(UTF_8)) + ); } } diff --git a/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/pathencryption/PathEncryptorDecryptor.java b/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/pathencryption/PathEncryptorDecryptor.java index 152d5ea44..2853d2224 100644 --- a/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/pathencryption/PathEncryptorDecryptor.java +++ b/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/pathencryption/PathEncryptorDecryptor.java @@ -6,14 +6,16 @@ public interface PathEncryptorDecryptor { /** * @param pathSecretKey entity that contains keys for encrypt path + * @param originalPath * @return Encrypted path using {@code pathSecretKey} */ - byte[] encrypt(PathEncryptionSecretKey pathSecretKey, byte[] rawData); + String encrypt(PathEncryptionSecretKey pathSecretKey, String originalPath); /** * @param pathSecretKey entity that contains keys for decrypt path + * @param encryptedPath * @return Decrypted path using {@code pathSecretKey} */ - byte[] decrypt(PathEncryptionSecretKey pathSecretKey, byte[] encryptedData); + String decrypt(PathEncryptionSecretKey pathSecretKey, String encryptedPath); } From f6639696fcfea5c728a2ed6254150324ebdb6e0b Mon Sep 17 00:00:00 2001 From: Ihor Yatsenko Date: Wed, 11 Sep 2019 01:39:08 +0300 Subject: [PATCH 063/255] DOC-239: Clean up code --- .../generator/CaSignedCertificateBuilder.java | 37 ++++++++++--------- .../SymmetricPathEncryptionServiceImpl.java | 26 ++++++------- .../dto/PathSecretKeyWithData.java | 4 +- ...ymmetricPathEncryptionServiceImplTest.java | 3 +- 4 files changed, 36 insertions(+), 34 deletions(-) diff --git a/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/keystore/generator/CaSignedCertificateBuilder.java b/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/keystore/generator/CaSignedCertificateBuilder.java index b22a46175..1adedf2a2 100644 --- a/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/keystore/generator/CaSignedCertificateBuilder.java +++ b/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/keystore/generator/CaSignedCertificateBuilder.java @@ -16,7 +16,6 @@ import java.math.BigInteger; import java.security.PrivateKey; import java.security.PublicKey; -import java.util.ArrayList; import java.util.Date; import java.util.List; @@ -53,15 +52,7 @@ public X509CertificateHolder build(PrivateKey issuerPrivatekey) { if (dirty) throw new IllegalStateException("Builder can not be reused"); dirty = true; - // AUtoselect algorithm - if (StringUtils.isBlank(signatureAlgo)) { - String algorithm = issuerPrivatekey.getAlgorithm(); - if (StringUtils.equalsAnyIgnoreCase("DSA", algorithm)) { - signatureAlgo = "SHA256withDSA"; - } else if (StringUtils.equals("RSA", algorithm)) { - signatureAlgo = "SHA256WithRSA"; - } - } + signatureAlgo = autodetectAlgorithm(issuerPrivatekey); Date now = new Date(); Date notAfter = notAfterInDays != null ? DateUtils.addDays(now, notAfterInDays) : null; @@ -75,7 +66,10 @@ public X509CertificateHolder build(PrivateKey issuerPrivatekey) { .build(); List errorKeys = BatchValidator.filterNull(notNullCheckList); - if (errorKeys == null) errorKeys = new ArrayList<>(); + + if (errorKeys != null && !errorKeys.isEmpty()) { + throw new IllegalArgumentException("Fields can not be null: " + errorKeys); + } X500Name issuerDN = null; BasicConstraints basicConstraints = null; @@ -84,8 +78,6 @@ public X509CertificateHolder build(PrivateKey issuerPrivatekey) { if (createCaCert) { // self signed ca certificate basicConstraints = new BasicConstraints(true); - // in ca case, subject must subject must be set - boolean subjectOnlyInAlternativeName = false; } else { // not a ca certificate basicConstraints = new BasicConstraints(false); @@ -93,11 +85,7 @@ public X509CertificateHolder build(PrivateKey issuerPrivatekey) { BigInteger serial = SerialNumberGenerator.uniqueSerial(); - X509v3CertificateBuilder v3CertGen = null; - - if (!errorKeys.isEmpty()) { - throw new IllegalArgumentException("Fields can not be null: " + errorKeys); - } + X509v3CertificateBuilder v3CertGen; v3CertGen = new JcaX509v3CertificateBuilder(issuerDN, serial, notBefore, notAfter, subjectDN, subjectPublicKey); JcaX509ExtensionUtils extUtils = V3CertificateUtils.getJcaX509ExtensionUtils(); @@ -121,6 +109,19 @@ public X509CertificateHolder build(PrivateKey issuerPrivatekey) { } + private String autodetectAlgorithm(PrivateKey issuerPrivatekey) { + if (null == signatureAlgo || signatureAlgo.isEmpty()) { + String algorithm = issuerPrivatekey.getAlgorithm(); + if (StringUtils.equalsAnyIgnoreCase("DSA", algorithm)) { + return "SHA256withDSA"; + } else if (StringUtils.equals("RSA", algorithm)) { + return "SHA256WithRSA"; + } + } + + return null; + } + public CaSignedCertificateBuilder withCa(boolean ca) { this.createCaCert = ca; return this; diff --git a/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/pathencryption/SymmetricPathEncryptionServiceImpl.java b/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/pathencryption/SymmetricPathEncryptionServiceImpl.java index 77b475a56..1c73559ad 100644 --- a/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/pathencryption/SymmetricPathEncryptionServiceImpl.java +++ b/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/pathencryption/SymmetricPathEncryptionServiceImpl.java @@ -30,17 +30,17 @@ public class SymmetricPathEncryptionServiceImpl implements SymmetricPathEncrypti private static final String DOT_SLASH_PREFIX = "./"; private static final String PATH_SEPARATOR = "/"; - private final Function encryptAndEncode; - private final Function decryptAndDecode; + private final Function encryptAndEncode; + private final Function decryptAndDecode; @Inject public SymmetricPathEncryptionServiceImpl(PathEncryptorDecryptor pathEncryptorDecryptor) { encryptAndEncode = keyEntryEncryptedDataPair -> encode(pathEncryptorDecryptor.encrypt( - keyEntryEncryptedDataPair.getPathEncryptionSecretKey(), keyEntryEncryptedDataPair.getData() + keyEntryEncryptedDataPair.getPathEncryptionSecretKey(), keyEntryEncryptedDataPair.getPath() )); decryptAndDecode = keyEntryDecryptedDataPair -> pathEncryptorDecryptor.decrypt( - keyEntryDecryptedDataPair.getPathEncryptionSecretKey(), decode(keyEntryDecryptedDataPair.getData()) + keyEntryDecryptedDataPair.getPathEncryptionSecretKey(), decode(keyEntryDecryptedDataPair.getPath()) ); } @@ -77,27 +77,27 @@ public Uri decrypt(PathEncryptionSecretKey pathEncryptionSecretKey, Uri bucketPa } @SneakyThrows - private static byte[] decode(byte[] encryptedData) { - if (null == encryptedData || encryptedData.length == 0) { - return encryptedData; + private static String decode(String encryptedPath) { + if (null == encryptedPath || encryptedPath.isEmpty()) { + return encryptedPath; } - return Base64.getUrlDecoder().decode(encryptedData); + return new String(Base64.getUrlDecoder().decode(encryptedPath), UTF_8); } @SneakyThrows - private static byte[] encode(byte[] encryptedData) { - if (null == encryptedData) { + private static String encode(String encryptedPath) { + if (null == encryptedPath || encryptedPath.isEmpty()) { return null; } - return Base64.getUrlEncoder().encodeToString(encryptedData).getBytes(UTF_8); + return Base64.getUrlEncoder().encodeToString(encryptedPath.getBytes(UTF_8)); } private static Uri processURIparts( PathEncryptionSecretKey secretKeyEntry, Uri bucketPath, - Function process) { + Function process) { StringBuilder result = new StringBuilder(); String path = bucketPath.getRawPath(); @@ -115,7 +115,7 @@ private static Uri processURIparts( URI.create( Arrays.stream(path.split(PATH_SEPARATOR)) .map(uriPart -> process.apply( - new PathSecretKeyWithData(secretKeyEntry, uriPart.getBytes(UTF_8)))) + new PathSecretKeyWithData(secretKeyEntry, uriPart))) .map(String::new) // byte[] -> string .collect(Collectors.joining(PATH_SEPARATOR))) ); diff --git a/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/pathencryption/dto/PathSecretKeyWithData.java b/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/pathencryption/dto/PathSecretKeyWithData.java index f5ec1c94a..8cee484c7 100644 --- a/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/pathencryption/dto/PathSecretKeyWithData.java +++ b/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/pathencryption/dto/PathSecretKeyWithData.java @@ -9,12 +9,12 @@ * Contains data for encryption or decryption and related secret key entity * * {@code pathEncryptionSecretKey} keys for encryption and decryption path - * {@code data} encrypted or decrypted data + * {@code path} encrypted or decrypted path to file */ @Getter @Setter @AllArgsConstructor public class PathSecretKeyWithData { private final PathEncryptionSecretKey pathEncryptionSecretKey; - private final byte[] data; + private final String path; } diff --git a/datasafe-encryption/datasafe-encryption-impl/src/test/java/de/adorsys/datasafe/encrypiton/impl/pathencryption/SymmetricPathEncryptionServiceImplTest.java b/datasafe-encryption/datasafe-encryption-impl/src/test/java/de/adorsys/datasafe/encrypiton/impl/pathencryption/SymmetricPathEncryptionServiceImplTest.java index 5faccfc13..f61a4296f 100644 --- a/datasafe-encryption/datasafe-encryption-impl/src/test/java/de/adorsys/datasafe/encrypiton/impl/pathencryption/SymmetricPathEncryptionServiceImplTest.java +++ b/datasafe-encryption/datasafe-encryption-impl/src/test/java/de/adorsys/datasafe/encrypiton/impl/pathencryption/SymmetricPathEncryptionServiceImplTest.java @@ -8,6 +8,7 @@ import de.adorsys.datasafe.types.api.resource.Uri; import de.adorsys.datasafe.types.api.shared.BaseMockitoTest; import lombok.extern.slf4j.Slf4j; +import org.cryptomator.siv.SivMode; import org.junit.jupiter.api.Test; import javax.crypto.BadPaddingException; @@ -24,7 +25,7 @@ class SymmetricPathEncryptionServiceImplTest extends BaseMockitoTest { private SymmetricPathEncryptionServiceImpl bucketPathEncryptionService = new SymmetricPathEncryptionServiceImpl( - new DefaultPathEncryptorDecryptor() + new DefaultPathEncryptorDecryptor(new SivMode()) ); private KeyStoreService keyStoreService = new KeyStoreServiceImpl(new DefaultPasswordBasedKeyConfig()); From 6b969cec4e32b11457d78a08a54ca56c2f872c6f Mon Sep 17 00:00:00 2001 From: psp Date: Wed, 11 Sep 2019 12:45:01 +0200 Subject: [PATCH 064/255] Accessable for Minio and Ceph too --- .../java/de/adorsys/datasafe/cli/Cli.java | 8 +- .../datasafe/cli/config/DatasafeFactory.java | 90 ++++++++++++++++--- 2 files changed, 86 insertions(+), 12 deletions(-) diff --git a/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/Cli.java b/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/Cli.java index 2315cb59e..06ebf6975 100644 --- a/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/Cli.java +++ b/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/Cli.java @@ -12,13 +12,18 @@ import lombok.Getter; import lombok.RequiredArgsConstructor; import lombok.SneakyThrows; +import lombok.extern.slf4j.Slf4j; +import org.bouncycastle.jce.provider.BouncyCastleProvider; import picocli.CommandLine; +import java.io.Console; import java.io.Reader; import java.nio.file.Files; import java.nio.file.Path; import java.nio.file.Paths; +import java.security.Security; +@Slf4j @CommandLine.Command( name = "datasafe-cli", subcommands = { @@ -45,7 +50,8 @@ public class Cli implements Runnable { public static void main(String[] args) { // silencing AWS SDK: System.setProperty("org.apache.commons.logging.Log", "org.apache.commons.logging.impl.NoOpLog"); - + // Hi Valentyn, did not get it running locally without the registration + Security.addProvider(new BouncyCastleProvider()); int exitCode = new CommandLine(new Cli()).execute(args); System.exit(exitCode); } diff --git a/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/config/DatasafeFactory.java b/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/config/DatasafeFactory.java index 7bb5b1fa3..dac564e70 100644 --- a/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/config/DatasafeFactory.java +++ b/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/config/DatasafeFactory.java @@ -1,5 +1,12 @@ package de.adorsys.datasafe.cli.config; +import com.amazonaws.ClientConfiguration; +import com.amazonaws.Protocol; +import com.amazonaws.auth.AWSStaticCredentialsProvider; +import com.amazonaws.auth.BasicAWSCredentials; +import com.amazonaws.client.builder.AwsClientBuilder; +import com.amazonaws.services.s3.AmazonS3; +import com.amazonaws.services.s3.AmazonS3ClientBuilder; import com.google.common.collect.ImmutableMap; import dagger.Lazy; import de.adorsys.datasafe.business.impl.service.DaggerDefaultDatasafeServices; @@ -19,10 +26,12 @@ import de.adorsys.datasafe.types.api.context.overrides.OverridesRegistry; import de.adorsys.datasafe.types.api.utils.ExecutorServiceUtil; import lombok.experimental.Delegate; +import lombok.extern.slf4j.Slf4j; import java.nio.file.Path; import java.util.regex.Pattern; +@Slf4j public class DatasafeFactory { public static DefaultDatasafeServices datasafe(Path fsRoot, String systemPassword) { @@ -34,7 +43,10 @@ public static DefaultDatasafeServices datasafe(Path fsRoot, String systemPasswor new RegexDelegatingStorage( ImmutableMap.builder() .put(Pattern.compile("file:/.+"), localFs(fsRoot)) - .put(Pattern.compile("s3://.+"), amazonS3()).build() + .put(Pattern.compile("s3://.+"), amazonS3()) + .put(Pattern.compile("http://.+"), httpS3()) + .put(Pattern.compile("https://.+"), httpS3()) + .build() ) ) .overridesRegistry(registry) @@ -51,18 +63,36 @@ private static StorageService localFs(Path fsRoot) { return new FileSystemStorageService(fsRoot); } + private static StorageService httpS3() { + return new UriBasedAuthStorageService( + acc -> { + String url = acc.getOnlyHostPart().toString(); + String accessKey = acc.getAccessKey(); + String secretKey = acc.getSecretKey(); + String bucketName = acc.getBucketName(); + String region = "eu-central-1"; + log.debug("HTTP reading"); + return getStorageService(accessKey, secretKey, url, region, bucketName); + } + ); + } + private static StorageService amazonS3() { return new UriBasedAuthStorageService( - acc -> new S3StorageService( - S3ClientFactory.getClientByRegion( - acc.getOnlyHostPart().toString().split("://")[1], - acc.getAccessKey(), - acc.getSecretKey() - ), - // Bucket name is encoded in first path segment - acc.getBucketName(), - ExecutorServiceUtil.submitterExecutesOnStarvationExecutingService() - ) + acc -> { + System.out.println("S3"); + log.debug("S3 reading"); + return new S3StorageService( + S3ClientFactory.getClientByRegion( + acc.getOnlyHostPart().toString().split("://")[1], + acc.getAccessKey(), + acc.getSecretKey() + ), + // Bucket name is encoded in first path segment + acc.getBucketName(), + ExecutorServiceUtil.submitterExecutesOnStarvationExecutingService() + ); + } ); } @@ -76,4 +106,42 @@ private WithCredentialProvider(Lazy storageKeyStoreOp this.delegate = new RegexAccessServiceWithStorageCredentialsImpl(storageKeyStoreOperations); } } + + private static S3StorageService getStorageService(String accessKey, String secretKey, String url, String region, String bucket) { + AmazonS3ClientBuilder amazonS3ClientBuilder = AmazonS3ClientBuilder.standard() + .withCredentials( + new AWSStaticCredentialsProvider( + new BasicAWSCredentials( + accessKey, + secretKey)) + ) + .enablePathStyleAccess(); + + AwsClientBuilder.EndpointConfiguration endpoint = new AwsClientBuilder.EndpointConfiguration( + url, + region + ); + amazonS3ClientBuilder.withEndpointConfiguration(endpoint); + + if (! url.toLowerCase().startsWith("https")) { + log.info("Creating S3 client without https"); + ClientConfiguration clientConfig = new ClientConfiguration(); + clientConfig.setProtocol(Protocol.HTTP); + clientConfig.disableSocketProxy(); + amazonS3ClientBuilder.withClientConfiguration(clientConfig); + } + + AmazonS3 amazons3 = amazonS3ClientBuilder.build(); + S3StorageService storageService = new S3StorageService( + amazons3, + bucket, + ExecutorServiceUtil + .submitterExecutesOnStarvationExecutingService( + 5, + 5 + ) + ); + return storageService; + } } + From a80a1496eabba9adcfe1f1d93e46eaa5d95a10ae Mon Sep 17 00:00:00 2001 From: psp Date: Wed, 11 Sep 2019 13:04:29 +0200 Subject: [PATCH 065/255] removed system.out --- .../java/de/adorsys/datasafe/cli/config/DatasafeFactory.java | 1 - 1 file changed, 1 deletion(-) diff --git a/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/config/DatasafeFactory.java b/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/config/DatasafeFactory.java index dac564e70..78b422fca 100644 --- a/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/config/DatasafeFactory.java +++ b/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/config/DatasafeFactory.java @@ -80,7 +80,6 @@ private static StorageService httpS3() { private static StorageService amazonS3() { return new UriBasedAuthStorageService( acc -> { - System.out.println("S3"); log.debug("S3 reading"); return new S3StorageService( S3ClientFactory.getClientByRegion( From 04d73420137adaeea13f845e6b7c52f70565c096 Mon Sep 17 00:00:00 2001 From: Valentyn Berezin Date: Wed, 11 Sep 2019 14:25:35 +0300 Subject: [PATCH 066/255] Fix build, so it does not use windows --- .travis.yml | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/.travis.yml b/.travis.yml index 984eccbd2..714355ee4 100644 --- a/.travis.yml +++ b/.travis.yml @@ -67,26 +67,26 @@ matrix: #### CLI-ORIENTED BUILD #### # These are CLI-only builds that produce Datasafe cli executable for each OS: - # CLI for Linux: -# - os: linux -# language: bash -# before_install: -# - /bin/bash .travis/install_maven_custom_jdk_and_add_security_providers.sh -# <<: *build-cli -# <<: *deploy-cli -# # CLI for MacOS: -# - os: osx -# language: bash -# before_install: -# - /bin/bash .travis/install_maven_custom_jdk_and_add_security_providers.sh -# <<: *build-cli -# <<: *deploy-cli - # CLI for Windows (disabled as of now): - - os: windows - env: - - NO_WIN_DEFENDER=$(curl "${GRAVIS}.disable-windows-defender.sh" --output .no-defender.sh && source .no-defender.sh) + CLI for Linux: + - os: linux language: bash before_install: - /bin/bash .travis/install_maven_custom_jdk_and_add_security_providers.sh <<: *build-cli <<: *deploy-cli + # CLI for MacOS: + - os: osx + language: bash + before_install: + - /bin/bash .travis/install_maven_custom_jdk_and_add_security_providers.sh + <<: *build-cli + <<: *deploy-cli + # CLI for Windows (disabled as of now): +# - os: windows +# env: +# - NO_WIN_DEFENDER=$(curl "${GRAVIS}.disable-windows-defender.sh" --output .no-defender.sh && source .no-defender.sh) +# language: bash +# before_install: +# - /bin/bash .travis/install_maven_custom_jdk_and_add_security_providers.sh +# <<: *build-cli +# <<: *deploy-cli From ab7ee7d6312f24c6a8851267c85b021695792001 Mon Sep 17 00:00:00 2001 From: Valentyn Berezin Date: Wed, 11 Sep 2019 14:27:28 +0300 Subject: [PATCH 067/255] Modify comment --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 714355ee4..41768c1ac 100644 --- a/.travis.yml +++ b/.travis.yml @@ -43,7 +43,7 @@ build-cli: &build-cli # CLI artifacts publishing: deploy-cli: &deploy-cli - # FIXME Enabling temporary deploy rule + # FIXME Enabling temporary deploy rule for cli deploy: on: branch: feature/datasafe-cli-w-s3 From 431f9e098e01268bd40b35b40fd8f9b0cda58623 Mon Sep 17 00:00:00 2001 From: Valentyn Berezin Date: Wed, 11 Sep 2019 14:29:44 +0300 Subject: [PATCH 068/255] Modify comment --- .travis.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.travis.yml b/.travis.yml index 41768c1ac..5e6b06294 100644 --- a/.travis.yml +++ b/.travis.yml @@ -29,6 +29,7 @@ deploy: after_success: - echo "Success" +################ Custom build stages: # Special test-skipping stage to build CLI, using maven-wrapper build-cli: &build-cli script: @@ -56,6 +57,7 @@ deploy-cli: &deploy-cli local_dir: datasafe-cli/target upload-dir: datasafe-cli/${TRAVIS_OS_NAME}/${TRAVIS_COMMIT} +################ Build matrix: # Build configuration definition: matrix: include: From 21973944ce09a5cc5b3f15c5881fe5253045a807 Mon Sep 17 00:00:00 2001 From: Valentyn Berezin Date: Wed, 11 Sep 2019 14:37:04 +0300 Subject: [PATCH 069/255] Fix yaml formatting --- .travis.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 5e6b06294..d6059c339 100644 --- a/.travis.yml +++ b/.travis.yml @@ -69,21 +69,21 @@ matrix: #### CLI-ORIENTED BUILD #### # These are CLI-only builds that produce Datasafe cli executable for each OS: - CLI for Linux: + ### CLI for Linux: - os: linux language: bash before_install: - /bin/bash .travis/install_maven_custom_jdk_and_add_security_providers.sh <<: *build-cli <<: *deploy-cli - # CLI for MacOS: + ### CLI for MacOS: - os: osx language: bash before_install: - /bin/bash .travis/install_maven_custom_jdk_and_add_security_providers.sh <<: *build-cli <<: *deploy-cli - # CLI for Windows (disabled as of now): +# CLI for Windows (disabled as of now): # - os: windows # env: # - NO_WIN_DEFENDER=$(curl "${GRAVIS}.disable-windows-defender.sh" --output .no-defender.sh && source .no-defender.sh) From 31c59ac02eff1c22d8702dbc2b118fef749132d3 Mon Sep 17 00:00:00 2001 From: psp Date: Wed, 11 Sep 2019 13:37:55 +0200 Subject: [PATCH 070/255] Added minio example --- datasafe-cli/README.md | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/datasafe-cli/README.md b/datasafe-cli/README.md index f79d8c297..d63bdba07 100644 --- a/datasafe-cli/README.md +++ b/datasafe-cli/README.md @@ -6,3 +6,41 @@ 1. add org.bouncycastle.jsse.provider.BouncyCastleJsseProvider to java.security as SSL provider (bctls jar) Basically, you need to add a line of the following format in a location with similar properties: security.provider.n=provider-class-name + +# SimpleTest with Minio +Lets assume you have a minio running with url: http://localhost:9000. +Further you have a bucket named "affe" in that minio. + +Before you run the Cli (which is the main class) in the project directory, create a temporary folder <$projectDir>/tmp. +And than allways start the Cli in this tmp directory. In this case, you can use the default confirms and all profiles/keys/secrets will be stored in the tmp directory. As this example is to store the data in minio, the data is not stored in the tmp directory, but in minio. + +1. First you create a profile. Simple confirm all asked questions with enter. + ``` + -u=peter -p=peter -sp=system profile create + ``` +1. Add the url of minio with a new storagename. Notice that the bucket is at the end of the url. + ``` + -u=peter -p=peter -sp=system profile storage add -i my-minio -p http://localhost:9000/affe + ``` + +1. Add the accesskey and secretkey. It assumed, they are simpleAcessKey and simpleSecretKey. + ``` + -u=peter -p=peter -sp=system profile storage credentials add -m http://.+ --username=simpleAccessKey --password=simpleSecretKey + ``` + +1. Now you can store data to your minio. The data will be encrypted with the keys stored in the tmp directory. + So in this case the pom is stored to minio. Of course encrypted. But with the new name pom2.xml. + ``` + -u=peter -p=peter -sp=system private cp -s=my-minio ../pom.xml pom2.xml + ``` + +1. Now you can see the encrypted data in your minio. To see the decrypted name, you can use the list command. + ``` + -u=peter -p=peter -sp=system private ls -s=my-minio + ``` + +1. Eventually you can decrypt the content of pom2.xml. I will be written to stdout. + ``` + -u=peter -p=peter -sp=system private cat -s=my-minio pom2.xml + ``` + From 2b528ab73df14bdfa0691d5e1513db73cd99abda Mon Sep 17 00:00:00 2001 From: Valentyn Berezin Date: Wed, 11 Sep 2019 14:50:13 +0300 Subject: [PATCH 071/255] Use wrapper --- .travis.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index d6059c339..b2603223c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -18,7 +18,7 @@ install: # Original build script: - echo "Script" - - mvn --settings .travis/settings.xml clean verify -B -V -DAWS_BUCKET=${AWS_BUCKET} -DskipTests # FIXME remove skipTests + - ./mvnw --settings .travis/settings.xml clean verify -B -V -DAWS_BUCKET=${AWS_BUCKET} -DskipTests # FIXME remove skipTests # Original deploy deploy: @@ -36,11 +36,11 @@ build-cli: &build-cli # re-export JAVA_HOME - source ~/.jdk_config # Prepare everything, no settings.xml needed - - mvn clean install -B -V -DskipTests + - ./mvnw clean install -B -V -DskipTests # Change security providers of JDK - /bin/bash .travis/enable_bouncycastle_security.sh # Build native image, no settings.xml needed - - mvn -f datasafe-cli/pom.xml clean package -B -V -Pnative-image -DskipTests + - ./mvnw -f datasafe-cli/pom.xml clean package -B -V -Pnative-image -DskipTests # CLI artifacts publishing: deploy-cli: &deploy-cli From 0c5f619ed0e9105372c9c159f6c398caca9790c0 Mon Sep 17 00:00:00 2001 From: Valentyn Berezin Date: Wed, 11 Sep 2019 14:58:36 +0300 Subject: [PATCH 072/255] Get wrapper back --- .mvn/wrapper/MavenWrapperDownloader.java | 117 +++++++++ .mvn/wrapper/maven-wrapper.properties | 2 + mvnw | 310 +++++++++++++++++++++++ mvnw.cmd | 182 +++++++++++++ 4 files changed, 611 insertions(+) create mode 100644 .mvn/wrapper/MavenWrapperDownloader.java create mode 100644 .mvn/wrapper/maven-wrapper.properties create mode 100755 mvnw create mode 100644 mvnw.cmd diff --git a/.mvn/wrapper/MavenWrapperDownloader.java b/.mvn/wrapper/MavenWrapperDownloader.java new file mode 100644 index 000000000..c32394f14 --- /dev/null +++ b/.mvn/wrapper/MavenWrapperDownloader.java @@ -0,0 +1,117 @@ +/* + * Copyright 2007-present the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import java.net.*; +import java.io.*; +import java.nio.channels.*; +import java.util.Properties; + +public class MavenWrapperDownloader { + + private static final String WRAPPER_VERSION = "0.5.5"; + /** + * Default URL to download the maven-wrapper.jar from, if no 'downloadUrl' is provided. + */ + private static final String DEFAULT_DOWNLOAD_URL = "https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/" + + WRAPPER_VERSION + "/maven-wrapper-" + WRAPPER_VERSION + ".jar"; + + /** + * Path to the maven-wrapper.properties file, which might contain a downloadUrl property to + * use instead of the default one. + */ + private static final String MAVEN_WRAPPER_PROPERTIES_PATH = + ".mvn/wrapper/maven-wrapper.properties"; + + /** + * Path where the maven-wrapper.jar will be saved to. + */ + private static final String MAVEN_WRAPPER_JAR_PATH = + ".mvn/wrapper/maven-wrapper.jar"; + + /** + * Name of the property which should be used to override the default download url for the wrapper. + */ + private static final String PROPERTY_NAME_WRAPPER_URL = "wrapperUrl"; + + public static void main(String args[]) { + System.out.println("- Downloader started"); + File baseDirectory = new File(args[0]); + System.out.println("- Using base directory: " + baseDirectory.getAbsolutePath()); + + // If the maven-wrapper.properties exists, read it and check if it contains a custom + // wrapperUrl parameter. + File mavenWrapperPropertyFile = new File(baseDirectory, MAVEN_WRAPPER_PROPERTIES_PATH); + String url = DEFAULT_DOWNLOAD_URL; + if(mavenWrapperPropertyFile.exists()) { + FileInputStream mavenWrapperPropertyFileInputStream = null; + try { + mavenWrapperPropertyFileInputStream = new FileInputStream(mavenWrapperPropertyFile); + Properties mavenWrapperProperties = new Properties(); + mavenWrapperProperties.load(mavenWrapperPropertyFileInputStream); + url = mavenWrapperProperties.getProperty(PROPERTY_NAME_WRAPPER_URL, url); + } catch (IOException e) { + System.out.println("- ERROR loading '" + MAVEN_WRAPPER_PROPERTIES_PATH + "'"); + } finally { + try { + if(mavenWrapperPropertyFileInputStream != null) { + mavenWrapperPropertyFileInputStream.close(); + } + } catch (IOException e) { + // Ignore ... + } + } + } + System.out.println("- Downloading from: " + url); + + File outputFile = new File(baseDirectory.getAbsolutePath(), MAVEN_WRAPPER_JAR_PATH); + if(!outputFile.getParentFile().exists()) { + if(!outputFile.getParentFile().mkdirs()) { + System.out.println( + "- ERROR creating output directory '" + outputFile.getParentFile().getAbsolutePath() + "'"); + } + } + System.out.println("- Downloading to: " + outputFile.getAbsolutePath()); + try { + downloadFileFromURL(url, outputFile); + System.out.println("Done"); + System.exit(0); + } catch (Throwable e) { + System.out.println("- Error downloading"); + e.printStackTrace(); + System.exit(1); + } + } + + private static void downloadFileFromURL(String urlString, File destination) throws Exception { + if (System.getenv("MVNW_USERNAME") != null && System.getenv("MVNW_PASSWORD") != null) { + String username = System.getenv("MVNW_USERNAME"); + char[] password = System.getenv("MVNW_PASSWORD").toCharArray(); + Authenticator.setDefault(new Authenticator() { + @Override + protected PasswordAuthentication getPasswordAuthentication() { + return new PasswordAuthentication(username, password); + } + }); + } + URL website = new URL(urlString); + ReadableByteChannel rbc; + rbc = Channels.newChannel(website.openStream()); + FileOutputStream fos = new FileOutputStream(destination); + fos.getChannel().transferFrom(rbc, 0, Long.MAX_VALUE); + fos.close(); + rbc.close(); + } + +} diff --git a/.mvn/wrapper/maven-wrapper.properties b/.mvn/wrapper/maven-wrapper.properties new file mode 100644 index 000000000..fa87ad7dd --- /dev/null +++ b/.mvn/wrapper/maven-wrapper.properties @@ -0,0 +1,2 @@ +distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.6.1/apache-maven-3.6.1-bin.zip +wrapperUrl=https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.5/maven-wrapper-0.5.5.jar diff --git a/mvnw b/mvnw new file mode 100755 index 000000000..d2f0ea380 --- /dev/null +++ b/mvnw @@ -0,0 +1,310 @@ +#!/bin/sh +# ---------------------------------------------------------------------------- +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +# ---------------------------------------------------------------------------- + +# ---------------------------------------------------------------------------- +# Maven2 Start Up Batch script +# +# Required ENV vars: +# ------------------ +# JAVA_HOME - location of a JDK home dir +# +# Optional ENV vars +# ----------------- +# M2_HOME - location of maven2's installed home dir +# MAVEN_OPTS - parameters passed to the Java VM when running Maven +# e.g. to debug Maven itself, use +# set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000 +# MAVEN_SKIP_RC - flag to disable loading of mavenrc files +# ---------------------------------------------------------------------------- + +if [ -z "$MAVEN_SKIP_RC" ] ; then + + if [ -f /etc/mavenrc ] ; then + . /etc/mavenrc + fi + + if [ -f "$HOME/.mavenrc" ] ; then + . "$HOME/.mavenrc" + fi + +fi + +# OS specific support. $var _must_ be set to either true or false. +cygwin=false; +darwin=false; +mingw=false +case "`uname`" in + CYGWIN*) cygwin=true ;; + MINGW*) mingw=true;; + Darwin*) darwin=true + # Use /usr/libexec/java_home if available, otherwise fall back to /Library/Java/Home + # See https://developer.apple.com/library/mac/qa/qa1170/_index.html + if [ -z "$JAVA_HOME" ]; then + if [ -x "/usr/libexec/java_home" ]; then + export JAVA_HOME="`/usr/libexec/java_home`" + else + export JAVA_HOME="/Library/Java/Home" + fi + fi + ;; +esac + +if [ -z "$JAVA_HOME" ] ; then + if [ -r /etc/gentoo-release ] ; then + JAVA_HOME=`java-config --jre-home` + fi +fi + +if [ -z "$M2_HOME" ] ; then + ## resolve links - $0 may be a link to maven's home + PRG="$0" + + # need this for relative symlinks + while [ -h "$PRG" ] ; do + ls=`ls -ld "$PRG"` + link=`expr "$ls" : '.*-> \(.*\)$'` + if expr "$link" : '/.*' > /dev/null; then + PRG="$link" + else + PRG="`dirname "$PRG"`/$link" + fi + done + + saveddir=`pwd` + + M2_HOME=`dirname "$PRG"`/.. + + # make it fully qualified + M2_HOME=`cd "$M2_HOME" && pwd` + + cd "$saveddir" + # echo Using m2 at $M2_HOME +fi + +# For Cygwin, ensure paths are in UNIX format before anything is touched +if $cygwin ; then + [ -n "$M2_HOME" ] && + M2_HOME=`cygpath --unix "$M2_HOME"` + [ -n "$JAVA_HOME" ] && + JAVA_HOME=`cygpath --unix "$JAVA_HOME"` + [ -n "$CLASSPATH" ] && + CLASSPATH=`cygpath --path --unix "$CLASSPATH"` +fi + +# For Mingw, ensure paths are in UNIX format before anything is touched +if $mingw ; then + [ -n "$M2_HOME" ] && + M2_HOME="`(cd "$M2_HOME"; pwd)`" + [ -n "$JAVA_HOME" ] && + JAVA_HOME="`(cd "$JAVA_HOME"; pwd)`" +fi + +if [ -z "$JAVA_HOME" ]; then + javaExecutable="`which javac`" + if [ -n "$javaExecutable" ] && ! [ "`expr \"$javaExecutable\" : '\([^ ]*\)'`" = "no" ]; then + # readlink(1) is not available as standard on Solaris 10. + readLink=`which readlink` + if [ ! `expr "$readLink" : '\([^ ]*\)'` = "no" ]; then + if $darwin ; then + javaHome="`dirname \"$javaExecutable\"`" + javaExecutable="`cd \"$javaHome\" && pwd -P`/javac" + else + javaExecutable="`readlink -f \"$javaExecutable\"`" + fi + javaHome="`dirname \"$javaExecutable\"`" + javaHome=`expr "$javaHome" : '\(.*\)/bin'` + JAVA_HOME="$javaHome" + export JAVA_HOME + fi + fi +fi + +if [ -z "$JAVACMD" ] ; then + if [ -n "$JAVA_HOME" ] ; then + if [ -x "$JAVA_HOME/jre/sh/java" ] ; then + # IBM's JDK on AIX uses strange locations for the executables + JAVACMD="$JAVA_HOME/jre/sh/java" + else + JAVACMD="$JAVA_HOME/bin/java" + fi + else + JAVACMD="`which java`" + fi +fi + +if [ ! -x "$JAVACMD" ] ; then + echo "Error: JAVA_HOME is not defined correctly." >&2 + echo " We cannot execute $JAVACMD" >&2 + exit 1 +fi + +if [ -z "$JAVA_HOME" ] ; then + echo "Warning: JAVA_HOME environment variable is not set." +fi + +CLASSWORLDS_LAUNCHER=org.codehaus.plexus.classworlds.launcher.Launcher + +# traverses directory structure from process work directory to filesystem root +# first directory with .mvn subdirectory is considered project base directory +find_maven_basedir() { + + if [ -z "$1" ] + then + echo "Path not specified to find_maven_basedir" + return 1 + fi + + basedir="$1" + wdir="$1" + while [ "$wdir" != '/' ] ; do + if [ -d "$wdir"/.mvn ] ; then + basedir=$wdir + break + fi + # workaround for JBEAP-8937 (on Solaris 10/Sparc) + if [ -d "${wdir}" ]; then + wdir=`cd "$wdir/.."; pwd` + fi + # end of workaround + done + echo "${basedir}" +} + +# concatenates all lines of a file +concat_lines() { + if [ -f "$1" ]; then + echo "$(tr -s '\n' ' ' < "$1")" + fi +} + +BASE_DIR=`find_maven_basedir "$(pwd)"` +if [ -z "$BASE_DIR" ]; then + exit 1; +fi + +########################################################################################## +# Extension to allow automatically downloading the maven-wrapper.jar from Maven-central +# This allows using the maven wrapper in projects that prohibit checking in binary data. +########################################################################################## +if [ -r "$BASE_DIR/.mvn/wrapper/maven-wrapper.jar" ]; then + if [ "$MVNW_VERBOSE" = true ]; then + echo "Found .mvn/wrapper/maven-wrapper.jar" + fi +else + if [ "$MVNW_VERBOSE" = true ]; then + echo "Couldn't find .mvn/wrapper/maven-wrapper.jar, downloading it ..." + fi + if [ -n "$MVNW_REPOURL" ]; then + jarUrl="$MVNW_REPOURL/io/takari/maven-wrapper/0.5.5/maven-wrapper-0.5.5.jar" + else + jarUrl="https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.5/maven-wrapper-0.5.5.jar" + fi + while IFS="=" read key value; do + case "$key" in (wrapperUrl) jarUrl="$value"; break ;; + esac + done < "$BASE_DIR/.mvn/wrapper/maven-wrapper.properties" + if [ "$MVNW_VERBOSE" = true ]; then + echo "Downloading from: $jarUrl" + fi + wrapperJarPath="$BASE_DIR/.mvn/wrapper/maven-wrapper.jar" + if $cygwin; then + wrapperJarPath=`cygpath --path --windows "$wrapperJarPath"` + fi + + if command -v wget > /dev/null; then + if [ "$MVNW_VERBOSE" = true ]; then + echo "Found wget ... using wget" + fi + if [ -z "$MVNW_USERNAME" ] || [ -z "$MVNW_PASSWORD" ]; then + wget "$jarUrl" -O "$wrapperJarPath" + else + wget --http-user=$MVNW_USERNAME --http-password=$MVNW_PASSWORD "$jarUrl" -O "$wrapperJarPath" + fi + elif command -v curl > /dev/null; then + if [ "$MVNW_VERBOSE" = true ]; then + echo "Found curl ... using curl" + fi + if [ -z "$MVNW_USERNAME" ] || [ -z "$MVNW_PASSWORD" ]; then + curl -o "$wrapperJarPath" "$jarUrl" -f + else + curl --user $MVNW_USERNAME:$MVNW_PASSWORD -o "$wrapperJarPath" "$jarUrl" -f + fi + + else + if [ "$MVNW_VERBOSE" = true ]; then + echo "Falling back to using Java to download" + fi + javaClass="$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.java" + # For Cygwin, switch paths to Windows format before running javac + if $cygwin; then + javaClass=`cygpath --path --windows "$javaClass"` + fi + if [ -e "$javaClass" ]; then + if [ ! -e "$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.class" ]; then + if [ "$MVNW_VERBOSE" = true ]; then + echo " - Compiling MavenWrapperDownloader.java ..." + fi + # Compiling the Java class + ("$JAVA_HOME/bin/javac" "$javaClass") + fi + if [ -e "$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.class" ]; then + # Running the downloader + if [ "$MVNW_VERBOSE" = true ]; then + echo " - Running MavenWrapperDownloader.java ..." + fi + ("$JAVA_HOME/bin/java" -cp .mvn/wrapper MavenWrapperDownloader "$MAVEN_PROJECTBASEDIR") + fi + fi + fi +fi +########################################################################################## +# End of extension +########################################################################################## + +export MAVEN_PROJECTBASEDIR=${MAVEN_BASEDIR:-"$BASE_DIR"} +if [ "$MVNW_VERBOSE" = true ]; then + echo $MAVEN_PROJECTBASEDIR +fi +MAVEN_OPTS="$(concat_lines "$MAVEN_PROJECTBASEDIR/.mvn/jvm.config") $MAVEN_OPTS" + +# For Cygwin, switch paths to Windows format before running java +if $cygwin; then + [ -n "$M2_HOME" ] && + M2_HOME=`cygpath --path --windows "$M2_HOME"` + [ -n "$JAVA_HOME" ] && + JAVA_HOME=`cygpath --path --windows "$JAVA_HOME"` + [ -n "$CLASSPATH" ] && + CLASSPATH=`cygpath --path --windows "$CLASSPATH"` + [ -n "$MAVEN_PROJECTBASEDIR" ] && + MAVEN_PROJECTBASEDIR=`cygpath --path --windows "$MAVEN_PROJECTBASEDIR"` +fi + +# Provide a "standardized" way to retrieve the CLI args that will +# work with both Windows and non-Windows executions. +MAVEN_CMD_LINE_ARGS="$MAVEN_CONFIG $@" +export MAVEN_CMD_LINE_ARGS + +WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain + +exec "$JAVACMD" \ + $MAVEN_OPTS \ + -classpath "$MAVEN_PROJECTBASEDIR/.mvn/wrapper/maven-wrapper.jar" \ + "-Dmaven.home=${M2_HOME}" "-Dmaven.multiModuleProjectDirectory=${MAVEN_PROJECTBASEDIR}" \ + ${WRAPPER_LAUNCHER} $MAVEN_CONFIG "$@" diff --git a/mvnw.cmd b/mvnw.cmd new file mode 100644 index 000000000..b26ab24f0 --- /dev/null +++ b/mvnw.cmd @@ -0,0 +1,182 @@ +@REM ---------------------------------------------------------------------------- +@REM Licensed to the Apache Software Foundation (ASF) under one +@REM or more contributor license agreements. See the NOTICE file +@REM distributed with this work for additional information +@REM regarding copyright ownership. The ASF licenses this file +@REM to you under the Apache License, Version 2.0 (the +@REM "License"); you may not use this file except in compliance +@REM with the License. You may obtain a copy of the License at +@REM +@REM http://www.apache.org/licenses/LICENSE-2.0 +@REM +@REM Unless required by applicable law or agreed to in writing, +@REM software distributed under the License is distributed on an +@REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +@REM KIND, either express or implied. See the License for the +@REM specific language governing permissions and limitations +@REM under the License. +@REM ---------------------------------------------------------------------------- + +@REM ---------------------------------------------------------------------------- +@REM Maven2 Start Up Batch script +@REM +@REM Required ENV vars: +@REM JAVA_HOME - location of a JDK home dir +@REM +@REM Optional ENV vars +@REM M2_HOME - location of maven2's installed home dir +@REM MAVEN_BATCH_ECHO - set to 'on' to enable the echoing of the batch commands +@REM MAVEN_BATCH_PAUSE - set to 'on' to wait for a key stroke before ending +@REM MAVEN_OPTS - parameters passed to the Java VM when running Maven +@REM e.g. to debug Maven itself, use +@REM set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000 +@REM MAVEN_SKIP_RC - flag to disable loading of mavenrc files +@REM ---------------------------------------------------------------------------- + +@REM Begin all REM lines with '@' in case MAVEN_BATCH_ECHO is 'on' +@echo off +@REM set title of command window +title %0 +@REM enable echoing by setting MAVEN_BATCH_ECHO to 'on' +@if "%MAVEN_BATCH_ECHO%" == "on" echo %MAVEN_BATCH_ECHO% + +@REM set %HOME% to equivalent of $HOME +if "%HOME%" == "" (set "HOME=%HOMEDRIVE%%HOMEPATH%") + +@REM Execute a user defined script before this one +if not "%MAVEN_SKIP_RC%" == "" goto skipRcPre +@REM check for pre script, once with legacy .bat ending and once with .cmd ending +if exist "%HOME%\mavenrc_pre.bat" call "%HOME%\mavenrc_pre.bat" +if exist "%HOME%\mavenrc_pre.cmd" call "%HOME%\mavenrc_pre.cmd" +:skipRcPre + +@setlocal + +set ERROR_CODE=0 + +@REM To isolate internal variables from possible post scripts, we use another setlocal +@setlocal + +@REM ==== START VALIDATION ==== +if not "%JAVA_HOME%" == "" goto OkJHome + +echo. +echo Error: JAVA_HOME not found in your environment. >&2 +echo Please set the JAVA_HOME variable in your environment to match the >&2 +echo location of your Java installation. >&2 +echo. +goto error + +:OkJHome +if exist "%JAVA_HOME%\bin\java.exe" goto init + +echo. +echo Error: JAVA_HOME is set to an invalid directory. >&2 +echo JAVA_HOME = "%JAVA_HOME%" >&2 +echo Please set the JAVA_HOME variable in your environment to match the >&2 +echo location of your Java installation. >&2 +echo. +goto error + +@REM ==== END VALIDATION ==== + +:init + +@REM Find the project base dir, i.e. the directory that contains the folder ".mvn". +@REM Fallback to current working directory if not found. + +set MAVEN_PROJECTBASEDIR=%MAVEN_BASEDIR% +IF NOT "%MAVEN_PROJECTBASEDIR%"=="" goto endDetectBaseDir + +set EXEC_DIR=%CD% +set WDIR=%EXEC_DIR% +:findBaseDir +IF EXIST "%WDIR%"\.mvn goto baseDirFound +cd .. +IF "%WDIR%"=="%CD%" goto baseDirNotFound +set WDIR=%CD% +goto findBaseDir + +:baseDirFound +set MAVEN_PROJECTBASEDIR=%WDIR% +cd "%EXEC_DIR%" +goto endDetectBaseDir + +:baseDirNotFound +set MAVEN_PROJECTBASEDIR=%EXEC_DIR% +cd "%EXEC_DIR%" + +:endDetectBaseDir + +IF NOT EXIST "%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config" goto endReadAdditionalConfig + +@setlocal EnableExtensions EnableDelayedExpansion +for /F "usebackq delims=" %%a in ("%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config") do set JVM_CONFIG_MAVEN_PROPS=!JVM_CONFIG_MAVEN_PROPS! %%a +@endlocal & set JVM_CONFIG_MAVEN_PROPS=%JVM_CONFIG_MAVEN_PROPS% + +:endReadAdditionalConfig + +SET MAVEN_JAVA_EXE="%JAVA_HOME%\bin\java.exe" +set WRAPPER_JAR="%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.jar" +set WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain + +set DOWNLOAD_URL="https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.5/maven-wrapper-0.5.5.jar" + +FOR /F "tokens=1,2 delims==" %%A IN ("%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.properties") DO ( + IF "%%A"=="wrapperUrl" SET DOWNLOAD_URL=%%B +) + +@REM Extension to allow automatically downloading the maven-wrapper.jar from Maven-central +@REM This allows using the maven wrapper in projects that prohibit checking in binary data. +if exist %WRAPPER_JAR% ( + if "%MVNW_VERBOSE%" == "true" ( + echo Found %WRAPPER_JAR% + ) +) else ( + if not "%MVNW_REPOURL%" == "" ( + SET DOWNLOAD_URL="%MVNW_REPOURL%/io/takari/maven-wrapper/0.5.5/maven-wrapper-0.5.5.jar" + ) + if "%MVNW_VERBOSE%" == "true" ( + echo Couldn't find %WRAPPER_JAR%, downloading it ... + echo Downloading from: %DOWNLOAD_URL% + ) + + powershell -Command "&{"^ + "$webclient = new-object System.Net.WebClient;"^ + "if (-not ([string]::IsNullOrEmpty('%MVNW_USERNAME%') -and [string]::IsNullOrEmpty('%MVNW_PASSWORD%'))) {"^ + "$webclient.Credentials = new-object System.Net.NetworkCredential('%MVNW_USERNAME%', '%MVNW_PASSWORD%');"^ + "}"^ + "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; $webclient.DownloadFile('%DOWNLOAD_URL%', '%WRAPPER_JAR%')"^ + "}" + if "%MVNW_VERBOSE%" == "true" ( + echo Finished downloading %WRAPPER_JAR% + ) +) +@REM End of extension + +@REM Provide a "standardized" way to retrieve the CLI args that will +@REM work with both Windows and non-Windows executions. +set MAVEN_CMD_LINE_ARGS=%* + +%MAVEN_JAVA_EXE% %JVM_CONFIG_MAVEN_PROPS% %MAVEN_OPTS% %MAVEN_DEBUG_OPTS% -classpath %WRAPPER_JAR% "-Dmaven.multiModuleProjectDirectory=%MAVEN_PROJECTBASEDIR%" %WRAPPER_LAUNCHER% %MAVEN_CONFIG% %* +if ERRORLEVEL 1 goto error +goto end + +:error +set ERROR_CODE=1 + +:end +@endlocal & set ERROR_CODE=%ERROR_CODE% + +if not "%MAVEN_SKIP_RC%" == "" goto skipRcPost +@REM check for post script, once with legacy .bat ending and once with .cmd ending +if exist "%HOME%\mavenrc_post.bat" call "%HOME%\mavenrc_post.bat" +if exist "%HOME%\mavenrc_post.cmd" call "%HOME%\mavenrc_post.cmd" +:skipRcPost + +@REM pause the script if MAVEN_BATCH_PAUSE is set to 'on' +if "%MAVEN_BATCH_PAUSE%" == "on" pause + +if "%MAVEN_TERMINATE_CMD%" == "on" exit %ERROR_CODE% + +exit /B %ERROR_CODE% From 6d649ff21c734a2342e6c06e4f4e09df9abe7ec8 Mon Sep 17 00:00:00 2001 From: Valentyn Berezin Date: Wed, 11 Sep 2019 15:15:11 +0300 Subject: [PATCH 073/255] Drop deploy secrets when they are not needed --- .travis.yml | 3 +++ .travis/drop_deploy_secrets.sh | 11 +++++++++++ 2 files changed, 14 insertions(+) create mode 100755 .travis/drop_deploy_secrets.sh diff --git a/.travis.yml b/.travis.yml index b2603223c..e8152be20 100644 --- a/.travis.yml +++ b/.travis.yml @@ -73,6 +73,7 @@ matrix: - os: linux language: bash before_install: + - source ./travis/drop_deploy_secrets.sh - /bin/bash .travis/install_maven_custom_jdk_and_add_security_providers.sh <<: *build-cli <<: *deploy-cli @@ -80,6 +81,7 @@ matrix: - os: osx language: bash before_install: + - source ./travis/drop_deploy_secrets.sh - /bin/bash .travis/install_maven_custom_jdk_and_add_security_providers.sh <<: *build-cli <<: *deploy-cli @@ -89,6 +91,7 @@ matrix: # - NO_WIN_DEFENDER=$(curl "${GRAVIS}.disable-windows-defender.sh" --output .no-defender.sh && source .no-defender.sh) # language: bash # before_install: +# - source ./travis/drop_deploy_secrets.sh # - /bin/bash .travis/install_maven_custom_jdk_and_add_security_providers.sh # <<: *build-cli # <<: *deploy-cli diff --git a/.travis/drop_deploy_secrets.sh b/.travis/drop_deploy_secrets.sh new file mode 100755 index 000000000..58d7cd6a1 --- /dev/null +++ b/.travis/drop_deploy_secrets.sh @@ -0,0 +1,11 @@ +#!/bin/bash + +export GPG_OWNERTRUST='' +export GPG_SECRET_KEY='' +export GPG_PASSPHRASE='' +export OPENSHIFT_USER='' +export OPENSHIFT_PASSWORD='' +export DOCKERHUB_USER='' +export DOCKERHUB_PASS='' +export SONATYPE_USERNAME='' +export SONATYPE_PASSWORD='' From 664e526d30169035f32aae67211fbafe668857d0 Mon Sep 17 00:00:00 2001 From: Valentyn Berezin Date: Wed, 11 Sep 2019 15:17:29 +0300 Subject: [PATCH 074/255] Drop deploy secrets when they are not needed --- .travis.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index e8152be20..ea3bf7b27 100644 --- a/.travis.yml +++ b/.travis.yml @@ -73,7 +73,7 @@ matrix: - os: linux language: bash before_install: - - source ./travis/drop_deploy_secrets.sh + - source .travis/drop_deploy_secrets.sh - /bin/bash .travis/install_maven_custom_jdk_and_add_security_providers.sh <<: *build-cli <<: *deploy-cli @@ -81,7 +81,7 @@ matrix: - os: osx language: bash before_install: - - source ./travis/drop_deploy_secrets.sh + - source .travis/drop_deploy_secrets.sh - /bin/bash .travis/install_maven_custom_jdk_and_add_security_providers.sh <<: *build-cli <<: *deploy-cli @@ -91,7 +91,7 @@ matrix: # - NO_WIN_DEFENDER=$(curl "${GRAVIS}.disable-windows-defender.sh" --output .no-defender.sh && source .no-defender.sh) # language: bash # before_install: -# - source ./travis/drop_deploy_secrets.sh +# - source .travis/drop_deploy_secrets.sh # - /bin/bash .travis/install_maven_custom_jdk_and_add_security_providers.sh # <<: *build-cli # <<: *deploy-cli From e973613e95f35534ccd854467a1fbfe4643c320b Mon Sep 17 00:00:00 2001 From: Valentyn Berezin Date: Mon, 16 Sep 2019 15:15:17 +0300 Subject: [PATCH 075/255] DOC-239. SIV mode usage without leaking that path segments are same, unless they are on same level (identity in this case) - not possible to guess a/b/a pattern from encryption --- .../keys/DFSPrivateKeyServiceImpl.java | 4 +- .../keystore/KeyStoreCreationConfig.java | 2 +- .../keystore/PathEncryptionSecretKey.java | 3 +- .../impl/keystore/KeyStoreServiceImpl.java | 2 +- .../DefaultPathEncryptorDecryptor.java | 24 +++-- .../PathEncryptorDecryptor.java | 11 +- .../SymmetricPathEncryptionServiceImpl.java | 84 +++++++++------ ...java => PathSegmentWithSecretKeyWith.java} | 20 +++- ...ymmetricPathEncryptionServiceImplTest.java | 101 +++++++++++------- 9 files changed, 157 insertions(+), 94 deletions(-) rename datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/pathencryption/dto/{PathSecretKeyWithData.java => PathSegmentWithSecretKeyWith.java} (50%) diff --git a/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/keys/DFSPrivateKeyServiceImpl.java b/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/keys/DFSPrivateKeyServiceImpl.java index 22da0dda7..007dc1bd6 100644 --- a/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/keys/DFSPrivateKeyServiceImpl.java +++ b/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/keys/DFSPrivateKeyServiceImpl.java @@ -41,7 +41,7 @@ public PathEncryptionSecretKey pathEncryptionSecretKey(UserIDAuth forUser) { List secretKeyIds = getSecretKeyIds(forUser); String secretPathKeyId = getSecretPathKeyIdByPrefix(secretKeyIds, PATH_KEY_ID_PREFIX); - String secretPathCrtKeyId = getSecretPathKeyIdByPrefix(secretKeyIds, PATH_KEY_ID_PREFIX_CRT); + String secretPathCrtKeyId = getSecretPathKeyIdByPrefix(secretKeyIds, PATH_KEY_ID_PREFIX_CTR); return new PathEncryptionSecretKey( new KeyID(secretPathKeyId), @@ -59,7 +59,7 @@ private String getSecretPathKeyIdByPrefix(List keys, String pathKeyIdPref private List getSecretKeyIds(UserIDAuth forUser) { return keyStoreOper.readAliases(forUser).stream() - .filter(it -> it.startsWith(PATH_KEY_ID_PREFIX) || it.startsWith(PATH_KEY_ID_PREFIX_CRT)) + .filter(it -> it.startsWith(PATH_KEY_ID_PREFIX) || it.startsWith(PATH_KEY_ID_PREFIX_CTR)) .map(KeyID::new) .collect(Collectors.toList()); } diff --git a/datasafe-encryption/datasafe-encryption-api/src/main/java/de/adorsys/datasafe/encrypiton/api/types/keystore/KeyStoreCreationConfig.java b/datasafe-encryption/datasafe-encryption-api/src/main/java/de/adorsys/datasafe/encrypiton/api/types/keystore/KeyStoreCreationConfig.java index ddf31dde0..6253670c3 100644 --- a/datasafe-encryption/datasafe-encryption-api/src/main/java/de/adorsys/datasafe/encrypiton/api/types/keystore/KeyStoreCreationConfig.java +++ b/datasafe-encryption/datasafe-encryption-api/src/main/java/de/adorsys/datasafe/encrypiton/api/types/keystore/KeyStoreCreationConfig.java @@ -11,7 +11,7 @@ public class KeyStoreCreationConfig { public static final String PATH_KEY_ID_PREFIX = "PATH_SECRET"; - public static final String PATH_KEY_ID_PREFIX_CRT = "PATH_SECRET_CRT_"; + public static final String PATH_KEY_ID_PREFIX_CTR = "PATH_CTR_SECRET"; public static final String DOCUMENT_KEY_ID_PREFIX = "PRIVATE_SECRET"; private final int encKeyNumber; diff --git a/datasafe-encryption/datasafe-encryption-api/src/main/java/de/adorsys/datasafe/encrypiton/api/types/keystore/PathEncryptionSecretKey.java b/datasafe-encryption/datasafe-encryption-api/src/main/java/de/adorsys/datasafe/encrypiton/api/types/keystore/PathEncryptionSecretKey.java index 4528ff3a2..ce5f1a22b 100644 --- a/datasafe-encryption/datasafe-encryption-api/src/main/java/de/adorsys/datasafe/encrypiton/api/types/keystore/PathEncryptionSecretKey.java +++ b/datasafe-encryption/datasafe-encryption-api/src/main/java/de/adorsys/datasafe/encrypiton/api/types/keystore/PathEncryptionSecretKey.java @@ -11,7 +11,8 @@ @RequiredArgsConstructor public class PathEncryptionSecretKey { - private final KeyID keyID; + private final KeyID secretKeyId; private final SecretKey secretKey; + private final KeyID counterKeyId; private final SecretKey counterSecretKey; } diff --git a/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/keystore/KeyStoreServiceImpl.java b/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/keystore/KeyStoreServiceImpl.java index 535fc5481..2ba7c1619 100644 --- a/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/keystore/KeyStoreServiceImpl.java +++ b/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/keystore/KeyStoreServiceImpl.java @@ -45,7 +45,7 @@ public KeyStore createKeyStore(KeyStoreAuth keyStoreAuth, config, ImmutableMap.of( new KeyID(PATH_KEY_ID_PREFIX + UUID.randomUUID().toString()), Optional.empty(), - new KeyID(PATH_KEY_ID_PREFIX_CRT + UUID.randomUUID().toString()), Optional.empty(), + new KeyID(PATH_KEY_ID_PREFIX_CTR + UUID.randomUUID().toString()), Optional.empty(), new KeyID(DOCUMENT_KEY_ID_PREFIX + UUID.randomUUID().toString()), Optional.empty() ) ); diff --git a/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/pathencryption/DefaultPathEncryptorDecryptor.java b/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/pathencryption/DefaultPathEncryptorDecryptor.java index 8624b3552..05a5ef5aa 100644 --- a/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/pathencryption/DefaultPathEncryptorDecryptor.java +++ b/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/pathencryption/DefaultPathEncryptorDecryptor.java @@ -7,8 +7,6 @@ import javax.inject.Inject; -import static java.nio.charset.StandardCharsets.UTF_8; - /** * Default path encryption/decryption that uses AES-GCM-SIV mode. * @@ -22,24 +20,28 @@ public class DefaultPathEncryptorDecryptor implements PathEncryptorDecryptor { private final SivMode sivMode; @Inject - public DefaultPathEncryptorDecryptor(SivMode sivMode){ + public DefaultPathEncryptorDecryptor(SivMode sivMode) { this.sivMode = sivMode; } @Override - public String encrypt(PathEncryptionSecretKey pathSecretKey, String originalPath) { - return new String(sivMode.encrypt(pathSecretKey.getCounterSecretKey().getEncoded(), - pathSecretKey.getSecretKey().getEncoded(), - originalPath.getBytes(UTF_8)) + public byte[] encrypt(PathEncryptionSecretKey pathSecretKey, byte[] originalPath, byte[] associated) { + return sivMode.encrypt( + pathSecretKey.getCounterSecretKey().getEncoded(), + pathSecretKey.getSecretKey().getEncoded(), + originalPath, + associated ); } @Override @SneakyThrows - public String decrypt(PathEncryptionSecretKey pathSecretKey, String encryptedPath) { - return new String(sivMode.decrypt(pathSecretKey.getCounterSecretKey().getEncoded(), - pathSecretKey.getSecretKey().getEncoded(), - encryptedPath.getBytes(UTF_8)) + public byte[] decrypt(PathEncryptionSecretKey pathSecretKey, byte[] encryptedPath, byte[] associated) { + return sivMode.decrypt( + pathSecretKey.getCounterSecretKey().getEncoded(), + pathSecretKey.getSecretKey().getEncoded(), + encryptedPath, + associated ); } } diff --git a/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/pathencryption/PathEncryptorDecryptor.java b/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/pathencryption/PathEncryptorDecryptor.java index 2853d2224..68ed15bb3 100644 --- a/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/pathencryption/PathEncryptorDecryptor.java +++ b/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/pathencryption/PathEncryptorDecryptor.java @@ -6,16 +6,17 @@ public interface PathEncryptorDecryptor { /** * @param pathSecretKey entity that contains keys for encrypt path - * @param originalPath + * @param originalPath path to encrypt + * @param associated Associated data to authenticate * @return Encrypted path using {@code pathSecretKey} */ - String encrypt(PathEncryptionSecretKey pathSecretKey, String originalPath); + byte[] encrypt(PathEncryptionSecretKey pathSecretKey, byte[] originalPath, byte[] associated); /** * @param pathSecretKey entity that contains keys for decrypt path - * @param encryptedPath + * @param encryptedPath path to decrypt + * @param associated Associated data to authenticate * @return Decrypted path using {@code pathSecretKey} */ - String decrypt(PathEncryptionSecretKey pathSecretKey, String encryptedPath); - + byte[] decrypt(PathEncryptionSecretKey pathSecretKey, byte[] encryptedPath, byte[] associated); } diff --git a/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/pathencryption/SymmetricPathEncryptionServiceImpl.java b/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/pathencryption/SymmetricPathEncryptionServiceImpl.java index 1c73559ad..e16d65ef5 100644 --- a/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/pathencryption/SymmetricPathEncryptionServiceImpl.java +++ b/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/pathencryption/SymmetricPathEncryptionServiceImpl.java @@ -1,8 +1,9 @@ package de.adorsys.datasafe.encrypiton.impl.pathencryption; +import com.google.common.primitives.Ints; import de.adorsys.datasafe.encrypiton.api.pathencryption.encryption.SymmetricPathEncryptionService; import de.adorsys.datasafe.encrypiton.api.types.keystore.PathEncryptionSecretKey; -import de.adorsys.datasafe.encrypiton.impl.pathencryption.dto.PathSecretKeyWithData; +import de.adorsys.datasafe.encrypiton.impl.pathencryption.dto.PathSegmentWithSecretKeyWith; import de.adorsys.datasafe.types.api.context.annotations.RuntimeDelegate; import de.adorsys.datasafe.types.api.resource.Uri; import lombok.SneakyThrows; @@ -10,12 +11,11 @@ import javax.inject.Inject; import java.net.URI; -import java.util.Arrays; +import java.nio.charset.StandardCharsets; import java.util.Base64; import java.util.function.Function; import java.util.stream.Collectors; - -import static java.nio.charset.StandardCharsets.UTF_8; +import java.util.stream.IntStream; /** * Path encryption service that maintains URI segments integrity. @@ -30,18 +30,29 @@ public class SymmetricPathEncryptionServiceImpl implements SymmetricPathEncrypti private static final String DOT_SLASH_PREFIX = "./"; private static final String PATH_SEPARATOR = "/"; - private final Function encryptAndEncode; - private final Function decryptAndDecode; + private final Function encryptAndEncode; + private final Function decryptAndDecode; @Inject public SymmetricPathEncryptionServiceImpl(PathEncryptorDecryptor pathEncryptorDecryptor) { - encryptAndEncode = keyEntryEncryptedDataPair -> encode(pathEncryptorDecryptor.encrypt( - keyEntryEncryptedDataPair.getPathEncryptionSecretKey(), keyEntryEncryptedDataPair.getPath() - )); - - decryptAndDecode = keyEntryDecryptedDataPair -> pathEncryptorDecryptor.decrypt( - keyEntryDecryptedDataPair.getPathEncryptionSecretKey(), decode(keyEntryDecryptedDataPair.getPath()) - ); + encryptAndEncode = keyEntryEncryptedDataPair -> + encode( + pathEncryptorDecryptor.encrypt( + keyEntryEncryptedDataPair.getPathEncryptionSecretKey(), + keyEntryEncryptedDataPair.getPath().getBytes(StandardCharsets.UTF_8), + Ints.toByteArray(keyEntryEncryptedDataPair.getAuthenticationPosition()) + ) + ); + + decryptAndDecode = keyEntryDecryptedDataPair -> + new String( + pathEncryptorDecryptor.decrypt( + keyEntryDecryptedDataPair.getPathEncryptionSecretKey(), + decode(keyEntryDecryptedDataPair.getPath()), + Ints.toByteArray(keyEntryDecryptedDataPair.getAuthenticationPosition()) + ), + StandardCharsets.UTF_8 + ); } /** @@ -77,27 +88,27 @@ public Uri decrypt(PathEncryptionSecretKey pathEncryptionSecretKey, Uri bucketPa } @SneakyThrows - private static String decode(String encryptedPath) { + private static byte[] decode(String encryptedPath) { if (null == encryptedPath || encryptedPath.isEmpty()) { - return encryptedPath; + return null; } - return new String(Base64.getUrlDecoder().decode(encryptedPath), UTF_8); + return Base64.getUrlDecoder().decode(encryptedPath); } @SneakyThrows - private static String encode(String encryptedPath) { - if (null == encryptedPath || encryptedPath.isEmpty()) { + private static String encode(byte[] encryptedPath) { + if (null == encryptedPath) { return null; } - return Base64.getUrlEncoder().encodeToString(encryptedPath.getBytes(UTF_8)); + return Base64.getUrlEncoder().encodeToString(encryptedPath); } private static Uri processURIparts( PathEncryptionSecretKey secretKeyEntry, Uri bucketPath, - Function process) { + Function process) { StringBuilder result = new StringBuilder(); String path = bucketPath.getRawPath(); @@ -110,15 +121,24 @@ private static Uri processURIparts( return new Uri(result.toString()); } - // Resulting value of `path` is URL-safe - return new Uri( - URI.create( - Arrays.stream(path.split(PATH_SEPARATOR)) - .map(uriPart -> process.apply( - new PathSecretKeyWithData(secretKeyEntry, uriPart))) - .map(String::new) // byte[] -> string - .collect(Collectors.joining(PATH_SEPARATOR))) - ); + String[] segments = path.split(PATH_SEPARATOR); + + return new Uri(URI.create(processSegments(secretKeyEntry, process, segments))); + } + + private static String processSegments(PathEncryptionSecretKey secretKeyEntry, + Function process, + String[] segments) { + return IntStream.range(0, segments.length) + .boxed() + .map(position -> + process.apply( + new PathSegmentWithSecretKeyWith( + secretKeyEntry, + position, + segments[position] + )) + ).collect(Collectors.joining(PATH_SEPARATOR)); } private static void validateArgs(PathEncryptionSecretKey secretKeyEntry, Uri bucketPath) { @@ -126,6 +146,10 @@ private static void validateArgs(PathEncryptionSecretKey secretKeyEntry, Uri buc throw new IllegalArgumentException("Secret key should not be null"); } + if (null == secretKeyEntry.getCounterSecretKey()) { + throw new IllegalArgumentException("Counter secret key should not be null"); + } + if (null == bucketPath) { throw new IllegalArgumentException("Bucket path should not be null"); } @@ -136,4 +160,4 @@ private static void validateUriIsRelative(Uri uri) { throw new IllegalArgumentException("URI should be relative"); } } -} \ No newline at end of file +} diff --git a/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/pathencryption/dto/PathSecretKeyWithData.java b/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/pathencryption/dto/PathSegmentWithSecretKeyWith.java similarity index 50% rename from datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/pathencryption/dto/PathSecretKeyWithData.java rename to datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/pathencryption/dto/PathSegmentWithSecretKeyWith.java index 8cee484c7..5c6fda11d 100644 --- a/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/pathencryption/dto/PathSecretKeyWithData.java +++ b/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/pathencryption/dto/PathSegmentWithSecretKeyWith.java @@ -6,15 +6,25 @@ import lombok.Setter; /** - * Contains data for encryption or decryption and related secret key entity - * - * {@code pathEncryptionSecretKey} keys for encryption and decryption path - * {@code path} encrypted or decrypted path to file + * Contains path segment for encryption or decryption and related secret key entity. */ @Getter @Setter @AllArgsConstructor -public class PathSecretKeyWithData { +public class PathSegmentWithSecretKeyWith { + + /** + * Keys for encryption and decryption path. + */ private final PathEncryptionSecretKey pathEncryptionSecretKey; + + /** + * Path segment position to authenticate. + */ + private final int authenticationPosition; + + /** + * Encrypted or decrypted path segment. + */ private final String path; } diff --git a/datasafe-encryption/datasafe-encryption-impl/src/test/java/de/adorsys/datasafe/encrypiton/impl/pathencryption/SymmetricPathEncryptionServiceImplTest.java b/datasafe-encryption/datasafe-encryption-impl/src/test/java/de/adorsys/datasafe/encrypiton/impl/pathencryption/SymmetricPathEncryptionServiceImplTest.java index f61a4296f..7a6274ac3 100644 --- a/datasafe-encryption/datasafe-encryption-impl/src/test/java/de/adorsys/datasafe/encrypiton/impl/pathencryption/SymmetricPathEncryptionServiceImplTest.java +++ b/datasafe-encryption/datasafe-encryption-impl/src/test/java/de/adorsys/datasafe/encrypiton/impl/pathencryption/SymmetricPathEncryptionServiceImplTest.java @@ -17,7 +17,8 @@ import java.net.URI; import java.security.KeyStore; -import static de.adorsys.datasafe.encrypiton.api.types.keystore.KeyStoreCreationConfig.PATH_KEY_ID_PREFIX; +import static de.adorsys.datasafe.encrypiton.api.types.keystore.KeyStoreCreationConfig.PATH_KEY_ID_PREFIX_CTR; +import static org.assertj.core.api.Assertions.assertThat; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertThrows; @@ -37,60 +38,72 @@ class SymmetricPathEncryptionServiceImplTest extends BaseMockitoTest { private KeyStoreAccess keyStoreAccess = new KeyStoreAccess(keyStore, keyStoreAuth); @Test - void testSuccessEncryptDecryptPath() { - String testPath = "path/to/file"; + void testEncryptionDoesNotLeakSameSegments() { + String testPath = "path/to/path/file/to"; Uri testURI = new Uri(testPath); + PathEncryptionSecretKey pathEncryptionSecretKey = pathEncryptionSecretKey(); - SecretKeySpec secretKey = keyStoreService.getSecretKey( - keyStoreAccess, - KeystoreUtil.keyIdByPrefix(keyStore, PATH_KEY_ID_PREFIX) - ); + Uri encrypted = bucketPathEncryptionService.encrypt(pathEncryptionSecretKey, testURI); - SecretKeySpec secretKeyCrt = keyStoreService.getSecretKey( - keyStoreAccess, - KeystoreUtil.keyIdByPrefix(keyStore, PATH_KEY_ID_PREFIX) - ); + String[] encryptedSegments = encrypted.asString().split("/"); + assertThat(encryptedSegments[0]).isNotEqualTo(encryptedSegments[2]); + assertThat(encryptedSegments[1]).isNotEqualTo(encryptedSegments[4]); + } - PathEncryptionSecretKey secretKeyIDWithKey = new PathEncryptionSecretKey( - KeystoreUtil.keyIdByPrefix(keyStore, PATH_KEY_ID_PREFIX), secretKey, secretKeyCrt); + @Test + void testSuccessEncryptDecryptPath() { + String testPath = "path/to/file"; + + Uri testURI = new Uri(testPath); + PathEncryptionSecretKey pathEncryptionSecretKey = pathEncryptionSecretKey(); - Uri encrypted = bucketPathEncryptionService.encrypt(secretKeyIDWithKey, testURI); + Uri encrypted = bucketPathEncryptionService.encrypt(pathEncryptionSecretKey, testURI); log.debug("Encrypted path: {}", encrypted); - Uri decrypted = bucketPathEncryptionService.decrypt(secretKeyIDWithKey, encrypted); + Uri decrypted = bucketPathEncryptionService.decrypt(pathEncryptionSecretKey, encrypted); log.debug("Decrypted path: {}", decrypted); assertEquals(testPath, decrypted.toASCIIString()); } @Test - void testFailEncryptPathWithWrongKeyID() { + void testFailEncryptPathWithWrongPathKeyID() { String testPath = "path/to/file/"; - log.info("Test path: {}", testPath); - Uri testURI = new Uri(testPath); - SecretKeySpec secretKey = keyStoreService.getSecretKey(keyStoreAccess, new KeyID("Invalid key")); - - PathEncryptionSecretKey pathEncryptionSecretKey = new PathEncryptionSecretKey( - KeystoreUtil.keyIdByPrefix(keyStore, PATH_KEY_ID_PREFIX), secretKey, secretKey); + PathEncryptionSecretKey correctKey = pathEncryptionSecretKey(); + PathEncryptionSecretKey toTest = new PathEncryptionSecretKey( + new KeyID("Wrong id"), + null, + correctKey.getCounterKeyId(), + correctKey.getCounterSecretKey() + ); - // secret keys is null, because during key obtain was used incorrect KeyID, - // so bucketPathEncryptionService#encrypt throw BaseException(was handled NullPointerException) - assertThrows(IllegalArgumentException.class, () -> bucketPathEncryptionService.encrypt(pathEncryptionSecretKey, testURI)); + assertThrows(IllegalArgumentException.class, () -> bucketPathEncryptionService.encrypt(toTest, testURI)); } @Test - void testFailEncryptPathWithBrokenEncryptedPath() { - SecretKeySpec secretKey = keyStoreService.getSecretKey( - keyStoreAccess, - KeystoreUtil.keyIdByPrefix(keyStore, PATH_KEY_ID_PREFIX) + void testFailEncryptPathWithWrongPathCtrKeyID() { + String testPath = "path/to/file/"; + + Uri testURI = new Uri(testPath); + + PathEncryptionSecretKey correctKey = pathEncryptionSecretKey(); + PathEncryptionSecretKey toTest = new PathEncryptionSecretKey( + correctKey.getSecretKeyId(), + correctKey.getSecretKey(), + new KeyID("Wrong id"), + null ); - PathEncryptionSecretKey pathEncryptionSecretKey = new PathEncryptionSecretKey( - KeystoreUtil.keyIdByPrefix(keyStore, PATH_KEY_ID_PREFIX), secretKey, secretKey); + assertThrows(IllegalArgumentException.class, () -> bucketPathEncryptionService.encrypt(toTest, testURI)); + } + + @Test + void testFailEncryptPathWithBrokenEncryptedPath() { + PathEncryptionSecretKey pathEncryptionSecretKey = pathEncryptionSecretKey(); assertThrows(BadPaddingException.class, () -> bucketPathEncryptionService.decrypt(pathEncryptionSecretKey, @@ -99,16 +112,28 @@ void testFailEncryptPathWithBrokenEncryptedPath() { @Test void testFailEncryptPathWithTextPath() { + PathEncryptionSecretKey pathEncryptionSecretKey = pathEncryptionSecretKey(); + + assertThrows( + IllegalBlockSizeException.class, + () -> bucketPathEncryptionService.decrypt(pathEncryptionSecretKey, new Uri("simple/text/path/")) + ); + } + + private PathEncryptionSecretKey pathEncryptionSecretKey() { + KeyID secretKeyId = KeystoreUtil.keyIdByPrefix(keyStore, KeyStoreCreationConfig.PATH_KEY_ID_PREFIX); SecretKeySpec secretKey = keyStoreService.getSecretKey( keyStoreAccess, - KeystoreUtil.keyIdByPrefix(keyStore, PATH_KEY_ID_PREFIX) + secretKeyId ); - PathEncryptionSecretKey pathEncryptionSecretKey = new PathEncryptionSecretKey( - KeystoreUtil.keyIdByPrefix(keyStore, PATH_KEY_ID_PREFIX), secretKey, secretKey); + KeyID counterSecretKeyId = KeystoreUtil.keyIdByPrefix(keyStore, PATH_KEY_ID_PREFIX_CTR); + SecretKeySpec secretKeyCtr = keyStoreService.getSecretKey( + keyStoreAccess, + counterSecretKeyId + ); - assertThrows(IllegalBlockSizeException.class, - () -> bucketPathEncryptionService.decrypt(pathEncryptionSecretKey, - new Uri("/simple/text/path/"))); + return new PathEncryptionSecretKey( + secretKeyId, secretKey, counterSecretKeyId, secretKeyCtr); } -} \ No newline at end of file +} From 25bf02b9108f2d71199efa337879875f56ed7a08 Mon Sep 17 00:00:00 2001 From: Valentyn Berezin Date: Mon, 16 Sep 2019 16:18:48 +0300 Subject: [PATCH 076/255] DOC-239. Fix build errors --- .../DefaultPathEncryptionModule.java | 7 ++++--- .../keys/DFSPrivateKeyServiceImpl.java | 21 ++++++++++--------- 2 files changed, 15 insertions(+), 13 deletions(-) diff --git a/datasafe-business/src/main/java/de/adorsys/datasafe/business/impl/pathencryption/DefaultPathEncryptionModule.java b/datasafe-business/src/main/java/de/adorsys/datasafe/business/impl/pathencryption/DefaultPathEncryptionModule.java index a6d2c6792..bfe6b67de 100644 --- a/datasafe-business/src/main/java/de/adorsys/datasafe/business/impl/pathencryption/DefaultPathEncryptionModule.java +++ b/datasafe-business/src/main/java/de/adorsys/datasafe/business/impl/pathencryption/DefaultPathEncryptionModule.java @@ -17,10 +17,11 @@ @Module public abstract class DefaultPathEncryptionModule { - - @Provides - abstract SivMode sivMode(SivMode siv); + static SivMode sivMode() { + return new SivMode(); + } + /** * Default path encryption that uses Base64-urlsafe path serialization and AES-CGM-SIV mode for encryption */ diff --git a/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/keys/DFSPrivateKeyServiceImpl.java b/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/keys/DFSPrivateKeyServiceImpl.java index 007dc1bd6..f3fbfb49b 100644 --- a/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/keys/DFSPrivateKeyServiceImpl.java +++ b/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/keys/DFSPrivateKeyServiceImpl.java @@ -44,24 +44,25 @@ public PathEncryptionSecretKey pathEncryptionSecretKey(UserIDAuth forUser) { String secretPathCrtKeyId = getSecretPathKeyIdByPrefix(secretKeyIds, PATH_KEY_ID_PREFIX_CTR); return new PathEncryptionSecretKey( - new KeyID(secretPathKeyId), - (SecretKey) keyStoreOper.getKey(forUser, secretPathKeyId), - (SecretKey) keyStoreOper.getKey(forUser, secretPathCrtKeyId)); + new KeyID(secretPathKeyId), + (SecretKey) keyStoreOper.getKey(forUser, secretPathKeyId), + new KeyID(secretPathCrtKeyId), + (SecretKey) keyStoreOper.getKey(forUser, secretPathCrtKeyId)); } private String getSecretPathKeyIdByPrefix(List keys, String pathKeyIdPrefix) { return keys.stream() - .filter(it -> it.getValue().startsWith(pathKeyIdPrefix)) - .findFirst() - .get() - .getValue(); + .filter(it -> it.getValue().startsWith(pathKeyIdPrefix)) + .findFirst() + .orElseThrow(() -> new IllegalStateException("Key ID with prefix " + pathKeyIdPrefix + " not found")) + .getValue(); } private List getSecretKeyIds(UserIDAuth forUser) { return keyStoreOper.readAliases(forUser).stream() - .filter(it -> it.startsWith(PATH_KEY_ID_PREFIX) || it.startsWith(PATH_KEY_ID_PREFIX_CTR)) - .map(KeyID::new) - .collect(Collectors.toList()); + .filter(it -> it.startsWith(PATH_KEY_ID_PREFIX) || it.startsWith(PATH_KEY_ID_PREFIX_CTR)) + .map(KeyID::new) + .collect(Collectors.toList()); } /** From 37aeb29c1ef462da72b935ce7886db8e868948e8 Mon Sep 17 00:00:00 2001 From: Valentyn Berezin Date: Mon, 16 Sep 2019 16:43:18 +0300 Subject: [PATCH 077/255] DOC-239. Move nullability tests and checks to PathEncryptionSecretKey --- .../keystore/PathEncryptionSecretKeyTest.java | 63 +++++++++++++++++++ .../api/types/CreateUserPrivateProfile.java | 1 - .../keystore/PathEncryptionSecretKey.java | 12 +++- .../SymmetricPathEncryptionServiceImpl.java | 6 +- ...ymmetricPathEncryptionServiceImplTest.java | 34 ---------- 5 files changed, 73 insertions(+), 43 deletions(-) create mode 100644 datasafe-business/src/test/java/de/adorsys/datasafe/encrypiton/api/types/keystore/PathEncryptionSecretKeyTest.java diff --git a/datasafe-business/src/test/java/de/adorsys/datasafe/encrypiton/api/types/keystore/PathEncryptionSecretKeyTest.java b/datasafe-business/src/test/java/de/adorsys/datasafe/encrypiton/api/types/keystore/PathEncryptionSecretKeyTest.java new file mode 100644 index 000000000..28af136ec --- /dev/null +++ b/datasafe-business/src/test/java/de/adorsys/datasafe/encrypiton/api/types/keystore/PathEncryptionSecretKeyTest.java @@ -0,0 +1,63 @@ +package de.adorsys.datasafe.encrypiton.api.types.keystore; + +import de.adorsys.datasafe.types.api.shared.BaseMockitoTest; +import org.junit.jupiter.api.Test; +import org.mockito.Mock; + +import javax.crypto.SecretKey; + +import static org.assertj.core.api.Assertions.assertThat; +import static org.junit.jupiter.api.Assertions.assertThrows; + +class PathEncryptionSecretKeyTest extends BaseMockitoTest { + + @Mock + private KeyID secretKeyId; + + @Mock + private SecretKey secretKey; + + @Mock + private KeyID counterKeyId; + + @Mock + private SecretKey counterSecretKey; + + @Test + void validateAllOk() { + PathEncryptionSecretKey key = new PathEncryptionSecretKey( + secretKeyId, secretKey, counterKeyId, counterSecretKey + ); + + assertThat(key.getSecretKey()).isEqualTo(secretKey); + assertThat(key.getCounterSecretKey()).isEqualTo(counterSecretKey); + } + + @Test + void validateNullSecretKeyIdImpossible() { + assertThrows(NullPointerException.class, () -> + new PathEncryptionSecretKey(null, secretKey, counterKeyId, counterSecretKey) + ); + } + + @Test + void validateNullSecretKeyImpossible() { + assertThrows(NullPointerException.class, () -> + new PathEncryptionSecretKey(secretKeyId, null, counterKeyId, counterSecretKey) + ); + } + + @Test + void validateNullCounterKeyIdImpossible() { + assertThrows(NullPointerException.class, () -> + new PathEncryptionSecretKey(secretKeyId, secretKey, null, counterSecretKey) + ); + } + + @Test + void validateNullCounterKeyImpossible() { + assertThrows(NullPointerException.class, () -> + new PathEncryptionSecretKey(secretKeyId, secretKey, counterKeyId, null) + ); + } +} diff --git a/datasafe-directory/datasafe-directory-api/src/main/java/de/adorsys/datasafe/directory/api/types/CreateUserPrivateProfile.java b/datasafe-directory/datasafe-directory-api/src/main/java/de/adorsys/datasafe/directory/api/types/CreateUserPrivateProfile.java index 0cfa25a90..aa830c419 100644 --- a/datasafe-directory/datasafe-directory-api/src/main/java/de/adorsys/datasafe/directory/api/types/CreateUserPrivateProfile.java +++ b/datasafe-directory/datasafe-directory-api/src/main/java/de/adorsys/datasafe/directory/api/types/CreateUserPrivateProfile.java @@ -10,7 +10,6 @@ import lombok.SneakyThrows; import lombok.Value; -import java.security.SecureRandom; import java.util.Collections; import java.util.HashMap; import java.util.List; diff --git a/datasafe-encryption/datasafe-encryption-api/src/main/java/de/adorsys/datasafe/encrypiton/api/types/keystore/PathEncryptionSecretKey.java b/datasafe-encryption/datasafe-encryption-api/src/main/java/de/adorsys/datasafe/encrypiton/api/types/keystore/PathEncryptionSecretKey.java index ce5f1a22b..6775b8b47 100644 --- a/datasafe-encryption/datasafe-encryption-api/src/main/java/de/adorsys/datasafe/encrypiton/api/types/keystore/PathEncryptionSecretKey.java +++ b/datasafe-encryption/datasafe-encryption-api/src/main/java/de/adorsys/datasafe/encrypiton/api/types/keystore/PathEncryptionSecretKey.java @@ -1,18 +1,24 @@ package de.adorsys.datasafe.encrypiton.api.types.keystore; -import lombok.Getter; -import lombok.RequiredArgsConstructor; -import lombok.ToString; +import lombok.*; import javax.crypto.SecretKey; @Getter @ToString +@Value @RequiredArgsConstructor public class PathEncryptionSecretKey { + @NonNull private final KeyID secretKeyId; + + @NonNull private final SecretKey secretKey; + + @NonNull private final KeyID counterKeyId; + + @NonNull private final SecretKey counterSecretKey; } diff --git a/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/pathencryption/SymmetricPathEncryptionServiceImpl.java b/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/pathencryption/SymmetricPathEncryptionServiceImpl.java index e16d65ef5..d5a1b65bc 100644 --- a/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/pathencryption/SymmetricPathEncryptionServiceImpl.java +++ b/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/pathencryption/SymmetricPathEncryptionServiceImpl.java @@ -142,14 +142,10 @@ private static String processSegments(PathEncryptionSecretKey secretKeyEntry, } private static void validateArgs(PathEncryptionSecretKey secretKeyEntry, Uri bucketPath) { - if (null == secretKeyEntry || null == secretKeyEntry.getSecretKey()) { + if (null == secretKeyEntry) { throw new IllegalArgumentException("Secret key should not be null"); } - if (null == secretKeyEntry.getCounterSecretKey()) { - throw new IllegalArgumentException("Counter secret key should not be null"); - } - if (null == bucketPath) { throw new IllegalArgumentException("Bucket path should not be null"); } diff --git a/datasafe-encryption/datasafe-encryption-impl/src/test/java/de/adorsys/datasafe/encrypiton/impl/pathencryption/SymmetricPathEncryptionServiceImplTest.java b/datasafe-encryption/datasafe-encryption-impl/src/test/java/de/adorsys/datasafe/encrypiton/impl/pathencryption/SymmetricPathEncryptionServiceImplTest.java index 7a6274ac3..58626e9f6 100644 --- a/datasafe-encryption/datasafe-encryption-impl/src/test/java/de/adorsys/datasafe/encrypiton/impl/pathencryption/SymmetricPathEncryptionServiceImplTest.java +++ b/datasafe-encryption/datasafe-encryption-impl/src/test/java/de/adorsys/datasafe/encrypiton/impl/pathencryption/SymmetricPathEncryptionServiceImplTest.java @@ -67,40 +67,6 @@ void testSuccessEncryptDecryptPath() { assertEquals(testPath, decrypted.toASCIIString()); } - @Test - void testFailEncryptPathWithWrongPathKeyID() { - String testPath = "path/to/file/"; - - Uri testURI = new Uri(testPath); - - PathEncryptionSecretKey correctKey = pathEncryptionSecretKey(); - PathEncryptionSecretKey toTest = new PathEncryptionSecretKey( - new KeyID("Wrong id"), - null, - correctKey.getCounterKeyId(), - correctKey.getCounterSecretKey() - ); - - assertThrows(IllegalArgumentException.class, () -> bucketPathEncryptionService.encrypt(toTest, testURI)); - } - - @Test - void testFailEncryptPathWithWrongPathCtrKeyID() { - String testPath = "path/to/file/"; - - Uri testURI = new Uri(testPath); - - PathEncryptionSecretKey correctKey = pathEncryptionSecretKey(); - PathEncryptionSecretKey toTest = new PathEncryptionSecretKey( - correctKey.getSecretKeyId(), - correctKey.getSecretKey(), - new KeyID("Wrong id"), - null - ); - - assertThrows(IllegalArgumentException.class, () -> bucketPathEncryptionService.encrypt(toTest, testURI)); - } - @Test void testFailEncryptPathWithBrokenEncryptedPath() { PathEncryptionSecretKey pathEncryptionSecretKey = pathEncryptionSecretKey(); From c2ed45e4937913f8fb5710fb6a678c686df9fd6b Mon Sep 17 00:00:00 2001 From: Maxim Grischenko Date: Mon, 16 Sep 2019 16:28:14 +0200 Subject: [PATCH 078/255] added version to profile --- .../impl/e2e/MultiDFSFunctionalityTest.java | 2 ++ .../ProfileContainsDatasafeVersionTest.java | 28 +++++++++++++++++++ .../api/types/CreateUserPrivateProfile.java | 7 +++++ .../api/types/CreateUserPublicProfile.java | 7 +++++ .../api/types/UserPrivateProfile.java | 6 ++++ .../api/types/UserPublicProfile.java | 6 ++++ .../impl/profile/config/DefaultDFSConfig.java | 6 ++++ 7 files changed, 62 insertions(+) create mode 100644 datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/ProfileContainsDatasafeVersionTest.java diff --git a/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/MultiDFSFunctionalityTest.java b/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/MultiDFSFunctionalityTest.java index 1e4e70efb..185a2edc4 100644 --- a/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/MultiDFSFunctionalityTest.java +++ b/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/MultiDFSFunctionalityTest.java @@ -230,6 +230,7 @@ private void registerUser(UserIDAuth auth) { .id(auth.getUserID()) .inbox(BasePublicResource.forAbsolutePublic(inboxLocation)) .publicKeys(BasePublicResource.forAbsolutePublic(pubKeysLocation)) + .version(DefaultDFSConfig.currentDatasafeVersion()) .build() ); @@ -248,6 +249,7 @@ private void registerUser(UserIDAuth auth) { ) .associatedResources(Collections.emptyList()) .publishPubKeysTo(BasePublicResource.forAbsolutePublic(pubKeysLocation)) + .version(DefaultDFSConfig.currentDatasafeVersion()) .build() ); diff --git a/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/ProfileContainsDatasafeVersionTest.java b/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/ProfileContainsDatasafeVersionTest.java new file mode 100644 index 000000000..ba861024b --- /dev/null +++ b/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/ProfileContainsDatasafeVersionTest.java @@ -0,0 +1,28 @@ +package de.adorsys.datasafe.business.impl.e2e; + +import de.adorsys.datasafe.business.impl.service.DefaultDatasafeServices; +import de.adorsys.datasafe.encrypiton.api.types.UserIDAuth; +import de.adorsys.datasafe.teststorage.WithStorageProvider; +import lombok.SneakyThrows; +import org.junit.jupiter.api.Test; + +import static org.assertj.core.api.Assertions.assertThat; + +class ProfileContainsDatasafeVersionTest extends BaseE2ETest { + + @Test + @SneakyThrows + void getProfileVersionTest() { + StorageDescriptor fs = fs(); + init(fs); + UserIDAuth bob = registerUser("bob"); + String version = profileRetrievalService.privateProfile(bob).getVersion(); + assertThat(version).isNotEmpty(); + } + + private void init(WithStorageProvider.StorageDescriptor descriptor) { + DefaultDatasafeServices datasafeServices = DatasafeServicesProvider + .defaultDatasafeServices(descriptor.getStorageService().get(), descriptor.getLocation()); + initialize(DatasafeServicesProvider.dfsConfig(descriptor.getLocation()), datasafeServices); + } +} diff --git a/datasafe-directory/datasafe-directory-api/src/main/java/de/adorsys/datasafe/directory/api/types/CreateUserPrivateProfile.java b/datasafe-directory/datasafe-directory-api/src/main/java/de/adorsys/datasafe/directory/api/types/CreateUserPrivateProfile.java index e942ab40b..c0a2f8012 100644 --- a/datasafe-directory/datasafe-directory-api/src/main/java/de/adorsys/datasafe/directory/api/types/CreateUserPrivateProfile.java +++ b/datasafe-directory/datasafe-directory-api/src/main/java/de/adorsys/datasafe/directory/api/types/CreateUserPrivateProfile.java @@ -65,6 +65,12 @@ public class CreateUserPrivateProfile { */ private final AbsoluteLocation publishPubKeysTo; + /** + * Entity version. Keeps version of datasafe which create profile + */ + @NonNull + private final String version; + public UserPrivateProfile removeAccess() { return UserPrivateProfile.builder() // FIXME - remove access ? @@ -75,6 +81,7 @@ public UserPrivateProfile removeAccess() { .documentVersionStorage(documentVersionStorage) .associatedResources(associatedResources) .publishPublicKeysTo(publishPubKeysTo) + .version(version) .build(); } } diff --git a/datasafe-directory/datasafe-directory-api/src/main/java/de/adorsys/datasafe/directory/api/types/CreateUserPublicProfile.java b/datasafe-directory/datasafe-directory-api/src/main/java/de/adorsys/datasafe/directory/api/types/CreateUserPublicProfile.java index 502650322..a0709b4c3 100644 --- a/datasafe-directory/datasafe-directory-api/src/main/java/de/adorsys/datasafe/directory/api/types/CreateUserPublicProfile.java +++ b/datasafe-directory/datasafe-directory-api/src/main/java/de/adorsys/datasafe/directory/api/types/CreateUserPublicProfile.java @@ -32,11 +32,18 @@ public class CreateUserPublicProfile { @NonNull private final AbsoluteLocation inbox; + /** + * Entity version. Keeps version of datasafe which create profile + */ + @NonNull + private final String version; + public UserPublicProfile removeAccess() { return UserPublicProfile.builder() // FIXME - remove access ? .inbox(inbox) .publicKeys(publicKeys) + .version(version) .build(); } } diff --git a/datasafe-directory/datasafe-directory-api/src/main/java/de/adorsys/datasafe/directory/api/types/UserPrivateProfile.java b/datasafe-directory/datasafe-directory-api/src/main/java/de/adorsys/datasafe/directory/api/types/UserPrivateProfile.java index 4eb86f1ff..166cad759 100644 --- a/datasafe-directory/datasafe-directory-api/src/main/java/de/adorsys/datasafe/directory/api/types/UserPrivateProfile.java +++ b/datasafe-directory/datasafe-directory-api/src/main/java/de/adorsys/datasafe/directory/api/types/UserPrivateProfile.java @@ -61,4 +61,10 @@ public class UserPrivateProfile { * Optional field used for getting storage credentials using default flow. */ private final AbsoluteLocation storageCredentialsKeystore; + + /** + * Entity version. Keeps version of datasafe which create profile + */ + @NonNull + private final String version; } diff --git a/datasafe-directory/datasafe-directory-api/src/main/java/de/adorsys/datasafe/directory/api/types/UserPublicProfile.java b/datasafe-directory/datasafe-directory-api/src/main/java/de/adorsys/datasafe/directory/api/types/UserPublicProfile.java index 502ebe13e..7a24a289c 100644 --- a/datasafe-directory/datasafe-directory-api/src/main/java/de/adorsys/datasafe/directory/api/types/UserPublicProfile.java +++ b/datasafe-directory/datasafe-directory-api/src/main/java/de/adorsys/datasafe/directory/api/types/UserPublicProfile.java @@ -24,4 +24,10 @@ public class UserPublicProfile { */ @NonNull private final AbsoluteLocation inbox; + + /** + * Entity version. Keeps version of datasafe which create profile + */ + @NonNull + private final String version; } diff --git a/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/config/DefaultDFSConfig.java b/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/config/DefaultDFSConfig.java index d02e4274e..7ac1c0ea0 100644 --- a/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/config/DefaultDFSConfig.java +++ b/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/config/DefaultDFSConfig.java @@ -106,6 +106,7 @@ public CreateUserPrivateProfile defaultPrivateTemplate(UserIDAuth id) { .documentVersionStorage(accessPrivate(rootLocation.resolve("./" + VERSION_COMPONENT + "/"))) .publishPubKeysTo(access(publicKeys(rootLocation))) .associatedResources(Collections.singletonList(accessPrivate(rootLocation))) + .version(currentDatasafeVersion()) .build(); } @@ -117,6 +118,7 @@ public CreateUserPublicProfile defaultPublicTemplate(UserID id) { .id(id) .inbox(access(inbox(rootLocation))) .publicKeys(access(publicKeys(rootLocation))) + .version(currentDatasafeVersion()) .build(); } @@ -155,6 +157,10 @@ protected Uri publicKeys(Uri rootLocation) { return rootLocation.resolve("./" + PUBLIC_COMPONENT + "/" + "pubkeys"); } + public static String currentDatasafeVersion() { + return "v062"; + } + public static Uri addTrailingSlashIfNeeded(Uri systemRoot) { return new Uri(addTrailingSlashIfNeeded(systemRoot.asURI())); } From 53a96aa55967fcb1d74d39f8e4c46ddbb3552a50 Mon Sep 17 00:00:00 2001 From: Valentyn Berezin Date: Mon, 16 Sep 2019 17:33:32 +0300 Subject: [PATCH 079/255] DOC-239. Fixed KeystoreE2ETest --- .../adorsys/datasafe/business/impl/e2e/KeystoreE2ETest.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/KeystoreE2ETest.java b/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/KeystoreE2ETest.java index 0f844f11a..fc1d40a0b 100644 --- a/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/KeystoreE2ETest.java +++ b/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/KeystoreE2ETest.java @@ -23,8 +23,8 @@ import java.util.Set; import static de.adorsys.datasafe.business.impl.e2e.DatasafeServicesProvider.STORE_PAZZWORD; -import static de.adorsys.datasafe.encrypiton.api.types.keystore.KeyStoreCreationConfig.DOCUMENT_KEY_ID_PREFIX; import static de.adorsys.datasafe.encrypiton.api.types.keystore.KeyStoreCreationConfig.PATH_KEY_ID_PREFIX; +import static de.adorsys.datasafe.encrypiton.api.types.keystore.KeyStoreCreationConfig.PATH_KEY_ID_PREFIX_CTR; import static org.assertj.core.api.Assertions.assertThat; /** @@ -57,7 +57,8 @@ void testDefaultKeystoreHasProperKeys() { new ReadStorePassword(STORE_PAZZWORD) ); - assertThat(aliases(keyStore)).filteredOn(it -> it.matches(PATH_KEY_ID_PREFIX + ".+")).hasSize(2); + assertThat(aliases(keyStore)).filteredOn(it -> it.matches(PATH_KEY_ID_PREFIX + ".+")).hasSize(1); + assertThat(aliases(keyStore)).filteredOn(it -> it.matches(PATH_KEY_ID_PREFIX_CTR + ".+")).hasSize(1); } @SneakyThrows From af8e3efc331e9522470b4a246bb3f75fa2fecb0e Mon Sep 17 00:00:00 2001 From: Valentyn Berezin Date: Mon, 16 Sep 2019 19:50:13 +0300 Subject: [PATCH 080/255] DOC-266. Added application version to profile --- .../DefaultVersionedPrivateActionsModule.java | 4 +-- .../service/VersionedDatasafeServices.java | 4 +-- .../impl/e2e/BasicFunctionalityTest.java | 5 +++ .../impl/e2e/Datasafe043CompatTest.java | 9 +++++- .../impl/e2e/MultiDFSFunctionalityTest.java | 2 -- .../ProfileContainsDatasafeVersionTest.java | 7 ++-- .../api/types/CreateUserPrivateProfile.java | 8 +++-- .../api/types/CreateUserPublicProfile.java | 8 +++-- .../api/types/UserPrivateProfile.java | 7 ++-- .../api/types/UserPublicProfile.java | 5 +-- .../impl/profile/config/DefaultDFSConfig.java | 6 ---- .../actions/ProfileRetrievalServiceImpl.java | 25 +++++++++++++-- ...erationsTestWithVersionedDatasafeTest.java | 10 +++--- ...DefaultDatasafeOnVersionedStorageTest.java | 32 +++++++++---------- .../impl/version/VersionEncoderDecoder.java | 12 +++---- .../latest/DefaultVersionEncoderDecoder.java | 2 +- .../latest/DefaultVersionInfoServiceImpl.java | 6 ++-- .../EncryptedLatestLinkServiceImpl.java | 4 +-- .../latest/LatestPrivateSpaceImpl.java | 4 +-- .../latest/actions/LatestListImpl.java | 4 +-- .../latest/actions/LatestReadImpl.java | 2 +- .../latest/actions/LatestRemoveImpl.java | 2 +- .../latest/actions/LatestWriteImpl.java | 2 +- .../impl/version/types/LatestDFSVersion.java | 2 +- .../rest/impl/controller/UserController.java | 2 +- .../impl/controller/VersionController.java | 6 ++-- .../SimpleDatasafeAdapter043CompatTest.java | 2 +- .../datasafe/types/api/global/Version.java | 23 +++++++++++++ 28 files changed, 131 insertions(+), 74 deletions(-) create mode 100644 datasafe-types-api/src/main/java/de/adorsys/datasafe/types/api/global/Version.java diff --git a/datasafe-business/src/main/java/de/adorsys/datasafe/business/impl/privatestore/actions/DefaultVersionedPrivateActionsModule.java b/datasafe-business/src/main/java/de/adorsys/datasafe/business/impl/privatestore/actions/DefaultVersionedPrivateActionsModule.java index 1332a04c4..705066817 100644 --- a/datasafe-business/src/main/java/de/adorsys/datasafe/business/impl/privatestore/actions/DefaultVersionedPrivateActionsModule.java +++ b/datasafe-business/src/main/java/de/adorsys/datasafe/business/impl/privatestore/actions/DefaultVersionedPrivateActionsModule.java @@ -38,7 +38,7 @@ static LatestDFSVersion latestDFSVersion() { } /** - * Encode version into URL, by default http://example.com/path is encoded to http://example.com/path/VERSION + * Encode appVersion into URL, by default http://example.com/path is encoded to http://example.com/path/VERSION */ @Binds abstract VersionEncoderDecoder versionEncoder(DefaultVersionEncoderDecoderRuntimeDelegatable impl); @@ -74,7 +74,7 @@ static LatestDFSVersion latestDFSVersion() { abstract VersionedRemove latestRemove(LatestRemoveImplRuntimeDelegatable impl); /** - * Writes blob and updates the latest link, so that it points to written blob (creates a version of + * Writes blob and updates the latest link, so that it points to written blob (creates a appVersion of * the document that automatically should become the latest). */ @Binds diff --git a/datasafe-business/src/main/java/de/adorsys/datasafe/business/impl/service/VersionedDatasafeServices.java b/datasafe-business/src/main/java/de/adorsys/datasafe/business/impl/service/VersionedDatasafeServices.java index d75e4b5bc..8e53bbf90 100644 --- a/datasafe-business/src/main/java/de/adorsys/datasafe/business/impl/service/VersionedDatasafeServices.java +++ b/datasafe-business/src/main/java/de/adorsys/datasafe/business/impl/service/VersionedDatasafeServices.java @@ -26,7 +26,7 @@ import javax.inject.Singleton; /** - * This is Datasafe services that always work with latest file version using `software` versioning. + * This is Datasafe services that always work with latest file appVersion using `software` versioning. * Note, that despite is has {@code @Singleton} annotation, it is not real singleton, the only shared thing * across all services instantiated using build() is bindings with {@code Singleton} in its Module. */ @@ -46,7 +46,7 @@ public interface VersionedDatasafeServices { /** - * @return Provides version information for a given resource (shows only versioned resources) + * @return Provides appVersion information for a given resource (shows only versioned resources) */ DefaultVersionInfoServiceImpl versionInfo(); diff --git a/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/BasicFunctionalityTest.java b/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/BasicFunctionalityTest.java index 61281bb27..ebd4e6036 100644 --- a/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/BasicFunctionalityTest.java +++ b/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/BasicFunctionalityTest.java @@ -7,6 +7,7 @@ import de.adorsys.datasafe.teststorage.WithStorageProvider; import de.adorsys.datasafe.types.api.actions.ReadRequest; import de.adorsys.datasafe.types.api.actions.WriteRequest; +import de.adorsys.datasafe.types.api.global.Version; import de.adorsys.datasafe.types.api.resource.AbsoluteLocation; import de.adorsys.datasafe.types.api.resource.BasePrivateResource; import de.adorsys.datasafe.types.api.resource.ResolvedResource; @@ -44,8 +45,12 @@ void testDFSBasedProfileStorage(WithStorageProvider.StorageDescriptor descriptor init(descriptor); UserID userJohn = new UserID("john"); assertThat(profileRetrievalService.userExists(userJohn)).isFalse(); + john = registerUser(userJohn.getValue()); assertThat(profileRetrievalService.userExists(userJohn)).isTrue(); + assertThat(profileRetrievalService.privateProfile(john).getAppVersion()).isEqualTo(Version.current()); + assertThat(profileRetrievalService.publicProfile(john.getUserID()).getAppVersion()).isEqualTo(Version.current()); + profileRemovalService.deregister(john); assertThat(profileRetrievalService.userExists(userJohn)).isFalse(); } diff --git a/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/Datasafe043CompatTest.java b/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/Datasafe043CompatTest.java index cb8b8b971..2db988bc5 100644 --- a/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/Datasafe043CompatTest.java +++ b/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/Datasafe043CompatTest.java @@ -8,6 +8,7 @@ import de.adorsys.datasafe.encrypiton.api.types.UserIDAuth; import de.adorsys.datasafe.encrypiton.api.types.keystore.ReadKeyPassword; import de.adorsys.datasafe.storage.impl.fs.FileSystemStorageService; +import de.adorsys.datasafe.types.api.global.Version; import de.adorsys.datasafe.types.api.actions.ReadRequest; import de.adorsys.datasafe.types.api.actions.WriteRequest; import de.adorsys.datasafe.types.api.shared.BaseMockitoTest; @@ -31,7 +32,7 @@ import static org.assertj.core.api.Assertions.assertThat; /** - * This test ensures that Datasafe can use setup and folder structure from version 0.4.3 (backward compatibility) + * This test ensures that Datasafe can use setup and folder structure from appVersion 0.4.3 (backward compatibility) */ class Datasafe043CompatTest extends BaseMockitoTest { @@ -128,6 +129,12 @@ void writeNewAndReadFileFromOldVersion() { "jane/private/keystore", "jane/private/files" ); + + // 0.4.3 is baseline-compatible and there was no versioning before + assertThat(datasafe.userProfile().privateProfile(john).getAppVersion()).isEqualTo(Version.BASELINE); + assertThat(datasafe.userProfile().privateProfile(jane).getAppVersion()).isEqualTo(Version.BASELINE); + assertThat(datasafe.userProfile().publicProfile(john.getUserID()).getAppVersion()).isEqualTo(Version.BASELINE); + assertThat(datasafe.userProfile().publicProfile(john.getUserID()).getAppVersion()).isEqualTo(Version.BASELINE); } @SneakyThrows diff --git a/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/MultiDFSFunctionalityTest.java b/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/MultiDFSFunctionalityTest.java index 185a2edc4..1e4e70efb 100644 --- a/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/MultiDFSFunctionalityTest.java +++ b/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/MultiDFSFunctionalityTest.java @@ -230,7 +230,6 @@ private void registerUser(UserIDAuth auth) { .id(auth.getUserID()) .inbox(BasePublicResource.forAbsolutePublic(inboxLocation)) .publicKeys(BasePublicResource.forAbsolutePublic(pubKeysLocation)) - .version(DefaultDFSConfig.currentDatasafeVersion()) .build() ); @@ -249,7 +248,6 @@ private void registerUser(UserIDAuth auth) { ) .associatedResources(Collections.emptyList()) .publishPubKeysTo(BasePublicResource.forAbsolutePublic(pubKeysLocation)) - .version(DefaultDFSConfig.currentDatasafeVersion()) .build() ); diff --git a/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/ProfileContainsDatasafeVersionTest.java b/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/ProfileContainsDatasafeVersionTest.java index ba861024b..6b6f993c6 100644 --- a/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/ProfileContainsDatasafeVersionTest.java +++ b/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/ProfileContainsDatasafeVersionTest.java @@ -3,6 +3,7 @@ import de.adorsys.datasafe.business.impl.service.DefaultDatasafeServices; import de.adorsys.datasafe.encrypiton.api.types.UserIDAuth; import de.adorsys.datasafe.teststorage.WithStorageProvider; +import de.adorsys.datasafe.types.api.global.Version; import lombok.SneakyThrows; import org.junit.jupiter.api.Test; @@ -15,9 +16,11 @@ class ProfileContainsDatasafeVersionTest extends BaseE2ETest { void getProfileVersionTest() { StorageDescriptor fs = fs(); init(fs); + UserIDAuth bob = registerUser("bob"); - String version = profileRetrievalService.privateProfile(bob).getVersion(); - assertThat(version).isNotEmpty(); + + Version version = profileRetrievalService.privateProfile(bob).getAppVersion(); + assertThat(version).isEqualTo(Version.current()); } private void init(WithStorageProvider.StorageDescriptor descriptor) { diff --git a/datasafe-directory/datasafe-directory-api/src/main/java/de/adorsys/datasafe/directory/api/types/CreateUserPrivateProfile.java b/datasafe-directory/datasafe-directory-api/src/main/java/de/adorsys/datasafe/directory/api/types/CreateUserPrivateProfile.java index c0a2f8012..c2a361ea2 100644 --- a/datasafe-directory/datasafe-directory-api/src/main/java/de/adorsys/datasafe/directory/api/types/CreateUserPrivateProfile.java +++ b/datasafe-directory/datasafe-directory-api/src/main/java/de/adorsys/datasafe/directory/api/types/CreateUserPrivateProfile.java @@ -1,6 +1,7 @@ package de.adorsys.datasafe.directory.api.types; import de.adorsys.datasafe.encrypiton.api.types.UserIDAuth; +import de.adorsys.datasafe.types.api.global.Version; import de.adorsys.datasafe.types.api.resource.AbsoluteLocation; import de.adorsys.datasafe.types.api.resource.PrivateResource; import de.adorsys.datasafe.types.api.resource.PublicResource; @@ -66,10 +67,11 @@ public class CreateUserPrivateProfile { private final AbsoluteLocation publishPubKeysTo; /** - * Entity version. Keeps version of datasafe which create profile + * Entity appVersion. Keeps version of datasafe which was used to create profile */ @NonNull - private final String version; + @Builder.Default + private final Version appVersion = Version.current(); public UserPrivateProfile removeAccess() { return UserPrivateProfile.builder() @@ -81,7 +83,7 @@ public UserPrivateProfile removeAccess() { .documentVersionStorage(documentVersionStorage) .associatedResources(associatedResources) .publishPublicKeysTo(publishPubKeysTo) - .version(version) + .appVersion(appVersion) .build(); } } diff --git a/datasafe-directory/datasafe-directory-api/src/main/java/de/adorsys/datasafe/directory/api/types/CreateUserPublicProfile.java b/datasafe-directory/datasafe-directory-api/src/main/java/de/adorsys/datasafe/directory/api/types/CreateUserPublicProfile.java index a0709b4c3..dbf5b5d66 100644 --- a/datasafe-directory/datasafe-directory-api/src/main/java/de/adorsys/datasafe/directory/api/types/CreateUserPublicProfile.java +++ b/datasafe-directory/datasafe-directory-api/src/main/java/de/adorsys/datasafe/directory/api/types/CreateUserPublicProfile.java @@ -1,6 +1,7 @@ package de.adorsys.datasafe.directory.api.types; import de.adorsys.datasafe.encrypiton.api.types.UserID; +import de.adorsys.datasafe.types.api.global.Version; import de.adorsys.datasafe.types.api.resource.AbsoluteLocation; import de.adorsys.datasafe.types.api.resource.PublicResource; import lombok.Builder; @@ -33,17 +34,18 @@ public class CreateUserPublicProfile { private final AbsoluteLocation inbox; /** - * Entity version. Keeps version of datasafe which create profile + * Entity appVersion. Keeps version of Datasafe which was used to create profile */ @NonNull - private final String version; + @Builder.Default + private final Version appVersion = Version.current(); public UserPublicProfile removeAccess() { return UserPublicProfile.builder() // FIXME - remove access ? .inbox(inbox) .publicKeys(publicKeys) - .version(version) + .appVersion(appVersion) .build(); } } diff --git a/datasafe-directory/datasafe-directory-api/src/main/java/de/adorsys/datasafe/directory/api/types/UserPrivateProfile.java b/datasafe-directory/datasafe-directory-api/src/main/java/de/adorsys/datasafe/directory/api/types/UserPrivateProfile.java index 166cad759..ea08bfca6 100644 --- a/datasafe-directory/datasafe-directory-api/src/main/java/de/adorsys/datasafe/directory/api/types/UserPrivateProfile.java +++ b/datasafe-directory/datasafe-directory-api/src/main/java/de/adorsys/datasafe/directory/api/types/UserPrivateProfile.java @@ -1,5 +1,6 @@ package de.adorsys.datasafe.directory.api.types; +import de.adorsys.datasafe.types.api.global.Version; import de.adorsys.datasafe.types.api.resource.AbsoluteLocation; import de.adorsys.datasafe.types.api.resource.PrivateResource; import de.adorsys.datasafe.types.api.resource.PublicResource; @@ -16,7 +17,7 @@ */ @Data @Builder(toBuilder = true) -public class UserPrivateProfile { +public class UserPrivateProfile{ /** * Users' keystore location @@ -63,8 +64,8 @@ public class UserPrivateProfile { private final AbsoluteLocation storageCredentialsKeystore; /** - * Entity version. Keeps version of datasafe which create profile + * Entity appVersion. Keeps appVersion of datasafe which was used to create profile */ @NonNull - private final String version; + private final Version appVersion; } diff --git a/datasafe-directory/datasafe-directory-api/src/main/java/de/adorsys/datasafe/directory/api/types/UserPublicProfile.java b/datasafe-directory/datasafe-directory-api/src/main/java/de/adorsys/datasafe/directory/api/types/UserPublicProfile.java index 7a24a289c..b966792a1 100644 --- a/datasafe-directory/datasafe-directory-api/src/main/java/de/adorsys/datasafe/directory/api/types/UserPublicProfile.java +++ b/datasafe-directory/datasafe-directory-api/src/main/java/de/adorsys/datasafe/directory/api/types/UserPublicProfile.java @@ -1,5 +1,6 @@ package de.adorsys.datasafe.directory.api.types; +import de.adorsys.datasafe.types.api.global.Version; import de.adorsys.datasafe.types.api.resource.AbsoluteLocation; import de.adorsys.datasafe.types.api.resource.PublicResource; import lombok.Builder; @@ -26,8 +27,8 @@ public class UserPublicProfile { private final AbsoluteLocation inbox; /** - * Entity version. Keeps version of datasafe which create profile + * Entity appVersion. Keeps version (logical, not release) of datasafe which was used to create profile */ @NonNull - private final String version; + private final Version appVersion; } diff --git a/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/config/DefaultDFSConfig.java b/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/config/DefaultDFSConfig.java index 7ac1c0ea0..d02e4274e 100644 --- a/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/config/DefaultDFSConfig.java +++ b/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/config/DefaultDFSConfig.java @@ -106,7 +106,6 @@ public CreateUserPrivateProfile defaultPrivateTemplate(UserIDAuth id) { .documentVersionStorage(accessPrivate(rootLocation.resolve("./" + VERSION_COMPONENT + "/"))) .publishPubKeysTo(access(publicKeys(rootLocation))) .associatedResources(Collections.singletonList(accessPrivate(rootLocation))) - .version(currentDatasafeVersion()) .build(); } @@ -118,7 +117,6 @@ public CreateUserPublicProfile defaultPublicTemplate(UserID id) { .id(id) .inbox(access(inbox(rootLocation))) .publicKeys(access(publicKeys(rootLocation))) - .version(currentDatasafeVersion()) .build(); } @@ -157,10 +155,6 @@ protected Uri publicKeys(Uri rootLocation) { return rootLocation.resolve("./" + PUBLIC_COMPONENT + "/" + "pubkeys"); } - public static String currentDatasafeVersion() { - return "v062"; - } - public static Uri addTrailingSlashIfNeeded(Uri systemRoot) { return new Uri(addTrailingSlashIfNeeded(systemRoot.asURI())); } diff --git a/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/operations/actions/ProfileRetrievalServiceImpl.java b/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/operations/actions/ProfileRetrievalServiceImpl.java index b3dc053a8..f2b0b83a1 100644 --- a/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/operations/actions/ProfileRetrievalServiceImpl.java +++ b/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/operations/actions/ProfileRetrievalServiceImpl.java @@ -13,6 +13,7 @@ import de.adorsys.datasafe.storage.api.actions.StorageCheckService; import de.adorsys.datasafe.storage.api.actions.StorageReadService; import de.adorsys.datasafe.types.api.context.annotations.RuntimeDelegate; +import de.adorsys.datasafe.types.api.global.Version; import de.adorsys.datasafe.types.api.resource.AbsoluteLocation; import lombok.SneakyThrows; import lombok.extern.slf4j.Slf4j; @@ -50,7 +51,9 @@ public ProfileRetrievalServiceImpl(DFSConfig dfsConfig, StorageReadService readS public UserPublicProfile publicProfile(UserID ofUser) { UserPublicProfile userPublicProfile = userProfileCache.getPublicProfile().computeIfAbsent( ofUser, - id -> readProfile(dfsConfig.publicProfile(ofUser), UserPublicProfile.class) + id -> handleMissingVersion( + readProfile(dfsConfig.publicProfile(ofUser), UserPublicProfile.class) + ) ); log.debug("get public profile {} for user {}", userPublicProfile, ofUser); return userPublicProfile; @@ -63,7 +66,9 @@ public UserPublicProfile publicProfile(UserID ofUser) { public UserPrivateProfile privateProfile(UserIDAuth ofUser) { UserPrivateProfile userPrivateProfile = userProfileCache.getPrivateProfile().computeIfAbsent( ofUser.getUserID(), - id -> readProfile(dfsConfig.privateProfile(ofUser.getUserID()), UserPrivateProfile.class) + id -> handleMissingVersion( + readProfile(dfsConfig.privateProfile(ofUser.getUserID()), UserPrivateProfile.class) + ) ); log.debug("get private profile {} for user {}", userPrivateProfile, ofUser); return userPrivateProfile; @@ -85,4 +90,20 @@ private T readProfile(AbsoluteLocation resource, Class clazz) { return serde.fromJson(new String(ByteStreams.toByteArray(is)), clazz); } } + + private UserPublicProfile handleMissingVersion(UserPublicProfile profile) { + if (null == profile.getAppVersion()) { + return profile.toBuilder().appVersion(Version.BASELINE).build(); + } + + return profile; + } + + private UserPrivateProfile handleMissingVersion(UserPrivateProfile profile) { + if (null == profile.getAppVersion()) { + return profile.toBuilder().appVersion(Version.BASELINE).build(); + } + + return profile; + } } diff --git a/datasafe-examples/datasafe-examples-business/src/test/java/de/adorsys/datasafe/examples/business/filesystem/BaseUserOperationsTestWithVersionedDatasafeTest.java b/datasafe-examples/datasafe-examples-business/src/test/java/de/adorsys/datasafe/examples/business/filesystem/BaseUserOperationsTestWithVersionedDatasafeTest.java index 0ac35ca01..c08c0f8c6 100644 --- a/datasafe-examples/datasafe-examples-business/src/test/java/de/adorsys/datasafe/examples/business/filesystem/BaseUserOperationsTestWithVersionedDatasafeTest.java +++ b/datasafe-examples/datasafe-examples-business/src/test/java/de/adorsys/datasafe/examples/business/filesystem/BaseUserOperationsTestWithVersionedDatasafeTest.java @@ -105,7 +105,7 @@ void writeFileToVersionedPrivateSpace() { assertThat(versionedServices.latestPrivate().list(ListRequest.forDefaultPrivate(user, ""))).hasSize(1); // END_SNIPPET - // BEGIN_SNIPPET:Lets check how to read oldest file version + // BEGIN_SNIPPET:Lets check how to read oldest file appVersion // so lets collect all versions List, PrivateResource, DFSVersion>> withVersions = versionedServices.versionInfo().versionsOf( @@ -126,7 +126,7 @@ void writeFileToVersionedPrivateSpace() { /** * Imagine the usecase when you have some cached local files from users' privatespace and your application - * wants to check if your local version is outdated and you need to download new version from storage. + * wants to check if your local appVersion is outdated and you need to download new appVersion from storage. */ @Test @SneakyThrows @@ -138,7 +138,7 @@ void checkThatWeNeedToDownloadNewFile() { // First lets store some file, for example John stored it from mobile phone try (OutputStream os = versionedServices.latestPrivate() .write(WriteRequest.forDefaultPrivate(user, "my/own/file.txt"))) { - os.write(("Hello old version").getBytes(StandardCharsets.UTF_8)); + os.write(("Hello old appVersion").getBytes(StandardCharsets.UTF_8)); } // Application on mobile phone caches file content to improve performance, so it should cache timestamp too @@ -150,7 +150,7 @@ void checkThatWeNeedToDownloadNewFile() { Thread.sleep(1000L); // it took some time for him to get to PC try (OutputStream os = versionedServices.latestPrivate() .write(WriteRequest.forDefaultPrivate(user, "my/own/file.txt"))) { - os.write(("Hello new version").getBytes(StandardCharsets.UTF_8)); + os.write(("Hello new appVersion").getBytes(StandardCharsets.UTF_8)); } // John takes his mobile phone and application checks if it needs to sync content @@ -160,7 +160,7 @@ void checkThatWeNeedToDownloadNewFile() { // This indicates that we need to update our cache on mobile phone // Modified date of saved file has changed and it is newer that our cached date - // So mobile application should download latest file version + // So mobile application should download latest file appVersion assertThat(savedOnPC).isAfter(savedOnMobile); // END_SNIPPET } diff --git a/datasafe-examples/datasafe-examples-versioned-s3/src/test/java/de/adorsys/datasafe/examples/business/s3/BaseUserOperationsWithDefaultDatasafeOnVersionedStorageTest.java b/datasafe-examples/datasafe-examples-versioned-s3/src/test/java/de/adorsys/datasafe/examples/business/s3/BaseUserOperationsWithDefaultDatasafeOnVersionedStorageTest.java index 1da625a16..8a2ee424f 100644 --- a/datasafe-examples/datasafe-examples-versioned-s3/src/test/java/de/adorsys/datasafe/examples/business/s3/BaseUserOperationsWithDefaultDatasafeOnVersionedStorageTest.java +++ b/datasafe-examples/datasafe-examples-versioned-s3/src/test/java/de/adorsys/datasafe/examples/business/s3/BaseUserOperationsWithDefaultDatasafeOnVersionedStorageTest.java @@ -128,8 +128,8 @@ void init() { } /** - * S3 storage adapter supports sending back file version (if S3 storage returns it) when storing object to - * bucket and it allows reading object using its version too. + * S3 storage adapter supports sending back file appVersion (if S3 storage returns it) when storing object to + * bucket and it allows reading object using its appVersion too. */ @Test @SneakyThrows @@ -140,7 +140,7 @@ void writeFileThenReadLatestAndReadByVersion() { // writing data to my/own/file.txt 3 times with different content: // 1st time, writing into my/own/file.txt: - // Expanded snippet of how to capture file version when writing object: + // Expanded snippet of how to capture file appVersion when writing object: AtomicReference version = new AtomicReference<>(); try (OutputStream os = defaultDatasafeServices.privateService() .write(WriteRequest.forDefaultPrivate(user, MY_OWN_FILE_TXT) @@ -148,43 +148,43 @@ void writeFileThenReadLatestAndReadByVersion() { .callback((PhysicalVersionCallback) version::set) .build()) ) { - // Initial version will contain "Hello 1": + // Initial appVersion will contain "Hello 1": os.write("Hello 1".getBytes(StandardCharsets.UTF_8)); } - // this variable has our initial file version: + // this variable has our initial file appVersion: String version1 = version.get(); // Write 2 more times different data to same file - my/own/file.txt: String version2 = writeToPrivate(user, MY_OWN_FILE_TXT, "Hello 2"); - // Last version will contain "Hello 3": + // Last appVersion will contain "Hello 3": String version3 = writeToPrivate(user, MY_OWN_FILE_TXT, "Hello 3"); - // now, when we read file without specifying version - we see latest file content: + // now, when we read file without specifying appVersion - we see latest file content: assertThat(defaultDatasafeServices.privateService().read( ReadRequest.forDefaultPrivate(user, MY_OWN_FILE_TXT)) ).hasContent("Hello 3"); - // but if we specify file version - we get content for it: + // but if we specify file appVersion - we get content for it: assertThat(defaultDatasafeServices.privateService().read( ReadRequest.forDefaultPrivateWithVersion(user, MY_OWN_FILE_TXT, new StorageVersion(version1))) ).hasContent("Hello 1"); // END_SNIPPET - log.debug("version 1 " + version1); - log.debug("version 2 " + version2); - log.debug("version 3 " + version3); + log.debug("appVersion 1 " + version1); + log.debug("appVersion 2 " + version2); + log.debug("appVersion 3 " + version3); assertThat(defaultDatasafeServices.privateService().list(ListRequest.forDefaultPrivate(user, ""))).hasSize(1); assertThat(version1.equals(version2)).isFalse(); assertThat(version1.equals(version3)).isFalse(); } /** - * Example of how to remove specific version id + * Example of how to remove specific appVersion id */ @Test @SneakyThrows void removeSpecificVersionId() { - // BEGIN_SNIPPET:Versioned storage support - removing specific version + // BEGIN_SNIPPET:Versioned storage support - removing specific appVersion // creating new user UserIDAuth user = registerUser("john"); @@ -192,12 +192,12 @@ void removeSpecificVersionId() { String versionId = writeToPrivate(user, MY_OWN_FILE_TXT, "Hello 1"); writeToPrivate(user, MY_OWN_FILE_TXT, "Hello 2"); - // now, we read old file version + // now, we read old file appVersion assertThat(defaultDatasafeServices.privateService().read( ReadRequest.forDefaultPrivateWithVersion(user, MY_OWN_FILE_TXT, new StorageVersion(versionId))) ).hasContent("Hello 1"); - // now, we remove old file version + // now, we remove old file appVersion defaultDatasafeServices.privateService().remove( RemoveRequest.forDefaultPrivateWithVersion(user, MY_OWN_FILE_TXT, new StorageVersion(versionId)) ); @@ -207,7 +207,7 @@ void removeSpecificVersionId() { ReadRequest.forDefaultPrivateWithVersion(user, MY_OWN_FILE_TXT, new StorageVersion(versionId))) ); - // but latest file version is still available + // but latest file appVersion is still available assertThat(defaultDatasafeServices.privateService().read( ReadRequest.forDefaultPrivate(user, MY_OWN_FILE_TXT)) ).hasContent("Hello 2"); diff --git a/datasafe-metainfo/datasafe-metainfo-version-impl/src/main/java/de/adorsys/datasafe/metainfo/version/impl/version/VersionEncoderDecoder.java b/datasafe-metainfo/datasafe-metainfo-version-impl/src/main/java/de/adorsys/datasafe/metainfo/version/impl/version/VersionEncoderDecoder.java index def39128c..87e8c5f2a 100644 --- a/datasafe-metainfo/datasafe-metainfo-version-impl/src/main/java/de/adorsys/datasafe/metainfo/version/impl/version/VersionEncoderDecoder.java +++ b/datasafe-metainfo/datasafe-metainfo-version-impl/src/main/java/de/adorsys/datasafe/metainfo/version/impl/version/VersionEncoderDecoder.java @@ -6,21 +6,21 @@ import java.util.Optional; /** - * Encodes and decodes URI into/from URI with version. + * Encodes and decodes URI into/from URI with appVersion. */ public interface VersionEncoderDecoder { /** - * Generates URI tagged with version. - * @param resource URI to tag with version - * @return URI with version + * Generates URI tagged with appVersion. + * @param resource URI to tag with appVersion + * @return URI with appVersion */ VersionedUri newVersion(Uri resource); /** * Parses versioned URI. - * @param uri resource with encoded version - * @return decoded resource and version + * @param uri resource with encoded appVersion + * @return decoded resource and appVersion * @apiNote It won't work on non-versioned resources. */ Optional decodeVersion(Uri uri); diff --git a/datasafe-metainfo/datasafe-metainfo-version-impl/src/main/java/de/adorsys/datasafe/metainfo/version/impl/version/latest/DefaultVersionEncoderDecoder.java b/datasafe-metainfo/datasafe-metainfo-version-impl/src/main/java/de/adorsys/datasafe/metainfo/version/impl/version/latest/DefaultVersionEncoderDecoder.java index eea7112c6..80ad9d6eb 100644 --- a/datasafe-metainfo/datasafe-metainfo-version-impl/src/main/java/de/adorsys/datasafe/metainfo/version/impl/version/latest/DefaultVersionEncoderDecoder.java +++ b/datasafe-metainfo/datasafe-metainfo-version-impl/src/main/java/de/adorsys/datasafe/metainfo/version/impl/version/latest/DefaultVersionEncoderDecoder.java @@ -12,7 +12,7 @@ /** * Encoder/decoder that creates URI versions using UUID generator and path separator, so that versioned resource * http://example.com/some/path/75943a83-ae8a-4eaf-bffb-1a20f235416c - * means version 75943a83-ae8a-4eaf-bffb-1a20f235416c of http://example.com/some/path + * means appVersion 75943a83-ae8a-4eaf-bffb-1a20f235416c of http://example.com/some/path */ @RuntimeDelegate public class DefaultVersionEncoderDecoder implements VersionEncoderDecoder { diff --git a/datasafe-metainfo/datasafe-metainfo-version-impl/src/main/java/de/adorsys/datasafe/metainfo/version/impl/version/latest/DefaultVersionInfoServiceImpl.java b/datasafe-metainfo/datasafe-metainfo-version-impl/src/main/java/de/adorsys/datasafe/metainfo/version/impl/version/latest/DefaultVersionInfoServiceImpl.java index dd8eea05b..724d30615 100644 --- a/datasafe-metainfo/datasafe-metainfo-version-impl/src/main/java/de/adorsys/datasafe/metainfo/version/impl/version/latest/DefaultVersionInfoServiceImpl.java +++ b/datasafe-metainfo/datasafe-metainfo-version-impl/src/main/java/de/adorsys/datasafe/metainfo/version/impl/version/latest/DefaultVersionInfoServiceImpl.java @@ -16,9 +16,9 @@ import java.util.stream.Stream; /** - * Default implementation of version information service that determines latest resource using + * Default implementation of appVersion information service that determines latest resource using * {@link EncryptedLatestLinkService} and reads all associated blobs with versions using {@link ListPrivate} - * within privatespace. Then it decrypts associated blobs into version and path using {@link VersionEncoderDecoder} + * within privatespace. Then it decrypts associated blobs into appVersion and path using {@link VersionEncoderDecoder} */ @RuntimeDelegate public class DefaultVersionInfoServiceImpl implements VersionInfoService { @@ -65,7 +65,7 @@ private Versioned, ResolvedResource, DFSVersi request.getStorageIdentifier() ); - // TODO: This can be cached - latest links for resource version. + // TODO: This can be cached - latest links for resource appVersion. AbsoluteLocation resolved = listPrivate .list(request.toBuilder().location(latestLink.getResource()).build()) .findFirst().orElse(null); diff --git a/datasafe-metainfo/datasafe-metainfo-version-impl/src/main/java/de/adorsys/datasafe/metainfo/version/impl/version/latest/EncryptedLatestLinkServiceImpl.java b/datasafe-metainfo/datasafe-metainfo-version-impl/src/main/java/de/adorsys/datasafe/metainfo/version/impl/version/latest/EncryptedLatestLinkServiceImpl.java index 7062b7513..8098ebf86 100644 --- a/datasafe-metainfo/datasafe-metainfo-version-impl/src/main/java/de/adorsys/datasafe/metainfo/version/impl/version/latest/EncryptedLatestLinkServiceImpl.java +++ b/datasafe-metainfo/datasafe-metainfo-version-impl/src/main/java/de/adorsys/datasafe/metainfo/version/impl/version/latest/EncryptedLatestLinkServiceImpl.java @@ -51,8 +51,8 @@ public AbsoluteLocation resolveLatestLinkLocation( UserPrivateProfile privateProfile = profiles.privateProfile(owner); if (null == privateProfile.getDocumentVersionStorage()) { - log.error("Missing version storage for {}", Obfuscate.secure(owner.getUserID().getValue())); - throw new IllegalStateException("User private profile is missing document version storage"); + log.error("Missing appVersion storage for {}", Obfuscate.secure(owner.getUserID().getValue())); + throw new IllegalStateException("User private profile is missing document appVersion storage"); } AbsoluteLocation encryptedPath = resolver.encryptAndResolvePath( diff --git a/datasafe-metainfo/datasafe-metainfo-version-impl/src/main/java/de/adorsys/datasafe/metainfo/version/impl/version/latest/LatestPrivateSpaceImpl.java b/datasafe-metainfo/datasafe-metainfo-version-impl/src/main/java/de/adorsys/datasafe/metainfo/version/impl/version/latest/LatestPrivateSpaceImpl.java index 2f93fa222..23466040e 100644 --- a/datasafe-metainfo/datasafe-metainfo-version-impl/src/main/java/de/adorsys/datasafe/metainfo/version/impl/version/latest/LatestPrivateSpaceImpl.java +++ b/datasafe-metainfo/datasafe-metainfo-version-impl/src/main/java/de/adorsys/datasafe/metainfo/version/impl/version/latest/LatestPrivateSpaceImpl.java @@ -21,10 +21,10 @@ import java.util.stream.Stream; /** - * Privatespace where each operation will be applied to latest file version. + * Privatespace where each operation will be applied to latest file appVersion. * @implNote Operations on non-versioned resources are not supported. Ideally, do not mix versioned and * non-versioned resources in same privatespace. - * @param version tag + * @param appVersion tag */ @RuntimeDelegate public class LatestPrivateSpaceImpl implements VersionedPrivateSpaceService { diff --git a/datasafe-metainfo/datasafe-metainfo-version-impl/src/main/java/de/adorsys/datasafe/metainfo/version/impl/version/latest/actions/LatestListImpl.java b/datasafe-metainfo/datasafe-metainfo-version-impl/src/main/java/de/adorsys/datasafe/metainfo/version/impl/version/latest/actions/LatestListImpl.java index 2a73b2fbf..c5771efb3 100644 --- a/datasafe-metainfo/datasafe-metainfo-version-impl/src/main/java/de/adorsys/datasafe/metainfo/version/impl/version/latest/actions/LatestListImpl.java +++ b/datasafe-metainfo/datasafe-metainfo-version-impl/src/main/java/de/adorsys/datasafe/metainfo/version/impl/version/latest/actions/LatestListImpl.java @@ -20,10 +20,10 @@ /** * Default latest list operation that reads latest resource root for incoming request * using {@link EncryptedLatestLinkService}, then lists raw blobs within that root - * (inside privatespace using {@link ListPrivate}) and parses them into version, logical resource + * (inside privatespace using {@link ListPrivate}) and parses them into appVersion, logical resource * using {@link VersionEncoderDecoder} * @implNote Shows only versioned resources, won't show unversioned resources - * @param version tag + * @param appVersion tag */ @RuntimeDelegate public class LatestListImpl implements VersionedList { diff --git a/datasafe-metainfo/datasafe-metainfo-version-impl/src/main/java/de/adorsys/datasafe/metainfo/version/impl/version/latest/actions/LatestReadImpl.java b/datasafe-metainfo/datasafe-metainfo-version-impl/src/main/java/de/adorsys/datasafe/metainfo/version/impl/version/latest/actions/LatestReadImpl.java index 632920a76..0ff97517d 100644 --- a/datasafe-metainfo/datasafe-metainfo-version-impl/src/main/java/de/adorsys/datasafe/metainfo/version/impl/version/latest/actions/LatestReadImpl.java +++ b/datasafe-metainfo/datasafe-metainfo-version-impl/src/main/java/de/adorsys/datasafe/metainfo/version/impl/version/latest/actions/LatestReadImpl.java @@ -19,7 +19,7 @@ * {@link EncryptedLatestLinkService}, follows that link by reading its content to get latest blob * location, reads and decrypts latest blob content using {@link ReadFromPrivate} * @implNote Reads only from versioned resources - can't be used with ordinary one - * @param version tag + * @param appVersion tag */ @RuntimeDelegate public class LatestReadImpl implements VersionedRead { diff --git a/datasafe-metainfo/datasafe-metainfo-version-impl/src/main/java/de/adorsys/datasafe/metainfo/version/impl/version/latest/actions/LatestRemoveImpl.java b/datasafe-metainfo/datasafe-metainfo-version-impl/src/main/java/de/adorsys/datasafe/metainfo/version/impl/version/latest/actions/LatestRemoveImpl.java index c75f0cb3b..86292f54e 100644 --- a/datasafe-metainfo/datasafe-metainfo-version-impl/src/main/java/de/adorsys/datasafe/metainfo/version/impl/version/latest/actions/LatestRemoveImpl.java +++ b/datasafe-metainfo/datasafe-metainfo-version-impl/src/main/java/de/adorsys/datasafe/metainfo/version/impl/version/latest/actions/LatestRemoveImpl.java @@ -17,7 +17,7 @@ * Default versioned resource remove action that simply removes document returned by {@link EncryptedLatestLinkService} * so that old versions are preserved, because they are blobs within privatestorage. * @implNote Removes only versioned resource - can't be used with ordinary one - * @param version tag + * @param appVersion tag */ @RuntimeDelegate public class LatestRemoveImpl implements VersionedRemove { diff --git a/datasafe-metainfo/datasafe-metainfo-version-impl/src/main/java/de/adorsys/datasafe/metainfo/version/impl/version/latest/actions/LatestWriteImpl.java b/datasafe-metainfo/datasafe-metainfo-version-impl/src/main/java/de/adorsys/datasafe/metainfo/version/impl/version/latest/actions/LatestWriteImpl.java index f895f26a7..71448bae8 100644 --- a/datasafe-metainfo/datasafe-metainfo-version-impl/src/main/java/de/adorsys/datasafe/metainfo/version/impl/version/latest/actions/LatestWriteImpl.java +++ b/datasafe-metainfo/datasafe-metainfo-version-impl/src/main/java/de/adorsys/datasafe/metainfo/version/impl/version/latest/actions/LatestWriteImpl.java @@ -27,7 +27,7 @@ * Link content is the resource that is relative to user privatespace. * Relativization against privatespace root of written blob is done by {@link EncryptedResourceResolver}. * @implNote Writes only to versioned resources - can't be used with ordinary one - * @param version tag + * @param appVersion tag */ @RuntimeDelegate public class LatestWriteImpl implements VersionedWrite { diff --git a/datasafe-metainfo/datasafe-metainfo-version-impl/src/main/java/de/adorsys/datasafe/metainfo/version/impl/version/types/LatestDFSVersion.java b/datasafe-metainfo/datasafe-metainfo-version-impl/src/main/java/de/adorsys/datasafe/metainfo/version/impl/version/types/LatestDFSVersion.java index b51a631b0..eb1967a0c 100644 --- a/datasafe-metainfo/datasafe-metainfo-version-impl/src/main/java/de/adorsys/datasafe/metainfo/version/impl/version/types/LatestDFSVersion.java +++ b/datasafe-metainfo/datasafe-metainfo-version-impl/src/main/java/de/adorsys/datasafe/metainfo/version/impl/version/types/LatestDFSVersion.java @@ -1,7 +1,7 @@ package de.adorsys.datasafe.metainfo.version.impl.version.types; /** - * Latest version that is known for DFS system. + * Latest appVersion that is known for DFS system. */ public class LatestDFSVersion implements DFSVersionStrategy { } diff --git a/datasafe-rest-impl/src/main/java/de/adorsys/datasafe/rest/impl/controller/UserController.java b/datasafe-rest-impl/src/main/java/de/adorsys/datasafe/rest/impl/controller/UserController.java index 4f6230025..776d0e3f3 100644 --- a/datasafe-rest-impl/src/main/java/de/adorsys/datasafe/rest/impl/controller/UserController.java +++ b/datasafe-rest-impl/src/main/java/de/adorsys/datasafe/rest/impl/controller/UserController.java @@ -50,7 +50,7 @@ public class UserController { * private-profile: ${systemRoot}/profiles/private/${userName} * User files: * privatespace-raw-files: ${systemRoot}/${userName}/private/files - * privatespace-latest-file-version: ${systemRoot}/${userName}/versions + * privatespace-latest-file-appVersion: ${systemRoot}/${userName}/versions * privatespace-keystore: ${systemRoot}/${userName}/private/keystore * inbox: ${systemRoot}/${userName}/inbox * public-keys: ${systemRoot}/${userName}/public/keystore diff --git a/datasafe-rest-impl/src/main/java/de/adorsys/datasafe/rest/impl/controller/VersionController.java b/datasafe-rest-impl/src/main/java/de/adorsys/datasafe/rest/impl/controller/VersionController.java index 11c8a33af..32fd86ddb 100644 --- a/datasafe-rest-impl/src/main/java/de/adorsys/datasafe/rest/impl/controller/VersionController.java +++ b/datasafe-rest-impl/src/main/java/de/adorsys/datasafe/rest/impl/controller/VersionController.java @@ -67,7 +67,7 @@ public List listVersionedDocuments(@RequestHeader String user, } /** - * reads latest version of file from user's private space. + * reads latest appVersion of file from user's private space. */ @SneakyThrows @GetMapping(value = "/versioned/{path:.*}", produces = APPLICATION_OCTET_STREAM_VALUE) @@ -95,7 +95,7 @@ public void readVersionedDocument(@RequestHeader String user, } /** - * writes latest version of file to user's private space. + * writes latest appVersion of file to user's private space. */ @SneakyThrows @PutMapping(value = "/versioned/{path:.*}", consumes = MULTIPART_FORM_DATA_VALUE) @@ -119,7 +119,7 @@ public void writeVersionedDocument(@RequestHeader String user, } /** - * deletes latest version of file from user's private space. + * deletes latest appVersion of file from user's private space. */ @DeleteMapping("/versioned/{path:.*}") @ApiOperation("Delete latest document from user's private space") diff --git a/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/test/java/de/adorsys/datasafe/simple/adapter/impl/SimpleDatasafeAdapter043CompatTest.java b/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/test/java/de/adorsys/datasafe/simple/adapter/impl/SimpleDatasafeAdapter043CompatTest.java index 124e89246..572245a02 100644 --- a/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/test/java/de/adorsys/datasafe/simple/adapter/impl/SimpleDatasafeAdapter043CompatTest.java +++ b/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/test/java/de/adorsys/datasafe/simple/adapter/impl/SimpleDatasafeAdapter043CompatTest.java @@ -19,7 +19,7 @@ import static org.assertj.core.api.Assertions.assertThat; /** - * This test ensures that SimpleDatasafeAdapter can use setup and folder structure from version 0.4.3 + * This test ensures that SimpleDatasafeAdapter can use setup and folder structure from appVersion 0.4.3 * (backward compatibility) */ class SimpleDatasafeAdapter043CompatTest extends BaseMockitoTest { diff --git a/datasafe-types-api/src/main/java/de/adorsys/datasafe/types/api/global/Version.java b/datasafe-types-api/src/main/java/de/adorsys/datasafe/types/api/global/Version.java new file mode 100644 index 000000000..08849798f --- /dev/null +++ b/datasafe-types-api/src/main/java/de/adorsys/datasafe/types/api/global/Version.java @@ -0,0 +1,23 @@ +package de.adorsys.datasafe.types.api.global; + +import lombok.Getter; +import lombok.RequiredArgsConstructor; + +/** + * This class carries logical Datasafe version (i.e. dictates user profile structure). + */ +@Getter +@RequiredArgsConstructor +public enum Version { + + /** + * The first version before major changes happened. + */ + BASELINE("v0"); + + private final String id; + + public static Version current() { + return BASELINE; + } +} From edf15626c2aa1d92d36a3a1ca3fdb234923e9c5c Mon Sep 17 00:00:00 2001 From: Valentyn Berezin Date: Mon, 16 Sep 2019 19:56:56 +0300 Subject: [PATCH 081/255] DOC-266. Drop irrelevant renames --- ...DefaultDatasafeOnVersionedStorageTest.java | 32 +++++++++---------- .../latest/DefaultVersionEncoderDecoder.java | 2 +- .../latest/DefaultVersionInfoServiceImpl.java | 6 ++-- .../EncryptedLatestLinkServiceImpl.java | 4 +-- .../latest/LatestPrivateSpaceImpl.java | 4 +-- .../latest/actions/LatestListImpl.java | 4 +-- .../latest/actions/LatestReadImpl.java | 2 +- .../latest/actions/LatestRemoveImpl.java | 2 +- .../latest/actions/LatestWriteImpl.java | 2 +- .../impl/version/types/LatestDFSVersion.java | 2 +- .../rest/impl/controller/UserController.java | 2 +- .../impl/controller/VersionController.java | 6 ++-- .../datasafe/types/api/global/Version.java | 3 +- 13 files changed, 36 insertions(+), 35 deletions(-) diff --git a/datasafe-examples/datasafe-examples-versioned-s3/src/test/java/de/adorsys/datasafe/examples/business/s3/BaseUserOperationsWithDefaultDatasafeOnVersionedStorageTest.java b/datasafe-examples/datasafe-examples-versioned-s3/src/test/java/de/adorsys/datasafe/examples/business/s3/BaseUserOperationsWithDefaultDatasafeOnVersionedStorageTest.java index 8a2ee424f..1da625a16 100644 --- a/datasafe-examples/datasafe-examples-versioned-s3/src/test/java/de/adorsys/datasafe/examples/business/s3/BaseUserOperationsWithDefaultDatasafeOnVersionedStorageTest.java +++ b/datasafe-examples/datasafe-examples-versioned-s3/src/test/java/de/adorsys/datasafe/examples/business/s3/BaseUserOperationsWithDefaultDatasafeOnVersionedStorageTest.java @@ -128,8 +128,8 @@ void init() { } /** - * S3 storage adapter supports sending back file appVersion (if S3 storage returns it) when storing object to - * bucket and it allows reading object using its appVersion too. + * S3 storage adapter supports sending back file version (if S3 storage returns it) when storing object to + * bucket and it allows reading object using its version too. */ @Test @SneakyThrows @@ -140,7 +140,7 @@ void writeFileThenReadLatestAndReadByVersion() { // writing data to my/own/file.txt 3 times with different content: // 1st time, writing into my/own/file.txt: - // Expanded snippet of how to capture file appVersion when writing object: + // Expanded snippet of how to capture file version when writing object: AtomicReference version = new AtomicReference<>(); try (OutputStream os = defaultDatasafeServices.privateService() .write(WriteRequest.forDefaultPrivate(user, MY_OWN_FILE_TXT) @@ -148,43 +148,43 @@ void writeFileThenReadLatestAndReadByVersion() { .callback((PhysicalVersionCallback) version::set) .build()) ) { - // Initial appVersion will contain "Hello 1": + // Initial version will contain "Hello 1": os.write("Hello 1".getBytes(StandardCharsets.UTF_8)); } - // this variable has our initial file appVersion: + // this variable has our initial file version: String version1 = version.get(); // Write 2 more times different data to same file - my/own/file.txt: String version2 = writeToPrivate(user, MY_OWN_FILE_TXT, "Hello 2"); - // Last appVersion will contain "Hello 3": + // Last version will contain "Hello 3": String version3 = writeToPrivate(user, MY_OWN_FILE_TXT, "Hello 3"); - // now, when we read file without specifying appVersion - we see latest file content: + // now, when we read file without specifying version - we see latest file content: assertThat(defaultDatasafeServices.privateService().read( ReadRequest.forDefaultPrivate(user, MY_OWN_FILE_TXT)) ).hasContent("Hello 3"); - // but if we specify file appVersion - we get content for it: + // but if we specify file version - we get content for it: assertThat(defaultDatasafeServices.privateService().read( ReadRequest.forDefaultPrivateWithVersion(user, MY_OWN_FILE_TXT, new StorageVersion(version1))) ).hasContent("Hello 1"); // END_SNIPPET - log.debug("appVersion 1 " + version1); - log.debug("appVersion 2 " + version2); - log.debug("appVersion 3 " + version3); + log.debug("version 1 " + version1); + log.debug("version 2 " + version2); + log.debug("version 3 " + version3); assertThat(defaultDatasafeServices.privateService().list(ListRequest.forDefaultPrivate(user, ""))).hasSize(1); assertThat(version1.equals(version2)).isFalse(); assertThat(version1.equals(version3)).isFalse(); } /** - * Example of how to remove specific appVersion id + * Example of how to remove specific version id */ @Test @SneakyThrows void removeSpecificVersionId() { - // BEGIN_SNIPPET:Versioned storage support - removing specific appVersion + // BEGIN_SNIPPET:Versioned storage support - removing specific version // creating new user UserIDAuth user = registerUser("john"); @@ -192,12 +192,12 @@ void removeSpecificVersionId() { String versionId = writeToPrivate(user, MY_OWN_FILE_TXT, "Hello 1"); writeToPrivate(user, MY_OWN_FILE_TXT, "Hello 2"); - // now, we read old file appVersion + // now, we read old file version assertThat(defaultDatasafeServices.privateService().read( ReadRequest.forDefaultPrivateWithVersion(user, MY_OWN_FILE_TXT, new StorageVersion(versionId))) ).hasContent("Hello 1"); - // now, we remove old file appVersion + // now, we remove old file version defaultDatasafeServices.privateService().remove( RemoveRequest.forDefaultPrivateWithVersion(user, MY_OWN_FILE_TXT, new StorageVersion(versionId)) ); @@ -207,7 +207,7 @@ void removeSpecificVersionId() { ReadRequest.forDefaultPrivateWithVersion(user, MY_OWN_FILE_TXT, new StorageVersion(versionId))) ); - // but latest file appVersion is still available + // but latest file version is still available assertThat(defaultDatasafeServices.privateService().read( ReadRequest.forDefaultPrivate(user, MY_OWN_FILE_TXT)) ).hasContent("Hello 2"); diff --git a/datasafe-metainfo/datasafe-metainfo-version-impl/src/main/java/de/adorsys/datasafe/metainfo/version/impl/version/latest/DefaultVersionEncoderDecoder.java b/datasafe-metainfo/datasafe-metainfo-version-impl/src/main/java/de/adorsys/datasafe/metainfo/version/impl/version/latest/DefaultVersionEncoderDecoder.java index 80ad9d6eb..eea7112c6 100644 --- a/datasafe-metainfo/datasafe-metainfo-version-impl/src/main/java/de/adorsys/datasafe/metainfo/version/impl/version/latest/DefaultVersionEncoderDecoder.java +++ b/datasafe-metainfo/datasafe-metainfo-version-impl/src/main/java/de/adorsys/datasafe/metainfo/version/impl/version/latest/DefaultVersionEncoderDecoder.java @@ -12,7 +12,7 @@ /** * Encoder/decoder that creates URI versions using UUID generator and path separator, so that versioned resource * http://example.com/some/path/75943a83-ae8a-4eaf-bffb-1a20f235416c - * means appVersion 75943a83-ae8a-4eaf-bffb-1a20f235416c of http://example.com/some/path + * means version 75943a83-ae8a-4eaf-bffb-1a20f235416c of http://example.com/some/path */ @RuntimeDelegate public class DefaultVersionEncoderDecoder implements VersionEncoderDecoder { diff --git a/datasafe-metainfo/datasafe-metainfo-version-impl/src/main/java/de/adorsys/datasafe/metainfo/version/impl/version/latest/DefaultVersionInfoServiceImpl.java b/datasafe-metainfo/datasafe-metainfo-version-impl/src/main/java/de/adorsys/datasafe/metainfo/version/impl/version/latest/DefaultVersionInfoServiceImpl.java index 724d30615..dd8eea05b 100644 --- a/datasafe-metainfo/datasafe-metainfo-version-impl/src/main/java/de/adorsys/datasafe/metainfo/version/impl/version/latest/DefaultVersionInfoServiceImpl.java +++ b/datasafe-metainfo/datasafe-metainfo-version-impl/src/main/java/de/adorsys/datasafe/metainfo/version/impl/version/latest/DefaultVersionInfoServiceImpl.java @@ -16,9 +16,9 @@ import java.util.stream.Stream; /** - * Default implementation of appVersion information service that determines latest resource using + * Default implementation of version information service that determines latest resource using * {@link EncryptedLatestLinkService} and reads all associated blobs with versions using {@link ListPrivate} - * within privatespace. Then it decrypts associated blobs into appVersion and path using {@link VersionEncoderDecoder} + * within privatespace. Then it decrypts associated blobs into version and path using {@link VersionEncoderDecoder} */ @RuntimeDelegate public class DefaultVersionInfoServiceImpl implements VersionInfoService { @@ -65,7 +65,7 @@ private Versioned, ResolvedResource, DFSVersi request.getStorageIdentifier() ); - // TODO: This can be cached - latest links for resource appVersion. + // TODO: This can be cached - latest links for resource version. AbsoluteLocation resolved = listPrivate .list(request.toBuilder().location(latestLink.getResource()).build()) .findFirst().orElse(null); diff --git a/datasafe-metainfo/datasafe-metainfo-version-impl/src/main/java/de/adorsys/datasafe/metainfo/version/impl/version/latest/EncryptedLatestLinkServiceImpl.java b/datasafe-metainfo/datasafe-metainfo-version-impl/src/main/java/de/adorsys/datasafe/metainfo/version/impl/version/latest/EncryptedLatestLinkServiceImpl.java index 8098ebf86..7062b7513 100644 --- a/datasafe-metainfo/datasafe-metainfo-version-impl/src/main/java/de/adorsys/datasafe/metainfo/version/impl/version/latest/EncryptedLatestLinkServiceImpl.java +++ b/datasafe-metainfo/datasafe-metainfo-version-impl/src/main/java/de/adorsys/datasafe/metainfo/version/impl/version/latest/EncryptedLatestLinkServiceImpl.java @@ -51,8 +51,8 @@ public AbsoluteLocation resolveLatestLinkLocation( UserPrivateProfile privateProfile = profiles.privateProfile(owner); if (null == privateProfile.getDocumentVersionStorage()) { - log.error("Missing appVersion storage for {}", Obfuscate.secure(owner.getUserID().getValue())); - throw new IllegalStateException("User private profile is missing document appVersion storage"); + log.error("Missing version storage for {}", Obfuscate.secure(owner.getUserID().getValue())); + throw new IllegalStateException("User private profile is missing document version storage"); } AbsoluteLocation encryptedPath = resolver.encryptAndResolvePath( diff --git a/datasafe-metainfo/datasafe-metainfo-version-impl/src/main/java/de/adorsys/datasafe/metainfo/version/impl/version/latest/LatestPrivateSpaceImpl.java b/datasafe-metainfo/datasafe-metainfo-version-impl/src/main/java/de/adorsys/datasafe/metainfo/version/impl/version/latest/LatestPrivateSpaceImpl.java index 23466040e..2f93fa222 100644 --- a/datasafe-metainfo/datasafe-metainfo-version-impl/src/main/java/de/adorsys/datasafe/metainfo/version/impl/version/latest/LatestPrivateSpaceImpl.java +++ b/datasafe-metainfo/datasafe-metainfo-version-impl/src/main/java/de/adorsys/datasafe/metainfo/version/impl/version/latest/LatestPrivateSpaceImpl.java @@ -21,10 +21,10 @@ import java.util.stream.Stream; /** - * Privatespace where each operation will be applied to latest file appVersion. + * Privatespace where each operation will be applied to latest file version. * @implNote Operations on non-versioned resources are not supported. Ideally, do not mix versioned and * non-versioned resources in same privatespace. - * @param appVersion tag + * @param version tag */ @RuntimeDelegate public class LatestPrivateSpaceImpl implements VersionedPrivateSpaceService { diff --git a/datasafe-metainfo/datasafe-metainfo-version-impl/src/main/java/de/adorsys/datasafe/metainfo/version/impl/version/latest/actions/LatestListImpl.java b/datasafe-metainfo/datasafe-metainfo-version-impl/src/main/java/de/adorsys/datasafe/metainfo/version/impl/version/latest/actions/LatestListImpl.java index c5771efb3..2a73b2fbf 100644 --- a/datasafe-metainfo/datasafe-metainfo-version-impl/src/main/java/de/adorsys/datasafe/metainfo/version/impl/version/latest/actions/LatestListImpl.java +++ b/datasafe-metainfo/datasafe-metainfo-version-impl/src/main/java/de/adorsys/datasafe/metainfo/version/impl/version/latest/actions/LatestListImpl.java @@ -20,10 +20,10 @@ /** * Default latest list operation that reads latest resource root for incoming request * using {@link EncryptedLatestLinkService}, then lists raw blobs within that root - * (inside privatespace using {@link ListPrivate}) and parses them into appVersion, logical resource + * (inside privatespace using {@link ListPrivate}) and parses them into version, logical resource * using {@link VersionEncoderDecoder} * @implNote Shows only versioned resources, won't show unversioned resources - * @param appVersion tag + * @param version tag */ @RuntimeDelegate public class LatestListImpl implements VersionedList { diff --git a/datasafe-metainfo/datasafe-metainfo-version-impl/src/main/java/de/adorsys/datasafe/metainfo/version/impl/version/latest/actions/LatestReadImpl.java b/datasafe-metainfo/datasafe-metainfo-version-impl/src/main/java/de/adorsys/datasafe/metainfo/version/impl/version/latest/actions/LatestReadImpl.java index 0ff97517d..632920a76 100644 --- a/datasafe-metainfo/datasafe-metainfo-version-impl/src/main/java/de/adorsys/datasafe/metainfo/version/impl/version/latest/actions/LatestReadImpl.java +++ b/datasafe-metainfo/datasafe-metainfo-version-impl/src/main/java/de/adorsys/datasafe/metainfo/version/impl/version/latest/actions/LatestReadImpl.java @@ -19,7 +19,7 @@ * {@link EncryptedLatestLinkService}, follows that link by reading its content to get latest blob * location, reads and decrypts latest blob content using {@link ReadFromPrivate} * @implNote Reads only from versioned resources - can't be used with ordinary one - * @param appVersion tag + * @param version tag */ @RuntimeDelegate public class LatestReadImpl implements VersionedRead { diff --git a/datasafe-metainfo/datasafe-metainfo-version-impl/src/main/java/de/adorsys/datasafe/metainfo/version/impl/version/latest/actions/LatestRemoveImpl.java b/datasafe-metainfo/datasafe-metainfo-version-impl/src/main/java/de/adorsys/datasafe/metainfo/version/impl/version/latest/actions/LatestRemoveImpl.java index 86292f54e..c75f0cb3b 100644 --- a/datasafe-metainfo/datasafe-metainfo-version-impl/src/main/java/de/adorsys/datasafe/metainfo/version/impl/version/latest/actions/LatestRemoveImpl.java +++ b/datasafe-metainfo/datasafe-metainfo-version-impl/src/main/java/de/adorsys/datasafe/metainfo/version/impl/version/latest/actions/LatestRemoveImpl.java @@ -17,7 +17,7 @@ * Default versioned resource remove action that simply removes document returned by {@link EncryptedLatestLinkService} * so that old versions are preserved, because they are blobs within privatestorage. * @implNote Removes only versioned resource - can't be used with ordinary one - * @param appVersion tag + * @param version tag */ @RuntimeDelegate public class LatestRemoveImpl implements VersionedRemove { diff --git a/datasafe-metainfo/datasafe-metainfo-version-impl/src/main/java/de/adorsys/datasafe/metainfo/version/impl/version/latest/actions/LatestWriteImpl.java b/datasafe-metainfo/datasafe-metainfo-version-impl/src/main/java/de/adorsys/datasafe/metainfo/version/impl/version/latest/actions/LatestWriteImpl.java index 71448bae8..f895f26a7 100644 --- a/datasafe-metainfo/datasafe-metainfo-version-impl/src/main/java/de/adorsys/datasafe/metainfo/version/impl/version/latest/actions/LatestWriteImpl.java +++ b/datasafe-metainfo/datasafe-metainfo-version-impl/src/main/java/de/adorsys/datasafe/metainfo/version/impl/version/latest/actions/LatestWriteImpl.java @@ -27,7 +27,7 @@ * Link content is the resource that is relative to user privatespace. * Relativization against privatespace root of written blob is done by {@link EncryptedResourceResolver}. * @implNote Writes only to versioned resources - can't be used with ordinary one - * @param appVersion tag + * @param version tag */ @RuntimeDelegate public class LatestWriteImpl implements VersionedWrite { diff --git a/datasafe-metainfo/datasafe-metainfo-version-impl/src/main/java/de/adorsys/datasafe/metainfo/version/impl/version/types/LatestDFSVersion.java b/datasafe-metainfo/datasafe-metainfo-version-impl/src/main/java/de/adorsys/datasafe/metainfo/version/impl/version/types/LatestDFSVersion.java index eb1967a0c..b51a631b0 100644 --- a/datasafe-metainfo/datasafe-metainfo-version-impl/src/main/java/de/adorsys/datasafe/metainfo/version/impl/version/types/LatestDFSVersion.java +++ b/datasafe-metainfo/datasafe-metainfo-version-impl/src/main/java/de/adorsys/datasafe/metainfo/version/impl/version/types/LatestDFSVersion.java @@ -1,7 +1,7 @@ package de.adorsys.datasafe.metainfo.version.impl.version.types; /** - * Latest appVersion that is known for DFS system. + * Latest version that is known for DFS system. */ public class LatestDFSVersion implements DFSVersionStrategy { } diff --git a/datasafe-rest-impl/src/main/java/de/adorsys/datasafe/rest/impl/controller/UserController.java b/datasafe-rest-impl/src/main/java/de/adorsys/datasafe/rest/impl/controller/UserController.java index 776d0e3f3..4f6230025 100644 --- a/datasafe-rest-impl/src/main/java/de/adorsys/datasafe/rest/impl/controller/UserController.java +++ b/datasafe-rest-impl/src/main/java/de/adorsys/datasafe/rest/impl/controller/UserController.java @@ -50,7 +50,7 @@ public class UserController { * private-profile: ${systemRoot}/profiles/private/${userName} * User files: * privatespace-raw-files: ${systemRoot}/${userName}/private/files - * privatespace-latest-file-appVersion: ${systemRoot}/${userName}/versions + * privatespace-latest-file-version: ${systemRoot}/${userName}/versions * privatespace-keystore: ${systemRoot}/${userName}/private/keystore * inbox: ${systemRoot}/${userName}/inbox * public-keys: ${systemRoot}/${userName}/public/keystore diff --git a/datasafe-rest-impl/src/main/java/de/adorsys/datasafe/rest/impl/controller/VersionController.java b/datasafe-rest-impl/src/main/java/de/adorsys/datasafe/rest/impl/controller/VersionController.java index 32fd86ddb..11c8a33af 100644 --- a/datasafe-rest-impl/src/main/java/de/adorsys/datasafe/rest/impl/controller/VersionController.java +++ b/datasafe-rest-impl/src/main/java/de/adorsys/datasafe/rest/impl/controller/VersionController.java @@ -67,7 +67,7 @@ public List listVersionedDocuments(@RequestHeader String user, } /** - * reads latest appVersion of file from user's private space. + * reads latest version of file from user's private space. */ @SneakyThrows @GetMapping(value = "/versioned/{path:.*}", produces = APPLICATION_OCTET_STREAM_VALUE) @@ -95,7 +95,7 @@ public void readVersionedDocument(@RequestHeader String user, } /** - * writes latest appVersion of file to user's private space. + * writes latest version of file to user's private space. */ @SneakyThrows @PutMapping(value = "/versioned/{path:.*}", consumes = MULTIPART_FORM_DATA_VALUE) @@ -119,7 +119,7 @@ public void writeVersionedDocument(@RequestHeader String user, } /** - * deletes latest appVersion of file from user's private space. + * deletes latest version of file from user's private space. */ @DeleteMapping("/versioned/{path:.*}") @ApiOperation("Delete latest document from user's private space") diff --git a/datasafe-types-api/src/main/java/de/adorsys/datasafe/types/api/global/Version.java b/datasafe-types-api/src/main/java/de/adorsys/datasafe/types/api/global/Version.java index 08849798f..7b4c6e21d 100644 --- a/datasafe-types-api/src/main/java/de/adorsys/datasafe/types/api/global/Version.java +++ b/datasafe-types-api/src/main/java/de/adorsys/datasafe/types/api/global/Version.java @@ -4,7 +4,8 @@ import lombok.RequiredArgsConstructor; /** - * This class carries logical Datasafe version (i.e. dictates user profile structure). + * This class carries logical Datasafe version (i.e. dictates user profile structure) so that application can + * detect incompatibilities between old data and new code and act accordingly. */ @Getter @RequiredArgsConstructor From d8d704e990a1b18003992b3474c07c2b3db3a42c Mon Sep 17 00:00:00 2001 From: Valentyn Berezin Date: Mon, 16 Sep 2019 20:01:25 +0300 Subject: [PATCH 082/255] DOC-266. Drop irrelevant renames --- .../DefaultVersionedPrivateActionsModule.java | 4 ++-- .../impl/service/VersionedDatasafeServices.java | 4 ++-- .../business/impl/e2e/Datasafe043CompatTest.java | 2 +- ...eUserOperationsTestWithVersionedDatasafeTest.java | 10 +++++----- .../version/impl/version/VersionEncoderDecoder.java | 12 ++++++------ .../impl/SimpleDatasafeAdapter043CompatTest.java | 2 +- 6 files changed, 17 insertions(+), 17 deletions(-) diff --git a/datasafe-business/src/main/java/de/adorsys/datasafe/business/impl/privatestore/actions/DefaultVersionedPrivateActionsModule.java b/datasafe-business/src/main/java/de/adorsys/datasafe/business/impl/privatestore/actions/DefaultVersionedPrivateActionsModule.java index 705066817..1332a04c4 100644 --- a/datasafe-business/src/main/java/de/adorsys/datasafe/business/impl/privatestore/actions/DefaultVersionedPrivateActionsModule.java +++ b/datasafe-business/src/main/java/de/adorsys/datasafe/business/impl/privatestore/actions/DefaultVersionedPrivateActionsModule.java @@ -38,7 +38,7 @@ static LatestDFSVersion latestDFSVersion() { } /** - * Encode appVersion into URL, by default http://example.com/path is encoded to http://example.com/path/VERSION + * Encode version into URL, by default http://example.com/path is encoded to http://example.com/path/VERSION */ @Binds abstract VersionEncoderDecoder versionEncoder(DefaultVersionEncoderDecoderRuntimeDelegatable impl); @@ -74,7 +74,7 @@ static LatestDFSVersion latestDFSVersion() { abstract VersionedRemove latestRemove(LatestRemoveImplRuntimeDelegatable impl); /** - * Writes blob and updates the latest link, so that it points to written blob (creates a appVersion of + * Writes blob and updates the latest link, so that it points to written blob (creates a version of * the document that automatically should become the latest). */ @Binds diff --git a/datasafe-business/src/main/java/de/adorsys/datasafe/business/impl/service/VersionedDatasafeServices.java b/datasafe-business/src/main/java/de/adorsys/datasafe/business/impl/service/VersionedDatasafeServices.java index 8e53bbf90..d75e4b5bc 100644 --- a/datasafe-business/src/main/java/de/adorsys/datasafe/business/impl/service/VersionedDatasafeServices.java +++ b/datasafe-business/src/main/java/de/adorsys/datasafe/business/impl/service/VersionedDatasafeServices.java @@ -26,7 +26,7 @@ import javax.inject.Singleton; /** - * This is Datasafe services that always work with latest file appVersion using `software` versioning. + * This is Datasafe services that always work with latest file version using `software` versioning. * Note, that despite is has {@code @Singleton} annotation, it is not real singleton, the only shared thing * across all services instantiated using build() is bindings with {@code Singleton} in its Module. */ @@ -46,7 +46,7 @@ public interface VersionedDatasafeServices { /** - * @return Provides appVersion information for a given resource (shows only versioned resources) + * @return Provides version information for a given resource (shows only versioned resources) */ DefaultVersionInfoServiceImpl versionInfo(); diff --git a/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/Datasafe043CompatTest.java b/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/Datasafe043CompatTest.java index 2db988bc5..e7ba26466 100644 --- a/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/Datasafe043CompatTest.java +++ b/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/Datasafe043CompatTest.java @@ -32,7 +32,7 @@ import static org.assertj.core.api.Assertions.assertThat; /** - * This test ensures that Datasafe can use setup and folder structure from appVersion 0.4.3 (backward compatibility) + * This test ensures that Datasafe can use setup and folder structure from version 0.4.3 (backward compatibility) */ class Datasafe043CompatTest extends BaseMockitoTest { diff --git a/datasafe-examples/datasafe-examples-business/src/test/java/de/adorsys/datasafe/examples/business/filesystem/BaseUserOperationsTestWithVersionedDatasafeTest.java b/datasafe-examples/datasafe-examples-business/src/test/java/de/adorsys/datasafe/examples/business/filesystem/BaseUserOperationsTestWithVersionedDatasafeTest.java index c08c0f8c6..0ac35ca01 100644 --- a/datasafe-examples/datasafe-examples-business/src/test/java/de/adorsys/datasafe/examples/business/filesystem/BaseUserOperationsTestWithVersionedDatasafeTest.java +++ b/datasafe-examples/datasafe-examples-business/src/test/java/de/adorsys/datasafe/examples/business/filesystem/BaseUserOperationsTestWithVersionedDatasafeTest.java @@ -105,7 +105,7 @@ void writeFileToVersionedPrivateSpace() { assertThat(versionedServices.latestPrivate().list(ListRequest.forDefaultPrivate(user, ""))).hasSize(1); // END_SNIPPET - // BEGIN_SNIPPET:Lets check how to read oldest file appVersion + // BEGIN_SNIPPET:Lets check how to read oldest file version // so lets collect all versions List, PrivateResource, DFSVersion>> withVersions = versionedServices.versionInfo().versionsOf( @@ -126,7 +126,7 @@ void writeFileToVersionedPrivateSpace() { /** * Imagine the usecase when you have some cached local files from users' privatespace and your application - * wants to check if your local appVersion is outdated and you need to download new appVersion from storage. + * wants to check if your local version is outdated and you need to download new version from storage. */ @Test @SneakyThrows @@ -138,7 +138,7 @@ void checkThatWeNeedToDownloadNewFile() { // First lets store some file, for example John stored it from mobile phone try (OutputStream os = versionedServices.latestPrivate() .write(WriteRequest.forDefaultPrivate(user, "my/own/file.txt"))) { - os.write(("Hello old appVersion").getBytes(StandardCharsets.UTF_8)); + os.write(("Hello old version").getBytes(StandardCharsets.UTF_8)); } // Application on mobile phone caches file content to improve performance, so it should cache timestamp too @@ -150,7 +150,7 @@ void checkThatWeNeedToDownloadNewFile() { Thread.sleep(1000L); // it took some time for him to get to PC try (OutputStream os = versionedServices.latestPrivate() .write(WriteRequest.forDefaultPrivate(user, "my/own/file.txt"))) { - os.write(("Hello new appVersion").getBytes(StandardCharsets.UTF_8)); + os.write(("Hello new version").getBytes(StandardCharsets.UTF_8)); } // John takes his mobile phone and application checks if it needs to sync content @@ -160,7 +160,7 @@ void checkThatWeNeedToDownloadNewFile() { // This indicates that we need to update our cache on mobile phone // Modified date of saved file has changed and it is newer that our cached date - // So mobile application should download latest file appVersion + // So mobile application should download latest file version assertThat(savedOnPC).isAfter(savedOnMobile); // END_SNIPPET } diff --git a/datasafe-metainfo/datasafe-metainfo-version-impl/src/main/java/de/adorsys/datasafe/metainfo/version/impl/version/VersionEncoderDecoder.java b/datasafe-metainfo/datasafe-metainfo-version-impl/src/main/java/de/adorsys/datasafe/metainfo/version/impl/version/VersionEncoderDecoder.java index 87e8c5f2a..def39128c 100644 --- a/datasafe-metainfo/datasafe-metainfo-version-impl/src/main/java/de/adorsys/datasafe/metainfo/version/impl/version/VersionEncoderDecoder.java +++ b/datasafe-metainfo/datasafe-metainfo-version-impl/src/main/java/de/adorsys/datasafe/metainfo/version/impl/version/VersionEncoderDecoder.java @@ -6,21 +6,21 @@ import java.util.Optional; /** - * Encodes and decodes URI into/from URI with appVersion. + * Encodes and decodes URI into/from URI with version. */ public interface VersionEncoderDecoder { /** - * Generates URI tagged with appVersion. - * @param resource URI to tag with appVersion - * @return URI with appVersion + * Generates URI tagged with version. + * @param resource URI to tag with version + * @return URI with version */ VersionedUri newVersion(Uri resource); /** * Parses versioned URI. - * @param uri resource with encoded appVersion - * @return decoded resource and appVersion + * @param uri resource with encoded version + * @return decoded resource and version * @apiNote It won't work on non-versioned resources. */ Optional decodeVersion(Uri uri); diff --git a/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/test/java/de/adorsys/datasafe/simple/adapter/impl/SimpleDatasafeAdapter043CompatTest.java b/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/test/java/de/adorsys/datasafe/simple/adapter/impl/SimpleDatasafeAdapter043CompatTest.java index 572245a02..124e89246 100644 --- a/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/test/java/de/adorsys/datasafe/simple/adapter/impl/SimpleDatasafeAdapter043CompatTest.java +++ b/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/test/java/de/adorsys/datasafe/simple/adapter/impl/SimpleDatasafeAdapter043CompatTest.java @@ -19,7 +19,7 @@ import static org.assertj.core.api.Assertions.assertThat; /** - * This test ensures that SimpleDatasafeAdapter can use setup and folder structure from appVersion 0.4.3 + * This test ensures that SimpleDatasafeAdapter can use setup and folder structure from version 0.4.3 * (backward compatibility) */ class SimpleDatasafeAdapter043CompatTest extends BaseMockitoTest { From 74594a74e5fe021006e9edc565988fbf7669cc9f Mon Sep 17 00:00:00 2001 From: Valentyn Berezin Date: Mon, 16 Sep 2019 20:38:01 +0300 Subject: [PATCH 083/255] DOC-266. Drop unneeded pre-versioning code --- ...t.java => DatasafeBaselineCompatTest.java} | 7 +- .../compat-0.4.3/profiles/private/jane | 1 - .../compat-0.4.3/profiles/private/john | 1 - .../compat-0.4.3/profiles/public/jane | 1 - .../compat-0.4.3/profiles/public/john | 1 - .../compat-0.6.2/profiles/private/jane | 1 + .../compat-0.6.2/profiles/private/john | 1 + .../compat-0.6.2/profiles/public/jane | 1 + .../compat-0.6.2/profiles/public/john | 1 + .../3_FBQ7knNcCKL1rPDE5Mmg== | Bin .../users/jane/private/keystore | Bin .../users/jane/public/pubkeys | 0 .../users/john/private/keystore | Bin .../users/john/public/inbox/hello.txt | Bin .../users/john/public/pubkeys | 0 .../actions/ProfileRetrievalServiceImpl.java | 25 +--- .../impl/profile/serde/GsonSerde.java | 49 +------- ...etrievalServiceImplForOldProfilesTest.java | 114 ------------------ 18 files changed, 13 insertions(+), 190 deletions(-) rename datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/{Datasafe043CompatTest.java => DatasafeBaselineCompatTest.java} (96%) delete mode 100644 datasafe-business/src/test/resources/compat-0.4.3/profiles/private/jane delete mode 100644 datasafe-business/src/test/resources/compat-0.4.3/profiles/private/john delete mode 100644 datasafe-business/src/test/resources/compat-0.4.3/profiles/public/jane delete mode 100644 datasafe-business/src/test/resources/compat-0.4.3/profiles/public/john create mode 100644 datasafe-business/src/test/resources/compat-0.6.2/profiles/private/jane create mode 100644 datasafe-business/src/test/resources/compat-0.6.2/profiles/private/john create mode 100644 datasafe-business/src/test/resources/compat-0.6.2/profiles/public/jane create mode 100644 datasafe-business/src/test/resources/compat-0.6.2/profiles/public/john rename datasafe-business/src/test/resources/{compat-0.4.3 => compat-0.6.2}/users/jane/private/files/Qc5BJaNqSbbSBoHUmrYhEQ==/3_FBQ7knNcCKL1rPDE5Mmg== (100%) rename datasafe-business/src/test/resources/{compat-0.4.3 => compat-0.6.2}/users/jane/private/keystore (100%) rename datasafe-business/src/test/resources/{compat-0.4.3 => compat-0.6.2}/users/jane/public/pubkeys (100%) rename datasafe-business/src/test/resources/{compat-0.4.3 => compat-0.6.2}/users/john/private/keystore (100%) rename datasafe-business/src/test/resources/{compat-0.4.3 => compat-0.6.2}/users/john/public/inbox/hello.txt (100%) rename datasafe-business/src/test/resources/{compat-0.4.3 => compat-0.6.2}/users/john/public/pubkeys (100%) delete mode 100644 datasafe-directory/datasafe-directory-impl/src/test/java/de/adorsys/datasafe/directory/impl/profile/operations/actions/ProfileRetrievalServiceImplForOldProfilesTest.java diff --git a/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/Datasafe043CompatTest.java b/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/DatasafeBaselineCompatTest.java similarity index 96% rename from datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/Datasafe043CompatTest.java rename to datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/DatasafeBaselineCompatTest.java index e7ba26466..5d49ca588 100644 --- a/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/Datasafe043CompatTest.java +++ b/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/DatasafeBaselineCompatTest.java @@ -32,11 +32,11 @@ import static org.assertj.core.api.Assertions.assertThat; /** - * This test ensures that Datasafe can use setup and folder structure from version 0.4.3 (backward compatibility) + * This test ensures that Datasafe can use setup and folder structure from version 0.6.2 (baseline backward compatibility) */ -class Datasafe043CompatTest extends BaseMockitoTest { +class DatasafeBaselineCompatTest extends BaseMockitoTest { - private static final String BASE_FIXTURE = "compat-0.4.3"; + private static final String BASE_FIXTURE = "compat-0.6.2"; private static final String OLD_ROOT = "file:/var/folders/3w/fzdgs28j1_b3r4y8x9_s4wpw0000gn/T/junit4892767241345613098/"; @@ -130,7 +130,6 @@ void writeNewAndReadFileFromOldVersion() { "jane/private/files" ); - // 0.4.3 is baseline-compatible and there was no versioning before assertThat(datasafe.userProfile().privateProfile(john).getAppVersion()).isEqualTo(Version.BASELINE); assertThat(datasafe.userProfile().privateProfile(jane).getAppVersion()).isEqualTo(Version.BASELINE); assertThat(datasafe.userProfile().publicProfile(john.getUserID()).getAppVersion()).isEqualTo(Version.BASELINE); diff --git a/datasafe-business/src/test/resources/compat-0.4.3/profiles/private/jane b/datasafe-business/src/test/resources/compat-0.4.3/profiles/private/jane deleted file mode 100644 index ef9e1c92e..000000000 --- a/datasafe-business/src/test/resources/compat-0.4.3/profiles/private/jane +++ /dev/null @@ -1 +0,0 @@ -{"keystore":{"resource":"file:/var/folders/3w/fzdgs28j1_b3r4y8x9_s4wpw0000gn/T/junit4892767241345613098/users/jane/private/keystore"},"privateStorage":{"resource":"file:/var/folders/3w/fzdgs28j1_b3r4y8x9_s4wpw0000gn/T/junit4892767241345613098/users/jane/private/files/"},"inboxWithFullAccess":{"resource":"file:/var/folders/3w/fzdgs28j1_b3r4y8x9_s4wpw0000gn/T/junit4892767241345613098/users/jane/public/inbox/"},"documentVersionStorage":{"resource":"file:/var/folders/3w/fzdgs28j1_b3r4y8x9_s4wpw0000gn/T/junit4892767241345613098/users/jane/versions/"},"associatedResources":[{"resource":"file:/var/folders/3w/fzdgs28j1_b3r4y8x9_s4wpw0000gn/T/junit4892767241345613098/users/jane/"}]} \ No newline at end of file diff --git a/datasafe-business/src/test/resources/compat-0.4.3/profiles/private/john b/datasafe-business/src/test/resources/compat-0.4.3/profiles/private/john deleted file mode 100644 index 7cabe5f35..000000000 --- a/datasafe-business/src/test/resources/compat-0.4.3/profiles/private/john +++ /dev/null @@ -1 +0,0 @@ -{"keystore":{"resource":"file:/var/folders/3w/fzdgs28j1_b3r4y8x9_s4wpw0000gn/T/junit4892767241345613098/users/john/private/keystore"},"privateStorage":{"resource":"file:/var/folders/3w/fzdgs28j1_b3r4y8x9_s4wpw0000gn/T/junit4892767241345613098/users/john/private/files/"},"inboxWithFullAccess":{"resource":"file:/var/folders/3w/fzdgs28j1_b3r4y8x9_s4wpw0000gn/T/junit4892767241345613098/users/john/public/inbox/"},"documentVersionStorage":{"resource":"file:/var/folders/3w/fzdgs28j1_b3r4y8x9_s4wpw0000gn/T/junit4892767241345613098/users/john/versions/"},"associatedResources":[{"resource":"file:/var/folders/3w/fzdgs28j1_b3r4y8x9_s4wpw0000gn/T/junit4892767241345613098/users/john/"}]} \ No newline at end of file diff --git a/datasafe-business/src/test/resources/compat-0.4.3/profiles/public/jane b/datasafe-business/src/test/resources/compat-0.4.3/profiles/public/jane deleted file mode 100644 index 79d812da9..000000000 --- a/datasafe-business/src/test/resources/compat-0.4.3/profiles/public/jane +++ /dev/null @@ -1 +0,0 @@ -{"publicKeys":{"resource":"file:/var/folders/3w/fzdgs28j1_b3r4y8x9_s4wpw0000gn/T/junit4892767241345613098/users/jane/public/pubkeys"},"inbox":{"resource":"file:/var/folders/3w/fzdgs28j1_b3r4y8x9_s4wpw0000gn/T/junit4892767241345613098/users/jane/public/inbox/"}} \ No newline at end of file diff --git a/datasafe-business/src/test/resources/compat-0.4.3/profiles/public/john b/datasafe-business/src/test/resources/compat-0.4.3/profiles/public/john deleted file mode 100644 index fc19bf2cf..000000000 --- a/datasafe-business/src/test/resources/compat-0.4.3/profiles/public/john +++ /dev/null @@ -1 +0,0 @@ -{"publicKeys":{"resource":"file:/var/folders/3w/fzdgs28j1_b3r4y8x9_s4wpw0000gn/T/junit4892767241345613098/users/john/public/pubkeys"},"inbox":{"resource":"file:/var/folders/3w/fzdgs28j1_b3r4y8x9_s4wpw0000gn/T/junit4892767241345613098/users/john/public/inbox/"}} \ No newline at end of file diff --git a/datasafe-business/src/test/resources/compat-0.6.2/profiles/private/jane b/datasafe-business/src/test/resources/compat-0.6.2/profiles/private/jane new file mode 100644 index 000000000..9c34a2740 --- /dev/null +++ b/datasafe-business/src/test/resources/compat-0.6.2/profiles/private/jane @@ -0,0 +1 @@ +{"appVersion": "BASELINE", "keystore":{"resource":"file:/var/folders/3w/fzdgs28j1_b3r4y8x9_s4wpw0000gn/T/junit4892767241345613098/users/jane/private/keystore"},"privateStorage":{"{\"id\": \"DEFAULT\"}": {"resource":"file:/var/folders/3w/fzdgs28j1_b3r4y8x9_s4wpw0000gn/T/junit4892767241345613098/users/jane/private/files/"}},"inboxWithFullAccess":{"resource":"file:/var/folders/3w/fzdgs28j1_b3r4y8x9_s4wpw0000gn/T/junit4892767241345613098/users/jane/public/inbox/"},"documentVersionStorage":{"resource":"file:/var/folders/3w/fzdgs28j1_b3r4y8x9_s4wpw0000gn/T/junit4892767241345613098/users/jane/versions/"},"associatedResources":[{"resource":"file:/var/folders/3w/fzdgs28j1_b3r4y8x9_s4wpw0000gn/T/junit4892767241345613098/users/jane/"}]} diff --git a/datasafe-business/src/test/resources/compat-0.6.2/profiles/private/john b/datasafe-business/src/test/resources/compat-0.6.2/profiles/private/john new file mode 100644 index 000000000..0da1fe08b --- /dev/null +++ b/datasafe-business/src/test/resources/compat-0.6.2/profiles/private/john @@ -0,0 +1 @@ +{"appVersion": "BASELINE", "keystore":{"resource":"file:/var/folders/3w/fzdgs28j1_b3r4y8x9_s4wpw0000gn/T/junit4892767241345613098/users/john/private/keystore"},"privateStorage":{"{\"id\": \"DEFAULT\"}": {"resource":"file:/var/folders/3w/fzdgs28j1_b3r4y8x9_s4wpw0000gn/T/junit4892767241345613098/users/john/private/files/"}},"inboxWithFullAccess":{"resource":"file:/var/folders/3w/fzdgs28j1_b3r4y8x9_s4wpw0000gn/T/junit4892767241345613098/users/john/public/inbox/"},"documentVersionStorage":{"resource":"file:/var/folders/3w/fzdgs28j1_b3r4y8x9_s4wpw0000gn/T/junit4892767241345613098/users/john/versions/"},"associatedResources":[{"resource":"file:/var/folders/3w/fzdgs28j1_b3r4y8x9_s4wpw0000gn/T/junit4892767241345613098/users/john/"}]} diff --git a/datasafe-business/src/test/resources/compat-0.6.2/profiles/public/jane b/datasafe-business/src/test/resources/compat-0.6.2/profiles/public/jane new file mode 100644 index 000000000..a98ed4c43 --- /dev/null +++ b/datasafe-business/src/test/resources/compat-0.6.2/profiles/public/jane @@ -0,0 +1 @@ +{"appVersion": "BASELINE", "publicKeys":{"resource":"file:/var/folders/3w/fzdgs28j1_b3r4y8x9_s4wpw0000gn/T/junit4892767241345613098/users/jane/public/pubkeys"},"inbox":{"resource":"file:/var/folders/3w/fzdgs28j1_b3r4y8x9_s4wpw0000gn/T/junit4892767241345613098/users/jane/public/inbox/"}} diff --git a/datasafe-business/src/test/resources/compat-0.6.2/profiles/public/john b/datasafe-business/src/test/resources/compat-0.6.2/profiles/public/john new file mode 100644 index 000000000..9c0eae5ca --- /dev/null +++ b/datasafe-business/src/test/resources/compat-0.6.2/profiles/public/john @@ -0,0 +1 @@ +{"appVersion": "BASELINE", "publicKeys":{"resource":"file:/var/folders/3w/fzdgs28j1_b3r4y8x9_s4wpw0000gn/T/junit4892767241345613098/users/john/public/pubkeys"},"inbox":{"resource":"file:/var/folders/3w/fzdgs28j1_b3r4y8x9_s4wpw0000gn/T/junit4892767241345613098/users/john/public/inbox/"}} diff --git a/datasafe-business/src/test/resources/compat-0.4.3/users/jane/private/files/Qc5BJaNqSbbSBoHUmrYhEQ==/3_FBQ7knNcCKL1rPDE5Mmg== b/datasafe-business/src/test/resources/compat-0.6.2/users/jane/private/files/Qc5BJaNqSbbSBoHUmrYhEQ==/3_FBQ7knNcCKL1rPDE5Mmg== similarity index 100% rename from datasafe-business/src/test/resources/compat-0.4.3/users/jane/private/files/Qc5BJaNqSbbSBoHUmrYhEQ==/3_FBQ7knNcCKL1rPDE5Mmg== rename to datasafe-business/src/test/resources/compat-0.6.2/users/jane/private/files/Qc5BJaNqSbbSBoHUmrYhEQ==/3_FBQ7knNcCKL1rPDE5Mmg== diff --git a/datasafe-business/src/test/resources/compat-0.4.3/users/jane/private/keystore b/datasafe-business/src/test/resources/compat-0.6.2/users/jane/private/keystore similarity index 100% rename from datasafe-business/src/test/resources/compat-0.4.3/users/jane/private/keystore rename to datasafe-business/src/test/resources/compat-0.6.2/users/jane/private/keystore diff --git a/datasafe-business/src/test/resources/compat-0.4.3/users/jane/public/pubkeys b/datasafe-business/src/test/resources/compat-0.6.2/users/jane/public/pubkeys similarity index 100% rename from datasafe-business/src/test/resources/compat-0.4.3/users/jane/public/pubkeys rename to datasafe-business/src/test/resources/compat-0.6.2/users/jane/public/pubkeys diff --git a/datasafe-business/src/test/resources/compat-0.4.3/users/john/private/keystore b/datasafe-business/src/test/resources/compat-0.6.2/users/john/private/keystore similarity index 100% rename from datasafe-business/src/test/resources/compat-0.4.3/users/john/private/keystore rename to datasafe-business/src/test/resources/compat-0.6.2/users/john/private/keystore diff --git a/datasafe-business/src/test/resources/compat-0.4.3/users/john/public/inbox/hello.txt b/datasafe-business/src/test/resources/compat-0.6.2/users/john/public/inbox/hello.txt similarity index 100% rename from datasafe-business/src/test/resources/compat-0.4.3/users/john/public/inbox/hello.txt rename to datasafe-business/src/test/resources/compat-0.6.2/users/john/public/inbox/hello.txt diff --git a/datasafe-business/src/test/resources/compat-0.4.3/users/john/public/pubkeys b/datasafe-business/src/test/resources/compat-0.6.2/users/john/public/pubkeys similarity index 100% rename from datasafe-business/src/test/resources/compat-0.4.3/users/john/public/pubkeys rename to datasafe-business/src/test/resources/compat-0.6.2/users/john/public/pubkeys diff --git a/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/operations/actions/ProfileRetrievalServiceImpl.java b/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/operations/actions/ProfileRetrievalServiceImpl.java index f2b0b83a1..b3dc053a8 100644 --- a/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/operations/actions/ProfileRetrievalServiceImpl.java +++ b/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/operations/actions/ProfileRetrievalServiceImpl.java @@ -13,7 +13,6 @@ import de.adorsys.datasafe.storage.api.actions.StorageCheckService; import de.adorsys.datasafe.storage.api.actions.StorageReadService; import de.adorsys.datasafe.types.api.context.annotations.RuntimeDelegate; -import de.adorsys.datasafe.types.api.global.Version; import de.adorsys.datasafe.types.api.resource.AbsoluteLocation; import lombok.SneakyThrows; import lombok.extern.slf4j.Slf4j; @@ -51,9 +50,7 @@ public ProfileRetrievalServiceImpl(DFSConfig dfsConfig, StorageReadService readS public UserPublicProfile publicProfile(UserID ofUser) { UserPublicProfile userPublicProfile = userProfileCache.getPublicProfile().computeIfAbsent( ofUser, - id -> handleMissingVersion( - readProfile(dfsConfig.publicProfile(ofUser), UserPublicProfile.class) - ) + id -> readProfile(dfsConfig.publicProfile(ofUser), UserPublicProfile.class) ); log.debug("get public profile {} for user {}", userPublicProfile, ofUser); return userPublicProfile; @@ -66,9 +63,7 @@ public UserPublicProfile publicProfile(UserID ofUser) { public UserPrivateProfile privateProfile(UserIDAuth ofUser) { UserPrivateProfile userPrivateProfile = userProfileCache.getPrivateProfile().computeIfAbsent( ofUser.getUserID(), - id -> handleMissingVersion( - readProfile(dfsConfig.privateProfile(ofUser.getUserID()), UserPrivateProfile.class) - ) + id -> readProfile(dfsConfig.privateProfile(ofUser.getUserID()), UserPrivateProfile.class) ); log.debug("get private profile {} for user {}", userPrivateProfile, ofUser); return userPrivateProfile; @@ -90,20 +85,4 @@ private T readProfile(AbsoluteLocation resource, Class clazz) { return serde.fromJson(new String(ByteStreams.toByteArray(is)), clazz); } } - - private UserPublicProfile handleMissingVersion(UserPublicProfile profile) { - if (null == profile.getAppVersion()) { - return profile.toBuilder().appVersion(Version.BASELINE).build(); - } - - return profile; - } - - private UserPrivateProfile handleMissingVersion(UserPrivateProfile profile) { - if (null == profile.getAppVersion()) { - return profile.toBuilder().appVersion(Version.BASELINE).build(); - } - - return profile; - } } diff --git a/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/serde/GsonSerde.java b/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/serde/GsonSerde.java index eda3430d0..67f19592e 100644 --- a/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/serde/GsonSerde.java +++ b/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/serde/GsonSerde.java @@ -1,32 +1,18 @@ package de.adorsys.datasafe.directory.impl.profile.serde; -import com.google.common.reflect.TypeToken; -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonObject; -import com.google.gson.JsonPrimitive; -import com.google.gson.JsonSerializer; +import com.google.gson.*; import de.adorsys.datasafe.encrypiton.api.keystore.PublicKeySerde; import de.adorsys.datasafe.types.api.context.annotations.RuntimeDelegate; -import de.adorsys.datasafe.types.api.resource.AbsoluteLocation; -import de.adorsys.datasafe.types.api.resource.BasePrivateResource; -import de.adorsys.datasafe.types.api.resource.BasePublicResource; -import de.adorsys.datasafe.types.api.resource.PrivateResource; -import de.adorsys.datasafe.types.api.resource.PublicResource; -import de.adorsys.datasafe.types.api.resource.StorageIdentifier; -import de.adorsys.datasafe.types.api.resource.Uri; +import de.adorsys.datasafe.types.api.resource.*; import lombok.experimental.Delegate; import javax.inject.Inject; import java.net.URI; import java.security.PublicKey; -import java.util.Collections; -import java.util.HashMap; -import java.util.Map; /** * User profile to json serializer/deserializer. + * * @implNote By default, is used to store profiles as json files. */ @RuntimeDelegate @@ -73,33 +59,6 @@ public GsonSerde(PublicKeySerde pubSerde) { (JsonSerializer) (elem, type, ctx) -> new JsonPrimitive(pubSerde.writePubKey(elem)) ); - Gson basic = gsonBuilder.enableComplexMapKeySerialization().create(); - - // Allow support for old-style profiles that have 1 single private storage - gsonBuilder.registerTypeAdapter( - new TypeToken>>() {}.getType(), - (JsonDeserializer>>) - (elem, type, ctx) -> { - if (!(elem instanceof JsonObject)) { - return basic.fromJson(elem, type); - } - - JsonObject object = (JsonObject) elem; - - if (null != object.get("resource") && object.entrySet().size() == 1) { - return new HashMap<>( - Collections.singletonMap( - StorageIdentifier.DEFAULT, - BasePrivateResource.forAbsolutePrivate( - URI.create(object.get("resource").getAsString())) - ) - ); - } - - throw new IllegalArgumentException("Unparseable node"); - } - ); - - this.gson = gsonBuilder.create(); + this.gson = gsonBuilder.enableComplexMapKeySerialization().create(); } } diff --git a/datasafe-directory/datasafe-directory-impl/src/test/java/de/adorsys/datasafe/directory/impl/profile/operations/actions/ProfileRetrievalServiceImplForOldProfilesTest.java b/datasafe-directory/datasafe-directory-impl/src/test/java/de/adorsys/datasafe/directory/impl/profile/operations/actions/ProfileRetrievalServiceImplForOldProfilesTest.java deleted file mode 100644 index 107defc5f..000000000 --- a/datasafe-directory/datasafe-directory-impl/src/test/java/de/adorsys/datasafe/directory/impl/profile/operations/actions/ProfileRetrievalServiceImplForOldProfilesTest.java +++ /dev/null @@ -1,114 +0,0 @@ -package de.adorsys.datasafe.directory.impl.profile.operations.actions; - -import com.google.common.io.Resources; -import de.adorsys.datasafe.directory.api.config.DFSConfig; -import de.adorsys.datasafe.directory.api.profile.dfs.BucketAccessService; -import de.adorsys.datasafe.directory.api.types.UserPrivateProfile; -import de.adorsys.datasafe.directory.api.types.UserPublicProfile; -import de.adorsys.datasafe.directory.impl.profile.operations.UserProfileCache; -import de.adorsys.datasafe.directory.impl.profile.serde.GsonSerde; -import de.adorsys.datasafe.encrypiton.api.keystore.PublicKeySerde; -import de.adorsys.datasafe.encrypiton.api.types.UserID; -import de.adorsys.datasafe.encrypiton.api.types.UserIDAuth; -import de.adorsys.datasafe.storage.api.actions.StorageCheckService; -import de.adorsys.datasafe.storage.api.actions.StorageReadService; -import de.adorsys.datasafe.types.api.resource.AbsoluteLocation; -import de.adorsys.datasafe.types.api.resource.BasePrivateResource; -import de.adorsys.datasafe.types.api.resource.StorageIdentifier; -import de.adorsys.datasafe.types.api.shared.BaseMockitoTest; -import lombok.SneakyThrows; -import org.junit.jupiter.api.BeforeEach; -import org.junit.jupiter.api.Test; -import org.mockito.InjectMocks; -import org.mockito.Mock; -import org.mockito.Spy; - -import static org.assertj.core.api.Assertions.assertThat; -import static org.mockito.ArgumentMatchers.any; -import static org.mockito.Mockito.mock; -import static org.mockito.Mockito.when; - -/** - * Test that validates it is still possible to use old user profiles - when there was single private space. - */ -class ProfileRetrievalServiceImplForOldProfilesTest extends BaseMockitoTest { - - private static final AbsoluteLocation PRIV = BasePrivateResource.forAbsolutePrivate("file:///pathPriv"); - private static final AbsoluteLocation PUB = BasePrivateResource.forAbsolutePrivate("file:///pathPub"); - - @Mock - private DFSConfig dfsConfig; - - @Mock - private StorageReadService readService; - - @Mock - private StorageCheckService checkService; - - @Mock - private BucketAccessService access; - - @Spy - private GsonSerde serde = new GsonSerde(mock(PublicKeySerde.class)); - - @Mock - private UserProfileCache userProfileCache; - - @InjectMocks - private ProfileRetrievalServiceImpl tested; - - @Mock - private UserIDAuth user; - - @Mock - private UserID userId; - - @BeforeEach - @SneakyThrows - void init() { - when(user.getUserID()).thenReturn(userId); - when(dfsConfig.publicProfile(userId)).thenReturn(PUB); - when(dfsConfig.privateProfile(userId)).thenReturn(PRIV); - when(access.withSystemAccess(any())).thenAnswer(inv -> inv.getArgument(0)); - when(readService.read(PRIV)) - .thenReturn(Resources.asByteSource(Resources.getResource("profile/user.priv")).openStream()); - when(readService.read(PUB)) - .thenReturn(Resources.asByteSource(Resources.getResource("profile/user.pub")).openStream()); - } - - @Test - void publicProfile() { - UserPublicProfile profile = tested.publicProfile(userId); - - assertThat(profile.getInbox()).extracting(this::str) - .isEqualTo("s3://adorsys-docusafe/datasafe/users/qqqq/public/inbox/"); - assertThat(profile.getPublicKeys()).extracting(this::str) - .isEqualTo("s3://adorsys-docusafe/datasafe/users/qqqq/public/pubkeys"); - } - - @Test - void privateProfile() { - UserPrivateProfile profile = tested.privateProfile(user); - - assertThat(profile.getKeystore()).extracting(this::str) - .isEqualTo("s3://adorsys-docusafe/datasafe/users/qqqq/private/keystore"); - assertThat(profile.getPrivateStorage()) - .hasEntrySatisfying( - StorageIdentifier.DEFAULT, - it -> assertThat(it).extracting(this::str) - .isEqualTo("s3://adorsys-docusafe/datasafe/users/qqqq/private/files/") - ); - assertThat(profile.getDocumentVersionStorage()).extracting(this::str) - .isEqualTo("s3://adorsys-docusafe/datasafe/users/qqqq/versions/"); - assertThat(profile.getInboxWithFullAccess()).extracting(this::str) - .isEqualTo("s3://adorsys-docusafe/datasafe/users/qqqq/public/inbox/"); - assertThat(profile.getAssociatedResources()).extracting(this::str) - .containsExactly("s3://adorsys-docusafe/datasafe/users/qqqq/"); - assertThat(profile.getPublishPublicKeysTo()).isNull(); - assertThat(profile.getStorageCredentialsKeystore()).isNull(); - } - - private String str(AbsoluteLocation location) { - return location.location().asString(); - } -} From ee79bc574bd09ffcd9695cbf524c8458f8df4424 Mon Sep 17 00:00:00 2001 From: Ihor Yatsenko Date: Tue, 17 Sep 2019 09:31:27 +0300 Subject: [PATCH 084/255] DOC-239: Clean up code --- .../keys/DFSPrivateKeyServiceImpl.java | 4 +-- .../encrypiton/api/types/BaseTypeString.java | 2 ++ .../encrypiton/api/types/keystore/KeyID.java | 2 ++ .../keystore/KeyStoreCreationConfig.java | 2 +- .../keystore/PathEncryptionSecretKey.java | 2 +- .../impl/keystore/KeyStoreServiceImpl.java | 2 +- .../DefaultPathEncryptorDecryptor.java | 11 +++++++ .../SymmetricPathEncryptionServiceImpl.java | 33 +++++++++---------- ...ymmetricPathEncryptionServiceImplTest.java | 17 ++++++---- .../teststorage/WithStorageProvider.java | 4 +-- 10 files changed, 48 insertions(+), 31 deletions(-) diff --git a/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/keys/DFSPrivateKeyServiceImpl.java b/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/keys/DFSPrivateKeyServiceImpl.java index 22da0dda7..007dc1bd6 100644 --- a/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/keys/DFSPrivateKeyServiceImpl.java +++ b/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/keys/DFSPrivateKeyServiceImpl.java @@ -41,7 +41,7 @@ public PathEncryptionSecretKey pathEncryptionSecretKey(UserIDAuth forUser) { List secretKeyIds = getSecretKeyIds(forUser); String secretPathKeyId = getSecretPathKeyIdByPrefix(secretKeyIds, PATH_KEY_ID_PREFIX); - String secretPathCrtKeyId = getSecretPathKeyIdByPrefix(secretKeyIds, PATH_KEY_ID_PREFIX_CRT); + String secretPathCrtKeyId = getSecretPathKeyIdByPrefix(secretKeyIds, PATH_KEY_ID_PREFIX_CTR); return new PathEncryptionSecretKey( new KeyID(secretPathKeyId), @@ -59,7 +59,7 @@ private String getSecretPathKeyIdByPrefix(List keys, String pathKeyIdPref private List getSecretKeyIds(UserIDAuth forUser) { return keyStoreOper.readAliases(forUser).stream() - .filter(it -> it.startsWith(PATH_KEY_ID_PREFIX) || it.startsWith(PATH_KEY_ID_PREFIX_CRT)) + .filter(it -> it.startsWith(PATH_KEY_ID_PREFIX) || it.startsWith(PATH_KEY_ID_PREFIX_CTR)) .map(KeyID::new) .collect(Collectors.toList()); } diff --git a/datasafe-encryption/datasafe-encryption-api/src/main/java/de/adorsys/datasafe/encrypiton/api/types/BaseTypeString.java b/datasafe-encryption/datasafe-encryption-api/src/main/java/de/adorsys/datasafe/encrypiton/api/types/BaseTypeString.java index 904e47614..49ddf65a5 100644 --- a/datasafe-encryption/datasafe-encryption-api/src/main/java/de/adorsys/datasafe/encrypiton/api/types/BaseTypeString.java +++ b/datasafe-encryption/datasafe-encryption-api/src/main/java/de/adorsys/datasafe/encrypiton/api/types/BaseTypeString.java @@ -3,6 +3,7 @@ import lombok.EqualsAndHashCode; import lombok.Getter; import lombok.RequiredArgsConstructor; +import lombok.ToString; import java.io.Serializable; @@ -12,6 +13,7 @@ @Getter @RequiredArgsConstructor @EqualsAndHashCode +@ToString public class BaseTypeString implements Serializable { private static final long serialVersionUID = 3569239558130703592L; diff --git a/datasafe-encryption/datasafe-encryption-api/src/main/java/de/adorsys/datasafe/encrypiton/api/types/keystore/KeyID.java b/datasafe-encryption/datasafe-encryption-api/src/main/java/de/adorsys/datasafe/encrypiton/api/types/keystore/KeyID.java index 9bbeaeac5..0be6bbbf3 100644 --- a/datasafe-encryption/datasafe-encryption-api/src/main/java/de/adorsys/datasafe/encrypiton/api/types/keystore/KeyID.java +++ b/datasafe-encryption/datasafe-encryption-api/src/main/java/de/adorsys/datasafe/encrypiton/api/types/keystore/KeyID.java @@ -1,10 +1,12 @@ package de.adorsys.datasafe.encrypiton.api.types.keystore; import de.adorsys.datasafe.encrypiton.api.types.BaseTypeString; +import lombok.ToString; /** * Wrapper that identifies key inside keystore. */ +@ToString(callSuper=true) public class KeyID extends BaseTypeString { public KeyID(String value) { diff --git a/datasafe-encryption/datasafe-encryption-api/src/main/java/de/adorsys/datasafe/encrypiton/api/types/keystore/KeyStoreCreationConfig.java b/datasafe-encryption/datasafe-encryption-api/src/main/java/de/adorsys/datasafe/encrypiton/api/types/keystore/KeyStoreCreationConfig.java index ddf31dde0..deed50c04 100644 --- a/datasafe-encryption/datasafe-encryption-api/src/main/java/de/adorsys/datasafe/encrypiton/api/types/keystore/KeyStoreCreationConfig.java +++ b/datasafe-encryption/datasafe-encryption-api/src/main/java/de/adorsys/datasafe/encrypiton/api/types/keystore/KeyStoreCreationConfig.java @@ -11,7 +11,7 @@ public class KeyStoreCreationConfig { public static final String PATH_KEY_ID_PREFIX = "PATH_SECRET"; - public static final String PATH_KEY_ID_PREFIX_CRT = "PATH_SECRET_CRT_"; + public static final String PATH_KEY_ID_PREFIX_CTR = "PATH_SECRET_CTR_"; public static final String DOCUMENT_KEY_ID_PREFIX = "PRIVATE_SECRET"; private final int encKeyNumber; diff --git a/datasafe-encryption/datasafe-encryption-api/src/main/java/de/adorsys/datasafe/encrypiton/api/types/keystore/PathEncryptionSecretKey.java b/datasafe-encryption/datasafe-encryption-api/src/main/java/de/adorsys/datasafe/encrypiton/api/types/keystore/PathEncryptionSecretKey.java index 4528ff3a2..f1d6db93a 100644 --- a/datasafe-encryption/datasafe-encryption-api/src/main/java/de/adorsys/datasafe/encrypiton/api/types/keystore/PathEncryptionSecretKey.java +++ b/datasafe-encryption/datasafe-encryption-api/src/main/java/de/adorsys/datasafe/encrypiton/api/types/keystore/PathEncryptionSecretKey.java @@ -7,7 +7,7 @@ import javax.crypto.SecretKey; @Getter -@ToString +@ToString(callSuper=true) @RequiredArgsConstructor public class PathEncryptionSecretKey { diff --git a/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/keystore/KeyStoreServiceImpl.java b/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/keystore/KeyStoreServiceImpl.java index 535fc5481..2ba7c1619 100644 --- a/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/keystore/KeyStoreServiceImpl.java +++ b/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/keystore/KeyStoreServiceImpl.java @@ -45,7 +45,7 @@ public KeyStore createKeyStore(KeyStoreAuth keyStoreAuth, config, ImmutableMap.of( new KeyID(PATH_KEY_ID_PREFIX + UUID.randomUUID().toString()), Optional.empty(), - new KeyID(PATH_KEY_ID_PREFIX_CRT + UUID.randomUUID().toString()), Optional.empty(), + new KeyID(PATH_KEY_ID_PREFIX_CTR + UUID.randomUUID().toString()), Optional.empty(), new KeyID(DOCUMENT_KEY_ID_PREFIX + UUID.randomUUID().toString()), Optional.empty() ) ); diff --git a/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/pathencryption/DefaultPathEncryptorDecryptor.java b/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/pathencryption/DefaultPathEncryptorDecryptor.java index 8624b3552..31a010f17 100644 --- a/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/pathencryption/DefaultPathEncryptorDecryptor.java +++ b/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/pathencryption/DefaultPathEncryptorDecryptor.java @@ -3,6 +3,7 @@ import de.adorsys.datasafe.encrypiton.api.types.keystore.PathEncryptionSecretKey; import de.adorsys.datasafe.types.api.context.annotations.RuntimeDelegate; import lombok.SneakyThrows; +import lombok.extern.slf4j.Slf4j; import org.cryptomator.siv.SivMode; import javax.inject.Inject; @@ -16,6 +17,7 @@ * Using @see SIV-MODE library for encryption and decryption * Encodes resulting bytes using Base64-urlsafe encoding. */ +@Slf4j @RuntimeDelegate public class DefaultPathEncryptorDecryptor implements PathEncryptorDecryptor { @@ -23,11 +25,17 @@ public class DefaultPathEncryptorDecryptor implements PathEncryptorDecryptor { @Inject public DefaultPathEncryptorDecryptor(SivMode sivMode){ + if(sivMode == null) { + throw new IllegalArgumentException("SivMode must be provided for encryption and decryption"); + } this.sivMode = sivMode; } @Override public String encrypt(PathEncryptionSecretKey pathSecretKey, String originalPath) { + //log.debug + System.out.println("Path secret key: {}, original path: {}" + pathSecretKey.toString()+" "+ originalPath); + return new String(sivMode.encrypt(pathSecretKey.getCounterSecretKey().getEncoded(), pathSecretKey.getSecretKey().getEncoded(), originalPath.getBytes(UTF_8)) @@ -37,6 +45,9 @@ public String encrypt(PathEncryptionSecretKey pathSecretKey, String originalPath @Override @SneakyThrows public String decrypt(PathEncryptionSecretKey pathSecretKey, String encryptedPath) { + //log.debug( + System.out.println("Path secret key: {}, encrypted path: {}"+ pathSecretKey.toString()+" "+ encryptedPath); + return new String(sivMode.decrypt(pathSecretKey.getCounterSecretKey().getEncoded(), pathSecretKey.getSecretKey().getEncoded(), encryptedPath.getBytes(UTF_8)) diff --git a/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/pathencryption/SymmetricPathEncryptionServiceImpl.java b/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/pathencryption/SymmetricPathEncryptionServiceImpl.java index 1c73559ad..817994d0d 100644 --- a/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/pathencryption/SymmetricPathEncryptionServiceImpl.java +++ b/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/pathencryption/SymmetricPathEncryptionServiceImpl.java @@ -31,16 +31,16 @@ public class SymmetricPathEncryptionServiceImpl implements SymmetricPathEncrypti private static final String PATH_SEPARATOR = "/"; private final Function encryptAndEncode; - private final Function decryptAndDecode; + private final Function decodeAndDecrypt; @Inject public SymmetricPathEncryptionServiceImpl(PathEncryptorDecryptor pathEncryptorDecryptor) { - encryptAndEncode = keyEntryEncryptedDataPair -> encode(pathEncryptorDecryptor.encrypt( - keyEntryEncryptedDataPair.getPathEncryptionSecretKey(), keyEntryEncryptedDataPair.getPath() + encryptAndEncode = keyEntryEncryptedData -> encode(pathEncryptorDecryptor.encrypt( + keyEntryEncryptedData.getPathEncryptionSecretKey(), keyEntryEncryptedData.getPath() )); - decryptAndDecode = keyEntryDecryptedDataPair -> pathEncryptorDecryptor.decrypt( - keyEntryDecryptedDataPair.getPathEncryptionSecretKey(), decode(keyEntryDecryptedDataPair.getPath()) + decodeAndDecrypt = keyEntryDecryptedData -> pathEncryptorDecryptor.decrypt( + keyEntryDecryptedData.getPathEncryptionSecretKey(), decode(keyEntryDecryptedData.getPath()) ); } @@ -54,9 +54,9 @@ public Uri encrypt(PathEncryptionSecretKey pathEncryptionSecretKey, Uri bucketPa validateUriIsRelative(bucketPath); return processURIparts( - pathEncryptionSecretKey, - bucketPath, - encryptAndEncode + pathEncryptionSecretKey, + bucketPath, + encryptAndEncode ); } @@ -65,14 +65,14 @@ public Uri encrypt(PathEncryptionSecretKey pathEncryptionSecretKey, Uri bucketPa */ @Override @SneakyThrows - public Uri decrypt(PathEncryptionSecretKey pathEncryptionSecretKey, Uri bucketPath) { - validateArgs(pathEncryptionSecretKey, bucketPath); - validateUriIsRelative(bucketPath); + public Uri decrypt(PathEncryptionSecretKey pathEncryptionSecretKey, Uri encryptedBucketPath) { + validateArgs(pathEncryptionSecretKey, encryptedBucketPath); + validateUriIsRelative(encryptedBucketPath); return processURIparts( - pathEncryptionSecretKey, - bucketPath, - decryptAndDecode + pathEncryptionSecretKey, + encryptedBucketPath, + decodeAndDecrypt ); } @@ -95,7 +95,7 @@ private static String encode(String encryptedPath) { } private static Uri processURIparts( - PathEncryptionSecretKey secretKeyEntry, + PathEncryptionSecretKey pathSecretKeyEntry, Uri bucketPath, Function process) { StringBuilder result = new StringBuilder(); @@ -115,8 +115,7 @@ private static Uri processURIparts( URI.create( Arrays.stream(path.split(PATH_SEPARATOR)) .map(uriPart -> process.apply( - new PathSecretKeyWithData(secretKeyEntry, uriPart))) - .map(String::new) // byte[] -> string + new PathSecretKeyWithData(pathSecretKeyEntry, uriPart))) .collect(Collectors.joining(PATH_SEPARATOR))) ); } diff --git a/datasafe-encryption/datasafe-encryption-impl/src/test/java/de/adorsys/datasafe/encrypiton/impl/pathencryption/SymmetricPathEncryptionServiceImplTest.java b/datasafe-encryption/datasafe-encryption-impl/src/test/java/de/adorsys/datasafe/encrypiton/impl/pathencryption/SymmetricPathEncryptionServiceImplTest.java index f61a4296f..b9710bb17 100644 --- a/datasafe-encryption/datasafe-encryption-impl/src/test/java/de/adorsys/datasafe/encrypiton/impl/pathencryption/SymmetricPathEncryptionServiceImplTest.java +++ b/datasafe-encryption/datasafe-encryption-impl/src/test/java/de/adorsys/datasafe/encrypiton/impl/pathencryption/SymmetricPathEncryptionServiceImplTest.java @@ -18,6 +18,7 @@ import java.security.KeyStore; import static de.adorsys.datasafe.encrypiton.api.types.keystore.KeyStoreCreationConfig.PATH_KEY_ID_PREFIX; +import static de.adorsys.datasafe.encrypiton.api.types.keystore.KeyStoreCreationConfig.PATH_KEY_ID_PREFIX_CTR; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertThrows; @@ -38,7 +39,7 @@ class SymmetricPathEncryptionServiceImplTest extends BaseMockitoTest { @Test void testSuccessEncryptDecryptPath() { - String testPath = "path/to/file"; + String testPath = "path"; Uri testURI = new Uri(testPath); @@ -47,18 +48,20 @@ void testSuccessEncryptDecryptPath() { KeystoreUtil.keyIdByPrefix(keyStore, PATH_KEY_ID_PREFIX) ); - SecretKeySpec secretKeyCrt = keyStoreService.getSecretKey( + SecretKeySpec secretKeyCtr = keyStoreService.getSecretKey( keyStoreAccess, - KeystoreUtil.keyIdByPrefix(keyStore, PATH_KEY_ID_PREFIX) + KeystoreUtil.keyIdByPrefix(keyStore, PATH_KEY_ID_PREFIX_CTR) ); - PathEncryptionSecretKey secretKeyIDWithKey = new PathEncryptionSecretKey( - KeystoreUtil.keyIdByPrefix(keyStore, PATH_KEY_ID_PREFIX), secretKey, secretKeyCrt); + PathEncryptionSecretKey pathEncryptionSecretKey = new PathEncryptionSecretKey( + KeystoreUtil.keyIdByPrefix(keyStore, PATH_KEY_ID_PREFIX), + secretKey, + secretKeyCtr); - Uri encrypted = bucketPathEncryptionService.encrypt(secretKeyIDWithKey, testURI); + Uri encrypted = bucketPathEncryptionService.encrypt(pathEncryptionSecretKey, testURI); log.debug("Encrypted path: {}", encrypted); - Uri decrypted = bucketPathEncryptionService.decrypt(secretKeyIDWithKey, encrypted); + Uri decrypted = bucketPathEncryptionService.decrypt(pathEncryptionSecretKey, encrypted); log.debug("Decrypted path: {}", decrypted); assertEquals(testPath, decrypted.toASCIIString()); diff --git a/datasafe-test-storages/src/main/java/de/adorsys/datasafe/teststorage/WithStorageProvider.java b/datasafe-test-storages/src/main/java/de/adorsys/datasafe/teststorage/WithStorageProvider.java index ee16a859f..c6b124b36 100644 --- a/datasafe-test-storages/src/main/java/de/adorsys/datasafe/teststorage/WithStorageProvider.java +++ b/datasafe-test-storages/src/main/java/de/adorsys/datasafe/teststorage/WithStorageProvider.java @@ -186,10 +186,10 @@ protected static Stream allDefaultStorages() { @ValueSource protected static Stream allStorages() { return Stream.of( - fs(), + fs()/*, minio(), cephVersioned(), - s3() + s3()*/ ).filter(Objects::nonNull); } From 531d4948cbf8c2fc503a565840b97093d3a95c27 Mon Sep 17 00:00:00 2001 From: Valentyn Berezin Date: Tue, 17 Sep 2019 12:09:42 +0300 Subject: [PATCH 085/255] DOC-266. Drop compatibility test --- .../impl/e2e/DatasafeBaselineCompatTest.java | 144 ------------------ .../compat-0.6.2/profiles/private/jane | 1 - .../compat-0.6.2/profiles/private/john | 1 - .../compat-0.6.2/profiles/public/jane | 1 - .../compat-0.6.2/profiles/public/john | 1 - .../3_FBQ7knNcCKL1rPDE5Mmg== | Bin 210 -> 0 bytes .../compat-0.6.2/users/jane/private/keystore | Bin 4656 -> 0 bytes .../compat-0.6.2/users/jane/public/pubkeys | 1 - .../compat-0.6.2/users/john/private/keystore | Bin 4656 -> 0 bytes .../users/john/public/inbox/hello.txt | Bin 431 -> 0 bytes .../compat-0.6.2/users/john/public/pubkeys | 1 - 11 files changed, 150 deletions(-) delete mode 100644 datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/DatasafeBaselineCompatTest.java delete mode 100644 datasafe-business/src/test/resources/compat-0.6.2/profiles/private/jane delete mode 100644 datasafe-business/src/test/resources/compat-0.6.2/profiles/private/john delete mode 100644 datasafe-business/src/test/resources/compat-0.6.2/profiles/public/jane delete mode 100644 datasafe-business/src/test/resources/compat-0.6.2/profiles/public/john delete mode 100644 datasafe-business/src/test/resources/compat-0.6.2/users/jane/private/files/Qc5BJaNqSbbSBoHUmrYhEQ==/3_FBQ7knNcCKL1rPDE5Mmg== delete mode 100644 datasafe-business/src/test/resources/compat-0.6.2/users/jane/private/keystore delete mode 100644 datasafe-business/src/test/resources/compat-0.6.2/users/jane/public/pubkeys delete mode 100644 datasafe-business/src/test/resources/compat-0.6.2/users/john/private/keystore delete mode 100644 datasafe-business/src/test/resources/compat-0.6.2/users/john/public/inbox/hello.txt delete mode 100644 datasafe-business/src/test/resources/compat-0.6.2/users/john/public/pubkeys diff --git a/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/DatasafeBaselineCompatTest.java b/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/DatasafeBaselineCompatTest.java deleted file mode 100644 index 5d49ca588..000000000 --- a/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/DatasafeBaselineCompatTest.java +++ /dev/null @@ -1,144 +0,0 @@ -package de.adorsys.datasafe.business.impl.e2e; - -import com.google.common.io.ByteStreams; -import de.adorsys.datasafe.business.impl.service.DaggerDefaultDatasafeServices; -import de.adorsys.datasafe.business.impl.service.DefaultDatasafeServices; -import de.adorsys.datasafe.directory.impl.profile.config.DefaultDFSConfig; -import de.adorsys.datasafe.encrypiton.api.types.UserID; -import de.adorsys.datasafe.encrypiton.api.types.UserIDAuth; -import de.adorsys.datasafe.encrypiton.api.types.keystore.ReadKeyPassword; -import de.adorsys.datasafe.storage.impl.fs.FileSystemStorageService; -import de.adorsys.datasafe.types.api.global.Version; -import de.adorsys.datasafe.types.api.actions.ReadRequest; -import de.adorsys.datasafe.types.api.actions.WriteRequest; -import de.adorsys.datasafe.types.api.shared.BaseMockitoTest; -import de.adorsys.datasafe.types.api.shared.Dirs; -import de.adorsys.datasafe.types.api.shared.Resources; -import lombok.SneakyThrows; -import org.bouncycastle.jce.provider.BouncyCastleProvider; -import org.junit.jupiter.api.BeforeEach; -import org.junit.jupiter.api.Test; -import org.junit.jupiter.api.io.TempDir; - -import java.io.InputStream; -import java.io.OutputStream; -import java.nio.file.Files; -import java.nio.file.Path; -import java.security.Security; -import java.util.Collections; -import java.util.List; -import java.util.stream.Collectors; - -import static org.assertj.core.api.Assertions.assertThat; - -/** - * This test ensures that Datasafe can use setup and folder structure from version 0.6.2 (baseline backward compatibility) - */ -class DatasafeBaselineCompatTest extends BaseMockitoTest { - - private static final String BASE_FIXTURE = "compat-0.6.2"; - private static final String OLD_ROOT = - "file:/var/folders/3w/fzdgs28j1_b3r4y8x9_s4wpw0000gn/T/junit4892767241345613098/"; - - private UserIDAuth john = new UserIDAuth(new UserID("john"), new ReadKeyPassword("secure-password john")); - private UserIDAuth jane = new UserIDAuth(new UserID("jane"), new ReadKeyPassword("secure-password jane")); - - private DefaultDatasafeServices datasafe; - private Path dfsRoot; - - @SneakyThrows - @BeforeEach - void extractFixtureAndPrepare(@TempDir Path tempDir) { - Security.addProvider(new BouncyCastleProvider()); - dfsRoot = tempDir; - - Resources.copyResourceDir(BASE_FIXTURE, tempDir); - // Replace original root with new root: - replace(tempDir.resolve("profiles/private/jane"), OLD_ROOT, tempDir.toUri().toString()); - replace(tempDir.resolve("profiles/private/john"), OLD_ROOT, tempDir.toUri().toString()); - replace(tempDir.resolve("profiles/public/jane"), OLD_ROOT, tempDir.toUri().toString()); - replace(tempDir.resolve("profiles/public/john"), OLD_ROOT, tempDir.toUri().toString()); - - datasafe = DaggerDefaultDatasafeServices.builder() - .config(new DefaultDFSConfig(tempDir.toUri(), "PAZZWORD")) - .storage(new FileSystemStorageService(tempDir)) - .build(); - } - - @Test - @SneakyThrows - void writeNewAndReadFileFromOldVersion() { - String oldContent = "Hello here 1"; - String newContent = "NEW Hello here 1"; - String newPrivatePath = "folder1/secret-NEW.txt"; - String oldPrivatePath = "folder1/secret.txt"; - String newInboxPath = "hello-NEW.txt"; - String oldInboxPath = "hello.txt"; - - // write new document to 'old' folder - try (OutputStream os = datasafe.privateService().write(WriteRequest.forDefaultPrivate(jane, newPrivatePath))) { - os.write(newContent.getBytes()); - } - - // read file from private and share this file with John - try (InputStream is = datasafe.privateService().read(ReadRequest.forDefaultPrivate(jane, newPrivatePath)); - OutputStream os = datasafe.inboxService().write(WriteRequest.forDefaultPublic( - Collections.singleton(john.getUserID()), - newInboxPath)) - ) { - ByteStreams.copy(is, os); - } - - // validate old Jane's private file - assertThat(datasafe.privateService().read(ReadRequest.forDefaultPrivate(jane, oldPrivatePath))) - .hasContent(oldContent); - // validate new Jane's private file - assertThat(datasafe.privateService().read(ReadRequest.forDefaultPrivate(jane, newPrivatePath))) - .hasContent(newContent); - - // validate old Johns's inbox file - assertThat(datasafe.inboxService().read(ReadRequest.forDefaultPrivate(john, oldInboxPath))) - .hasContent(oldContent); - // validate new Johns's inbox file - assertThat(datasafe.inboxService().read(ReadRequest.forDefaultPrivate(john, newInboxPath))) - .hasContent(newContent); - - // validate folder structure - assertThat(Dirs.walk(dfsRoot, 1)).containsExactlyInAnyOrder("profiles", "users"); - assertThat(Dirs.walk(dfsRoot.resolve("profiles"))) - .containsExactlyInAnyOrder( - "public", - "private", - "public/john", - "public/jane", - "private/john", - "private/jane" - ); - assertThat(Dirs.walk(dfsRoot.resolve("users"), 3)) - .containsExactlyInAnyOrder( - "john", - "john/public", - "john/public/inbox", - "john/public/pubkeys", - "john/private", - "john/private/keystore", - "jane", - "jane/public", - "jane/public/pubkeys", - "jane/private", - "jane/private/keystore", - "jane/private/files" - ); - - assertThat(datasafe.userProfile().privateProfile(john).getAppVersion()).isEqualTo(Version.BASELINE); - assertThat(datasafe.userProfile().privateProfile(jane).getAppVersion()).isEqualTo(Version.BASELINE); - assertThat(datasafe.userProfile().publicProfile(john.getUserID()).getAppVersion()).isEqualTo(Version.BASELINE); - assertThat(datasafe.userProfile().publicProfile(john.getUserID()).getAppVersion()).isEqualTo(Version.BASELINE); - } - - @SneakyThrows - private void replace(Path file, String what, String with) { - List baseContent = Files.readAllLines(file); - Files.write(file, baseContent.stream().map(it -> it.replace(what, with)).collect(Collectors.toList())); - } -} diff --git a/datasafe-business/src/test/resources/compat-0.6.2/profiles/private/jane b/datasafe-business/src/test/resources/compat-0.6.2/profiles/private/jane deleted file mode 100644 index 9c34a2740..000000000 --- a/datasafe-business/src/test/resources/compat-0.6.2/profiles/private/jane +++ /dev/null @@ -1 +0,0 @@ -{"appVersion": "BASELINE", "keystore":{"resource":"file:/var/folders/3w/fzdgs28j1_b3r4y8x9_s4wpw0000gn/T/junit4892767241345613098/users/jane/private/keystore"},"privateStorage":{"{\"id\": \"DEFAULT\"}": {"resource":"file:/var/folders/3w/fzdgs28j1_b3r4y8x9_s4wpw0000gn/T/junit4892767241345613098/users/jane/private/files/"}},"inboxWithFullAccess":{"resource":"file:/var/folders/3w/fzdgs28j1_b3r4y8x9_s4wpw0000gn/T/junit4892767241345613098/users/jane/public/inbox/"},"documentVersionStorage":{"resource":"file:/var/folders/3w/fzdgs28j1_b3r4y8x9_s4wpw0000gn/T/junit4892767241345613098/users/jane/versions/"},"associatedResources":[{"resource":"file:/var/folders/3w/fzdgs28j1_b3r4y8x9_s4wpw0000gn/T/junit4892767241345613098/users/jane/"}]} diff --git a/datasafe-business/src/test/resources/compat-0.6.2/profiles/private/john b/datasafe-business/src/test/resources/compat-0.6.2/profiles/private/john deleted file mode 100644 index 0da1fe08b..000000000 --- a/datasafe-business/src/test/resources/compat-0.6.2/profiles/private/john +++ /dev/null @@ -1 +0,0 @@ -{"appVersion": "BASELINE", "keystore":{"resource":"file:/var/folders/3w/fzdgs28j1_b3r4y8x9_s4wpw0000gn/T/junit4892767241345613098/users/john/private/keystore"},"privateStorage":{"{\"id\": \"DEFAULT\"}": {"resource":"file:/var/folders/3w/fzdgs28j1_b3r4y8x9_s4wpw0000gn/T/junit4892767241345613098/users/john/private/files/"}},"inboxWithFullAccess":{"resource":"file:/var/folders/3w/fzdgs28j1_b3r4y8x9_s4wpw0000gn/T/junit4892767241345613098/users/john/public/inbox/"},"documentVersionStorage":{"resource":"file:/var/folders/3w/fzdgs28j1_b3r4y8x9_s4wpw0000gn/T/junit4892767241345613098/users/john/versions/"},"associatedResources":[{"resource":"file:/var/folders/3w/fzdgs28j1_b3r4y8x9_s4wpw0000gn/T/junit4892767241345613098/users/john/"}]} diff --git a/datasafe-business/src/test/resources/compat-0.6.2/profiles/public/jane b/datasafe-business/src/test/resources/compat-0.6.2/profiles/public/jane deleted file mode 100644 index a98ed4c43..000000000 --- a/datasafe-business/src/test/resources/compat-0.6.2/profiles/public/jane +++ /dev/null @@ -1 +0,0 @@ -{"appVersion": "BASELINE", "publicKeys":{"resource":"file:/var/folders/3w/fzdgs28j1_b3r4y8x9_s4wpw0000gn/T/junit4892767241345613098/users/jane/public/pubkeys"},"inbox":{"resource":"file:/var/folders/3w/fzdgs28j1_b3r4y8x9_s4wpw0000gn/T/junit4892767241345613098/users/jane/public/inbox/"}} diff --git a/datasafe-business/src/test/resources/compat-0.6.2/profiles/public/john b/datasafe-business/src/test/resources/compat-0.6.2/profiles/public/john deleted file mode 100644 index 9c0eae5ca..000000000 --- a/datasafe-business/src/test/resources/compat-0.6.2/profiles/public/john +++ /dev/null @@ -1 +0,0 @@ -{"appVersion": "BASELINE", "publicKeys":{"resource":"file:/var/folders/3w/fzdgs28j1_b3r4y8x9_s4wpw0000gn/T/junit4892767241345613098/users/john/public/pubkeys"},"inbox":{"resource":"file:/var/folders/3w/fzdgs28j1_b3r4y8x9_s4wpw0000gn/T/junit4892767241345613098/users/john/public/inbox/"}} diff --git a/datasafe-business/src/test/resources/compat-0.6.2/users/jane/private/files/Qc5BJaNqSbbSBoHUmrYhEQ==/3_FBQ7knNcCKL1rPDE5Mmg== b/datasafe-business/src/test/resources/compat-0.6.2/users/jane/private/files/Qc5BJaNqSbbSBoHUmrYhEQ==/3_FBQ7knNcCKL1rPDE5Mmg== deleted file mode 100644 index dd036d187a9f0878972cb237018949a3f0763b90..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 210 zcmXqLVB^$k^Jx3d%gD~WpuwPliIKsuXi)(ZBa49vi%~$3XP9G%YkaV)bC7FDYGRVH zp`nF=ZgQ%np{|L!v8k?QnuU>Wa#ET_s$rsqu}Mm@0XG|GLYoI;Dl-eCE{ldqd+6`i zGjf{^Ud^;p-8jKGDOGCfLy4ywl^GQqP1|^*-{oo_c&2w^q5+aS7!70*W@xbph=pvq o8ka61^+?9(Mw?sr*98qM0(tuu=-c;5ev6l%^ToN3FM_@ z8?J0-0eZ44TdM}uX46a$6*VV33sj=zUdBA~pyaQ(15_rE8_1~)acvWqa$@&MUiaSZ zOd|1s+%CgXfXs6FlNq;cLz`2sb5p7f2MOH_xTwtC1CG!?fi^1R2Iae^VXY5f?(H-? zvTeR-FLx`E36M6fZ39qa+j!9C*sy(>bf`tI6>Sj|>0}90?3&}nm1J|mxlh|k zx04Wjwl^>V^wIZFoVNU4*_+ZIE3@nUX7N>K?P1IAMoswZ6m|dlilL@fq-Hn0MC;D+ zpPyBfARO;bbo)ea&*BHdR~3>(dv9nni?pY_Q@pp~DywlzkYqr4n@(}rSQ5}pfYfr4kA7CzWFFoeBf-4s0 zD`m!CpUS|d(?I~H7phyB)@1`v%{CY7>AtQ+Q?8OPnuq3rpE>B1iNEq4mm>*y_jzfJ zd!gwp#}&%M8wwV2L&jS!`vtT7uK;?jo<9r{3Mz$c+p&lD4K1TOp4}ZfG%}Oz65+~T zXFU`w*rIp_28h*M7&dhKDPLJ=ZCP>tf9dR~U%UJH6ch!{3 zS46gcVr(vIN$-7=&X^uTtEk!kmU3pXS={x~eAQ!K|Bo?qHSI2tc|wgFccP<`Ni-K= z@^oMfs$BZKpyMuRT|>|5X+iMDk6n!Qdje2wRh$(0A^%v5q4za5yxl*kRwZ^y7g^pT z_4S=e+b@0u(Js3M^)~c~IF38k41E5X3pqMO5>$W5vE6HQ^d_*Lv$2aa zVw7Y~#{RodZg2!f6 z2Jwt3%x&LKEw8XIO}PbH!T4DBWYI~+{^NLt5ax$Iy_NYDZ|?|~e$NQF8J_raSSJip zk+P!8YUjXW*17gbLXj{3+;(*Te50izwB2o#E$W9Ovy<6UJGXNoatizHGLQp;cV)2W zO)*q+3=whnJqSbyt;sy;)<8AV%|>^}qz(M|F}udD!H!noBwRS)kL`FGY5RY#{n&PdwB& z1!&C0E5i61-Zf}LT#skgSCXE=!IHoIoRvdJWI70t|1Wi?*d&ox1=Ez|$E^qH=Z|BZ zy>TR>P6b=A`fx_kv+1*L>_s>au4vR3@QbdndiFQ2H1VC^nkI?eHSPqu!&u&aE zYSM2Fhk@WkI5)y}92=Ja^V_2wMqu%4{+CoXIORCP>L#r6;W?X|5%L$18c1x%xzl** zm#z=oxC`qSZIwsL*`+CSo<=IE(VDl4Jq1A<9#V@fG<=dB32tm+cq^=odfG{J?;y-{ z`R$`%nVK#?cR*7j>+j1o@3O8GtAE_+T7O}xR6*$jix{}>olb-i)<9KH8T7GoDPmvj z@Sp)~rn=8}1MmfPQI^?=`vR8{Ro-UB_S!rLR3;gBe=B-Sk{UUc{OA@Rg19Kpsi0Rh ziXCW9OxG=LcxPdFGY_yTsw_1Dzmb56Q_A#Wgei*N#pc3K{3XFE2MK4wr^f-u>=q(#l1 z2iz(uYD^!qGAKqby6#>Q;TRdx0N*A>+lSaZe&fN;DR_#f>eiP~_Q~Wa4m*U7Bn^Z5 z$M2U?%0_Kx%a0gDo?iP4KdgB|q1IyUFjoCzu{C?%bw0sER7!Tt%)t5QQv~uh$fhw# zPq2fH7b|P3oj>qB{=~WqbR8i#?<3H93$I2LdmsL~P=Pf268~BA0q80%ZdM>Br z?W9O5n=eW}-y6?o!?pM399SGe9cK<&ektth_&bo;*?($1)GJ=ry$qyfY)3-|8o#y*h;=VXF}R*s29= z96CW>;GI184*s2|0#mXh3Tih!JgAVUqechcXTo+n!+CBN??K#qcmVD_Zt>qnSb?OY zZo)vXM6kjIXi!!Xp3+JmuWFHRNIxD5T8`8{S|?H2A@{s11M8k$@1c%Fa9qy*!%qdpUut^7x(tex8e--l(A=%Ck zdzoY}#20s2)l=b4Flr>!z-+=io;a8eH(_g{KU1aogE$-C^j7^pd!c+Z0%4nI)KIHmis|rzT-Zt4oydoNzqgP2gZO1_n2(otE|2x+R>(ORUR z-(4%xvDwb6y5Pu$L-q#P$LiI>x1}S5YmzLVV$+G@FWS!hF{ga-Q-{TorUfB9d}CC7 z5#@A^)VvQV)n#e!U}^M7DWM<~MjS~_20ggrMFRQcQi8->BSTBsY55QYS z=dz#F*6MaF-^iMIXfG0tVIvQM-uu!@1!n)Iypq3D*?_WV2*CH%m`1Oo+r!gehmv&3 zO=O@Is|c#Aok~m;M#GZC$83Q7fn70KzgL;E_CI}QD1z15!s z7@FA21!jSJ@Qs)bw3;>pL?sr?Obm4P4f^Sb-4JVfMIpDcz5W)JlMse6Mf6k7W)VBQ zwBG}!uFuaKvsJ*NE!!WYxrF7ywFGnphbJNYrOJbg5ITA))POUu+NO!YF3fTdna@Y} zU4``#cg`v9E?gpDgLC|s|EF{t0W?se92(IKk?xwymPopjN%Q?S&pTGDw}>lG)Vy7@ z(YMkWVx`v${^I;(VlL7k`^a{Fh+BHfnff7hcBt?EE1*KA2#x3(C|eM`MJPY9Wm_Sv z)bwTH>Mc|>PYAw&xS(2i4OVOL)2}UEZDCT){5&lTADnYf_tyKSqDFfPUl4{x^2OKo z0lY%z3J6sYeNx^>kmb&g*&R#ISB$$rw8U^4b>^(oL#B@IVIW^n7+$ZovZs=Lg{U}@ zcc9;P*08)3JS;QT2}!Y7Sv~_XY`}*SFbVm`rX(2i`?^sCJ>oh_MY9$(n@MAQ=^8l8 zR@yWRSj^sd<#HR;sGd{SvvYzsZLjgOSZIgM+XU}dekmG0o7y1qlv-WI*i_is#Uzl4{?b(-Qz%zC zstu-bF0~u>iR@qH} z4~zzzTkWbnj63gN;yhEcu+b5IDWnkk4txxB>*>t?W&^YL*hHnbn^vOTCL8M#*R+U<^dcA< z?Lbm(R^fQv;q9+7{~Zjfzaky1puyZ==g?_TpI3y}ft91?jwlv=w7}SK4w9)G_k?yiXh?qp z7Rg?Ay>1-12Eo?&RC>JPQpY0fIT(UAAJ0A5GN_mO4Cbx&DWK638RIbJD#MnwEx2c37AKR=8v(jEHD^hcM z=Qal;jANDXtN7T?<4|9$C}bVNxJ9c}ct2Xn8OCZ`z`v#N8xM9j4)c1uZT2zCrc*~t z`G^qNRElhe{a&9KMxLY0gN50NZm}aK>ow^jN}|}GXVbtqMZw@~4We*2U{$)WKbP1+ z1aJ|KoYV{y3iNF!hZ;%cMf=h|NS?M2ff@^eYBZ`=|`igJIDZkvft1l@5 z;RiL{GI&K>b%cTGKA>^W0KU1o9)T<|q+z6-Tnu?&Dc)Df283gAB>4AddSRIC|Fln*^uiYT79T6sCrq8LMu&7Z0(Ck)OT^C?|8 zsod3J1JG$wLJL0j(T`H~$+af*t1q1e@>FLA$W^;1Z!qjb64|>L|Y4(9vp|{ zpkW+nA&e4QF|rSYMEJ@EhF68yb6M1V?L4S;&qGKAqBlP%KbA^KVxpx000&6*fWv)5l%sL8cuY&! zyiB1QSlKVAJD5}NaY~S}0$tTc)_f5mNj(ABLuB6nm?5rSXU+0^QqfdK=-%f>L{Bnwn-4}7YIQM~e4XYHPBLeX&?No+`yV}hS97_;54GsYuC2J} ztZlYBL1#HG>v;xNj|ScbzM;j!hjtAcZY_DekQ`2qX@*d zv1X30wF5AvxsCx4e$Ea2k#<;#>|*}S+%SXn2%khW_DrTj&XEu*-mkZMAUu0B2oEgJ zD*z;1jHLPLs(Em@X;Vi>%CWyJGTb#;$)c)gour)oI4&&-FQ}HpJ{)7*?dY8D zA%MhHc#|EIj@sF%8HGffJCLLAe#brWVx(P#ZC3vgh}$5gf=(b^T$j#78!h;!9{0~J zPgGCerLnxn>Zgv|O<{MBKwC=5UmQazfz)6w@Uq^3-IRDU08A)23Y1u&{>s{7$6?Ni zQiQV61Gc9eff<#e;ouKJekpMdw&s1Wy5Pmi7XI*Bmpap1|6ja^sA`K7pSw7Gqn(lj z4Ed$PrR`IRiA7YSTPj~yBI^^O|X+>E>CLiqtuxO|8bNPgQlmcXAEb!XO=o!nqVN{ii;bSb)Lt^vwk@1VSg}f@&nH%{EP~u5S`TkoVn=^5>S_?LF{O ztcEoA#&JV7)NuOlSug2*lHW*2*AekS&d5plSImP5Sm47O7ZW%*PdgImixohPRzXCJ z5dZ^+-8`SKv-J;tpORF1%orbYQA)c2w=KayU)@DJr*d8!fA_-UI@~})2j^|YgSdJ` zCC7FbZ!z*fIe;KoG&HkZT>veKRr|m8;!J-mg|jj7XoH6dxQ3~@A#GuIMoncZQbgua zrN0#Ik2pdP^EmGR_jnB>emOH;ruXM|ANlUOk4iCaDQt=h5qS8q(*uy+h=8?A57=^a z2CS0QrIKkRhXe%%K7Ve)3XQjN%BJA88Ib3?2r`TgD20y{m`?ye4kd)BcvsC{Tv&@VnaftgSkT=ia(M{(q&&~n@ypf zhr*@f|FfvRuE%9iG$d5upDI#f7}L4Sc2VPm)&6Zw?Rou?wxTZ z%zKH1o*CRL9;%5nt4=*J9BH;x7q11>`V|&O%2c|En_M&Vqpl%O>+9QjCLNdBRcP6K zzMmT86#@f1)eV31DPoarzup^YNDP467iV&3zBS^KlVT73fT&MENmmvUxEBZ*dQL`4 zg!6di58h~&?E2{5`sIMaifgjJ*=n$xLhsQ0sg8#kNQDegIY%p~WaIkqtE5Nuyy-jQ z{~yQs94`fO445>^p{>NOV#JaFPb%09#|xL)T$b6bNo*06btx3pym9y(Uy-Ct`>F8d zZDIDXZB*n}A7d$CV)t3UvkSdfGyZt|Vw8!+I~xF_STxc79@?GG62u37+>>vPGKPuc zPVZGZc&?>G9WjDqJ4=%a(m&qBlekVOh&W48o8B)G0VJwDGQ4*1B#;=(`sh88!^Vc;0YS5aaB%0ru~o@x0%uv!Nbj&@c&qig>xiGG5nkl;0FVt6U;J3FuddN!ClT?3EWsMwkz@qpKj$q( z;x}L9%EV~QZkG5Rm>o*tVy@!Q)VfXo?X6kbHgK?vn+?xKq_G1d8@aUowTjy7-8azX z$o$}g=F&YIKnZj{lPIlXwJWr|Ya+y0AtMR;lWIj0HOZHeIbiYyEy`Hi&%qB*g@@0cuH~m9;rY z6`bv{6&zIr9X-+P%-517dVEvuFZL!oHR#*5Dl*!$6hle} zUJa|4m=pDf{yDMVOtY(hg5chr4Ydr+5M}ulsJu)hK^HjKASf^NiQS)zk0zQLB%e<% ztE5F<2if1IlCEzmdlWebXuMqM1c573YJ&2h76B8{&}DC!9{dNtTl*C-Am70iy`QuM zMB@eBHn-2NatoPm8`8NjP&M(W6AXQ99pz6U0<*R>n!AJB;{9oM$mo zXAP+H1I2nL@w6cPO@nyMY?(dlG2<>#mOl!YW)~ zV3=K`nbV$<2TR}xZyb^3&R^#a%}2-(Y~m_ljxm#XsTvbzX}oBy-|H|Z47|#b$8Ijp zur__x?V#&Tt<%UAlu|MRNC&ciEokQnfrNxFh-u5#ueJF*P3dxdzoL!i+o4))gw*s1 z(xnnn06>iS>R{IJ9+47L?tmMA`UYQ1%5g^p|L``109HnfNDzo%GQ*FP3k}KvsB;)D zzBlMxQK$dXuSov|t5QV~`gAvxl<`czsKKNJTmE3*l&Pn#{Fzw6I+or4pW)KRM!QzA zvBg90O#=0cwSHC3XQ(5Ruu*eS*`(a#T>m;RnT%-OCJijTq28I zM~I!<@)uaV>81JsseIPZc2WJ9{#B>k?)K;cDM(JaA-nNAzi)m*=k00+0yI*mkFF)z zRP4=N`|DiU%zI9pdaBeT%ViGyo-4>RABN$BIzkiO*`c2xZUyCCB2L7LtO3MEZ@Y^S zd)!7!%OYFgWFKFl6`4Eiip&=gZB{PbX4%AxF0du~FM>M;S3H=yCKXNEy^dI90Z6&W z6w6t6?iVwioWgD+Y>&eoS8qD7-UjmJ(GJhCwpG5OUs4sqRcg}h6AIBC5!C}-?-%7G z7~dV&BneYFLMGr6gA@;8<`*LK;iYl$Yqz(3XdM!U%Gyatc1cYRmEi6<$y+dHB>NZq z#c_xEx+3xNW=ZdT~rp zbT(GK+@%NAIBnq84Fe}WX&;0vDE*>udd1yl290)hd1>7BV?8}GoP>TG6=l#*=4BCv z7#!}K5z9?9ddU|^np^D`#vswukZJv*-T<|y- z;}%Zr2BY?cbS;|nvZ4>a3%2I6tHw}aurh&s@MdWFv!>b(6k1Exw7-X{l!gxI+&C5L zJQ0|5;#g&Q?x^LrgH%9$(M+Q3CuuX~%2w~NPioYx>nE56NNhX)lY2~D*)a}`SPN1E z%xm$NoN?<;6LU6&fxeVGh&sP9`-eM3@)7@L&pl)RebfP`dN>s2acdtyWWhEhx+WX%MpA6rPRVc>^9UlQoZ}_BuYvMu! zuv)+G@d7hk>IBF#g<$R4nueU8B}HD@X@H?BOm2i^BmNL)yy~BmOycQ*IXuZdJez_g z@>RLrb6dVb$DcWDq_3sfshaK#bAT*IWbsSA0)JuHG?)Y0rmE&88y~8_AcZO4T=rax z&q%H==}FYSxRj!-(cRdj!oJL+;brBGs8f)qyUEiVjm6VFH82DTZCg7<^e}kEdr7q+@skh00k29#1UB%PbIrEbp9?1ITqQD4v5x5*i(=)BhZ0JDy1w%a-oH)k z9;Jd0F3~|aNbJ3#xQapzi)s&Up&`MSo_KpxS8N;E^v#WkxQ8mwZ7>qCLJug$|J9zM zMy~jcBauN|#7%CnQ@!5=KsPuQUickkq}eS=(;V#=7Pwk*VB3nQEa6P+P{QWnN|@1N zg5k zBYdrIvm3fftvQ9^)k3=-3|4<&6Jq>)>_ehiV9DwV%PFpYy=(`tk4tj4iYGI7ZkFFG zhFk2QEy|RLq5|kBHk%g=+?^hlz1k3hn0<-(OeOVu^$=L^JD04LynKjjN59v za(jyrbZ|Lh0m<8H$WReL^tL6QFHCNL5Yg)obCrzC<15+_arI7-nN~d?0+fN@lW@Ye z1^IIoga#LI{ywHD#1NFQQh7|nY&;#7`2*z!|IkCxDa?>(2_6upt3 z^T;M}zhEICzELaY&x(oy@URZIbQ;8&2WED|#a&8r<1@#A9&0uQ&@Kg>kxfubJjfe#hWen&`Gk`i5|&nB@QD%D6PTx3~Lss5vGwk>7yGF~F|@ mX>PdmUlJQHxdQ0i$v_4%zEXkf*HWokhzGp@ diff --git a/datasafe-business/src/test/resources/compat-0.6.2/users/john/public/inbox/hello.txt b/datasafe-business/src/test/resources/compat-0.6.2/users/john/public/inbox/hello.txt deleted file mode 100644 index 8bfef5614475df41fc97e49886dd10c8a900d7b2..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 431 zcmXqLVB^$k^Jx3d%gD~WpuwPliIKsuiP6`fiP4jZk*UGZ+ch#c#6QSY*V9GUz`)eZ z!qUXhNH^Ia%|zG4C@obt(I72R*Eq$%Bq=d1+0w+^*nk&qA|oR!14|PlL!6IND-ZAU zd5R|;xQc!!s$Yvv4f^y^_TC{KN$&WJ1;;Ok#U`v<%fR#J%_XVJf!rEOhgCGpKkd64 zv17yO+uuCcUZ1Ms{t>ymn$yejk+*yJbE&HVr}>H>>dl?NYO$VAD(u@%o!xrUyc42d zpEdECpxV#F%&@OJac|mvb)l#0y56`~owC!Z>$Sb&-Zd{XJ!tZ)>n=yi-`}&9+;!}j zXu`96PUYvHg-w2(UNnVWbLL6Uh=-RPX4x$3?G;?Jp~1!4I9OJ5V(+y%9WQO>%X~U} zaT=$6<=Ru5`4+aXOFD6TgXnh6PqW(G*M7Xa(C0~@lmEdyF?WmRoU Date: Tue, 17 Sep 2019 12:25:35 +0300 Subject: [PATCH 086/255] DOC-266. Move dependency to dependency management section --- datasafe-encryption/datasafe-encryption-impl/pom.xml | 1 - .../pathencryption/SymmetricPathEncryptionServiceImpl.java | 3 ++- pom.xml | 5 +++++ 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/datasafe-encryption/datasafe-encryption-impl/pom.xml b/datasafe-encryption/datasafe-encryption-impl/pom.xml index 5f462ed8f..07ec3a624 100644 --- a/datasafe-encryption/datasafe-encryption-impl/pom.xml +++ b/datasafe-encryption/datasafe-encryption-impl/pom.xml @@ -72,7 +72,6 @@ org.cryptomator siv-mode - ${siv-mode.version} diff --git a/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/pathencryption/SymmetricPathEncryptionServiceImpl.java b/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/pathencryption/SymmetricPathEncryptionServiceImpl.java index d5a1b65bc..c459c7787 100644 --- a/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/pathencryption/SymmetricPathEncryptionServiceImpl.java +++ b/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/pathencryption/SymmetricPathEncryptionServiceImpl.java @@ -20,7 +20,8 @@ /** * Path encryption service that maintains URI segments integrity. * It means that path/to/file is encrypted to cipher(path)/cipher(to)/cipher(file) and each invocation of example: - * cipher(path) will yield same string. + * cipher(path) will yield same string, but cipher(path)/cipher(path) will not yield same segments - + * it will be more like abc/cde and not like abc/abc. */ @Slf4j @RuntimeDelegate diff --git a/pom.xml b/pom.xml index a35df6fdd..e2ee1bee5 100644 --- a/pom.xml +++ b/pom.xml @@ -196,6 +196,11 @@ auto-service ${auto-service.version} + + org.cryptomator + siv-mode + ${siv-mode.version} + From 4d5ee6f86db6895c47e269935123f1f5f2d7cd70 Mon Sep 17 00:00:00 2001 From: Valentyn Berezin Date: Tue, 17 Sep 2019 12:30:01 +0300 Subject: [PATCH 087/255] DOC-266. Fix REST test failures --- .../adorsys/datasafe/rest/impl/dto/UserPrivateProfileDTO.java | 2 ++ .../de/adorsys/datasafe/rest/impl/dto/UserPublicProfileDTO.java | 2 ++ 2 files changed, 4 insertions(+) diff --git a/datasafe-rest-impl/src/main/java/de/adorsys/datasafe/rest/impl/dto/UserPrivateProfileDTO.java b/datasafe-rest-impl/src/main/java/de/adorsys/datasafe/rest/impl/dto/UserPrivateProfileDTO.java index 2a761e7cb..d2d81beac 100644 --- a/datasafe-rest-impl/src/main/java/de/adorsys/datasafe/rest/impl/dto/UserPrivateProfileDTO.java +++ b/datasafe-rest-impl/src/main/java/de/adorsys/datasafe/rest/impl/dto/UserPrivateProfileDTO.java @@ -1,6 +1,7 @@ package de.adorsys.datasafe.rest.impl.dto; import de.adorsys.datasafe.directory.api.types.UserPrivateProfile; +import de.adorsys.datasafe.types.api.global.Version; import de.adorsys.datasafe.types.api.resource.StorageIdentifier; import lombok.AllArgsConstructor; import lombok.Data; @@ -81,6 +82,7 @@ public UserPrivateProfile toProfile() { it -> Util.privateResource(it.getValue()) )) ) + .appVersion(Version.current()) .build(); } } diff --git a/datasafe-rest-impl/src/main/java/de/adorsys/datasafe/rest/impl/dto/UserPublicProfileDTO.java b/datasafe-rest-impl/src/main/java/de/adorsys/datasafe/rest/impl/dto/UserPublicProfileDTO.java index 1eb71e779..b4ea0d4b7 100644 --- a/datasafe-rest-impl/src/main/java/de/adorsys/datasafe/rest/impl/dto/UserPublicProfileDTO.java +++ b/datasafe-rest-impl/src/main/java/de/adorsys/datasafe/rest/impl/dto/UserPublicProfileDTO.java @@ -1,6 +1,7 @@ package de.adorsys.datasafe.rest.impl.dto; import de.adorsys.datasafe.directory.api.types.UserPublicProfile; +import de.adorsys.datasafe.types.api.global.Version; import lombok.AllArgsConstructor; import lombok.Data; import lombok.NoArgsConstructor; @@ -29,6 +30,7 @@ public UserPublicProfile toProfile() { return UserPublicProfile.builder() .inbox(Util.publicResource(inbox)) .publicKeys(Util.publicResource(publicKeys)) + .appVersion(Version.current()) .build(); } } From fea51a7f7ff9438a2fd8bad94f96dbe435e0f427 Mon Sep 17 00:00:00 2001 From: Maxim Grischenko Date: Tue, 17 Sep 2019 12:09:07 +0200 Subject: [PATCH 088/255] path encryption version --- .../SymmetricPathEncryptionServiceImpl.java | 12 +++++++++++- .../types/api/global/PathEncryptionVersion.java | 15 +++++++++++++++ 2 files changed, 26 insertions(+), 1 deletion(-) create mode 100644 datasafe-types-api/src/main/java/de/adorsys/datasafe/types/api/global/PathEncryptionVersion.java diff --git a/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/pathencryption/SymmetricPathEncryptionServiceImpl.java b/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/pathencryption/SymmetricPathEncryptionServiceImpl.java index e8b2caa1e..471c9cc8a 100644 --- a/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/pathencryption/SymmetricPathEncryptionServiceImpl.java +++ b/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/pathencryption/SymmetricPathEncryptionServiceImpl.java @@ -2,6 +2,7 @@ import de.adorsys.datasafe.encrypiton.api.pathencryption.encryption.SymmetricPathEncryptionService; import de.adorsys.datasafe.types.api.context.annotations.RuntimeDelegate; +import de.adorsys.datasafe.types.api.global.PathEncryptionVersion; import de.adorsys.datasafe.types.api.resource.Uri; import lombok.SneakyThrows; import lombok.extern.slf4j.Slf4j; @@ -13,6 +14,7 @@ import java.util.Arrays; import java.util.function.Function; import java.util.stream.Collectors; +import java.util.stream.Stream; import static java.nio.charset.StandardCharsets.UTF_8; @@ -45,10 +47,11 @@ public Uri encrypt(SecretKey secretKey, Uri bucketPath) { Cipher cipher = encryptionConfig.encryptionCipher(secretKey); - return processURIparts( + Uri uri = processURIparts( bucketPath, str -> encode(str, cipher) ); + return new Uri(URI.create(uri.getPath() + PathEncryptionVersion.AES_SIV.getName())); } /** @@ -62,6 +65,13 @@ public Uri decrypt(SecretKey secretKey, Uri bucketPath) { Cipher cipher = encryptionConfig.decryptionCipher(secretKey); + String path = bucketPath.getPath(); + String pathEncryptionName = path.substring(path.length() - 3); + if (Stream.of(PathEncryptionVersion.values()).map(PathEncryptionVersion::getName).collect(Collectors.toSet()) + .contains(pathEncryptionName)) { + bucketPath = new Uri(URI.create(path.substring(0, path.length() - 3))); + } + return processURIparts( bucketPath, str -> decode(str, cipher) diff --git a/datasafe-types-api/src/main/java/de/adorsys/datasafe/types/api/global/PathEncryptionVersion.java b/datasafe-types-api/src/main/java/de/adorsys/datasafe/types/api/global/PathEncryptionVersion.java new file mode 100644 index 000000000..2ad9e7398 --- /dev/null +++ b/datasafe-types-api/src/main/java/de/adorsys/datasafe/types/api/global/PathEncryptionVersion.java @@ -0,0 +1,15 @@ +package de.adorsys.datasafe.types.api.global; + +import lombok.Getter; +import lombok.RequiredArgsConstructor; + +@Getter +@RequiredArgsConstructor +public enum PathEncryptionVersion { + + AES_SIV("SIV"); + + + // Should be 3-symbol string. Always added at the end of encrypted path + private final String name; +} From 5c20264b9e59ea67cb1a199fec788f6a5dc47b72 Mon Sep 17 00:00:00 2001 From: Valentyn Berezin Date: Tue, 17 Sep 2019 14:20:51 +0300 Subject: [PATCH 089/255] DOC-239. Ensure compatibility of SimpleDatasafeAdapter with 0.4.3 release --- .../impl/directory/DefaultProfileModule.java | 2 +- .../LegacyPathEncryptionConfig.java | 36 +++++ .../LegacySymmetricPathEncryptionService.java | 27 ++++ .../datasafe-simple-adapter-impl/pom.xml | 5 + .../adapter/impl/LegacyDatasafeService.java | 69 ++++++++++ .../impl/SimpleDatasafeServiceImpl.java | 70 +--------- .../SwitchableCMSEncryptionModule.java | 26 ++++ .../SwitchableCmsEncryptionImpl.java | 2 +- .../LegacyDFSPrivateKeyServiceImpl.java | 83 ++++++++++++ .../LegacyPathDigestConfig.java | 22 +++ .../LegacyPathEncryptionImpl.java | 54 ++++++++ .../pathencryption/LegacyPathEncryptor.java | 61 +++++++++ ...acySymmetricPathEncryptionServiceImpl.java | 128 ++++++++++++++++++ .../LegacyCredentialsModule.java | 94 +++++++++++++ .../LegacyPathEncryptionModule.java | 46 +++++++ .../SwitchablePathEncryptionImpl.java | 10 +- ...lativeProfileRegistrationServiceImpl.java} | 19 +-- .../DFSRelativeProfileRemovalServiceImpl.java | 3 + ...FSRelativeProfileRetrievalServiceImpl.java | 3 + ...DFSRelativeProfileUpdatingServiceImpl.java | 54 ++++++++ .../impl/profile/HardcodedProfileModule.java | 48 +++++++ .../impl/SimpleAdapterFeatureTest.java | 2 + 22 files changed, 785 insertions(+), 79 deletions(-) create mode 100644 datasafe-simple-adapter/datasafe-simple-adapter-api/src/main/java/de/adorsys/datasafe/simple/adapter/api/legacy/pathencryption/LegacyPathEncryptionConfig.java create mode 100644 datasafe-simple-adapter/datasafe-simple-adapter-api/src/main/java/de/adorsys/datasafe/simple/adapter/api/legacy/pathencryption/LegacySymmetricPathEncryptionService.java create mode 100644 datasafe-simple-adapter/datasafe-simple-adapter-impl/src/main/java/de/adorsys/datasafe/simple/adapter/impl/LegacyDatasafeService.java create mode 100644 datasafe-simple-adapter/datasafe-simple-adapter-impl/src/main/java/de/adorsys/datasafe/simple/adapter/impl/cmsencryption/SwitchableCMSEncryptionModule.java rename datasafe-simple-adapter/datasafe-simple-adapter-impl/src/main/java/de/adorsys/datasafe/simple/adapter/impl/{ => cmsencryption}/SwitchableCmsEncryptionImpl.java (97%) create mode 100644 datasafe-simple-adapter/datasafe-simple-adapter-impl/src/main/java/de/adorsys/datasafe/simple/adapter/impl/legacy/directory/LegacyDFSPrivateKeyServiceImpl.java create mode 100644 datasafe-simple-adapter/datasafe-simple-adapter-impl/src/main/java/de/adorsys/datasafe/simple/adapter/impl/legacy/pathencryption/LegacyPathDigestConfig.java create mode 100644 datasafe-simple-adapter/datasafe-simple-adapter-impl/src/main/java/de/adorsys/datasafe/simple/adapter/impl/legacy/pathencryption/LegacyPathEncryptionImpl.java create mode 100644 datasafe-simple-adapter/datasafe-simple-adapter-impl/src/main/java/de/adorsys/datasafe/simple/adapter/impl/legacy/pathencryption/LegacyPathEncryptor.java create mode 100644 datasafe-simple-adapter/datasafe-simple-adapter-impl/src/main/java/de/adorsys/datasafe/simple/adapter/impl/legacy/pathencryption/LegacySymmetricPathEncryptionServiceImpl.java create mode 100644 datasafe-simple-adapter/datasafe-simple-adapter-impl/src/main/java/de/adorsys/datasafe/simple/adapter/impl/pathencryption/LegacyCredentialsModule.java create mode 100644 datasafe-simple-adapter/datasafe-simple-adapter-impl/src/main/java/de/adorsys/datasafe/simple/adapter/impl/pathencryption/LegacyPathEncryptionModule.java rename datasafe-simple-adapter/datasafe-simple-adapter-impl/src/main/java/de/adorsys/datasafe/simple/adapter/impl/{ => pathencryption}/SwitchablePathEncryptionImpl.java (76%) rename datasafe-simple-adapter/datasafe-simple-adapter-impl/src/main/java/de/adorsys/datasafe/simple/adapter/impl/profile/{DFSRelativeProfileRegistrationService.java => DFSRelativeProfileRegistrationServiceImpl.java} (63%) create mode 100644 datasafe-simple-adapter/datasafe-simple-adapter-impl/src/main/java/de/adorsys/datasafe/simple/adapter/impl/profile/DFSRelativeProfileUpdatingServiceImpl.java create mode 100644 datasafe-simple-adapter/datasafe-simple-adapter-impl/src/main/java/de/adorsys/datasafe/simple/adapter/impl/profile/HardcodedProfileModule.java diff --git a/datasafe-business/src/main/java/de/adorsys/datasafe/business/impl/directory/DefaultProfileModule.java b/datasafe-business/src/main/java/de/adorsys/datasafe/business/impl/directory/DefaultProfileModule.java index af8bee226..3b69c093f 100644 --- a/datasafe-business/src/main/java/de/adorsys/datasafe/business/impl/directory/DefaultProfileModule.java +++ b/datasafe-business/src/main/java/de/adorsys/datasafe/business/impl/directory/DefaultProfileModule.java @@ -70,7 +70,7 @@ static UserProfileCache userProfileCache(@Nullable OverridesRegistry registry) { abstract ProfileRegistrationService creationService(ProfileRegistrationServiceImplRuntimeDelegatable impl); /** - * Default profile removal service. + * Default profile updating service. */ @Binds abstract ProfileUpdatingService updatingService(ProfileUpdatingServiceImplRuntimeDelegatable impl); diff --git a/datasafe-simple-adapter/datasafe-simple-adapter-api/src/main/java/de/adorsys/datasafe/simple/adapter/api/legacy/pathencryption/LegacyPathEncryptionConfig.java b/datasafe-simple-adapter/datasafe-simple-adapter-api/src/main/java/de/adorsys/datasafe/simple/adapter/api/legacy/pathencryption/LegacyPathEncryptionConfig.java new file mode 100644 index 000000000..83b635699 --- /dev/null +++ b/datasafe-simple-adapter/datasafe-simple-adapter-api/src/main/java/de/adorsys/datasafe/simple/adapter/api/legacy/pathencryption/LegacyPathEncryptionConfig.java @@ -0,0 +1,36 @@ +package de.adorsys.datasafe.simple.adapter.api.legacy.pathencryption; + +import javax.crypto.Cipher; +import javax.crypto.SecretKey; + +/** + * Path encryption cipher configurer. + */ +public interface LegacyPathEncryptionConfig { + + /** + * @param secretKey Use this secret key + * @return Path encryption cipher that uses {@code secretKey} + */ + Cipher encryptionCipher(SecretKey secretKey); + + /** + * @param secretKey Use this secret key + * @return Path decryption cipher that uses {@code secretKey} + */ + Cipher decryptionCipher(SecretKey secretKey); + + /** + * Serializes encrypted bytes of document path. + * @param bytes Encrypted path as bytes + * @return String representation of encrypted path + */ + String byteSerializer(byte[] bytes); + + /** + * Deserializes encrypted bytes of document path. + * @param input String representation of encrypted path + * @return byte representation of path suitable for decryption + */ + byte[] byteDeserializer(String input); +} diff --git a/datasafe-simple-adapter/datasafe-simple-adapter-api/src/main/java/de/adorsys/datasafe/simple/adapter/api/legacy/pathencryption/LegacySymmetricPathEncryptionService.java b/datasafe-simple-adapter/datasafe-simple-adapter-api/src/main/java/de/adorsys/datasafe/simple/adapter/api/legacy/pathencryption/LegacySymmetricPathEncryptionService.java new file mode 100644 index 000000000..286414dbc --- /dev/null +++ b/datasafe-simple-adapter/datasafe-simple-adapter-api/src/main/java/de/adorsys/datasafe/simple/adapter/api/legacy/pathencryption/LegacySymmetricPathEncryptionService.java @@ -0,0 +1,27 @@ +package de.adorsys.datasafe.simple.adapter.api.legacy.pathencryption; + +import de.adorsys.datasafe.types.api.resource.Uri; + +import javax.crypto.SecretKey; + +/** + * Encrypts and decrypts relative URI's using symmetric cryptography. + */ +public interface LegacySymmetricPathEncryptionService { + + /** + * Encrypts relative URI using secret key and serializes it into URL-friendly format. + * @param secretKey Key to encrypt with + * @param bucketPath Path to encrypt + * @return Encrypted relative URI that can be safely published. + */ + Uri encrypt(SecretKey secretKey, Uri bucketPath); + + /** + * Decrypts relative URI using secret key. + * @param secretKey Key to decrypt with + * @param bucketPath Path to decrypt + * @return Decrypted relative URI typically containing some sensitive information. + */ + Uri decrypt(SecretKey secretKey, Uri bucketPath); +} diff --git a/datasafe-simple-adapter/datasafe-simple-adapter-impl/pom.xml b/datasafe-simple-adapter/datasafe-simple-adapter-impl/pom.xml index a57877697..5c78c8147 100644 --- a/datasafe-simple-adapter/datasafe-simple-adapter-impl/pom.xml +++ b/datasafe-simple-adapter/datasafe-simple-adapter-impl/pom.xml @@ -103,6 +103,11 @@ ${maven.compiler.plugin.version} + + com.google.dagger + dagger-compiler + ${dagger.version} + org.projectlombok lombok diff --git a/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/main/java/de/adorsys/datasafe/simple/adapter/impl/LegacyDatasafeService.java b/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/main/java/de/adorsys/datasafe/simple/adapter/impl/LegacyDatasafeService.java new file mode 100644 index 000000000..68635fbaf --- /dev/null +++ b/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/main/java/de/adorsys/datasafe/simple/adapter/impl/LegacyDatasafeService.java @@ -0,0 +1,69 @@ +package de.adorsys.datasafe.simple.adapter.impl; + +import dagger.BindsInstance; +import dagger.Component; +import de.adorsys.datasafe.business.impl.document.DefaultDocumentModule; +import de.adorsys.datasafe.business.impl.inbox.actions.DefaultInboxActionsModule; +import de.adorsys.datasafe.business.impl.keystore.DefaultKeyStoreModule; +import de.adorsys.datasafe.business.impl.privatestore.actions.DefaultPrivateActionsModule; +import de.adorsys.datasafe.business.impl.service.DefaultDatasafeServices; +import de.adorsys.datasafe.business.impl.storage.DefaultStorageModule; +import de.adorsys.datasafe.directory.api.config.DFSConfig; +import de.adorsys.datasafe.simple.adapter.impl.cmsencryption.SwitchableCMSEncryptionModule; +import de.adorsys.datasafe.simple.adapter.impl.pathencryption.LegacyCredentialsModule; +import de.adorsys.datasafe.simple.adapter.impl.pathencryption.LegacyPathEncryptionModule; +import de.adorsys.datasafe.simple.adapter.impl.profile.HardcodedProfileModule; +import de.adorsys.datasafe.storage.api.StorageService; +import de.adorsys.datasafe.types.api.context.overrides.OverridesRegistry; + +import javax.annotation.Nullable; +import javax.inject.Singleton; + +/** + * Datasafe service that is compatible with 0.4.3 release. + */ +@Singleton +@Component(modules = { + LegacyCredentialsModule.class, + DefaultKeyStoreModule.class, + DefaultDocumentModule.class, + SwitchableCMSEncryptionModule.class, + LegacyPathEncryptionModule.class, + DefaultInboxActionsModule.class, + DefaultPrivateActionsModule.class, + HardcodedProfileModule.class, + DefaultStorageModule.class +}) +public interface LegacyDatasafeService extends DefaultDatasafeServices { + + @Component.Builder + interface Builder { + + /** + * Binds (configures) system root uri - where user profiles will be located and system + * access to open (but not to read key) keystore. + */ + @BindsInstance + Builder config(DFSConfig config); + + /** + * Binds (configures) all storage operations - not necessary to call {@code storageList} after. + */ + @BindsInstance + Builder storage(StorageService storageService); + + /** + * Provides class overriding functionality, so that you can disable i.e. path encryption + * @param overridesRegistry Map with class-overrides (note: you can override classes that are + * annotated with {@code RuntimeDelegate}) + */ + @BindsInstance + Builder overridesRegistry(@Nullable OverridesRegistry overridesRegistry); + + /** + * @return Provide NEW instance of Legacy Datasafe services. All dependencies except + * annotated with {@code @Singleton} will have scope analogous to Spring {code @Prototype}. + */ + LegacyDatasafeService build(); + } +} diff --git a/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/main/java/de/adorsys/datasafe/simple/adapter/impl/SimpleDatasafeServiceImpl.java b/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/main/java/de/adorsys/datasafe/simple/adapter/impl/SimpleDatasafeServiceImpl.java index 0875b7c9a..55ad2165f 100644 --- a/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/main/java/de/adorsys/datasafe/simple/adapter/impl/SimpleDatasafeServiceImpl.java +++ b/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/main/java/de/adorsys/datasafe/simple/adapter/impl/SimpleDatasafeServiceImpl.java @@ -8,37 +8,28 @@ import com.amazonaws.services.s3.AmazonS3; import com.amazonaws.services.s3.AmazonS3ClientBuilder; import com.google.common.io.ByteStreams; -import de.adorsys.datasafe.business.impl.service.DaggerDefaultDatasafeServices; import de.adorsys.datasafe.business.impl.service.DefaultDatasafeServices; import de.adorsys.datasafe.directory.impl.profile.config.DefaultDFSConfig; -import de.adorsys.datasafe.directory.impl.profile.operations.actions.ProfileRegistrationServiceImplRuntimeDelegatable; -import de.adorsys.datasafe.directory.impl.profile.operations.actions.ProfileRemovalServiceImplRuntimeDelegatable; -import de.adorsys.datasafe.directory.impl.profile.operations.actions.ProfileRetrievalServiceImplRuntimeDelegatable; import de.adorsys.datasafe.encrypiton.api.types.UserID; import de.adorsys.datasafe.encrypiton.api.types.UserIDAuth; import de.adorsys.datasafe.encrypiton.api.types.keystore.ReadKeyPassword; import de.adorsys.datasafe.encrypiton.api.types.keystore.ReadStorePassword; -import de.adorsys.datasafe.encrypiton.impl.cmsencryption.CMSEncryptionServiceImplRuntimeDelegatable; -import de.adorsys.datasafe.encrypiton.impl.pathencryption.PathEncryptionImplRuntimeDelegatable; import de.adorsys.datasafe.simple.adapter.api.SimpleDatasafeService; import de.adorsys.datasafe.simple.adapter.api.exceptions.SimpleAdapterException; import de.adorsys.datasafe.simple.adapter.api.types.*; -import de.adorsys.datasafe.simple.adapter.impl.profile.DFSRelativeProfileRegistrationService; -import de.adorsys.datasafe.simple.adapter.impl.profile.DFSRelativeProfileRemovalServiceImpl; -import de.adorsys.datasafe.simple.adapter.impl.profile.DFSRelativeProfileRetrievalServiceImpl; +import de.adorsys.datasafe.simple.adapter.impl.pathencryption.SwitchablePathEncryptionImpl; import de.adorsys.datasafe.storage.api.StorageService; import de.adorsys.datasafe.storage.impl.fs.FileSystemStorageService; -import de.adorsys.datasafe.types.api.utils.ExecutorServiceUtil; import de.adorsys.datasafe.storage.impl.s3.S3StorageService; import de.adorsys.datasafe.types.api.actions.ListRequest; import de.adorsys.datasafe.types.api.actions.ReadRequest; import de.adorsys.datasafe.types.api.actions.RemoveRequest; import de.adorsys.datasafe.types.api.actions.WriteRequest; -import de.adorsys.datasafe.types.api.context.BaseOverridesRegistry; import de.adorsys.datasafe.types.api.resource.AbsoluteLocationWithCapability; import de.adorsys.datasafe.types.api.resource.BasePrivateResource; import de.adorsys.datasafe.types.api.resource.PrivateResource; import de.adorsys.datasafe.types.api.resource.StorageCapability; +import de.adorsys.datasafe.types.api.utils.ExecutorServiceUtil; import lombok.SneakyThrows; import lombok.extern.slf4j.Slf4j; import org.apache.commons.lang3.StringUtils; @@ -65,19 +56,6 @@ public SimpleDatasafeServiceImpl() { } public SimpleDatasafeServiceImpl(DFSCredentials dfsCredentials) { - BaseOverridesRegistry baseOverridesRegistry = new BaseOverridesRegistry(); - PathEncryptionImplRuntimeDelegatable.overrideWith( - baseOverridesRegistry, - args -> new SwitchablePathEncryptionImpl( - args.getBucketPathEncryptionService(), - args.getPrivateKeyService()) - ); - - CMSEncryptionServiceImplRuntimeDelegatable.overrideWith( - baseOverridesRegistry, args -> new SwitchableCmsEncryptionImpl(args.getEncryptionConfig()) - ); - - makeUserProfilePathsHardcoded(baseOverridesRegistry); if (dfsCredentials instanceof FilesystemDFSCredentials) { FilesystemDFSCredentials filesystemDFSCredentials = (FilesystemDFSCredentials) dfsCredentials; @@ -88,10 +66,9 @@ public SimpleDatasafeServiceImpl(DFSCredentials dfsCredentials) { log.info(lsf.toString()); this.systemRoot = FileSystems.getDefault().getPath(filesystemDFSCredentials.getRoot()).toAbsolutePath().toUri(); storageService = new FileSystemStorageService(FileSystems.getDefault().getPath(filesystemDFSCredentials.getRoot())); - customlyBuiltDatasafeServices = DaggerDefaultDatasafeServices.builder() + customlyBuiltDatasafeServices = DaggerLegacyDatasafeService.builder() .config(new DefaultDFSConfig(systemRoot, universalReadStorePassword.getValue())) .storage(getStorageService()) - .overridesRegistry(baseOverridesRegistry) .build(); log.info("build DFS to FILESYSTEM with root " + filesystemDFSCredentials.getRoot()); @@ -151,51 +128,16 @@ public SimpleDatasafeServiceImpl(DFSCredentials dfsCredentials) { ) ); this.systemRoot = URI.create(S3_PREFIX + amazonS3DFSCredentials.getRootBucket()); - customlyBuiltDatasafeServices = DaggerDefaultDatasafeServices.builder() + + customlyBuiltDatasafeServices = DaggerLegacyDatasafeService.builder() .config(new DefaultDFSConfig(systemRoot, universalReadStorePassword.getValue())) .storage(getStorageService()) - .overridesRegistry(baseOverridesRegistry) .build(); + log.info("build DFS to S3 with root " + amazonS3DFSCredentials.getRootBucket() + " and url " + amazonS3DFSCredentials.getUrl()); } } - private void makeUserProfilePathsHardcoded(BaseOverridesRegistry baseOverridesRegistry) { - ProfileRegistrationServiceImplRuntimeDelegatable.overrideWith( - baseOverridesRegistry, - args -> new DFSRelativeProfileRegistrationService( - args.getStorageKeyStoreOper(), - args.getKeyStoreOper(), - args.getAccess(), - args.getCheckService(), - args.getWriteService(), - args.getSerde(), - args.getDfsConfig() - ) - ); - - ProfileRetrievalServiceImplRuntimeDelegatable.overrideWith( - baseOverridesRegistry, args -> new DFSRelativeProfileRetrievalServiceImpl( - args.getDfsConfig(), - args.getCheckService(), - args.getAccess() - ) - ); - - ProfileRemovalServiceImplRuntimeDelegatable.overrideWith( - baseOverridesRegistry, - args -> new DFSRelativeProfileRemovalServiceImpl( - args.getPrivateKeyService(), - args.getKeyStoreCache(), - args.getListService(), - args.getAccess(), - args.getDfsConfig(), - args.getRemoveService(), - args.getRetrievalService() - ) - ); - } - public StorageService getStorageService() { return storageService; } diff --git a/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/main/java/de/adorsys/datasafe/simple/adapter/impl/cmsencryption/SwitchableCMSEncryptionModule.java b/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/main/java/de/adorsys/datasafe/simple/adapter/impl/cmsencryption/SwitchableCMSEncryptionModule.java new file mode 100644 index 000000000..2ceb88cf2 --- /dev/null +++ b/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/main/java/de/adorsys/datasafe/simple/adapter/impl/cmsencryption/SwitchableCMSEncryptionModule.java @@ -0,0 +1,26 @@ +package de.adorsys.datasafe.simple.adapter.impl.cmsencryption; + +import dagger.Binds; +import dagger.Module; +import de.adorsys.datasafe.encrypiton.api.cmsencryption.CMSEncryptionService; +import de.adorsys.datasafe.encrypiton.impl.cmsencryption.CMSEncryptionConfig; +import de.adorsys.datasafe.encrypiton.impl.cmsencryption.DefaultCMSEncryptionConfig; + +/** + * This module is responsible for providing CMS encryption of document. + */ +@Module +public abstract class SwitchableCMSEncryptionModule { + + /** + * Default CMS-encryption config using AES256_CBC. + */ + @Binds + abstract CMSEncryptionConfig defaultCMSEncryptionConfig(DefaultCMSEncryptionConfig defaultCMSEncryptionConfig); + + /** + * Default BouncyCastle based CMS encryption for document. + */ + @Binds + abstract CMSEncryptionService cmsEncryptionService(SwitchableCmsEncryptionImpl impl); +} diff --git a/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/main/java/de/adorsys/datasafe/simple/adapter/impl/SwitchableCmsEncryptionImpl.java b/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/main/java/de/adorsys/datasafe/simple/adapter/impl/cmsencryption/SwitchableCmsEncryptionImpl.java similarity index 97% rename from datasafe-simple-adapter/datasafe-simple-adapter-impl/src/main/java/de/adorsys/datasafe/simple/adapter/impl/SwitchableCmsEncryptionImpl.java rename to datasafe-simple-adapter/datasafe-simple-adapter-impl/src/main/java/de/adorsys/datasafe/simple/adapter/impl/cmsencryption/SwitchableCmsEncryptionImpl.java index 990d59008..52d0790a5 100644 --- a/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/main/java/de/adorsys/datasafe/simple/adapter/impl/SwitchableCmsEncryptionImpl.java +++ b/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/main/java/de/adorsys/datasafe/simple/adapter/impl/cmsencryption/SwitchableCmsEncryptionImpl.java @@ -1,4 +1,4 @@ -package de.adorsys.datasafe.simple.adapter.impl; +package de.adorsys.datasafe.simple.adapter.impl.cmsencryption; import de.adorsys.datasafe.encrypiton.api.types.keystore.KeyID; import de.adorsys.datasafe.encrypiton.api.types.keystore.PublicKeyIDWithPublicKey; diff --git a/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/main/java/de/adorsys/datasafe/simple/adapter/impl/legacy/directory/LegacyDFSPrivateKeyServiceImpl.java b/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/main/java/de/adorsys/datasafe/simple/adapter/impl/legacy/directory/LegacyDFSPrivateKeyServiceImpl.java new file mode 100644 index 000000000..af314a848 --- /dev/null +++ b/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/main/java/de/adorsys/datasafe/simple/adapter/impl/legacy/directory/LegacyDFSPrivateKeyServiceImpl.java @@ -0,0 +1,83 @@ +package de.adorsys.datasafe.simple.adapter.impl.legacy.directory; + +import de.adorsys.datasafe.directory.api.profile.keys.DocumentKeyStoreOperations; +import de.adorsys.datasafe.directory.api.profile.keys.PrivateKeyService; +import de.adorsys.datasafe.encrypiton.api.types.UserIDAuth; +import de.adorsys.datasafe.encrypiton.api.types.keystore.KeyID; +import de.adorsys.datasafe.encrypiton.api.types.keystore.PathEncryptionSecretKey; +import de.adorsys.datasafe.encrypiton.api.types.keystore.SecretKeyIDWithKey; +import lombok.SneakyThrows; + +import javax.crypto.SecretKey; +import javax.inject.Inject; +import java.security.Key; +import java.util.Map; +import java.util.Set; +import java.util.stream.Collectors; + +import static de.adorsys.datasafe.encrypiton.api.types.keystore.KeyStoreCreationConfig.DOCUMENT_KEY_ID_PREFIX; +import static de.adorsys.datasafe.encrypiton.api.types.keystore.KeyStoreCreationConfig.PATH_KEY_ID_PREFIX; + +/** + * Retrieves and opens private keystore associated with user location DFS storage. + * Attempts to re-read keystore if not able to open it. + */ +public class LegacyDFSPrivateKeyServiceImpl implements PrivateKeyService { + + private final DocumentKeyStoreOperations keyStoreOper; + + @Inject + public LegacyDFSPrivateKeyServiceImpl(DocumentKeyStoreOperations keyStoreOper) { + this.keyStoreOper = keyStoreOper; + } + + /** + * Reads path encryption secret key from DFS and caches the result. + */ + @Override + public PathEncryptionSecretKey pathEncryptionSecretKey(UserIDAuth forUser) { + SecretKeyIDWithKey secretKeyIDWithKey = keyByPrefix(forUser, PATH_KEY_ID_PREFIX); + return new PathEncryptionSecretKey( + secretKeyIDWithKey.getKeyID(), + secretKeyIDWithKey.getSecretKey(), + secretKeyIDWithKey.getKeyID(), + secretKeyIDWithKey.getSecretKey() + ); + } + + /** + * Reads document encryption secret key from DFS and caches the result. + */ + @Override + public SecretKeyIDWithKey documentEncryptionSecretKey(UserIDAuth forUser) { + return keyByPrefix(forUser, DOCUMENT_KEY_ID_PREFIX); + } + + /** + * Reads private or secret key from DFS and caches the keystore associated with it. + */ + @Override + @SneakyThrows + public Map keysByIds(UserIDAuth forUser, Set keyIds) { + Set aliases = keyStoreOper.readAliases(forUser); + return keyIds.stream() + .filter(aliases::contains) + .collect(Collectors.toMap( + keyId -> keyId, + keyId -> keyStoreOper.getKey(forUser, keyId)) + ); + } + + private SecretKeyIDWithKey keyByPrefix(UserIDAuth forUser, String prefix) { + KeyID key = keyStoreOper.readAliases(forUser).stream() + .filter(it -> it.startsWith(prefix)) + .map(KeyID::new) + .findFirst() + .orElseThrow(() -> new IllegalArgumentException("No key with prefix: " + prefix)); + + return new SecretKeyIDWithKey( + key, + (SecretKey) keyStoreOper.getKey(forUser, key.getValue()) + ); + } +} diff --git a/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/main/java/de/adorsys/datasafe/simple/adapter/impl/legacy/pathencryption/LegacyPathDigestConfig.java b/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/main/java/de/adorsys/datasafe/simple/adapter/impl/legacy/pathencryption/LegacyPathDigestConfig.java new file mode 100644 index 000000000..a6771961e --- /dev/null +++ b/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/main/java/de/adorsys/datasafe/simple/adapter/impl/legacy/pathencryption/LegacyPathDigestConfig.java @@ -0,0 +1,22 @@ +package de.adorsys.datasafe.simple.adapter.impl.legacy.pathencryption; + +import lombok.AllArgsConstructor; +import lombok.Data; + +/** + * Configures document path encryption digest. + */ +@Data +@AllArgsConstructor +public class LegacyPathDigestConfig { + + private final String messageDigest; + private final String algorithm; + private final int shaKeyPartSize; + + public LegacyPathDigestConfig() { + this.messageDigest = "SHA-256"; + this.algorithm = "AES"; + this.shaKeyPartSize = 16; + } +} diff --git a/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/main/java/de/adorsys/datasafe/simple/adapter/impl/legacy/pathencryption/LegacyPathEncryptionImpl.java b/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/main/java/de/adorsys/datasafe/simple/adapter/impl/legacy/pathencryption/LegacyPathEncryptionImpl.java new file mode 100644 index 000000000..a4fe14ae8 --- /dev/null +++ b/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/main/java/de/adorsys/datasafe/simple/adapter/impl/legacy/pathencryption/LegacyPathEncryptionImpl.java @@ -0,0 +1,54 @@ +package de.adorsys.datasafe.simple.adapter.impl.legacy.pathencryption; + +import de.adorsys.datasafe.directory.api.profile.keys.PrivateKeyService; +import de.adorsys.datasafe.encrypiton.api.pathencryption.PathEncryption; +import de.adorsys.datasafe.encrypiton.api.types.UserIDAuth; +import de.adorsys.datasafe.encrypiton.api.types.keystore.PathEncryptionSecretKey; +import de.adorsys.datasafe.simple.adapter.api.legacy.pathencryption.LegacySymmetricPathEncryptionService; +import de.adorsys.datasafe.types.api.resource.Uri; +import lombok.extern.slf4j.Slf4j; + +import javax.inject.Inject; +import java.util.function.Function; + +/** + * Default path encryption service that uses {@link PrivateKeyService#pathEncryptionSecretKey(UserIDAuth)} as + * path encryption key. + */ +@Slf4j +public class LegacyPathEncryptionImpl implements PathEncryption { + + private final LegacySymmetricPathEncryptionService bucketPathEncryptionService; + private final PrivateKeyService privateKeyService; + + @Inject + public LegacyPathEncryptionImpl(LegacySymmetricPathEncryptionService bucketPathEncryptionService, + PrivateKeyService privateKeyService) { + this.bucketPathEncryptionService = bucketPathEncryptionService; + this.privateKeyService = privateKeyService; + } + + /** + * Simply pipes {@link LegacySymmetricPathEncryptionService} and {@link PrivateKeyService} to encrypt URI + */ + @Override + public Uri encrypt(UserIDAuth forUser, Uri path) { + PathEncryptionSecretKey keySpec = privateKeyService.pathEncryptionSecretKey(forUser); + Uri encrypt = bucketPathEncryptionService.encrypt(keySpec.getSecretKey(), path); + log.debug("encrypted path {} for user {} path {}", encrypt, forUser.getUserID(), path); + return encrypt; + } + + /** + * Simply pipes {@link LegacySymmetricPathEncryptionService} and {@link PrivateKeyService} to decrypt URI + */ + @Override + public Function decryptor(UserIDAuth forUser) { + PathEncryptionSecretKey keySpec = privateKeyService.pathEncryptionSecretKey(forUser); + return encryptedPath -> { + Uri decrypt = bucketPathEncryptionService.decrypt(keySpec.getSecretKey(), encryptedPath); + log.debug("decrypted path {} for user {} path {}", decrypt, forUser.getUserID(), encryptedPath); + return decrypt; + }; + } +} diff --git a/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/main/java/de/adorsys/datasafe/simple/adapter/impl/legacy/pathencryption/LegacyPathEncryptor.java b/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/main/java/de/adorsys/datasafe/simple/adapter/impl/legacy/pathencryption/LegacyPathEncryptor.java new file mode 100644 index 000000000..a01b72406 --- /dev/null +++ b/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/main/java/de/adorsys/datasafe/simple/adapter/impl/legacy/pathencryption/LegacyPathEncryptor.java @@ -0,0 +1,61 @@ +package de.adorsys.datasafe.simple.adapter.impl.legacy.pathencryption; + +import de.adorsys.datasafe.simple.adapter.api.legacy.pathencryption.LegacyPathEncryptionConfig; +import lombok.SneakyThrows; + +import javax.crypto.Cipher; +import javax.crypto.SecretKey; +import javax.crypto.spec.SecretKeySpec; +import javax.inject.Inject; +import java.security.MessageDigest; +import java.util.Arrays; +import java.util.Base64; + +/** + * Default path encryption/decryption that uses encryption specified by {@link LegacyPathDigestConfig} and + * encodes resulting bytes using Base64-urlsafe encoding. + */ +public class LegacyPathEncryptor implements LegacyPathEncryptionConfig { + + private final LegacyPathDigestConfig digestConfig; + + @Inject + public LegacyPathEncryptor(LegacyPathDigestConfig config) { + this.digestConfig = config; + } + + @Override + public Cipher encryptionCipher(SecretKey secretKey) { + return createCipher(secretKey, digestConfig, Cipher.ENCRYPT_MODE); + } + + @Override + public Cipher decryptionCipher(SecretKey secretKey) { + return createCipher(secretKey, digestConfig, Cipher.DECRYPT_MODE); + } + + @Override + public String byteSerializer(byte[] bytes) { + return Base64.getUrlEncoder().encodeToString(bytes); + } + + @Override + public byte[] byteDeserializer(String input) { + return Base64.getUrlDecoder().decode(input); + } + + @SneakyThrows + private static Cipher createCipher(SecretKey secretKey, LegacyPathDigestConfig config, int cipherMode) { + byte[] key = secretKey.getEncoded(); + MessageDigest sha = MessageDigest.getInstance(config.getMessageDigest()); + key = sha.digest(key); + + key = Arrays.copyOf(key, config.getShaKeyPartSize()); + + SecretKeySpec secretKeySpec = new SecretKeySpec(key, config.getAlgorithm()); + + Cipher cipher = Cipher.getInstance(config.getAlgorithm()); + cipher.init(cipherMode, secretKeySpec); + return cipher; + } +} diff --git a/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/main/java/de/adorsys/datasafe/simple/adapter/impl/legacy/pathencryption/LegacySymmetricPathEncryptionServiceImpl.java b/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/main/java/de/adorsys/datasafe/simple/adapter/impl/legacy/pathencryption/LegacySymmetricPathEncryptionServiceImpl.java new file mode 100644 index 000000000..3aac17a03 --- /dev/null +++ b/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/main/java/de/adorsys/datasafe/simple/adapter/impl/legacy/pathencryption/LegacySymmetricPathEncryptionServiceImpl.java @@ -0,0 +1,128 @@ +package de.adorsys.datasafe.simple.adapter.impl.legacy.pathencryption; + +import de.adorsys.datasafe.simple.adapter.api.legacy.pathencryption.LegacyPathEncryptionConfig; +import de.adorsys.datasafe.simple.adapter.api.legacy.pathencryption.LegacySymmetricPathEncryptionService; +import de.adorsys.datasafe.types.api.resource.Uri; +import lombok.SneakyThrows; +import lombok.extern.slf4j.Slf4j; + +import javax.crypto.Cipher; +import javax.crypto.SecretKey; +import javax.inject.Inject; +import java.net.URI; +import java.util.Arrays; +import java.util.function.Function; +import java.util.stream.Collectors; + +import static java.nio.charset.StandardCharsets.UTF_8; + +/** + * Path encryption service that maintains URI segments integrity. + * It means that path/to/file is encrypted to cipher(path)/cipher(to)/cipher(file) and each invocation of example: + * cipher(path) will yield same string. + */ +@Slf4j +public class LegacySymmetricPathEncryptionServiceImpl implements LegacySymmetricPathEncryptionService { + + private static final String PATH_SEPARATOR = "/"; + + private final LegacyPathEncryptionConfig encryptionConfig; + + @Inject + public LegacySymmetricPathEncryptionServiceImpl(LegacyPathEncryptionConfig encryptionConfig) { + this.encryptionConfig = encryptionConfig; + } + + /** + * Encrypts each URI segment separately and composes them back in same order. + */ + @Override + @SneakyThrows + public Uri encrypt(SecretKey secretKey, Uri bucketPath) { + validateArgs(secretKey, bucketPath); + validateUriIsRelative(bucketPath); + + Cipher cipher = encryptionConfig.encryptionCipher(secretKey); + + return processURIparts( + bucketPath, + str -> encode(str, cipher) + ); + } + + /** + * Decrypts each URI segment separately and composes them back in same order. + */ + @Override + @SneakyThrows + public Uri decrypt(SecretKey secretKey, Uri bucketPath) { + validateArgs(secretKey, bucketPath); + validateUriIsRelative(bucketPath); + + Cipher cipher = encryptionConfig.decryptionCipher(secretKey); + + return processURIparts( + bucketPath, + str -> decode(str, cipher) + ); + } + + @SneakyThrows + private String decode(String str, Cipher cipher) { + if (str.isEmpty()) { + return str; + } + + return new String(cipher.doFinal(encryptionConfig.byteDeserializer(str)), UTF_8); + } + + @SneakyThrows + private String encode(String str, Cipher cipher) { + if (str.isEmpty()) { + return str; + } + + return encryptionConfig.byteSerializer(cipher.doFinal(str.getBytes(UTF_8))); + } + + private static Uri processURIparts( + Uri bucketPath, + Function process) { + StringBuilder result = new StringBuilder(); + + String path = bucketPath.getRawPath(); + if (bucketPath.getRawPath().startsWith("./")) { + result.append("./"); + path = bucketPath.getRawPath().substring(2); + } + + if (path.isEmpty()) { + return new Uri(result.toString()); + } + + // Resulting value of `path` is URL-safe + return new Uri( + URI.create( + Arrays.stream(path.split(PATH_SEPARATOR, -1)) + .map(process) + .collect(Collectors.joining(PATH_SEPARATOR)) + ) + ); + } + + private static void validateArgs(SecretKey secretKey, Uri bucketPath) { + if (null == secretKey) { + throw new IllegalArgumentException("Secret key should not be null"); + } + + if (null == bucketPath) { + throw new IllegalArgumentException("Bucket path should not be null"); + } + } + + private static void validateUriIsRelative(Uri uri) { + if (uri.isAbsolute()) { + throw new IllegalArgumentException("URI should be relative"); + } + } +} diff --git a/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/main/java/de/adorsys/datasafe/simple/adapter/impl/pathencryption/LegacyCredentialsModule.java b/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/main/java/de/adorsys/datasafe/simple/adapter/impl/pathencryption/LegacyCredentialsModule.java new file mode 100644 index 000000000..ec162f886 --- /dev/null +++ b/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/main/java/de/adorsys/datasafe/simple/adapter/impl/pathencryption/LegacyCredentialsModule.java @@ -0,0 +1,94 @@ +package de.adorsys.datasafe.simple.adapter.impl.pathencryption; + +import com.google.common.cache.Cache; +import com.google.common.cache.CacheBuilder; +import dagger.Binds; +import dagger.Module; +import dagger.Provides; +import de.adorsys.datasafe.directory.api.profile.dfs.BucketAccessService; +import de.adorsys.datasafe.directory.api.profile.keys.DocumentKeyStoreOperations; +import de.adorsys.datasafe.directory.api.profile.keys.PrivateKeyService; +import de.adorsys.datasafe.directory.api.profile.keys.PublicKeyService; +import de.adorsys.datasafe.directory.api.profile.keys.StorageKeyStoreOperations; +import de.adorsys.datasafe.directory.impl.profile.dfs.BucketAccessServiceImplRuntimeDelegatable; +import de.adorsys.datasafe.directory.impl.profile.keys.*; +import de.adorsys.datasafe.encrypiton.api.types.UserID; +import de.adorsys.datasafe.encrypiton.api.types.keystore.PublicKeyIDWithPublicKey; +import de.adorsys.datasafe.simple.adapter.impl.legacy.directory.LegacyDFSPrivateKeyServiceImpl; +import de.adorsys.datasafe.types.api.context.overrides.OverridesRegistry; + +import javax.annotation.Nullable; +import javax.inject.Singleton; +import java.security.KeyStore; +import java.util.List; +import java.util.concurrent.TimeUnit; +import java.util.function.Supplier; + +/** + * This module is responsible for credentials access - either user or dfs. + */ +@Module +public abstract class LegacyCredentialsModule { + + /** + * Default keystore and public key Guava-based cache. If one can't afford that some instances + * may not see that storage access credentials were removed (for some time window they will be available) + * or keystore password has changed, they can use any distributed cache available. But for most use cases + * it is ok. + */ + @Provides + @Singleton + static KeyStoreCache keyStoreCache(@Nullable OverridesRegistry registry) { + + Supplier> cacheKeystore = () -> CacheBuilder.newBuilder() + .initialCapacity(1000) + // for this interval removed storage access key/changed keystore might not be seen + .expireAfterWrite(15, TimeUnit.MINUTES) + .build(); + + // These are actually static, so we can afford longer expiry time + Supplier>> cachePubKeys = () -> CacheBuilder.newBuilder() + .initialCapacity(1000) + .expireAfterWrite(60, TimeUnit.MINUTES) + .build(); + + return new DefaultKeyStoreCacheRuntimeDelegatable( + registry, + cachePubKeys.get().asMap(), + cacheKeystore.get().asMap(), + // it will generate new instance here + cacheKeystore.get().asMap() + ); + } + + /** + * Default no-op service to get credentials to access filesystem. + */ + @Binds + abstract BucketAccessService bucketAccessService(BucketAccessServiceImplRuntimeDelegatable impl); + + /** + * Default public key service that reads user public keys from the location specified by his profile inside DFS. + */ + @Binds + abstract PublicKeyService publicKeyService(DFSPublicKeyServiceImplRuntimeDelegatable impl); + + /** + * Keystore(document) operations class that hides keystore access from other components. + */ + @Binds + abstract DocumentKeyStoreOperations docKeyStoreOperations(DocumentKeyStoreOperationsImplRuntimeDelegatable impl); + + /** + * Keystore(storage credentials) operations class that hides keystore access from other components. + */ + @Binds + abstract StorageKeyStoreOperations storageKeyStoreOperations(StorageKeyStoreOperationsImplRuntimeDelegatable impl); + + /** + * Default private key service that reads user private/secret keys from the location specified by his + * profile inside DFS. + */ + @Binds + abstract PrivateKeyService privateKeyService(LegacyDFSPrivateKeyServiceImpl impl); +} diff --git a/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/main/java/de/adorsys/datasafe/simple/adapter/impl/pathencryption/LegacyPathEncryptionModule.java b/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/main/java/de/adorsys/datasafe/simple/adapter/impl/pathencryption/LegacyPathEncryptionModule.java new file mode 100644 index 000000000..22fda4377 --- /dev/null +++ b/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/main/java/de/adorsys/datasafe/simple/adapter/impl/pathencryption/LegacyPathEncryptionModule.java @@ -0,0 +1,46 @@ +package de.adorsys.datasafe.simple.adapter.impl.pathencryption; + +import dagger.Binds; +import dagger.Module; +import dagger.Provides; +import de.adorsys.datasafe.encrypiton.api.pathencryption.PathEncryption; +import de.adorsys.datasafe.simple.adapter.api.legacy.pathencryption.LegacyPathEncryptionConfig; +import de.adorsys.datasafe.simple.adapter.api.legacy.pathencryption.LegacySymmetricPathEncryptionService; +import de.adorsys.datasafe.simple.adapter.impl.legacy.pathencryption.LegacyPathDigestConfig; +import de.adorsys.datasafe.simple.adapter.impl.legacy.pathencryption.LegacyPathEncryptor; +import de.adorsys.datasafe.simple.adapter.impl.legacy.pathencryption.LegacySymmetricPathEncryptionServiceImpl; + +/** + * This module is responsible for providing pathencryption of document. + */ +@Module +public abstract class LegacyPathEncryptionModule { + + /** + * Default path digest that specifies AES and SHA-256 for path encryption. + */ + @Provides + static LegacyPathDigestConfig digestConfig() { + return new LegacyPathDigestConfig(); + } + + /** + * Default path encryption that uses Base64-urlsafe path serialization + */ + @Binds + abstract LegacyPathEncryptionConfig config(LegacyPathEncryptor config); + + /** + * By default simply use + * {@link de.adorsys.datasafe.directory.api.profile.keys.PrivateKeyService} to get key + * and pass path with key to {@link LegacySymmetricPathEncryptionService} + */ + @Binds + abstract PathEncryption pathEncryption(SwitchablePathEncryptionImpl impl); + + /** + * Default symmetric path encryption that encrypts URI segment-by-segment. + */ + @Binds + abstract LegacySymmetricPathEncryptionService bucketPathEncryptionService(LegacySymmetricPathEncryptionServiceImpl impl); +} diff --git a/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/main/java/de/adorsys/datasafe/simple/adapter/impl/SwitchablePathEncryptionImpl.java b/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/main/java/de/adorsys/datasafe/simple/adapter/impl/pathencryption/SwitchablePathEncryptionImpl.java similarity index 76% rename from datasafe-simple-adapter/datasafe-simple-adapter-impl/src/main/java/de/adorsys/datasafe/simple/adapter/impl/SwitchablePathEncryptionImpl.java rename to datasafe-simple-adapter/datasafe-simple-adapter-impl/src/main/java/de/adorsys/datasafe/simple/adapter/impl/pathencryption/SwitchablePathEncryptionImpl.java index a468009be..456823710 100644 --- a/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/main/java/de/adorsys/datasafe/simple/adapter/impl/SwitchablePathEncryptionImpl.java +++ b/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/main/java/de/adorsys/datasafe/simple/adapter/impl/pathencryption/SwitchablePathEncryptionImpl.java @@ -1,9 +1,9 @@ -package de.adorsys.datasafe.simple.adapter.impl; +package de.adorsys.datasafe.simple.adapter.impl.pathencryption; import de.adorsys.datasafe.directory.api.profile.keys.PrivateKeyService; -import de.adorsys.datasafe.encrypiton.api.pathencryption.encryption.SymmetricPathEncryptionService; import de.adorsys.datasafe.encrypiton.api.types.UserIDAuth; -import de.adorsys.datasafe.encrypiton.impl.pathencryption.PathEncryptionImpl; +import de.adorsys.datasafe.simple.adapter.api.legacy.pathencryption.LegacySymmetricPathEncryptionService; +import de.adorsys.datasafe.simple.adapter.impl.legacy.pathencryption.LegacyPathEncryptionImpl; import de.adorsys.datasafe.types.api.resource.Uri; import lombok.extern.slf4j.Slf4j; @@ -11,14 +11,14 @@ import java.util.function.Function; @Slf4j -public class SwitchablePathEncryptionImpl extends PathEncryptionImpl { +public class SwitchablePathEncryptionImpl extends LegacyPathEncryptionImpl { public static final String NO_BUCKETPATH_ENCRYPTION = "SC-NO-BUCKETPATH-ENCRYPTION"; private boolean withPathEncryption = checkIsPathEncryptionToUse(); @Inject - public SwitchablePathEncryptionImpl(SymmetricPathEncryptionService bucketPathEncryptionService, PrivateKeyService privateKeyService) { + public SwitchablePathEncryptionImpl(LegacySymmetricPathEncryptionService bucketPathEncryptionService, PrivateKeyService privateKeyService) { super(bucketPathEncryptionService, privateKeyService); } diff --git a/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/main/java/de/adorsys/datasafe/simple/adapter/impl/profile/DFSRelativeProfileRegistrationService.java b/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/main/java/de/adorsys/datasafe/simple/adapter/impl/profile/DFSRelativeProfileRegistrationServiceImpl.java similarity index 63% rename from datasafe-simple-adapter/datasafe-simple-adapter-impl/src/main/java/de/adorsys/datasafe/simple/adapter/impl/profile/DFSRelativeProfileRegistrationService.java rename to datasafe-simple-adapter/datasafe-simple-adapter-impl/src/main/java/de/adorsys/datasafe/simple/adapter/impl/profile/DFSRelativeProfileRegistrationServiceImpl.java index 59ff42c2c..c0c72aff7 100644 --- a/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/main/java/de/adorsys/datasafe/simple/adapter/impl/profile/DFSRelativeProfileRegistrationService.java +++ b/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/main/java/de/adorsys/datasafe/simple/adapter/impl/profile/DFSRelativeProfileRegistrationServiceImpl.java @@ -11,19 +11,22 @@ import de.adorsys.datasafe.storage.api.actions.StorageCheckService; import de.adorsys.datasafe.storage.api.actions.StorageWriteService; +import javax.inject.Inject; + /** * This service does not store user profile files, assuming profile paths are hardcoded relative to system root or * accessible using {@link DFSConfig} */ -public class DFSRelativeProfileRegistrationService extends ProfileRegistrationServiceImpl { +public class DFSRelativeProfileRegistrationServiceImpl extends ProfileRegistrationServiceImpl { - public DFSRelativeProfileRegistrationService(StorageKeyStoreOperations storageKeyStoreOper, - DocumentKeyStoreOperations keyStoreOper, - BucketAccessService access, - StorageCheckService checkService, - StorageWriteService writeService, - GsonSerde serde, - DFSConfig dfsConfig) { + @Inject + public DFSRelativeProfileRegistrationServiceImpl(StorageKeyStoreOperations storageKeyStoreOper, + DocumentKeyStoreOperations keyStoreOper, + BucketAccessService access, + StorageCheckService checkService, + StorageWriteService writeService, + GsonSerde serde, + DFSConfig dfsConfig) { super(null, storageKeyStoreOper, keyStoreOper, access, checkService, writeService, serde, dfsConfig); } diff --git a/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/main/java/de/adorsys/datasafe/simple/adapter/impl/profile/DFSRelativeProfileRemovalServiceImpl.java b/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/main/java/de/adorsys/datasafe/simple/adapter/impl/profile/DFSRelativeProfileRemovalServiceImpl.java index 4fcfd1161..ba77a30ef 100644 --- a/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/main/java/de/adorsys/datasafe/simple/adapter/impl/profile/DFSRelativeProfileRemovalServiceImpl.java +++ b/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/main/java/de/adorsys/datasafe/simple/adapter/impl/profile/DFSRelativeProfileRemovalServiceImpl.java @@ -10,12 +10,15 @@ import de.adorsys.datasafe.storage.api.actions.StorageListService; import de.adorsys.datasafe.storage.api.actions.StorageRemoveService; +import javax.inject.Inject; + /** * This service cleans up all users' files except profile json files. It assumes that user profile files does not * exist. */ public class DFSRelativeProfileRemovalServiceImpl extends ProfileRemovalServiceImpl { + @Inject public DFSRelativeProfileRemovalServiceImpl( PrivateKeyService privateKeyService, KeyStoreCache keyStoreCache, diff --git a/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/main/java/de/adorsys/datasafe/simple/adapter/impl/profile/DFSRelativeProfileRetrievalServiceImpl.java b/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/main/java/de/adorsys/datasafe/simple/adapter/impl/profile/DFSRelativeProfileRetrievalServiceImpl.java index ce8a36148..eb459e38c 100644 --- a/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/main/java/de/adorsys/datasafe/simple/adapter/impl/profile/DFSRelativeProfileRetrievalServiceImpl.java +++ b/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/main/java/de/adorsys/datasafe/simple/adapter/impl/profile/DFSRelativeProfileRetrievalServiceImpl.java @@ -12,6 +12,8 @@ import de.adorsys.datasafe.storage.api.actions.StorageCheckService; import lombok.extern.slf4j.Slf4j; +import javax.inject.Inject; + /** * This service ignores profiles stored at some external location and instead assumes that all files are relative * to system root. @@ -23,6 +25,7 @@ public class DFSRelativeProfileRetrievalServiceImpl extends ProfileRetrievalServ private final StorageCheckService checkService; private final BucketAccessService access; + @Inject public DFSRelativeProfileRetrievalServiceImpl(DFSConfig dfsConfig, StorageCheckService checkService, BucketAccessService access) { super(null, null, null, null, null, null); diff --git a/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/main/java/de/adorsys/datasafe/simple/adapter/impl/profile/DFSRelativeProfileUpdatingServiceImpl.java b/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/main/java/de/adorsys/datasafe/simple/adapter/impl/profile/DFSRelativeProfileUpdatingServiceImpl.java new file mode 100644 index 000000000..434e9ac25 --- /dev/null +++ b/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/main/java/de/adorsys/datasafe/simple/adapter/impl/profile/DFSRelativeProfileUpdatingServiceImpl.java @@ -0,0 +1,54 @@ +package de.adorsys.datasafe.simple.adapter.impl.profile; + +import de.adorsys.datasafe.directory.api.config.DFSConfig; +import de.adorsys.datasafe.directory.api.profile.keys.DocumentKeyStoreOperations; +import de.adorsys.datasafe.directory.api.profile.keys.PrivateKeyService; +import de.adorsys.datasafe.directory.api.profile.keys.StorageKeyStoreOperations; +import de.adorsys.datasafe.directory.api.types.StorageCredentials; +import de.adorsys.datasafe.directory.api.types.UserPrivateProfile; +import de.adorsys.datasafe.directory.api.types.UserPublicProfile; +import de.adorsys.datasafe.directory.impl.profile.operations.actions.ProfileUpdatingServiceImpl; +import de.adorsys.datasafe.encrypiton.api.types.UserIDAuth; +import de.adorsys.datasafe.encrypiton.api.types.keystore.ReadKeyPassword; +import de.adorsys.datasafe.types.api.resource.StorageIdentifier; + +import javax.inject.Inject; + +/** + * This service does not store user profile files, assuming profile paths are hardcoded relative to system root or + * accessible using {@link DFSConfig} + */ +public class DFSRelativeProfileUpdatingServiceImpl extends ProfileUpdatingServiceImpl { + + @Inject + public DFSRelativeProfileUpdatingServiceImpl(PrivateKeyService privateKeyService, + StorageKeyStoreOperations storageKeyStoreOper, + DocumentKeyStoreOperations keyStoreOper) { + super(null, privateKeyService, storageKeyStoreOper, keyStoreOper); + } + + @Override + public void updatePublicProfile(UserIDAuth forUser, UserPublicProfile profile) { + // NOP + } + + @Override + public void updatePrivateProfile(UserIDAuth forUser, UserPrivateProfile profile) { + // NOP + } + + @Override + public void updateReadKeyPassword(UserIDAuth forUser, ReadKeyPassword newPassword) { + super.updateReadKeyPassword(forUser, newPassword); + } + + @Override + public void registerStorageCredentials(UserIDAuth user, StorageIdentifier storageId, StorageCredentials credentials) { + super.registerStorageCredentials(user, storageId, credentials); + } + + @Override + public void deregisterStorageCredentials(UserIDAuth user, StorageIdentifier storageId) { + super.deregisterStorageCredentials(user, storageId); + } +} diff --git a/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/main/java/de/adorsys/datasafe/simple/adapter/impl/profile/HardcodedProfileModule.java b/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/main/java/de/adorsys/datasafe/simple/adapter/impl/profile/HardcodedProfileModule.java new file mode 100644 index 000000000..b7a7c64a3 --- /dev/null +++ b/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/main/java/de/adorsys/datasafe/simple/adapter/impl/profile/HardcodedProfileModule.java @@ -0,0 +1,48 @@ +package de.adorsys.datasafe.simple.adapter.impl.profile; + +import dagger.Binds; +import dagger.Module; +import de.adorsys.datasafe.directory.api.profile.operations.*; +import de.adorsys.datasafe.directory.api.resource.ResourceResolver; +import de.adorsys.datasafe.directory.impl.profile.operations.DFSBasedProfileStorageImplRuntimeDelegatable; +import de.adorsys.datasafe.directory.impl.profile.resource.ResourceResolverImplRuntimeDelegatable; + +@Module +public abstract class HardcodedProfileModule { + + /** + * Default profile reading service that simply reads json files with serialized public/private located on DFS. + */ + @Binds + abstract ProfileRetrievalService profileRetrievalService(DFSRelativeProfileRetrievalServiceImpl impl); + + /** + * Default profile creation service that simply creates keystore, public keys, user profile json files on DFS. + */ + @Binds + abstract ProfileRegistrationService creationService(DFSRelativeProfileRegistrationServiceImpl impl); + + /** + * Default profile updating service. + */ + @Binds + abstract ProfileUpdatingService updatingService(DFSRelativeProfileUpdatingServiceImpl impl); + + /** + * Default profile removal service. + */ + @Binds + abstract ProfileRemovalService removalService(DFSRelativeProfileRemovalServiceImpl impl); + + /** + * Resource resolver that simply prepends relevant path segment from profile based on location type. + */ + @Binds + abstract ResourceResolver resourceResolver(ResourceResolverImplRuntimeDelegatable impl); + + /** + * Aggregate service for profile operations. + */ + @Binds + abstract ProfileOperations profileService(DFSBasedProfileStorageImplRuntimeDelegatable impl); +} diff --git a/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/test/java/de/adorsys/datasafe/simple/adapter/impl/SimpleAdapterFeatureTest.java b/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/test/java/de/adorsys/datasafe/simple/adapter/impl/SimpleAdapterFeatureTest.java index 0a26bae47..a2a7235b4 100644 --- a/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/test/java/de/adorsys/datasafe/simple/adapter/impl/SimpleAdapterFeatureTest.java +++ b/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/test/java/de/adorsys/datasafe/simple/adapter/impl/SimpleAdapterFeatureTest.java @@ -4,6 +4,8 @@ import de.adorsys.datasafe.encrypiton.api.types.UserIDAuth; import de.adorsys.datasafe.encrypiton.api.types.keystore.ReadKeyPassword; import de.adorsys.datasafe.simple.adapter.api.types.*; +import de.adorsys.datasafe.simple.adapter.impl.cmsencryption.SwitchableCmsEncryptionImpl; +import de.adorsys.datasafe.simple.adapter.impl.pathencryption.SwitchablePathEncryptionImpl; import de.adorsys.datasafe.types.api.resource.AbsoluteLocation; import de.adorsys.datasafe.types.api.resource.BasePrivateResource; import de.adorsys.datasafe.types.api.resource.PrivateResource; From 56de3058935972f9118698329a6f741e7d34b8e4 Mon Sep 17 00:00:00 2001 From: Maxim Grischenko Date: Tue, 17 Sep 2019 16:50:27 +0200 Subject: [PATCH 090/255] version in begin of path --- .../SymmetricPathEncryptionServiceImpl.java | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/pathencryption/SymmetricPathEncryptionServiceImpl.java b/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/pathencryption/SymmetricPathEncryptionServiceImpl.java index 471c9cc8a..f5725e714 100644 --- a/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/pathencryption/SymmetricPathEncryptionServiceImpl.java +++ b/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/pathencryption/SymmetricPathEncryptionServiceImpl.java @@ -51,7 +51,7 @@ public Uri encrypt(SecretKey secretKey, Uri bucketPath) { bucketPath, str -> encode(str, cipher) ); - return new Uri(URI.create(uri.getPath() + PathEncryptionVersion.AES_SIV.getName())); + return new Uri(PathEncryptionVersion.AES_SIV.getName() + "/").resolve(uri); } /** @@ -64,14 +64,7 @@ public Uri decrypt(SecretKey secretKey, Uri bucketPath) { validateUriIsRelative(bucketPath); Cipher cipher = encryptionConfig.decryptionCipher(secretKey); - - String path = bucketPath.getPath(); - String pathEncryptionName = path.substring(path.length() - 3); - if (Stream.of(PathEncryptionVersion.values()).map(PathEncryptionVersion::getName).collect(Collectors.toSet()) - .contains(pathEncryptionName)) { - bucketPath = new Uri(URI.create(path.substring(0, path.length() - 3))); - } - + bucketPath = new Uri(PathEncryptionVersion.AES_SIV.getName() + "/").relativize(bucketPath); return processURIparts( bucketPath, str -> decode(str, cipher) From 18be96f5d47ac9e9665eac9eec22a99d0d2b95b2 Mon Sep 17 00:00:00 2001 From: Maxim Grischenko Date: Tue, 17 Sep 2019 17:21:48 +0200 Subject: [PATCH 091/255] test fix --- .../business/impl/e2e/SchemeDelegationWithDbTest.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/SchemeDelegationWithDbTest.java b/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/SchemeDelegationWithDbTest.java index 3412e50a6..7587f7077 100644 --- a/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/SchemeDelegationWithDbTest.java +++ b/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/SchemeDelegationWithDbTest.java @@ -15,6 +15,7 @@ import de.adorsys.datasafe.storage.impl.fs.FileSystemStorageService; import de.adorsys.datasafe.teststorage.WithStorageProvider; import de.adorsys.datasafe.types.api.actions.WriteRequest; +import de.adorsys.datasafe.types.api.global.PathEncryptionVersion; import de.adorsys.datasafe.types.api.resource.AbsoluteLocation; import de.adorsys.datasafe.types.api.resource.BasePrivateResource; import de.adorsys.datasafe.types.api.resource.Uri; @@ -85,7 +86,8 @@ void testProfileOnDbDataOnFsWorks() { assertThat(listDb("jdbc://localhost:9999/h2:mem:test/public_profiles/")) .containsExactly("jdbc://localhost:9999/h2:mem:test/public_profiles/john"); - Path encryptedFile = Files.walk(fsPath.resolve("users/john/private/files/")).collect(Collectors.toList()).get(1); + Path path = fsPath.resolve("users/john/private/files/" + PathEncryptionVersion.AES_SIV.getName() + "/"); + Path encryptedFile = Files.walk(path).collect(Collectors.toList()).get(1); // File and keystore/pub keys are on FS assertThat(Files.walk(fsPath)) .extracting(it -> fsPath.relativize(it)) @@ -99,6 +101,7 @@ void testProfileOnDbDataOnFsWorks() { "users/john/private", "users/john/private/keystore", "users/john/private/files", + "users/john/private/files/SIV", fsPath.relativize(encryptedFile).toString() ); } From e499cf3f2adc348a41c4c7f13f917f3fe0a41e84 Mon Sep 17 00:00:00 2001 From: Valentyn Berezin Date: Tue, 17 Sep 2019 18:47:59 +0300 Subject: [PATCH 092/255] DOC-266. Small refactoring of algorithm id --- .../impl/e2e/SchemeDelegationWithDbTest.java | 4 +-- .../SymmetricPathEncryptionServiceImpl.java | 8 +++--- .../types/api/global/PathEncryptionId.java | 28 +++++++++++++++++++ .../api/global/PathEncryptionVersion.java | 15 ---------- 4 files changed, 34 insertions(+), 21 deletions(-) create mode 100644 datasafe-types-api/src/main/java/de/adorsys/datasafe/types/api/global/PathEncryptionId.java delete mode 100644 datasafe-types-api/src/main/java/de/adorsys/datasafe/types/api/global/PathEncryptionVersion.java diff --git a/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/SchemeDelegationWithDbTest.java b/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/SchemeDelegationWithDbTest.java index 7587f7077..e53666b2f 100644 --- a/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/SchemeDelegationWithDbTest.java +++ b/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/SchemeDelegationWithDbTest.java @@ -15,7 +15,7 @@ import de.adorsys.datasafe.storage.impl.fs.FileSystemStorageService; import de.adorsys.datasafe.teststorage.WithStorageProvider; import de.adorsys.datasafe.types.api.actions.WriteRequest; -import de.adorsys.datasafe.types.api.global.PathEncryptionVersion; +import de.adorsys.datasafe.types.api.global.PathEncryptionId; import de.adorsys.datasafe.types.api.resource.AbsoluteLocation; import de.adorsys.datasafe.types.api.resource.BasePrivateResource; import de.adorsys.datasafe.types.api.resource.Uri; @@ -86,7 +86,7 @@ void testProfileOnDbDataOnFsWorks() { assertThat(listDb("jdbc://localhost:9999/h2:mem:test/public_profiles/")) .containsExactly("jdbc://localhost:9999/h2:mem:test/public_profiles/john"); - Path path = fsPath.resolve("users/john/private/files/" + PathEncryptionVersion.AES_SIV.getName() + "/"); + Path path = fsPath.resolve("users/john/private/files/" + PathEncryptionId.AES_SIV.getName() + "/"); Path encryptedFile = Files.walk(path).collect(Collectors.toList()).get(1); // File and keystore/pub keys are on FS assertThat(Files.walk(fsPath)) diff --git a/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/pathencryption/SymmetricPathEncryptionServiceImpl.java b/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/pathencryption/SymmetricPathEncryptionServiceImpl.java index f5725e714..9133857f0 100644 --- a/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/pathencryption/SymmetricPathEncryptionServiceImpl.java +++ b/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/pathencryption/SymmetricPathEncryptionServiceImpl.java @@ -2,7 +2,6 @@ import de.adorsys.datasafe.encrypiton.api.pathencryption.encryption.SymmetricPathEncryptionService; import de.adorsys.datasafe.types.api.context.annotations.RuntimeDelegate; -import de.adorsys.datasafe.types.api.global.PathEncryptionVersion; import de.adorsys.datasafe.types.api.resource.Uri; import lombok.SneakyThrows; import lombok.extern.slf4j.Slf4j; @@ -14,8 +13,8 @@ import java.util.Arrays; import java.util.function.Function; import java.util.stream.Collectors; -import java.util.stream.Stream; +import static de.adorsys.datasafe.types.api.global.PathEncryptionId.AES_SIV; import static java.nio.charset.StandardCharsets.UTF_8; /** @@ -51,7 +50,8 @@ public Uri encrypt(SecretKey secretKey, Uri bucketPath) { bucketPath, str -> encode(str, cipher) ); - return new Uri(PathEncryptionVersion.AES_SIV.getName() + "/").resolve(uri); + + return AES_SIV.asUriRoot().resolve(uri); } /** @@ -64,7 +64,7 @@ public Uri decrypt(SecretKey secretKey, Uri bucketPath) { validateUriIsRelative(bucketPath); Cipher cipher = encryptionConfig.decryptionCipher(secretKey); - bucketPath = new Uri(PathEncryptionVersion.AES_SIV.getName() + "/").relativize(bucketPath); + bucketPath = AES_SIV.asUriRoot().relativize(bucketPath); return processURIparts( bucketPath, str -> decode(str, cipher) diff --git a/datasafe-types-api/src/main/java/de/adorsys/datasafe/types/api/global/PathEncryptionId.java b/datasafe-types-api/src/main/java/de/adorsys/datasafe/types/api/global/PathEncryptionId.java new file mode 100644 index 000000000..ce73c0f4c --- /dev/null +++ b/datasafe-types-api/src/main/java/de/adorsys/datasafe/types/api/global/PathEncryptionId.java @@ -0,0 +1,28 @@ +package de.adorsys.datasafe.types.api.global; + +import de.adorsys.datasafe.types.api.resource.Uri; +import lombok.Getter; + +/** + * Identifies what algorithm was used to encrypt path. + */ +@Getter +public enum PathEncryptionId { + + AES_SIV("SIV"); + + // Should be 3-symbol string + private final String name; + + PathEncryptionId(String name) { + if (name.length() > 3) { + throw new IllegalArgumentException("Too long encryption identifier name, 3 characters expected"); + } + + this.name = name; + } + + public Uri asUriRoot() { + return new Uri(name + "/"); + } +} diff --git a/datasafe-types-api/src/main/java/de/adorsys/datasafe/types/api/global/PathEncryptionVersion.java b/datasafe-types-api/src/main/java/de/adorsys/datasafe/types/api/global/PathEncryptionVersion.java deleted file mode 100644 index 2ad9e7398..000000000 --- a/datasafe-types-api/src/main/java/de/adorsys/datasafe/types/api/global/PathEncryptionVersion.java +++ /dev/null @@ -1,15 +0,0 @@ -package de.adorsys.datasafe.types.api.global; - -import lombok.Getter; -import lombok.RequiredArgsConstructor; - -@Getter -@RequiredArgsConstructor -public enum PathEncryptionVersion { - - AES_SIV("SIV"); - - - // Should be 3-symbol string. Always added at the end of encrypted path - private final String name; -} From f8c97881102d0b72970e41fd5ddefdec7cfa22f2 Mon Sep 17 00:00:00 2001 From: Valentyn Berezin Date: Tue, 17 Sep 2019 18:50:15 +0300 Subject: [PATCH 093/255] DOC-239. Drop compatibility test --- .../impl/e2e/Datasafe043CompatTest.java | 138 ------------------ .../compat-0.4.3/profiles/private/jane | 1 - .../compat-0.4.3/profiles/private/john | 1 - .../compat-0.4.3/profiles/public/jane | 1 - .../compat-0.4.3/profiles/public/john | 1 - .../3_FBQ7knNcCKL1rPDE5Mmg== | Bin 210 -> 0 bytes .../compat-0.4.3/users/jane/private/keystore | Bin 4656 -> 0 bytes .../compat-0.4.3/users/jane/public/pubkeys | 1 - .../compat-0.4.3/users/john/private/keystore | Bin 4656 -> 0 bytes .../users/john/public/inbox/hello.txt | Bin 431 -> 0 bytes .../compat-0.4.3/users/john/public/pubkeys | 1 - 11 files changed, 144 deletions(-) delete mode 100644 datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/Datasafe043CompatTest.java delete mode 100644 datasafe-business/src/test/resources/compat-0.4.3/profiles/private/jane delete mode 100644 datasafe-business/src/test/resources/compat-0.4.3/profiles/private/john delete mode 100644 datasafe-business/src/test/resources/compat-0.4.3/profiles/public/jane delete mode 100644 datasafe-business/src/test/resources/compat-0.4.3/profiles/public/john delete mode 100644 datasafe-business/src/test/resources/compat-0.4.3/users/jane/private/files/Qc5BJaNqSbbSBoHUmrYhEQ==/3_FBQ7knNcCKL1rPDE5Mmg== delete mode 100644 datasafe-business/src/test/resources/compat-0.4.3/users/jane/private/keystore delete mode 100644 datasafe-business/src/test/resources/compat-0.4.3/users/jane/public/pubkeys delete mode 100644 datasafe-business/src/test/resources/compat-0.4.3/users/john/private/keystore delete mode 100644 datasafe-business/src/test/resources/compat-0.4.3/users/john/public/inbox/hello.txt delete mode 100644 datasafe-business/src/test/resources/compat-0.4.3/users/john/public/pubkeys diff --git a/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/Datasafe043CompatTest.java b/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/Datasafe043CompatTest.java deleted file mode 100644 index cb8b8b971..000000000 --- a/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/Datasafe043CompatTest.java +++ /dev/null @@ -1,138 +0,0 @@ -package de.adorsys.datasafe.business.impl.e2e; - -import com.google.common.io.ByteStreams; -import de.adorsys.datasafe.business.impl.service.DaggerDefaultDatasafeServices; -import de.adorsys.datasafe.business.impl.service.DefaultDatasafeServices; -import de.adorsys.datasafe.directory.impl.profile.config.DefaultDFSConfig; -import de.adorsys.datasafe.encrypiton.api.types.UserID; -import de.adorsys.datasafe.encrypiton.api.types.UserIDAuth; -import de.adorsys.datasafe.encrypiton.api.types.keystore.ReadKeyPassword; -import de.adorsys.datasafe.storage.impl.fs.FileSystemStorageService; -import de.adorsys.datasafe.types.api.actions.ReadRequest; -import de.adorsys.datasafe.types.api.actions.WriteRequest; -import de.adorsys.datasafe.types.api.shared.BaseMockitoTest; -import de.adorsys.datasafe.types.api.shared.Dirs; -import de.adorsys.datasafe.types.api.shared.Resources; -import lombok.SneakyThrows; -import org.bouncycastle.jce.provider.BouncyCastleProvider; -import org.junit.jupiter.api.BeforeEach; -import org.junit.jupiter.api.Test; -import org.junit.jupiter.api.io.TempDir; - -import java.io.InputStream; -import java.io.OutputStream; -import java.nio.file.Files; -import java.nio.file.Path; -import java.security.Security; -import java.util.Collections; -import java.util.List; -import java.util.stream.Collectors; - -import static org.assertj.core.api.Assertions.assertThat; - -/** - * This test ensures that Datasafe can use setup and folder structure from version 0.4.3 (backward compatibility) - */ -class Datasafe043CompatTest extends BaseMockitoTest { - - private static final String BASE_FIXTURE = "compat-0.4.3"; - private static final String OLD_ROOT = - "file:/var/folders/3w/fzdgs28j1_b3r4y8x9_s4wpw0000gn/T/junit4892767241345613098/"; - - private UserIDAuth john = new UserIDAuth(new UserID("john"), new ReadKeyPassword("secure-password john")); - private UserIDAuth jane = new UserIDAuth(new UserID("jane"), new ReadKeyPassword("secure-password jane")); - - private DefaultDatasafeServices datasafe; - private Path dfsRoot; - - @SneakyThrows - @BeforeEach - void extractFixtureAndPrepare(@TempDir Path tempDir) { - Security.addProvider(new BouncyCastleProvider()); - dfsRoot = tempDir; - - Resources.copyResourceDir(BASE_FIXTURE, tempDir); - // Replace original root with new root: - replace(tempDir.resolve("profiles/private/jane"), OLD_ROOT, tempDir.toUri().toString()); - replace(tempDir.resolve("profiles/private/john"), OLD_ROOT, tempDir.toUri().toString()); - replace(tempDir.resolve("profiles/public/jane"), OLD_ROOT, tempDir.toUri().toString()); - replace(tempDir.resolve("profiles/public/john"), OLD_ROOT, tempDir.toUri().toString()); - - datasafe = DaggerDefaultDatasafeServices.builder() - .config(new DefaultDFSConfig(tempDir.toUri(), "PAZZWORD")) - .storage(new FileSystemStorageService(tempDir)) - .build(); - } - - @Test - @SneakyThrows - void writeNewAndReadFileFromOldVersion() { - String oldContent = "Hello here 1"; - String newContent = "NEW Hello here 1"; - String newPrivatePath = "folder1/secret-NEW.txt"; - String oldPrivatePath = "folder1/secret.txt"; - String newInboxPath = "hello-NEW.txt"; - String oldInboxPath = "hello.txt"; - - // write new document to 'old' folder - try (OutputStream os = datasafe.privateService().write(WriteRequest.forDefaultPrivate(jane, newPrivatePath))) { - os.write(newContent.getBytes()); - } - - // read file from private and share this file with John - try (InputStream is = datasafe.privateService().read(ReadRequest.forDefaultPrivate(jane, newPrivatePath)); - OutputStream os = datasafe.inboxService().write(WriteRequest.forDefaultPublic( - Collections.singleton(john.getUserID()), - newInboxPath)) - ) { - ByteStreams.copy(is, os); - } - - // validate old Jane's private file - assertThat(datasafe.privateService().read(ReadRequest.forDefaultPrivate(jane, oldPrivatePath))) - .hasContent(oldContent); - // validate new Jane's private file - assertThat(datasafe.privateService().read(ReadRequest.forDefaultPrivate(jane, newPrivatePath))) - .hasContent(newContent); - - // validate old Johns's inbox file - assertThat(datasafe.inboxService().read(ReadRequest.forDefaultPrivate(john, oldInboxPath))) - .hasContent(oldContent); - // validate new Johns's inbox file - assertThat(datasafe.inboxService().read(ReadRequest.forDefaultPrivate(john, newInboxPath))) - .hasContent(newContent); - - // validate folder structure - assertThat(Dirs.walk(dfsRoot, 1)).containsExactlyInAnyOrder("profiles", "users"); - assertThat(Dirs.walk(dfsRoot.resolve("profiles"))) - .containsExactlyInAnyOrder( - "public", - "private", - "public/john", - "public/jane", - "private/john", - "private/jane" - ); - assertThat(Dirs.walk(dfsRoot.resolve("users"), 3)) - .containsExactlyInAnyOrder( - "john", - "john/public", - "john/public/inbox", - "john/public/pubkeys", - "john/private", - "john/private/keystore", - "jane", - "jane/public", - "jane/public/pubkeys", - "jane/private", - "jane/private/keystore", - "jane/private/files" - ); - } - - @SneakyThrows - private void replace(Path file, String what, String with) { - List baseContent = Files.readAllLines(file); - Files.write(file, baseContent.stream().map(it -> it.replace(what, with)).collect(Collectors.toList())); - } -} diff --git a/datasafe-business/src/test/resources/compat-0.4.3/profiles/private/jane b/datasafe-business/src/test/resources/compat-0.4.3/profiles/private/jane deleted file mode 100644 index ef9e1c92e..000000000 --- a/datasafe-business/src/test/resources/compat-0.4.3/profiles/private/jane +++ /dev/null @@ -1 +0,0 @@ -{"keystore":{"resource":"file:/var/folders/3w/fzdgs28j1_b3r4y8x9_s4wpw0000gn/T/junit4892767241345613098/users/jane/private/keystore"},"privateStorage":{"resource":"file:/var/folders/3w/fzdgs28j1_b3r4y8x9_s4wpw0000gn/T/junit4892767241345613098/users/jane/private/files/"},"inboxWithFullAccess":{"resource":"file:/var/folders/3w/fzdgs28j1_b3r4y8x9_s4wpw0000gn/T/junit4892767241345613098/users/jane/public/inbox/"},"documentVersionStorage":{"resource":"file:/var/folders/3w/fzdgs28j1_b3r4y8x9_s4wpw0000gn/T/junit4892767241345613098/users/jane/versions/"},"associatedResources":[{"resource":"file:/var/folders/3w/fzdgs28j1_b3r4y8x9_s4wpw0000gn/T/junit4892767241345613098/users/jane/"}]} \ No newline at end of file diff --git a/datasafe-business/src/test/resources/compat-0.4.3/profiles/private/john b/datasafe-business/src/test/resources/compat-0.4.3/profiles/private/john deleted file mode 100644 index 7cabe5f35..000000000 --- a/datasafe-business/src/test/resources/compat-0.4.3/profiles/private/john +++ /dev/null @@ -1 +0,0 @@ -{"keystore":{"resource":"file:/var/folders/3w/fzdgs28j1_b3r4y8x9_s4wpw0000gn/T/junit4892767241345613098/users/john/private/keystore"},"privateStorage":{"resource":"file:/var/folders/3w/fzdgs28j1_b3r4y8x9_s4wpw0000gn/T/junit4892767241345613098/users/john/private/files/"},"inboxWithFullAccess":{"resource":"file:/var/folders/3w/fzdgs28j1_b3r4y8x9_s4wpw0000gn/T/junit4892767241345613098/users/john/public/inbox/"},"documentVersionStorage":{"resource":"file:/var/folders/3w/fzdgs28j1_b3r4y8x9_s4wpw0000gn/T/junit4892767241345613098/users/john/versions/"},"associatedResources":[{"resource":"file:/var/folders/3w/fzdgs28j1_b3r4y8x9_s4wpw0000gn/T/junit4892767241345613098/users/john/"}]} \ No newline at end of file diff --git a/datasafe-business/src/test/resources/compat-0.4.3/profiles/public/jane b/datasafe-business/src/test/resources/compat-0.4.3/profiles/public/jane deleted file mode 100644 index 79d812da9..000000000 --- a/datasafe-business/src/test/resources/compat-0.4.3/profiles/public/jane +++ /dev/null @@ -1 +0,0 @@ -{"publicKeys":{"resource":"file:/var/folders/3w/fzdgs28j1_b3r4y8x9_s4wpw0000gn/T/junit4892767241345613098/users/jane/public/pubkeys"},"inbox":{"resource":"file:/var/folders/3w/fzdgs28j1_b3r4y8x9_s4wpw0000gn/T/junit4892767241345613098/users/jane/public/inbox/"}} \ No newline at end of file diff --git a/datasafe-business/src/test/resources/compat-0.4.3/profiles/public/john b/datasafe-business/src/test/resources/compat-0.4.3/profiles/public/john deleted file mode 100644 index fc19bf2cf..000000000 --- a/datasafe-business/src/test/resources/compat-0.4.3/profiles/public/john +++ /dev/null @@ -1 +0,0 @@ -{"publicKeys":{"resource":"file:/var/folders/3w/fzdgs28j1_b3r4y8x9_s4wpw0000gn/T/junit4892767241345613098/users/john/public/pubkeys"},"inbox":{"resource":"file:/var/folders/3w/fzdgs28j1_b3r4y8x9_s4wpw0000gn/T/junit4892767241345613098/users/john/public/inbox/"}} \ No newline at end of file diff --git a/datasafe-business/src/test/resources/compat-0.4.3/users/jane/private/files/Qc5BJaNqSbbSBoHUmrYhEQ==/3_FBQ7knNcCKL1rPDE5Mmg== b/datasafe-business/src/test/resources/compat-0.4.3/users/jane/private/files/Qc5BJaNqSbbSBoHUmrYhEQ==/3_FBQ7knNcCKL1rPDE5Mmg== deleted file mode 100644 index dd036d187a9f0878972cb237018949a3f0763b90..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 210 zcmXqLVB^$k^Jx3d%gD~WpuwPliIKsuXi)(ZBa49vi%~$3XP9G%YkaV)bC7FDYGRVH zp`nF=ZgQ%np{|L!v8k?QnuU>Wa#ET_s$rsqu}Mm@0XG|GLYoI;Dl-eCE{ldqd+6`i zGjf{^Ud^;p-8jKGDOGCfLy4ywl^GQqP1|^*-{oo_c&2w^q5+aS7!70*W@xbph=pvq o8ka61^+?9(Mw?sr*98qM0(tuu=-c;5ev6l%^ToN3FM_@ z8?J0-0eZ44TdM}uX46a$6*VV33sj=zUdBA~pyaQ(15_rE8_1~)acvWqa$@&MUiaSZ zOd|1s+%CgXfXs6FlNq;cLz`2sb5p7f2MOH_xTwtC1CG!?fi^1R2Iae^VXY5f?(H-? zvTeR-FLx`E36M6fZ39qa+j!9C*sy(>bf`tI6>Sj|>0}90?3&}nm1J|mxlh|k zx04Wjwl^>V^wIZFoVNU4*_+ZIE3@nUX7N>K?P1IAMoswZ6m|dlilL@fq-Hn0MC;D+ zpPyBfARO;bbo)ea&*BHdR~3>(dv9nni?pY_Q@pp~DywlzkYqr4n@(}rSQ5}pfYfr4kA7CzWFFoeBf-4s0 zD`m!CpUS|d(?I~H7phyB)@1`v%{CY7>AtQ+Q?8OPnuq3rpE>B1iNEq4mm>*y_jzfJ zd!gwp#}&%M8wwV2L&jS!`vtT7uK;?jo<9r{3Mz$c+p&lD4K1TOp4}ZfG%}Oz65+~T zXFU`w*rIp_28h*M7&dhKDPLJ=ZCP>tf9dR~U%UJH6ch!{3 zS46gcVr(vIN$-7=&X^uTtEk!kmU3pXS={x~eAQ!K|Bo?qHSI2tc|wgFccP<`Ni-K= z@^oMfs$BZKpyMuRT|>|5X+iMDk6n!Qdje2wRh$(0A^%v5q4za5yxl*kRwZ^y7g^pT z_4S=e+b@0u(Js3M^)~c~IF38k41E5X3pqMO5>$W5vE6HQ^d_*Lv$2aa zVw7Y~#{RodZg2!f6 z2Jwt3%x&LKEw8XIO}PbH!T4DBWYI~+{^NLt5ax$Iy_NYDZ|?|~e$NQF8J_raSSJip zk+P!8YUjXW*17gbLXj{3+;(*Te50izwB2o#E$W9Ovy<6UJGXNoatizHGLQp;cV)2W zO)*q+3=whnJqSbyt;sy;)<8AV%|>^}qz(M|F}udD!H!noBwRS)kL`FGY5RY#{n&PdwB& z1!&C0E5i61-Zf}LT#skgSCXE=!IHoIoRvdJWI70t|1Wi?*d&ox1=Ez|$E^qH=Z|BZ zy>TR>P6b=A`fx_kv+1*L>_s>au4vR3@QbdndiFQ2H1VC^nkI?eHSPqu!&u&aE zYSM2Fhk@WkI5)y}92=Ja^V_2wMqu%4{+CoXIORCP>L#r6;W?X|5%L$18c1x%xzl** zm#z=oxC`qSZIwsL*`+CSo<=IE(VDl4Jq1A<9#V@fG<=dB32tm+cq^=odfG{J?;y-{ z`R$`%nVK#?cR*7j>+j1o@3O8GtAE_+T7O}xR6*$jix{}>olb-i)<9KH8T7GoDPmvj z@Sp)~rn=8}1MmfPQI^?=`vR8{Ro-UB_S!rLR3;gBe=B-Sk{UUc{OA@Rg19Kpsi0Rh ziXCW9OxG=LcxPdFGY_yTsw_1Dzmb56Q_A#Wgei*N#pc3K{3XFE2MK4wr^f-u>=q(#l1 z2iz(uYD^!qGAKqby6#>Q;TRdx0N*A>+lSaZe&fN;DR_#f>eiP~_Q~Wa4m*U7Bn^Z5 z$M2U?%0_Kx%a0gDo?iP4KdgB|q1IyUFjoCzu{C?%bw0sER7!Tt%)t5QQv~uh$fhw# zPq2fH7b|P3oj>qB{=~WqbR8i#?<3H93$I2LdmsL~P=Pf268~BA0q80%ZdM>Br z?W9O5n=eW}-y6?o!?pM399SGe9cK<&ektth_&bo;*?($1)GJ=ry$qyfY)3-|8o#y*h;=VXF}R*s29= z96CW>;GI184*s2|0#mXh3Tih!JgAVUqechcXTo+n!+CBN??K#qcmVD_Zt>qnSb?OY zZo)vXM6kjIXi!!Xp3+JmuWFHRNIxD5T8`8{S|?H2A@{s11M8k$@1c%Fa9qy*!%qdpUut^7x(tex8e--l(A=%Ck zdzoY}#20s2)l=b4Flr>!z-+=io;a8eH(_g{KU1aogE$-C^j7^pd!c+Z0%4nI)KIHmis|rzT-Zt4oydoNzqgP2gZO1_n2(otE|2x+R>(ORUR z-(4%xvDwb6y5Pu$L-q#P$LiI>x1}S5YmzLVV$+G@FWS!hF{ga-Q-{TorUfB9d}CC7 z5#@A^)VvQV)n#e!U}^M7DWM<~MjS~_20ggrMFRQcQi8->BSTBsY55QYS z=dz#F*6MaF-^iMIXfG0tVIvQM-uu!@1!n)Iypq3D*?_WV2*CH%m`1Oo+r!gehmv&3 zO=O@Is|c#Aok~m;M#GZC$83Q7fn70KzgL;E_CI}QD1z15!s z7@FA21!jSJ@Qs)bw3;>pL?sr?Obm4P4f^Sb-4JVfMIpDcz5W)JlMse6Mf6k7W)VBQ zwBG}!uFuaKvsJ*NE!!WYxrF7ywFGnphbJNYrOJbg5ITA))POUu+NO!YF3fTdna@Y} zU4``#cg`v9E?gpDgLC|s|EF{t0W?se92(IKk?xwymPopjN%Q?S&pTGDw}>lG)Vy7@ z(YMkWVx`v${^I;(VlL7k`^a{Fh+BHfnff7hcBt?EE1*KA2#x3(C|eM`MJPY9Wm_Sv z)bwTH>Mc|>PYAw&xS(2i4OVOL)2}UEZDCT){5&lTADnYf_tyKSqDFfPUl4{x^2OKo z0lY%z3J6sYeNx^>kmb&g*&R#ISB$$rw8U^4b>^(oL#B@IVIW^n7+$ZovZs=Lg{U}@ zcc9;P*08)3JS;QT2}!Y7Sv~_XY`}*SFbVm`rX(2i`?^sCJ>oh_MY9$(n@MAQ=^8l8 zR@yWRSj^sd<#HR;sGd{SvvYzsZLjgOSZIgM+XU}dekmG0o7y1qlv-WI*i_is#Uzl4{?b(-Qz%zC zstu-bF0~u>iR@qH} z4~zzzTkWbnj63gN;yhEcu+b5IDWnkk4txxB>*>t?W&^YL*hHnbn^vOTCL8M#*R+U<^dcA< z?Lbm(R^fQv;q9+7{~Zjfzaky1puyZ==g?_TpI3y}ft91?jwlv=w7}SK4w9)G_k?yiXh?qp z7Rg?Ay>1-12Eo?&RC>JPQpY0fIT(UAAJ0A5GN_mO4Cbx&DWK638RIbJD#MnwEx2c37AKR=8v(jEHD^hcM z=Qal;jANDXtN7T?<4|9$C}bVNxJ9c}ct2Xn8OCZ`z`v#N8xM9j4)c1uZT2zCrc*~t z`G^qNRElhe{a&9KMxLY0gN50NZm}aK>ow^jN}|}GXVbtqMZw@~4We*2U{$)WKbP1+ z1aJ|KoYV{y3iNF!hZ;%cMf=h|NS?M2ff@^eYBZ`=|`igJIDZkvft1l@5 z;RiL{GI&K>b%cTGKA>^W0KU1o9)T<|q+z6-Tnu?&Dc)Df283gAB>4AddSRIC|Fln*^uiYT79T6sCrq8LMu&7Z0(Ck)OT^C?|8 zsod3J1JG$wLJL0j(T`H~$+af*t1q1e@>FLA$W^;1Z!qjb64|>L|Y4(9vp|{ zpkW+nA&e4QF|rSYMEJ@EhF68yb6M1V?L4S;&qGKAqBlP%KbA^KVxpx000&6*fWv)5l%sL8cuY&! zyiB1QSlKVAJD5}NaY~S}0$tTc)_f5mNj(ABLuB6nm?5rSXU+0^QqfdK=-%f>L{Bnwn-4}7YIQM~e4XYHPBLeX&?No+`yV}hS97_;54GsYuC2J} ztZlYBL1#HG>v;xNj|ScbzM;j!hjtAcZY_DekQ`2qX@*d zv1X30wF5AvxsCx4e$Ea2k#<;#>|*}S+%SXn2%khW_DrTj&XEu*-mkZMAUu0B2oEgJ zD*z;1jHLPLs(Em@X;Vi>%CWyJGTb#;$)c)gour)oI4&&-FQ}HpJ{)7*?dY8D zA%MhHc#|EIj@sF%8HGffJCLLAe#brWVx(P#ZC3vgh}$5gf=(b^T$j#78!h;!9{0~J zPgGCerLnxn>Zgv|O<{MBKwC=5UmQazfz)6w@Uq^3-IRDU08A)23Y1u&{>s{7$6?Ni zQiQV61Gc9eff<#e;ouKJekpMdw&s1Wy5Pmi7XI*Bmpap1|6ja^sA`K7pSw7Gqn(lj z4Ed$PrR`IRiA7YSTPj~yBI^^O|X+>E>CLiqtuxO|8bNPgQlmcXAEb!XO=o!nqVN{ii;bSb)Lt^vwk@1VSg}f@&nH%{EP~u5S`TkoVn=^5>S_?LF{O ztcEoA#&JV7)NuOlSug2*lHW*2*AekS&d5plSImP5Sm47O7ZW%*PdgImixohPRzXCJ z5dZ^+-8`SKv-J;tpORF1%orbYQA)c2w=KayU)@DJr*d8!fA_-UI@~})2j^|YgSdJ` zCC7FbZ!z*fIe;KoG&HkZT>veKRr|m8;!J-mg|jj7XoH6dxQ3~@A#GuIMoncZQbgua zrN0#Ik2pdP^EmGR_jnB>emOH;ruXM|ANlUOk4iCaDQt=h5qS8q(*uy+h=8?A57=^a z2CS0QrIKkRhXe%%K7Ve)3XQjN%BJA88Ib3?2r`TgD20y{m`?ye4kd)BcvsC{Tv&@VnaftgSkT=ia(M{(q&&~n@ypf zhr*@f|FfvRuE%9iG$d5upDI#f7}L4Sc2VPm)&6Zw?Rou?wxTZ z%zKH1o*CRL9;%5nt4=*J9BH;x7q11>`V|&O%2c|En_M&Vqpl%O>+9QjCLNdBRcP6K zzMmT86#@f1)eV31DPoarzup^YNDP467iV&3zBS^KlVT73fT&MENmmvUxEBZ*dQL`4 zg!6di58h~&?E2{5`sIMaifgjJ*=n$xLhsQ0sg8#kNQDegIY%p~WaIkqtE5Nuyy-jQ z{~yQs94`fO445>^p{>NOV#JaFPb%09#|xL)T$b6bNo*06btx3pym9y(Uy-Ct`>F8d zZDIDXZB*n}A7d$CV)t3UvkSdfGyZt|Vw8!+I~xF_STxc79@?GG62u37+>>vPGKPuc zPVZGZc&?>G9WjDqJ4=%a(m&qBlekVOh&W48o8B)G0VJwDGQ4*1B#;=(`sh88!^Vc;0YS5aaB%0ru~o@x0%uv!Nbj&@c&qig>xiGG5nkl;0FVt6U;J3FuddN!ClT?3EWsMwkz@qpKj$q( z;x}L9%EV~QZkG5Rm>o*tVy@!Q)VfXo?X6kbHgK?vn+?xKq_G1d8@aUowTjy7-8azX z$o$}g=F&YIKnZj{lPIlXwJWr|Ya+y0AtMR;lWIj0HOZHeIbiYyEy`Hi&%qB*g@@0cuH~m9;rY z6`bv{6&zIr9X-+P%-517dVEvuFZL!oHR#*5Dl*!$6hle} zUJa|4m=pDf{yDMVOtY(hg5chr4Ydr+5M}ulsJu)hK^HjKASf^NiQS)zk0zQLB%e<% ztE5F<2if1IlCEzmdlWebXuMqM1c573YJ&2h76B8{&}DC!9{dNtTl*C-Am70iy`QuM zMB@eBHn-2NatoPm8`8NjP&M(W6AXQ99pz6U0<*R>n!AJB;{9oM$mo zXAP+H1I2nL@w6cPO@nyMY?(dlG2<>#mOl!YW)~ zV3=K`nbV$<2TR}xZyb^3&R^#a%}2-(Y~m_ljxm#XsTvbzX}oBy-|H|Z47|#b$8Ijp zur__x?V#&Tt<%UAlu|MRNC&ciEokQnfrNxFh-u5#ueJF*P3dxdzoL!i+o4))gw*s1 z(xnnn06>iS>R{IJ9+47L?tmMA`UYQ1%5g^p|L``109HnfNDzo%GQ*FP3k}KvsB;)D zzBlMxQK$dXuSov|t5QV~`gAvxl<`czsKKNJTmE3*l&Pn#{Fzw6I+or4pW)KRM!QzA zvBg90O#=0cwSHC3XQ(5Ruu*eS*`(a#T>m;RnT%-OCJijTq28I zM~I!<@)uaV>81JsseIPZc2WJ9{#B>k?)K;cDM(JaA-nNAzi)m*=k00+0yI*mkFF)z zRP4=N`|DiU%zI9pdaBeT%ViGyo-4>RABN$BIzkiO*`c2xZUyCCB2L7LtO3MEZ@Y^S zd)!7!%OYFgWFKFl6`4Eiip&=gZB{PbX4%AxF0du~FM>M;S3H=yCKXNEy^dI90Z6&W z6w6t6?iVwioWgD+Y>&eoS8qD7-UjmJ(GJhCwpG5OUs4sqRcg}h6AIBC5!C}-?-%7G z7~dV&BneYFLMGr6gA@;8<`*LK;iYl$Yqz(3XdM!U%Gyatc1cYRmEi6<$y+dHB>NZq z#c_xEx+3xNW=ZdT~rp zbT(GK+@%NAIBnq84Fe}WX&;0vDE*>udd1yl290)hd1>7BV?8}GoP>TG6=l#*=4BCv z7#!}K5z9?9ddU|^np^D`#vswukZJv*-T<|y- z;}%Zr2BY?cbS;|nvZ4>a3%2I6tHw}aurh&s@MdWFv!>b(6k1Exw7-X{l!gxI+&C5L zJQ0|5;#g&Q?x^LrgH%9$(M+Q3CuuX~%2w~NPioYx>nE56NNhX)lY2~D*)a}`SPN1E z%xm$NoN?<;6LU6&fxeVGh&sP9`-eM3@)7@L&pl)RebfP`dN>s2acdtyWWhEhx+WX%MpA6rPRVc>^9UlQoZ}_BuYvMu! zuv)+G@d7hk>IBF#g<$R4nueU8B}HD@X@H?BOm2i^BmNL)yy~BmOycQ*IXuZdJez_g z@>RLrb6dVb$DcWDq_3sfshaK#bAT*IWbsSA0)JuHG?)Y0rmE&88y~8_AcZO4T=rax z&q%H==}FYSxRj!-(cRdj!oJL+;brBGs8f)qyUEiVjm6VFH82DTZCg7<^e}kEdr7q+@skh00k29#1UB%PbIrEbp9?1ITqQD4v5x5*i(=)BhZ0JDy1w%a-oH)k z9;Jd0F3~|aNbJ3#xQapzi)s&Up&`MSo_KpxS8N;E^v#WkxQ8mwZ7>qCLJug$|J9zM zMy~jcBauN|#7%CnQ@!5=KsPuQUickkq}eS=(;V#=7Pwk*VB3nQEa6P+P{QWnN|@1N zg5k zBYdrIvm3fftvQ9^)k3=-3|4<&6Jq>)>_ehiV9DwV%PFpYy=(`tk4tj4iYGI7ZkFFG zhFk2QEy|RLq5|kBHk%g=+?^hlz1k3hn0<-(OeOVu^$=L^JD04LynKjjN59v za(jyrbZ|Lh0m<8H$WReL^tL6QFHCNL5Yg)obCrzC<15+_arI7-nN~d?0+fN@lW@Ye z1^IIoga#LI{ywHD#1NFQQh7|nY&;#7`2*z!|IkCxDa?>(2_6upt3 z^T;M}zhEICzELaY&x(oy@URZIbQ;8&2WED|#a&8r<1@#A9&0uQ&@Kg>kxfubJjfe#hWen&`Gk`i5|&nB@QD%D6PTx3~Lss5vGwk>7yGF~F|@ mX>PdmUlJQHxdQ0i$v_4%zEXkf*HWokhzGp@ diff --git a/datasafe-business/src/test/resources/compat-0.4.3/users/john/public/inbox/hello.txt b/datasafe-business/src/test/resources/compat-0.4.3/users/john/public/inbox/hello.txt deleted file mode 100644 index 8bfef5614475df41fc97e49886dd10c8a900d7b2..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 431 zcmXqLVB^$k^Jx3d%gD~WpuwPliIKsuiP6`fiP4jZk*UGZ+ch#c#6QSY*V9GUz`)eZ z!qUXhNH^Ia%|zG4C@obt(I72R*Eq$%Bq=d1+0w+^*nk&qA|oR!14|PlL!6IND-ZAU zd5R|;xQc!!s$Yvv4f^y^_TC{KN$&WJ1;;Ok#U`v<%fR#J%_XVJf!rEOhgCGpKkd64 zv17yO+uuCcUZ1Ms{t>ymn$yejk+*yJbE&HVr}>H>>dl?NYO$VAD(u@%o!xrUyc42d zpEdECpxV#F%&@OJac|mvb)l#0y56`~owC!Z>$Sb&-Zd{XJ!tZ)>n=yi-`}&9+;!}j zXu`96PUYvHg-w2(UNnVWbLL6Uh=-RPX4x$3?G;?Jp~1!4I9OJ5V(+y%9WQO>%X~U} zaT=$6<=Ru5`4+aXOFD6TgXnh6PqW(G*M7Xa(C0~@lmEdyF?WmRoU Date: Tue, 17 Sep 2019 19:27:30 +0300 Subject: [PATCH 094/255] DOC-239. More fine-grained modules --- .../directory/DefaultCredentialsModule.java | 51 ++---------------- .../directory/DefaultKeystoreCacheModule.java | 53 ++++++++++++++++++ .../keys/DFSPrivateKeyServiceImpl.java | 32 +++++------ .../LegacyDFSPrivateKeyServiceImpl.java | 52 ++---------------- .../LegacyCredentialsModule.java | 54 +++---------------- 5 files changed, 83 insertions(+), 159 deletions(-) create mode 100644 datasafe-business/src/main/java/de/adorsys/datasafe/business/impl/directory/DefaultKeystoreCacheModule.java diff --git a/datasafe-business/src/main/java/de/adorsys/datasafe/business/impl/directory/DefaultCredentialsModule.java b/datasafe-business/src/main/java/de/adorsys/datasafe/business/impl/directory/DefaultCredentialsModule.java index c8eb88cf2..6d132913a 100644 --- a/datasafe-business/src/main/java/de/adorsys/datasafe/business/impl/directory/DefaultCredentialsModule.java +++ b/datasafe-business/src/main/java/de/adorsys/datasafe/business/impl/directory/DefaultCredentialsModule.java @@ -1,65 +1,24 @@ package de.adorsys.datasafe.business.impl.directory; -import com.google.common.cache.Cache; -import com.google.common.cache.CacheBuilder; import dagger.Binds; import dagger.Module; -import dagger.Provides; import de.adorsys.datasafe.directory.api.profile.dfs.BucketAccessService; import de.adorsys.datasafe.directory.api.profile.keys.DocumentKeyStoreOperations; import de.adorsys.datasafe.directory.api.profile.keys.PrivateKeyService; import de.adorsys.datasafe.directory.api.profile.keys.PublicKeyService; import de.adorsys.datasafe.directory.api.profile.keys.StorageKeyStoreOperations; import de.adorsys.datasafe.directory.impl.profile.dfs.BucketAccessServiceImplRuntimeDelegatable; -import de.adorsys.datasafe.directory.impl.profile.keys.*; -import de.adorsys.datasafe.encrypiton.api.types.UserID; -import de.adorsys.datasafe.encrypiton.api.types.keystore.PublicKeyIDWithPublicKey; -import de.adorsys.datasafe.types.api.context.overrides.OverridesRegistry; - -import javax.annotation.Nullable; -import javax.inject.Singleton; -import java.security.KeyStore; -import java.util.List; -import java.util.concurrent.TimeUnit; -import java.util.function.Supplier; +import de.adorsys.datasafe.directory.impl.profile.keys.DFSPrivateKeyServiceImplRuntimeDelegatable; +import de.adorsys.datasafe.directory.impl.profile.keys.DFSPublicKeyServiceImplRuntimeDelegatable; +import de.adorsys.datasafe.directory.impl.profile.keys.DocumentKeyStoreOperationsImplRuntimeDelegatable; +import de.adorsys.datasafe.directory.impl.profile.keys.StorageKeyStoreOperationsImplRuntimeDelegatable; /** * This module is responsible for credentials access - either user or dfs. */ -@Module +@Module(includes = DefaultKeystoreCacheModule.class) public abstract class DefaultCredentialsModule { - /** - * Default keystore and public key Guava-based cache. If one can't afford that some instances - * may not see that storage access credentials were removed (for some time window they will be available) - * or keystore password has changed, they can use any distributed cache available. But for most use cases - * it is ok. - */ - @Provides - @Singleton - static KeyStoreCache keyStoreCache(@Nullable OverridesRegistry registry) { - - Supplier> cacheKeystore = () -> CacheBuilder.newBuilder() - .initialCapacity(1000) - // for this interval removed storage access key/changed keystore might not be seen - .expireAfterWrite(15, TimeUnit.MINUTES) - .build(); - - // These are actually static, so we can afford longer expiry time - Supplier>> cachePubKeys = () -> CacheBuilder.newBuilder() - .initialCapacity(1000) - .expireAfterWrite(60, TimeUnit.MINUTES) - .build(); - - return new DefaultKeyStoreCacheRuntimeDelegatable( - registry, - cachePubKeys.get().asMap(), - cacheKeystore.get().asMap(), - // it will generate new instance here - cacheKeystore.get().asMap() - ); - } - /** * Default no-op service to get credentials to access filesystem. */ diff --git a/datasafe-business/src/main/java/de/adorsys/datasafe/business/impl/directory/DefaultKeystoreCacheModule.java b/datasafe-business/src/main/java/de/adorsys/datasafe/business/impl/directory/DefaultKeystoreCacheModule.java new file mode 100644 index 000000000..309a10ed8 --- /dev/null +++ b/datasafe-business/src/main/java/de/adorsys/datasafe/business/impl/directory/DefaultKeystoreCacheModule.java @@ -0,0 +1,53 @@ +package de.adorsys.datasafe.business.impl.directory; + +import com.google.common.cache.Cache; +import com.google.common.cache.CacheBuilder; +import dagger.Module; +import dagger.Provides; +import de.adorsys.datasafe.directory.impl.profile.keys.DefaultKeyStoreCacheRuntimeDelegatable; +import de.adorsys.datasafe.directory.impl.profile.keys.KeyStoreCache; +import de.adorsys.datasafe.encrypiton.api.types.UserID; +import de.adorsys.datasafe.encrypiton.api.types.keystore.PublicKeyIDWithPublicKey; +import de.adorsys.datasafe.types.api.context.overrides.OverridesRegistry; + +import javax.annotation.Nullable; +import javax.inject.Singleton; +import java.security.KeyStore; +import java.util.List; +import java.util.concurrent.TimeUnit; +import java.util.function.Supplier; + +@Module +public abstract class DefaultKeystoreCacheModule { + + /** + * Default keystore and public key Guava-based cache. If one can't afford that some instances + * may not see that storage access credentials were removed (for some time window they will be available) + * or keystore password has changed, they can use any distributed cache available. But for most use cases + * it is ok. + */ + @Provides + @Singleton + static KeyStoreCache keyStoreCache(@Nullable OverridesRegistry registry) { + + Supplier> cacheKeystore = () -> CacheBuilder.newBuilder() + .initialCapacity(1000) + // for this interval removed storage access key/changed keystore might not be seen + .expireAfterWrite(15, TimeUnit.MINUTES) + .build(); + + // These are actually static, so we can afford longer expiry time + Supplier>> cachePubKeys = () -> CacheBuilder.newBuilder() + .initialCapacity(1000) + .expireAfterWrite(60, TimeUnit.MINUTES) + .build(); + + return new DefaultKeyStoreCacheRuntimeDelegatable( + registry, + cachePubKeys.get().asMap(), + cacheKeystore.get().asMap(), + // it will generate new instance here + cacheKeystore.get().asMap() + ); + } +} diff --git a/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/keys/DFSPrivateKeyServiceImpl.java b/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/keys/DFSPrivateKeyServiceImpl.java index f3fbfb49b..2ed5909e4 100644 --- a/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/keys/DFSPrivateKeyServiceImpl.java +++ b/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/keys/DFSPrivateKeyServiceImpl.java @@ -50,21 +50,6 @@ public PathEncryptionSecretKey pathEncryptionSecretKey(UserIDAuth forUser) { (SecretKey) keyStoreOper.getKey(forUser, secretPathCrtKeyId)); } - private String getSecretPathKeyIdByPrefix(List keys, String pathKeyIdPrefix) { - return keys.stream() - .filter(it -> it.getValue().startsWith(pathKeyIdPrefix)) - .findFirst() - .orElseThrow(() -> new IllegalStateException("Key ID with prefix " + pathKeyIdPrefix + " not found")) - .getValue(); - } - - private List getSecretKeyIds(UserIDAuth forUser) { - return keyStoreOper.readAliases(forUser).stream() - .filter(it -> it.startsWith(PATH_KEY_ID_PREFIX) || it.startsWith(PATH_KEY_ID_PREFIX_CTR)) - .map(KeyID::new) - .collect(Collectors.toList()); - } - /** * Reads document encryption secret key from DFS and caches the result. */ @@ -88,7 +73,7 @@ public Map keysByIds(UserIDAuth forUser, Set keyIds) { ); } - private SecretKeyIDWithKey keyByPrefix(UserIDAuth forUser, String prefix) { + protected SecretKeyIDWithKey keyByPrefix(UserIDAuth forUser, String prefix) { KeyID key = keyStoreOper.readAliases(forUser).stream() .filter(it -> it.startsWith(prefix)) .map(KeyID::new) @@ -100,4 +85,19 @@ private SecretKeyIDWithKey keyByPrefix(UserIDAuth forUser, String prefix) { (SecretKey) keyStoreOper.getKey(forUser, key.getValue()) ); } + + private String getSecretPathKeyIdByPrefix(List keys, String pathKeyIdPrefix) { + return keys.stream() + .filter(it -> it.getValue().startsWith(pathKeyIdPrefix)) + .findFirst() + .orElseThrow(() -> new IllegalStateException("Key ID with prefix " + pathKeyIdPrefix + " not found")) + .getValue(); + } + + private List getSecretKeyIds(UserIDAuth forUser) { + return keyStoreOper.readAliases(forUser).stream() + .filter(it -> it.startsWith(PATH_KEY_ID_PREFIX) || it.startsWith(PATH_KEY_ID_PREFIX_CTR)) + .map(KeyID::new) + .collect(Collectors.toList()); + } } diff --git a/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/main/java/de/adorsys/datasafe/simple/adapter/impl/legacy/directory/LegacyDFSPrivateKeyServiceImpl.java b/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/main/java/de/adorsys/datasafe/simple/adapter/impl/legacy/directory/LegacyDFSPrivateKeyServiceImpl.java index af314a848..004227aeb 100644 --- a/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/main/java/de/adorsys/datasafe/simple/adapter/impl/legacy/directory/LegacyDFSPrivateKeyServiceImpl.java +++ b/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/main/java/de/adorsys/datasafe/simple/adapter/impl/legacy/directory/LegacyDFSPrivateKeyServiceImpl.java @@ -1,34 +1,24 @@ package de.adorsys.datasafe.simple.adapter.impl.legacy.directory; import de.adorsys.datasafe.directory.api.profile.keys.DocumentKeyStoreOperations; -import de.adorsys.datasafe.directory.api.profile.keys.PrivateKeyService; +import de.adorsys.datasafe.directory.impl.profile.keys.DFSPrivateKeyServiceImpl; import de.adorsys.datasafe.encrypiton.api.types.UserIDAuth; -import de.adorsys.datasafe.encrypiton.api.types.keystore.KeyID; import de.adorsys.datasafe.encrypiton.api.types.keystore.PathEncryptionSecretKey; import de.adorsys.datasafe.encrypiton.api.types.keystore.SecretKeyIDWithKey; -import lombok.SneakyThrows; -import javax.crypto.SecretKey; import javax.inject.Inject; -import java.security.Key; -import java.util.Map; -import java.util.Set; -import java.util.stream.Collectors; -import static de.adorsys.datasafe.encrypiton.api.types.keystore.KeyStoreCreationConfig.DOCUMENT_KEY_ID_PREFIX; import static de.adorsys.datasafe.encrypiton.api.types.keystore.KeyStoreCreationConfig.PATH_KEY_ID_PREFIX; /** * Retrieves and opens private keystore associated with user location DFS storage. * Attempts to re-read keystore if not able to open it. */ -public class LegacyDFSPrivateKeyServiceImpl implements PrivateKeyService { - - private final DocumentKeyStoreOperations keyStoreOper; +public class LegacyDFSPrivateKeyServiceImpl extends DFSPrivateKeyServiceImpl { @Inject public LegacyDFSPrivateKeyServiceImpl(DocumentKeyStoreOperations keyStoreOper) { - this.keyStoreOper = keyStoreOper; + super(keyStoreOper); } /** @@ -44,40 +34,4 @@ public PathEncryptionSecretKey pathEncryptionSecretKey(UserIDAuth forUser) { secretKeyIDWithKey.getSecretKey() ); } - - /** - * Reads document encryption secret key from DFS and caches the result. - */ - @Override - public SecretKeyIDWithKey documentEncryptionSecretKey(UserIDAuth forUser) { - return keyByPrefix(forUser, DOCUMENT_KEY_ID_PREFIX); - } - - /** - * Reads private or secret key from DFS and caches the keystore associated with it. - */ - @Override - @SneakyThrows - public Map keysByIds(UserIDAuth forUser, Set keyIds) { - Set aliases = keyStoreOper.readAliases(forUser); - return keyIds.stream() - .filter(aliases::contains) - .collect(Collectors.toMap( - keyId -> keyId, - keyId -> keyStoreOper.getKey(forUser, keyId)) - ); - } - - private SecretKeyIDWithKey keyByPrefix(UserIDAuth forUser, String prefix) { - KeyID key = keyStoreOper.readAliases(forUser).stream() - .filter(it -> it.startsWith(prefix)) - .map(KeyID::new) - .findFirst() - .orElseThrow(() -> new IllegalArgumentException("No key with prefix: " + prefix)); - - return new SecretKeyIDWithKey( - key, - (SecretKey) keyStoreOper.getKey(forUser, key.getValue()) - ); - } } diff --git a/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/main/java/de/adorsys/datasafe/simple/adapter/impl/pathencryption/LegacyCredentialsModule.java b/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/main/java/de/adorsys/datasafe/simple/adapter/impl/pathencryption/LegacyCredentialsModule.java index ec162f886..12eea6807 100644 --- a/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/main/java/de/adorsys/datasafe/simple/adapter/impl/pathencryption/LegacyCredentialsModule.java +++ b/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/main/java/de/adorsys/datasafe/simple/adapter/impl/pathencryption/LegacyCredentialsModule.java @@ -1,66 +1,25 @@ package de.adorsys.datasafe.simple.adapter.impl.pathencryption; -import com.google.common.cache.Cache; -import com.google.common.cache.CacheBuilder; import dagger.Binds; import dagger.Module; -import dagger.Provides; +import de.adorsys.datasafe.business.impl.directory.DefaultKeystoreCacheModule; import de.adorsys.datasafe.directory.api.profile.dfs.BucketAccessService; import de.adorsys.datasafe.directory.api.profile.keys.DocumentKeyStoreOperations; import de.adorsys.datasafe.directory.api.profile.keys.PrivateKeyService; import de.adorsys.datasafe.directory.api.profile.keys.PublicKeyService; import de.adorsys.datasafe.directory.api.profile.keys.StorageKeyStoreOperations; import de.adorsys.datasafe.directory.impl.profile.dfs.BucketAccessServiceImplRuntimeDelegatable; -import de.adorsys.datasafe.directory.impl.profile.keys.*; -import de.adorsys.datasafe.encrypiton.api.types.UserID; -import de.adorsys.datasafe.encrypiton.api.types.keystore.PublicKeyIDWithPublicKey; +import de.adorsys.datasafe.directory.impl.profile.keys.DFSPublicKeyServiceImplRuntimeDelegatable; +import de.adorsys.datasafe.directory.impl.profile.keys.DocumentKeyStoreOperationsImplRuntimeDelegatable; +import de.adorsys.datasafe.directory.impl.profile.keys.StorageKeyStoreOperationsImplRuntimeDelegatable; import de.adorsys.datasafe.simple.adapter.impl.legacy.directory.LegacyDFSPrivateKeyServiceImpl; -import de.adorsys.datasafe.types.api.context.overrides.OverridesRegistry; - -import javax.annotation.Nullable; -import javax.inject.Singleton; -import java.security.KeyStore; -import java.util.List; -import java.util.concurrent.TimeUnit; -import java.util.function.Supplier; /** * This module is responsible for credentials access - either user or dfs. */ -@Module +@Module(includes = DefaultKeystoreCacheModule.class) public abstract class LegacyCredentialsModule { - /** - * Default keystore and public key Guava-based cache. If one can't afford that some instances - * may not see that storage access credentials were removed (for some time window they will be available) - * or keystore password has changed, they can use any distributed cache available. But for most use cases - * it is ok. - */ - @Provides - @Singleton - static KeyStoreCache keyStoreCache(@Nullable OverridesRegistry registry) { - - Supplier> cacheKeystore = () -> CacheBuilder.newBuilder() - .initialCapacity(1000) - // for this interval removed storage access key/changed keystore might not be seen - .expireAfterWrite(15, TimeUnit.MINUTES) - .build(); - - // These are actually static, so we can afford longer expiry time - Supplier>> cachePubKeys = () -> CacheBuilder.newBuilder() - .initialCapacity(1000) - .expireAfterWrite(60, TimeUnit.MINUTES) - .build(); - - return new DefaultKeyStoreCacheRuntimeDelegatable( - registry, - cachePubKeys.get().asMap(), - cacheKeystore.get().asMap(), - // it will generate new instance here - cacheKeystore.get().asMap() - ); - } - /** * Default no-op service to get credentials to access filesystem. */ @@ -86,8 +45,7 @@ static KeyStoreCache keyStoreCache(@Nullable OverridesRegistry registry) { abstract StorageKeyStoreOperations storageKeyStoreOperations(StorageKeyStoreOperationsImplRuntimeDelegatable impl); /** - * Default private key service that reads user private/secret keys from the location specified by his - * profile inside DFS. + * Private key service that expects there is only one path encryption key. */ @Binds abstract PrivateKeyService privateKeyService(LegacyDFSPrivateKeyServiceImpl impl); From 341cbd460cc685b45d3b936ca5c3fcbb8257de07 Mon Sep 17 00:00:00 2001 From: Valentyn Berezin Date: Tue, 17 Sep 2019 20:00:56 +0300 Subject: [PATCH 095/255] DOC-239. Change path resolution --- .../business/impl/e2e/SchemeDelegationWithDbTest.java | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/SchemeDelegationWithDbTest.java b/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/SchemeDelegationWithDbTest.java index e53666b2f..517150428 100644 --- a/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/SchemeDelegationWithDbTest.java +++ b/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/SchemeDelegationWithDbTest.java @@ -15,7 +15,6 @@ import de.adorsys.datasafe.storage.impl.fs.FileSystemStorageService; import de.adorsys.datasafe.teststorage.WithStorageProvider; import de.adorsys.datasafe.types.api.actions.WriteRequest; -import de.adorsys.datasafe.types.api.global.PathEncryptionId; import de.adorsys.datasafe.types.api.resource.AbsoluteLocation; import de.adorsys.datasafe.types.api.resource.BasePrivateResource; import de.adorsys.datasafe.types.api.resource.Uri; @@ -32,6 +31,7 @@ import java.util.stream.Collectors; import java.util.stream.Stream; +import static de.adorsys.datasafe.types.api.global.PathEncryptionId.AES_SIV; import static org.assertj.core.api.Assertions.assertThat; class SchemeDelegationWithDbTest extends WithStorageProvider { @@ -39,14 +39,13 @@ class SchemeDelegationWithDbTest extends WithStorageProvider { private static final Set ALLOWED_TABLES = ImmutableSet.of("users", "private_profiles", "public_profiles"); private Path fsPath; - private StorageService filesystem; private StorageService db; private DefaultDatasafeServices datasafeServices; @BeforeEach void initialize(@TempDir Path tempDir) { this.fsPath = tempDir; - this.filesystem = new FileSystemStorageService(tempDir); + StorageService filesystem = new FileSystemStorageService(tempDir); this.db = new DatabaseStorageService(ALLOWED_TABLES, new DatabaseConnectionRegistry( uri -> uri.location().getWrapped().getScheme() + ":" + uri.location().getPath().split("/")[1], ImmutableMap.of("jdbc://localhost:9999", new DatabaseCredentials("sa", "sa"))) @@ -86,7 +85,7 @@ void testProfileOnDbDataOnFsWorks() { assertThat(listDb("jdbc://localhost:9999/h2:mem:test/public_profiles/")) .containsExactly("jdbc://localhost:9999/h2:mem:test/public_profiles/john"); - Path path = fsPath.resolve("users/john/private/files/" + PathEncryptionId.AES_SIV.getName() + "/"); + Path path = fsPath.resolve(new Uri("users/john/private/files/").resolve(AES_SIV.asUriRoot()).asString()); Path encryptedFile = Files.walk(path).collect(Collectors.toList()).get(1); // File and keystore/pub keys are on FS assertThat(Files.walk(fsPath)) From 2c969a14c92201a657f0428c8f278e0c8dd1ab16 Mon Sep 17 00:00:00 2001 From: Valentyn Berezin Date: Tue, 17 Sep 2019 20:08:15 +0300 Subject: [PATCH 096/255] DOC-239. Explicitly state dependency on SIV --- datasafe-business/pom.xml | 4 ++++ .../impl/profile/operations/actions/ProfileStoreService.java | 1 - 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/datasafe-business/pom.xml b/datasafe-business/pom.xml index 91669d057..261705ad5 100644 --- a/datasafe-business/pom.xml +++ b/datasafe-business/pom.xml @@ -94,6 +94,10 @@ org.bouncycastle bcprov-jdk15on + + org.cryptomator + siv-mode + com.google.code.findbugs diff --git a/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/operations/actions/ProfileStoreService.java b/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/operations/actions/ProfileStoreService.java index b15a823af..f7b867eec 100644 --- a/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/operations/actions/ProfileStoreService.java +++ b/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/operations/actions/ProfileStoreService.java @@ -27,7 +27,6 @@ public class ProfileStoreService { private final StorageWriteService writeService; @Inject - @SneakyThrows public ProfileStoreService(GsonSerde serde, UserProfileCache profileCache, DFSConfig dfsConfig, BucketAccessService access, StorageWriteService writeService) { this.serde = serde; From 9aec85a7a792a0f0ee84e68c34c011b354028c23 Mon Sep 17 00:00:00 2001 From: Ihor Yatsenko Date: Wed, 18 Sep 2019 10:52:55 +0300 Subject: [PATCH 097/255] DOC-239: Clean up code --- .../DefaultPathEncryptionModule.java | 6 ++++- .../keys/DFSPrivateKeyServiceImpl.java | 6 ++--- .../DefaultPathEncryptorDecryptor.java | 10 +++---- .../SymmetricPathEncryptionServiceImpl.java | 27 ++++++++++--------- 4 files changed, 26 insertions(+), 23 deletions(-) diff --git a/datasafe-business/src/main/java/de/adorsys/datasafe/business/impl/pathencryption/DefaultPathEncryptionModule.java b/datasafe-business/src/main/java/de/adorsys/datasafe/business/impl/pathencryption/DefaultPathEncryptionModule.java index bfe6b67de..fb09804b0 100644 --- a/datasafe-business/src/main/java/de/adorsys/datasafe/business/impl/pathencryption/DefaultPathEncryptionModule.java +++ b/datasafe-business/src/main/java/de/adorsys/datasafe/business/impl/pathencryption/DefaultPathEncryptionModule.java @@ -12,11 +12,15 @@ import org.cryptomator.siv.SivMode; /** - * This module is responsible for providing pathencryption of document. + * This module is responsible for providing path encryption of document. */ @Module public abstract class DefaultPathEncryptionModule { + /** + * SivMode using for encryption and decryption in AES CGM SIV mode + * @return SivMode + */ @Provides static SivMode sivMode() { return new SivMode(); diff --git a/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/keys/DFSPrivateKeyServiceImpl.java b/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/keys/DFSPrivateKeyServiceImpl.java index 2ed5909e4..10ef2b705 100644 --- a/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/keys/DFSPrivateKeyServiceImpl.java +++ b/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/keys/DFSPrivateKeyServiceImpl.java @@ -41,13 +41,13 @@ public PathEncryptionSecretKey pathEncryptionSecretKey(UserIDAuth forUser) { List secretKeyIds = getSecretKeyIds(forUser); String secretPathKeyId = getSecretPathKeyIdByPrefix(secretKeyIds, PATH_KEY_ID_PREFIX); - String secretPathCrtKeyId = getSecretPathKeyIdByPrefix(secretKeyIds, PATH_KEY_ID_PREFIX_CTR); + String secretPathCtrKeyId = getSecretPathKeyIdByPrefix(secretKeyIds, PATH_KEY_ID_PREFIX_CTR); return new PathEncryptionSecretKey( new KeyID(secretPathKeyId), (SecretKey) keyStoreOper.getKey(forUser, secretPathKeyId), - new KeyID(secretPathCrtKeyId), - (SecretKey) keyStoreOper.getKey(forUser, secretPathCrtKeyId)); + new KeyID(secretPathCtrKeyId), + (SecretKey) keyStoreOper.getKey(forUser, secretPathCtrKeyId)); } /** diff --git a/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/pathencryption/DefaultPathEncryptorDecryptor.java b/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/pathencryption/DefaultPathEncryptorDecryptor.java index e0f63c547..a7e3118a0 100644 --- a/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/pathencryption/DefaultPathEncryptorDecryptor.java +++ b/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/pathencryption/DefaultPathEncryptorDecryptor.java @@ -3,12 +3,11 @@ import de.adorsys.datasafe.encrypiton.api.types.keystore.PathEncryptionSecretKey; import de.adorsys.datasafe.types.api.context.annotations.RuntimeDelegate; import lombok.SneakyThrows; +import lombok.extern.slf4j.Slf4j; import org.cryptomator.siv.SivMode; import javax.inject.Inject; -import static java.nio.charset.StandardCharsets.UTF_8; - /** * Default path encryption/decryption that uses AES-GCM-SIV mode. * @@ -16,6 +15,7 @@ * Using @see SIV-MODE library for encryption and decryption * Encodes resulting bytes using Base64-urlsafe encoding. */ +@Slf4j @RuntimeDelegate public class DefaultPathEncryptorDecryptor implements PathEncryptorDecryptor { @@ -31,8 +31,7 @@ public DefaultPathEncryptorDecryptor(SivMode sivMode) { @Override public byte[] encrypt(PathEncryptionSecretKey pathSecretKey, byte[] originalPath, byte[] associated) { - //log.debug - System.out.println("Path secret key: {}, original path: {}" + pathSecretKey.toString()+" "+ originalPath); + log.debug("Path secret key: {}, original path: {}", pathSecretKey.toString(), originalPath); return sivMode.encrypt( pathSecretKey.getCounterSecretKey().getEncoded(), @@ -45,8 +44,7 @@ public byte[] encrypt(PathEncryptionSecretKey pathSecretKey, byte[] originalPath @Override @SneakyThrows public byte[] decrypt(PathEncryptionSecretKey pathSecretKey, byte[] encryptedPath, byte[] associated) { - //log.debug( - System.out.println("Path secret key: {}, encrypted path: {}"+ pathSecretKey.toString()+" "+ encryptedPath); + log.debug("Path secret key: {}, encrypted path: {}", pathSecretKey.toString(), encryptedPath); return sivMode.decrypt( pathSecretKey.getCounterSecretKey().getEncoded(), diff --git a/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/pathencryption/SymmetricPathEncryptionServiceImpl.java b/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/pathencryption/SymmetricPathEncryptionServiceImpl.java index ad42320c4..c459c7787 100644 --- a/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/pathencryption/SymmetricPathEncryptionServiceImpl.java +++ b/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/pathencryption/SymmetricPathEncryptionServiceImpl.java @@ -1,8 +1,9 @@ package de.adorsys.datasafe.encrypiton.impl.pathencryption; +import com.google.common.primitives.Ints; import de.adorsys.datasafe.encrypiton.api.pathencryption.encryption.SymmetricPathEncryptionService; import de.adorsys.datasafe.encrypiton.api.types.keystore.PathEncryptionSecretKey; -import de.adorsys.datasafe.encrypiton.impl.pathencryption.dto.PathSecretKeyWithData; +import de.adorsys.datasafe.encrypiton.impl.pathencryption.dto.PathSegmentWithSecretKeyWith; import de.adorsys.datasafe.types.api.context.annotations.RuntimeDelegate; import de.adorsys.datasafe.types.api.resource.Uri; import lombok.SneakyThrows; @@ -10,17 +11,17 @@ import javax.inject.Inject; import java.net.URI; -import java.util.Arrays; +import java.nio.charset.StandardCharsets; import java.util.Base64; import java.util.function.Function; import java.util.stream.Collectors; - -import static java.nio.charset.StandardCharsets.UTF_8; +import java.util.stream.IntStream; /** * Path encryption service that maintains URI segments integrity. * It means that path/to/file is encrypted to cipher(path)/cipher(to)/cipher(file) and each invocation of example: - * cipher(path) will yield same string. + * cipher(path) will yield same string, but cipher(path)/cipher(path) will not yield same segments - + * it will be more like abc/cde and not like abc/abc. */ @Slf4j @RuntimeDelegate @@ -88,27 +89,27 @@ public Uri decrypt(PathEncryptionSecretKey pathEncryptionSecretKey, Uri bucketPa } @SneakyThrows - private static String decode(String encryptedPath) { + private static byte[] decode(String encryptedPath) { if (null == encryptedPath || encryptedPath.isEmpty()) { - return encryptedPath; + return null; } - return new String(Base64.getUrlDecoder().decode(encryptedPath), UTF_8); + return Base64.getUrlDecoder().decode(encryptedPath); } @SneakyThrows - private static String encode(String encryptedPath) { - if (null == encryptedPath || encryptedPath.isEmpty()) { + private static String encode(byte[] encryptedPath) { + if (null == encryptedPath) { return null; } - return Base64.getUrlEncoder().encodeToString(encryptedPath.getBytes(UTF_8)); + return Base64.getUrlEncoder().encodeToString(encryptedPath); } private static Uri processURIparts( PathEncryptionSecretKey secretKeyEntry, Uri bucketPath, - Function process) { + Function process) { StringBuilder result = new StringBuilder(); String path = bucketPath.getRawPath(); @@ -156,4 +157,4 @@ private static void validateUriIsRelative(Uri uri) { throw new IllegalArgumentException("URI should be relative"); } } -} \ No newline at end of file +} From 0bae4119eb5d935ce81ddd24a9052c2e7cbd7d24 Mon Sep 17 00:00:00 2001 From: Valentyn Berezin Date: Wed, 18 Sep 2019 11:16:12 +0300 Subject: [PATCH 098/255] DOC-239. Make dependency plugin happy --- .../datasafe-simple-adapter-api/pom.xml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/datasafe-simple-adapter/datasafe-simple-adapter-api/pom.xml b/datasafe-simple-adapter/datasafe-simple-adapter-api/pom.xml index 5da537bb7..ffe105d1e 100644 --- a/datasafe-simple-adapter/datasafe-simple-adapter-api/pom.xml +++ b/datasafe-simple-adapter/datasafe-simple-adapter-api/pom.xml @@ -11,12 +11,19 @@ datasafe-simple-adapter-api + + de.adorsys + datasafe-types-api + ${project.version} + compile + de.adorsys datasafe-encryption-api ${project.version} compile + org.slf4j slf4j-api From db9e5d46e349a40b6223202d161744304ff7b6ba Mon Sep 17 00:00:00 2001 From: Ihor Yatsenko Date: Wed, 18 Sep 2019 11:29:34 +0300 Subject: [PATCH 099/255] DOC-239: Clean up pom.xml --- datasafe-business/pom.xml | 5 +++++ datasafe-simple-adapter/datasafe-simple-adapter-api/pom.xml | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/datasafe-business/pom.xml b/datasafe-business/pom.xml index 91669d057..7eae520a1 100644 --- a/datasafe-business/pom.xml +++ b/datasafe-business/pom.xml @@ -94,6 +94,10 @@ org.bouncycastle bcprov-jdk15on + + org.cryptomator + siv-mode + com.google.code.findbugs @@ -177,6 +181,7 @@ h2 test + diff --git a/datasafe-simple-adapter/datasafe-simple-adapter-api/pom.xml b/datasafe-simple-adapter/datasafe-simple-adapter-api/pom.xml index 5da537bb7..9579831eb 100644 --- a/datasafe-simple-adapter/datasafe-simple-adapter-api/pom.xml +++ b/datasafe-simple-adapter/datasafe-simple-adapter-api/pom.xml @@ -22,6 +22,11 @@ slf4j-api ${slf4j-simple.version} + + de.adorsys + datasafe-types-api + ${project.version} + org.junit.jupiter junit-jupiter-api From 4371b7de533e7fbb4dfe0faa65a81927987f3c5d Mon Sep 17 00:00:00 2001 From: Valentyn Berezin Date: Wed, 18 Sep 2019 12:47:33 +0300 Subject: [PATCH 100/255] DOC-239. Use SecretKeyIDWithKey in PathEncryptionSecretKey --- .../keystore/PathEncryptionSecretKeyTest.java | 24 +++-------- .../keys/DFSPrivateKeyServiceImpl.java | 41 ++++++++----------- .../encrypiton/api/types/keystore/KeyID.java | 2 +- .../keystore/PathEncryptionSecretKey.java | 12 +----- .../types/keystore/SecretKeyIDWithKey.java | 3 +- .../DefaultPathEncryptorDecryptor.java | 13 ++---- ...ymmetricPathEncryptionServiceImplTest.java | 4 +- .../datasafe-simple-adapter-api/pom.xml | 8 +--- .../LegacyDFSPrivateKeyServiceImpl.java | 6 +-- .../LegacyPathEncryptionImpl.java | 4 +- .../teststorage/WithStorageProvider.java | 4 +- 11 files changed, 39 insertions(+), 82 deletions(-) diff --git a/datasafe-business/src/test/java/de/adorsys/datasafe/encrypiton/api/types/keystore/PathEncryptionSecretKeyTest.java b/datasafe-business/src/test/java/de/adorsys/datasafe/encrypiton/api/types/keystore/PathEncryptionSecretKeyTest.java index 28af136ec..7f414c937 100644 --- a/datasafe-business/src/test/java/de/adorsys/datasafe/encrypiton/api/types/keystore/PathEncryptionSecretKeyTest.java +++ b/datasafe-business/src/test/java/de/adorsys/datasafe/encrypiton/api/types/keystore/PathEncryptionSecretKeyTest.java @@ -26,38 +26,24 @@ class PathEncryptionSecretKeyTest extends BaseMockitoTest { @Test void validateAllOk() { PathEncryptionSecretKey key = new PathEncryptionSecretKey( - secretKeyId, secretKey, counterKeyId, counterSecretKey + new SecretKeyIDWithKey(secretKeyId, secretKey), new SecretKeyIDWithKey(counterKeyId, counterSecretKey) ); - assertThat(key.getSecretKey()).isEqualTo(secretKey); - assertThat(key.getCounterSecretKey()).isEqualTo(counterSecretKey); - } - - @Test - void validateNullSecretKeyIdImpossible() { - assertThrows(NullPointerException.class, () -> - new PathEncryptionSecretKey(null, secretKey, counterKeyId, counterSecretKey) - ); + assertThat(key.getSecretKey().getSecretKey()).isEqualTo(secretKey); + assertThat(key.getCounterSecretKey().getSecretKey()).isEqualTo(counterSecretKey); } @Test void validateNullSecretKeyImpossible() { assertThrows(NullPointerException.class, () -> - new PathEncryptionSecretKey(secretKeyId, null, counterKeyId, counterSecretKey) - ); - } - - @Test - void validateNullCounterKeyIdImpossible() { - assertThrows(NullPointerException.class, () -> - new PathEncryptionSecretKey(secretKeyId, secretKey, null, counterSecretKey) + new PathEncryptionSecretKey(null, new SecretKeyIDWithKey(counterKeyId, counterSecretKey)) ); } @Test void validateNullCounterKeyImpossible() { assertThrows(NullPointerException.class, () -> - new PathEncryptionSecretKey(secretKeyId, secretKey, counterKeyId, null) + new PathEncryptionSecretKey(new SecretKeyIDWithKey(secretKeyId, secretKey), null) ); } } diff --git a/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/keys/DFSPrivateKeyServiceImpl.java b/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/keys/DFSPrivateKeyServiceImpl.java index 10ef2b705..0220efaf1 100644 --- a/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/keys/DFSPrivateKeyServiceImpl.java +++ b/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/keys/DFSPrivateKeyServiceImpl.java @@ -12,7 +12,7 @@ import javax.crypto.SecretKey; import javax.inject.Inject; import java.security.Key; -import java.util.List; +import java.util.Collection; import java.util.Map; import java.util.Set; import java.util.stream.Collectors; @@ -38,16 +38,14 @@ public DFSPrivateKeyServiceImpl(DocumentKeyStoreOperations keyStoreOper) { */ @Override public PathEncryptionSecretKey pathEncryptionSecretKey(UserIDAuth forUser) { - List secretKeyIds = getSecretKeyIds(forUser); - - String secretPathKeyId = getSecretPathKeyIdByPrefix(secretKeyIds, PATH_KEY_ID_PREFIX); - String secretPathCtrKeyId = getSecretPathKeyIdByPrefix(secretKeyIds, PATH_KEY_ID_PREFIX_CTR); + Set aliases = keyStoreOper.readAliases(forUser); + SecretKeyIDWithKey secretPathKeyId = keyByPrefix(forUser, aliases, PATH_KEY_ID_PREFIX); + SecretKeyIDWithKey secretPathCtrKeyId = keyByPrefix(forUser, aliases, PATH_KEY_ID_PREFIX_CTR); return new PathEncryptionSecretKey( - new KeyID(secretPathKeyId), - (SecretKey) keyStoreOper.getKey(forUser, secretPathKeyId), - new KeyID(secretPathCtrKeyId), - (SecretKey) keyStoreOper.getKey(forUser, secretPathCtrKeyId)); + secretPathKeyId, + secretPathCtrKeyId + ); } /** @@ -74,7 +72,15 @@ public Map keysByIds(UserIDAuth forUser, Set keyIds) { } protected SecretKeyIDWithKey keyByPrefix(UserIDAuth forUser, String prefix) { - KeyID key = keyStoreOper.readAliases(forUser).stream() + return keyByPrefix( + forUser, + keyStoreOper.readAliases(forUser), + prefix + ); + } + + protected SecretKeyIDWithKey keyByPrefix(UserIDAuth forUser, Collection aliases, String prefix) { + KeyID key = aliases.stream() .filter(it -> it.startsWith(prefix)) .map(KeyID::new) .findFirst() @@ -85,19 +91,4 @@ protected SecretKeyIDWithKey keyByPrefix(UserIDAuth forUser, String prefix) { (SecretKey) keyStoreOper.getKey(forUser, key.getValue()) ); } - - private String getSecretPathKeyIdByPrefix(List keys, String pathKeyIdPrefix) { - return keys.stream() - .filter(it -> it.getValue().startsWith(pathKeyIdPrefix)) - .findFirst() - .orElseThrow(() -> new IllegalStateException("Key ID with prefix " + pathKeyIdPrefix + " not found")) - .getValue(); - } - - private List getSecretKeyIds(UserIDAuth forUser) { - return keyStoreOper.readAliases(forUser).stream() - .filter(it -> it.startsWith(PATH_KEY_ID_PREFIX) || it.startsWith(PATH_KEY_ID_PREFIX_CTR)) - .map(KeyID::new) - .collect(Collectors.toList()); - } } diff --git a/datasafe-encryption/datasafe-encryption-api/src/main/java/de/adorsys/datasafe/encrypiton/api/types/keystore/KeyID.java b/datasafe-encryption/datasafe-encryption-api/src/main/java/de/adorsys/datasafe/encrypiton/api/types/keystore/KeyID.java index 0be6bbbf3..df60db9dc 100644 --- a/datasafe-encryption/datasafe-encryption-api/src/main/java/de/adorsys/datasafe/encrypiton/api/types/keystore/KeyID.java +++ b/datasafe-encryption/datasafe-encryption-api/src/main/java/de/adorsys/datasafe/encrypiton/api/types/keystore/KeyID.java @@ -6,7 +6,7 @@ /** * Wrapper that identifies key inside keystore. */ -@ToString(callSuper=true) +@ToString(callSuper = true) public class KeyID extends BaseTypeString { public KeyID(String value) { diff --git a/datasafe-encryption/datasafe-encryption-api/src/main/java/de/adorsys/datasafe/encrypiton/api/types/keystore/PathEncryptionSecretKey.java b/datasafe-encryption/datasafe-encryption-api/src/main/java/de/adorsys/datasafe/encrypiton/api/types/keystore/PathEncryptionSecretKey.java index 6775b8b47..d495070c1 100644 --- a/datasafe-encryption/datasafe-encryption-api/src/main/java/de/adorsys/datasafe/encrypiton/api/types/keystore/PathEncryptionSecretKey.java +++ b/datasafe-encryption/datasafe-encryption-api/src/main/java/de/adorsys/datasafe/encrypiton/api/types/keystore/PathEncryptionSecretKey.java @@ -2,8 +2,6 @@ import lombok.*; -import javax.crypto.SecretKey; - @Getter @ToString @Value @@ -11,14 +9,8 @@ public class PathEncryptionSecretKey { @NonNull - private final KeyID secretKeyId; - - @NonNull - private final SecretKey secretKey; - - @NonNull - private final KeyID counterKeyId; + private final SecretKeyIDWithKey secretKey; @NonNull - private final SecretKey counterSecretKey; + private final SecretKeyIDWithKey counterSecretKey; } diff --git a/datasafe-encryption/datasafe-encryption-api/src/main/java/de/adorsys/datasafe/encrypiton/api/types/keystore/SecretKeyIDWithKey.java b/datasafe-encryption/datasafe-encryption-api/src/main/java/de/adorsys/datasafe/encrypiton/api/types/keystore/SecretKeyIDWithKey.java index d517ce79e..eea75af71 100644 --- a/datasafe-encryption/datasafe-encryption-api/src/main/java/de/adorsys/datasafe/encrypiton/api/types/keystore/SecretKeyIDWithKey.java +++ b/datasafe-encryption/datasafe-encryption-api/src/main/java/de/adorsys/datasafe/encrypiton/api/types/keystore/SecretKeyIDWithKey.java @@ -10,11 +10,10 @@ * Wrapper for secret key and its ID, so it can be found by ID within keystore. */ @Getter -@ToString +@ToString(of = "keyID") @RequiredArgsConstructor public class SecretKeyIDWithKey { private final KeyID keyID; private final SecretKey secretKey; - } diff --git a/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/pathencryption/DefaultPathEncryptorDecryptor.java b/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/pathencryption/DefaultPathEncryptorDecryptor.java index a7e3118a0..0efbab159 100644 --- a/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/pathencryption/DefaultPathEncryptorDecryptor.java +++ b/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/pathencryption/DefaultPathEncryptorDecryptor.java @@ -23,19 +23,15 @@ public class DefaultPathEncryptorDecryptor implements PathEncryptorDecryptor { @Inject public DefaultPathEncryptorDecryptor(SivMode sivMode) { - if(sivMode == null) { - throw new IllegalArgumentException("SivMode must be provided for encryption and decryption"); - } this.sivMode = sivMode; } @Override public byte[] encrypt(PathEncryptionSecretKey pathSecretKey, byte[] originalPath, byte[] associated) { - log.debug("Path secret key: {}, original path: {}", pathSecretKey.toString(), originalPath); return sivMode.encrypt( - pathSecretKey.getCounterSecretKey().getEncoded(), - pathSecretKey.getSecretKey().getEncoded(), + pathSecretKey.getCounterSecretKey().getSecretKey(), + pathSecretKey.getSecretKey().getSecretKey(), originalPath, associated ); @@ -44,11 +40,10 @@ public byte[] encrypt(PathEncryptionSecretKey pathSecretKey, byte[] originalPath @Override @SneakyThrows public byte[] decrypt(PathEncryptionSecretKey pathSecretKey, byte[] encryptedPath, byte[] associated) { - log.debug("Path secret key: {}, encrypted path: {}", pathSecretKey.toString(), encryptedPath); return sivMode.decrypt( - pathSecretKey.getCounterSecretKey().getEncoded(), - pathSecretKey.getSecretKey().getEncoded(), + pathSecretKey.getCounterSecretKey().getSecretKey(), + pathSecretKey.getSecretKey().getSecretKey(), encryptedPath, associated ); diff --git a/datasafe-encryption/datasafe-encryption-impl/src/test/java/de/adorsys/datasafe/encrypiton/impl/pathencryption/SymmetricPathEncryptionServiceImplTest.java b/datasafe-encryption/datasafe-encryption-impl/src/test/java/de/adorsys/datasafe/encrypiton/impl/pathencryption/SymmetricPathEncryptionServiceImplTest.java index 58626e9f6..26a10270e 100644 --- a/datasafe-encryption/datasafe-encryption-impl/src/test/java/de/adorsys/datasafe/encrypiton/impl/pathencryption/SymmetricPathEncryptionServiceImplTest.java +++ b/datasafe-encryption/datasafe-encryption-impl/src/test/java/de/adorsys/datasafe/encrypiton/impl/pathencryption/SymmetricPathEncryptionServiceImplTest.java @@ -100,6 +100,8 @@ private PathEncryptionSecretKey pathEncryptionSecretKey() { ); return new PathEncryptionSecretKey( - secretKeyId, secretKey, counterSecretKeyId, secretKeyCtr); + new SecretKeyIDWithKey(secretKeyId, secretKey), + new SecretKeyIDWithKey(counterSecretKeyId, secretKeyCtr) + ); } } diff --git a/datasafe-simple-adapter/datasafe-simple-adapter-api/pom.xml b/datasafe-simple-adapter/datasafe-simple-adapter-api/pom.xml index b656ee52c..0b3692047 100644 --- a/datasafe-simple-adapter/datasafe-simple-adapter-api/pom.xml +++ b/datasafe-simple-adapter/datasafe-simple-adapter-api/pom.xml @@ -15,13 +15,11 @@ de.adorsys datasafe-types-api ${project.version} - compile de.adorsys datasafe-encryption-api ${project.version} - compile @@ -29,11 +27,7 @@ slf4j-api ${slf4j-simple.version} - - de.adorsys - datasafe-types-api - ${project.version} - + org.junit.jupiter junit-jupiter-api diff --git a/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/main/java/de/adorsys/datasafe/simple/adapter/impl/legacy/directory/LegacyDFSPrivateKeyServiceImpl.java b/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/main/java/de/adorsys/datasafe/simple/adapter/impl/legacy/directory/LegacyDFSPrivateKeyServiceImpl.java index 004227aeb..52bc98bb0 100644 --- a/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/main/java/de/adorsys/datasafe/simple/adapter/impl/legacy/directory/LegacyDFSPrivateKeyServiceImpl.java +++ b/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/main/java/de/adorsys/datasafe/simple/adapter/impl/legacy/directory/LegacyDFSPrivateKeyServiceImpl.java @@ -28,10 +28,8 @@ public LegacyDFSPrivateKeyServiceImpl(DocumentKeyStoreOperations keyStoreOper) { public PathEncryptionSecretKey pathEncryptionSecretKey(UserIDAuth forUser) { SecretKeyIDWithKey secretKeyIDWithKey = keyByPrefix(forUser, PATH_KEY_ID_PREFIX); return new PathEncryptionSecretKey( - secretKeyIDWithKey.getKeyID(), - secretKeyIDWithKey.getSecretKey(), - secretKeyIDWithKey.getKeyID(), - secretKeyIDWithKey.getSecretKey() + secretKeyIDWithKey, + secretKeyIDWithKey ); } } diff --git a/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/main/java/de/adorsys/datasafe/simple/adapter/impl/legacy/pathencryption/LegacyPathEncryptionImpl.java b/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/main/java/de/adorsys/datasafe/simple/adapter/impl/legacy/pathencryption/LegacyPathEncryptionImpl.java index a4fe14ae8..05a7963dc 100644 --- a/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/main/java/de/adorsys/datasafe/simple/adapter/impl/legacy/pathencryption/LegacyPathEncryptionImpl.java +++ b/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/main/java/de/adorsys/datasafe/simple/adapter/impl/legacy/pathencryption/LegacyPathEncryptionImpl.java @@ -34,7 +34,7 @@ public LegacyPathEncryptionImpl(LegacySymmetricPathEncryptionService bucketPathE @Override public Uri encrypt(UserIDAuth forUser, Uri path) { PathEncryptionSecretKey keySpec = privateKeyService.pathEncryptionSecretKey(forUser); - Uri encrypt = bucketPathEncryptionService.encrypt(keySpec.getSecretKey(), path); + Uri encrypt = bucketPathEncryptionService.encrypt(keySpec.getSecretKey().getSecretKey(), path); log.debug("encrypted path {} for user {} path {}", encrypt, forUser.getUserID(), path); return encrypt; } @@ -46,7 +46,7 @@ public Uri encrypt(UserIDAuth forUser, Uri path) { public Function decryptor(UserIDAuth forUser) { PathEncryptionSecretKey keySpec = privateKeyService.pathEncryptionSecretKey(forUser); return encryptedPath -> { - Uri decrypt = bucketPathEncryptionService.decrypt(keySpec.getSecretKey(), encryptedPath); + Uri decrypt = bucketPathEncryptionService.decrypt(keySpec.getSecretKey().getSecretKey(), encryptedPath); log.debug("decrypted path {} for user {} path {}", decrypt, forUser.getUserID(), encryptedPath); return decrypt; }; diff --git a/datasafe-test-storages/src/main/java/de/adorsys/datasafe/teststorage/WithStorageProvider.java b/datasafe-test-storages/src/main/java/de/adorsys/datasafe/teststorage/WithStorageProvider.java index c6b124b36..ee16a859f 100644 --- a/datasafe-test-storages/src/main/java/de/adorsys/datasafe/teststorage/WithStorageProvider.java +++ b/datasafe-test-storages/src/main/java/de/adorsys/datasafe/teststorage/WithStorageProvider.java @@ -186,10 +186,10 @@ protected static Stream allDefaultStorages() { @ValueSource protected static Stream allStorages() { return Stream.of( - fs()/*, + fs(), minio(), cephVersioned(), - s3()*/ + s3() ).filter(Objects::nonNull); } From a52cf0c238d4889cdd67f186d92f6b57e35e6847 Mon Sep 17 00:00:00 2001 From: Ihor Yatsenko Date: Wed, 18 Sep 2019 13:48:38 +0300 Subject: [PATCH 101/255] DOC-239: remove commented section from test --- .../de/adorsys/datasafe/teststorage/WithStorageProvider.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/datasafe-test-storages/src/main/java/de/adorsys/datasafe/teststorage/WithStorageProvider.java b/datasafe-test-storages/src/main/java/de/adorsys/datasafe/teststorage/WithStorageProvider.java index c6b124b36..ee16a859f 100644 --- a/datasafe-test-storages/src/main/java/de/adorsys/datasafe/teststorage/WithStorageProvider.java +++ b/datasafe-test-storages/src/main/java/de/adorsys/datasafe/teststorage/WithStorageProvider.java @@ -186,10 +186,10 @@ protected static Stream allDefaultStorages() { @ValueSource protected static Stream allStorages() { return Stream.of( - fs()/*, + fs(), minio(), cephVersioned(), - s3()*/ + s3() ).filter(Objects::nonNull); } From 1e10f7bdeb2ba47fd14b8a04f4597fc3221bfe0f Mon Sep 17 00:00:00 2001 From: Valentyn Berezin Date: Wed, 18 Sep 2019 15:56:12 +0300 Subject: [PATCH 102/255] DOC-266. Added more tests --- .../impl/profile/config/DefaultDFSConfig.java | 7 +- .../config/DFSConfigWithStorageCredsTest.java | 30 ++++++++ .../StorageKeyStoreOperationsImplTest.java | 75 +++++++++++++++++++ 3 files changed, 110 insertions(+), 2 deletions(-) create mode 100644 datasafe-directory/datasafe-directory-impl/src/test/java/de/adorsys/datasafe/directory/impl/profile/config/DFSConfigWithStorageCredsTest.java create mode 100644 datasafe-directory/datasafe-directory-impl/src/test/java/de/adorsys/datasafe/directory/impl/profile/keys/StorageKeyStoreOperationsImplTest.java diff --git a/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/config/DefaultDFSConfig.java b/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/config/DefaultDFSConfig.java index d02e4274e..f0883b8ca 100644 --- a/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/config/DefaultDFSConfig.java +++ b/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/config/DefaultDFSConfig.java @@ -166,12 +166,15 @@ public static URI addTrailingSlashIfNeeded(URI systemRoot) { public static String addTrailingSlashIfNeeded(String systemRoot) { if (systemRoot == null) { - throw new RuntimeException("systemRoot must not be null"); + throw new IllegalArgumentException("systemRoot must not be null"); } + int last = systemRoot.length(); - if (systemRoot.substring(last - 1).equals("/")) { + + if (!systemRoot.isEmpty() && systemRoot.substring(last - 1).equals("/")) { return systemRoot; } + return systemRoot + "/"; } } diff --git a/datasafe-directory/datasafe-directory-impl/src/test/java/de/adorsys/datasafe/directory/impl/profile/config/DFSConfigWithStorageCredsTest.java b/datasafe-directory/datasafe-directory-impl/src/test/java/de/adorsys/datasafe/directory/impl/profile/config/DFSConfigWithStorageCredsTest.java new file mode 100644 index 000000000..0dbe6d9d8 --- /dev/null +++ b/datasafe-directory/datasafe-directory-impl/src/test/java/de/adorsys/datasafe/directory/impl/profile/config/DFSConfigWithStorageCredsTest.java @@ -0,0 +1,30 @@ +package de.adorsys.datasafe.directory.impl.profile.config; + +import de.adorsys.datasafe.directory.api.types.CreateUserPrivateProfile; +import de.adorsys.datasafe.encrypiton.api.types.UserIDAuth; +import de.adorsys.datasafe.types.api.global.Version; +import de.adorsys.datasafe.types.api.shared.BaseMockitoTest; +import org.junit.jupiter.api.Test; + +import static org.assertj.core.api.Assertions.assertThat; + +class DFSConfigWithStorageCredsTest extends BaseMockitoTest { + + private DFSConfigWithStorageCreds tested = new DFSConfigWithStorageCreds("file://path", "secret"); + + @Test + void defaultPrivateTemplate() { + UserIDAuth user = new UserIDAuth("", ""); + + CreateUserPrivateProfile profile = tested.defaultPrivateTemplate(user); + + assertThat(profile.getId()).isEqualTo(user); + assertThat(profile.getAppVersion()).isEqualTo(Version.current()); + assertThat(profile.getPrivateStorage().location().asString()).isEqualTo("file://path/private/files/"); + assertThat(profile.getKeystore().location().asString()).isEqualTo("file://path/private/keystore"); + assertThat(profile.getStorageCredentialsKeystore().location().asString()) + .isEqualTo("file://path/private/storagekeystore"); + assertThat(profile.getPublishPubKeysTo().location().asString()).isEqualTo("file://path/public/pubkeys"); + assertThat(profile.getInboxWithWriteAccess().location().asString()).isEqualTo("file://path/public/inbox/"); + } +} diff --git a/datasafe-directory/datasafe-directory-impl/src/test/java/de/adorsys/datasafe/directory/impl/profile/keys/StorageKeyStoreOperationsImplTest.java b/datasafe-directory/datasafe-directory-impl/src/test/java/de/adorsys/datasafe/directory/impl/profile/keys/StorageKeyStoreOperationsImplTest.java new file mode 100644 index 000000000..a182ed217 --- /dev/null +++ b/datasafe-directory/datasafe-directory-impl/src/test/java/de/adorsys/datasafe/directory/impl/profile/keys/StorageKeyStoreOperationsImplTest.java @@ -0,0 +1,75 @@ +package de.adorsys.datasafe.directory.impl.profile.keys; + +import de.adorsys.datasafe.directory.api.profile.dfs.BucketAccessService; +import de.adorsys.datasafe.directory.api.profile.operations.ProfileRetrievalService; +import de.adorsys.datasafe.directory.api.types.UserPrivateProfile; +import de.adorsys.datasafe.directory.impl.profile.serde.GsonSerde; +import de.adorsys.datasafe.encrypiton.api.keystore.KeyStoreService; +import de.adorsys.datasafe.encrypiton.api.types.UserIDAuth; +import de.adorsys.datasafe.types.api.resource.AbsoluteLocation; +import de.adorsys.datasafe.types.api.resource.BasePrivateResource; +import de.adorsys.datasafe.types.api.resource.PrivateResource; +import de.adorsys.datasafe.types.api.resource.StorageIdentifier; +import de.adorsys.datasafe.types.api.shared.BaseMockitoTest; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.mockito.Answers; +import org.mockito.InjectMocks; +import org.mockito.Mock; + +import static org.mockito.ArgumentMatchers.any; +import static org.mockito.ArgumentMatchers.eq; +import static org.mockito.Mockito.verify; +import static org.mockito.Mockito.when; + +class StorageKeyStoreOperationsImplTest extends BaseMockitoTest { + + private static final String STORAGE_ID = "id"; + private static final String SECRET = "secret"; + private static final AbsoluteLocation STORAGE_KEYSTORE = + BasePrivateResource.forAbsolutePrivate("file://path"); + + @Mock + private GsonSerde gson; + + @Mock + private KeyStoreService keyStoreService; + + @Mock + private GenericKeystoreOperations genericOper; + + @Mock + private ProfileRetrievalService profile; + + @Mock + private BucketAccessService access; + + @Mock(answer = Answers.RETURNS_DEEP_STUBS) + private KeyStoreCache keystoreCache; + + @Mock + private UserPrivateProfile privateProfile; + + private UserIDAuth user = new UserIDAuth("john", SECRET); + + private StorageIdentifier storageId = new StorageIdentifier(STORAGE_ID); + + @InjectMocks + private StorageKeyStoreOperationsImpl tested; + + @BeforeEach + void init() { + when(profile.privateProfile(user)).thenReturn(privateProfile); + when(privateProfile.getStorageCredentialsKeystore()).thenReturn(STORAGE_KEYSTORE); + when(access.withSystemAccess(any())).thenAnswer(inv -> inv.getArgument(0)); + } + + @Test + void removeStorageCredentials() { + tested.removeStorageCredentials(user, storageId); + + verify(keyStoreService).removeKey(any(), eq(STORAGE_ID)); + verify(genericOper).writeKeystore(eq(user.getUserID()), any(), eq(STORAGE_KEYSTORE), any()); + verify(keystoreCache.getStorageAccess()).remove(user.getUserID()); + } +} From 64609d2ee255363220c25ddb13788caac3fd9b58 Mon Sep 17 00:00:00 2001 From: Valentyn Berezin Date: Wed, 18 Sep 2019 16:27:50 +0300 Subject: [PATCH 103/255] DOC-266. Added more tests --- .../adapter/impl/legacy/KeystoreUtil.java | 25 +++++ ...ymmetricPathEncryptionServiceImplTest.java | 99 +++++++++++++++++++ .../VersionedPrivateResourceTest.java | 66 +++++++++++++ 3 files changed, 190 insertions(+) create mode 100644 datasafe-simple-adapter/datasafe-simple-adapter-impl/src/test/java/de/adorsys/datasafe/simple/adapter/impl/legacy/KeystoreUtil.java create mode 100644 datasafe-simple-adapter/datasafe-simple-adapter-impl/src/test/java/de/adorsys/datasafe/simple/adapter/impl/legacy/SymmetricPathEncryptionServiceImplTest.java create mode 100644 datasafe-types-api/src/test/java/de/adorsys/datasafe/types/api/resource/VersionedPrivateResourceTest.java diff --git a/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/test/java/de/adorsys/datasafe/simple/adapter/impl/legacy/KeystoreUtil.java b/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/test/java/de/adorsys/datasafe/simple/adapter/impl/legacy/KeystoreUtil.java new file mode 100644 index 000000000..d5dd8473d --- /dev/null +++ b/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/test/java/de/adorsys/datasafe/simple/adapter/impl/legacy/KeystoreUtil.java @@ -0,0 +1,25 @@ +package de.adorsys.datasafe.simple.adapter.impl.legacy; + +import de.adorsys.datasafe.encrypiton.api.types.keystore.KeyID; +import lombok.SneakyThrows; +import lombok.experimental.UtilityClass; + +import java.security.KeyStore; +import java.util.Enumeration; + +@UtilityClass +public class KeystoreUtil { + + @SneakyThrows + public KeyID keyIdByPrefix(KeyStore keyStore, String prefix) { + Enumeration aliases = keyStore.aliases(); + while (aliases.hasMoreElements()) { + String element = aliases.nextElement(); + if (element.startsWith(prefix)) { + return new KeyID(element); + } + } + + throw new IllegalArgumentException("Keystore does not contain key with prefix: " + prefix); + } +} diff --git a/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/test/java/de/adorsys/datasafe/simple/adapter/impl/legacy/SymmetricPathEncryptionServiceImplTest.java b/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/test/java/de/adorsys/datasafe/simple/adapter/impl/legacy/SymmetricPathEncryptionServiceImplTest.java new file mode 100644 index 000000000..0d696ecea --- /dev/null +++ b/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/test/java/de/adorsys/datasafe/simple/adapter/impl/legacy/SymmetricPathEncryptionServiceImplTest.java @@ -0,0 +1,99 @@ +package de.adorsys.datasafe.simple.adapter.impl.legacy; + +import de.adorsys.datasafe.encrypiton.api.keystore.KeyStoreService; +import de.adorsys.datasafe.encrypiton.api.types.keystore.*; +import de.adorsys.datasafe.encrypiton.impl.keystore.DefaultPasswordBasedKeyConfig; +import de.adorsys.datasafe.encrypiton.impl.keystore.KeyStoreServiceImpl; +import de.adorsys.datasafe.simple.adapter.api.legacy.pathencryption.LegacySymmetricPathEncryptionService; +import de.adorsys.datasafe.simple.adapter.impl.legacy.pathencryption.LegacyPathDigestConfig; +import de.adorsys.datasafe.simple.adapter.impl.legacy.pathencryption.LegacyPathEncryptor; +import de.adorsys.datasafe.simple.adapter.impl.legacy.pathencryption.LegacySymmetricPathEncryptionServiceImpl; +import de.adorsys.datasafe.types.api.resource.Uri; +import de.adorsys.datasafe.types.api.shared.BaseMockitoTest; +import lombok.extern.slf4j.Slf4j; +import org.junit.jupiter.api.Test; + +import javax.crypto.BadPaddingException; +import javax.crypto.IllegalBlockSizeException; +import javax.crypto.spec.SecretKeySpec; +import java.net.URI; +import java.net.URISyntaxException; +import java.security.KeyStore; + +import static de.adorsys.datasafe.encrypiton.api.types.keystore.KeyStoreCreationConfig.PATH_KEY_ID_PREFIX; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertThrows; + +@Slf4j +class SymmetricPathEncryptionServiceImplTest extends BaseMockitoTest { + + private LegacySymmetricPathEncryptionService bucketPathEncryptionService = new LegacySymmetricPathEncryptionServiceImpl( + new LegacyPathEncryptor(new LegacyPathDigestConfig()) + ); + + private KeyStoreService keyStoreService = new KeyStoreServiceImpl(new DefaultPasswordBasedKeyConfig()); + private ReadKeyPassword readKeyPassword = new ReadKeyPassword("readkeypassword"); + private ReadStorePassword readStorePassword = new ReadStorePassword("readstorepassword"); + private KeyStoreAuth keyStoreAuth = new KeyStoreAuth(readStorePassword, readKeyPassword); + private KeyStoreCreationConfig config = new KeyStoreCreationConfig(0, 1); + private KeyStore keyStore = keyStoreService.createKeyStore(keyStoreAuth, KeyStoreType.DEFAULT, config); + private KeyStoreAccess keyStoreAccess = new KeyStoreAccess(keyStore, keyStoreAuth); + + @Test + void testSuccessEncryptDecryptPath() { + String testPath = "path/to/file"; + + log.info("Test path: {}", testPath); + + Uri testURI = new Uri(testPath); + + SecretKeySpec secretKey = keyStoreService.getSecretKey( + keyStoreAccess, + KeystoreUtil.keyIdByPrefix(keyStore, PATH_KEY_ID_PREFIX) + ); + Uri encrypted = bucketPathEncryptionService.encrypt(secretKey, testURI); + Uri decrypted = bucketPathEncryptionService.decrypt(secretKey, encrypted); + + log.debug("Encrypted path: {}", encrypted); + + assertEquals(testPath, decrypted.toASCIIString()); + } + + @Test + void testFailEncryptPathWithWrongKeyID() throws URISyntaxException { + String testPath = "path/to/file/"; + + log.info("Test path: {}", testPath); + + Uri testURI = new Uri(testPath); + + SecretKeySpec secretKey = keyStoreService.getSecretKey(keyStoreAccess, new KeyID("Invalid key")); + // secret keys is null, because during key obtain was used incorrect KeyID, + // so bucketPathEncryptionService#encrypt throw BaseException(was handled NullPointerException) + assertThrows(IllegalArgumentException.class, () -> bucketPathEncryptionService.encrypt(secretKey, testURI)); + } + + @Test + void testFailEncryptPathWithBrokenEncryptedPath() { + SecretKeySpec secretKey = keyStoreService.getSecretKey( + keyStoreAccess, + KeystoreUtil.keyIdByPrefix(keyStore, PATH_KEY_ID_PREFIX) + ); + + assertThrows(BadPaddingException.class, + () -> bucketPathEncryptionService.decrypt(secretKey, + new Uri(URI.create("bRQiW8qLNPEy5tO7shfV0w==/k0HooCVlmhHkQFw8mc==")))); + } + + @Test + void testFailEncryptPathWithTextPath() { + SecretKeySpec secretKey = keyStoreService.getSecretKey( + keyStoreAccess, + KeystoreUtil.keyIdByPrefix(keyStore, PATH_KEY_ID_PREFIX) + ); + + assertThrows(IllegalBlockSizeException.class, + () -> bucketPathEncryptionService.decrypt(secretKey, + new Uri("/simple/text/path/"))); + } +} diff --git a/datasafe-types-api/src/test/java/de/adorsys/datasafe/types/api/resource/VersionedPrivateResourceTest.java b/datasafe-types-api/src/test/java/de/adorsys/datasafe/types/api/resource/VersionedPrivateResourceTest.java new file mode 100644 index 000000000..be0f76e81 --- /dev/null +++ b/datasafe-types-api/src/test/java/de/adorsys/datasafe/types/api/resource/VersionedPrivateResourceTest.java @@ -0,0 +1,66 @@ +package de.adorsys.datasafe.types.api.resource; + +import de.adorsys.datasafe.types.api.shared.BaseMockitoTest; +import org.junit.jupiter.api.Test; + +import static org.assertj.core.api.Assertions.assertThat; +import static org.mockito.Mockito.mock; + +class VersionedPrivateResourceTest extends BaseMockitoTest { + + private static final String SOME_PATH = "some/path/"; + private Version version = mock(Version.class); + + private PrivateResource resource = BasePrivateResource.forPrivate(SOME_PATH); + private PrivateResource absoluteResource = BasePrivateResource + .forAbsolutePrivate("file://some/path/").getResource(); + + private VersionedPrivateResource tested = new VersionedPrivateResource<>(resource, version); + private VersionedPrivateResource absoluteTested = new VersionedPrivateResource<>(absoluteResource, version); + + @Test + void encryptedPath() { + assertThat(tested.encryptedPath().asString()).isEqualTo(SOME_PATH); + } + + @Test + void decryptedPath() { + assertThat(tested.decryptedPath().asString()).isEqualTo(""); + } + + @Test + void location() { + assertThat(tested.location().asString()).isEqualTo(SOME_PATH); + } + + @Test + void resolveFrom() { + assertThat( + tested.resolveFrom(BasePrivateResource.forAbsolutePrivate("file://data")).location().asString() + ).isEqualTo("file://data/some/path/"); + } + + @Test + void resolve() { + assertThat( + absoluteTested.resolve(new Uri("aa"), new Uri("bb")).location().asString() + ).isEqualTo("file://some/path/aa"); + } + + @Test + void withAuthority() { + assertThat( + absoluteTested.withAuthority("user", "secret").location().toASCIIString() + ).isEqualTo("file://user:secret@some/path/"); + } + + @Test + void getResource() { + assertThat(tested.getResource()).isEqualTo(resource); + } + + @Test + void getVersion() { + assertThat(tested.getVersion()).isEqualTo(version); + } +} From c17ce844645379e0939d9d691bb4bf8a38c20690 Mon Sep 17 00:00:00 2001 From: Valentyn Berezin Date: Wed, 18 Sep 2019 17:34:39 +0300 Subject: [PATCH 104/255] DOC-239. Authenticating user name too --- .../keystore/PathEncryptionSecretKeyTest.java | 29 ++++++++++++++--- .../api/profile/keys/PrivateKeyService.java | 4 +-- .../keys/DFSPrivateKeyServiceImpl.java | 7 +++-- .../SymmetricPathEncryptionService.java | 6 ++-- ....java => AuthPathEncryptionSecretKey.java} | 9 +++++- .../DefaultPathEncryptorDecryptor.java | 6 ++-- .../pathencryption/PathEncryptionImpl.java | 6 ++-- .../PathEncryptorDecryptor.java | 6 ++-- .../SymmetricPathEncryptionServiceImpl.java | 31 ++++++++++++------- .../dto/PathSegmentWithSecretKeyWith.java | 4 +-- ...ymmetricPathEncryptionServiceImplTest.java | 18 ++++++----- .../LegacyDFSPrivateKeyServiceImpl.java | 8 +++-- .../LegacyPathEncryptionImpl.java | 6 ++-- ...mmetricPathEncryptionServiceImplTest.java} | 2 +- 14 files changed, 92 insertions(+), 50 deletions(-) rename datasafe-encryption/datasafe-encryption-api/src/main/java/de/adorsys/datasafe/encrypiton/api/types/keystore/{PathEncryptionSecretKey.java => AuthPathEncryptionSecretKey.java} (56%) rename datasafe-simple-adapter/datasafe-simple-adapter-impl/src/test/java/de/adorsys/datasafe/simple/adapter/impl/legacy/{SymmetricPathEncryptionServiceImplTest.java => LegacySymmetricPathEncryptionServiceImplTest.java} (98%) diff --git a/datasafe-business/src/test/java/de/adorsys/datasafe/encrypiton/api/types/keystore/PathEncryptionSecretKeyTest.java b/datasafe-business/src/test/java/de/adorsys/datasafe/encrypiton/api/types/keystore/PathEncryptionSecretKeyTest.java index 7f414c937..24c79b2e5 100644 --- a/datasafe-business/src/test/java/de/adorsys/datasafe/encrypiton/api/types/keystore/PathEncryptionSecretKeyTest.java +++ b/datasafe-business/src/test/java/de/adorsys/datasafe/encrypiton/api/types/keystore/PathEncryptionSecretKeyTest.java @@ -1,5 +1,6 @@ package de.adorsys.datasafe.encrypiton.api.types.keystore; +import de.adorsys.datasafe.encrypiton.api.types.UserID; import de.adorsys.datasafe.types.api.shared.BaseMockitoTest; import org.junit.jupiter.api.Test; import org.mockito.Mock; @@ -23,27 +24,47 @@ class PathEncryptionSecretKeyTest extends BaseMockitoTest { @Mock private SecretKey counterSecretKey; + private UserID user = new UserID("user"); + @Test void validateAllOk() { - PathEncryptionSecretKey key = new PathEncryptionSecretKey( - new SecretKeyIDWithKey(secretKeyId, secretKey), new SecretKeyIDWithKey(counterKeyId, counterSecretKey) + AuthPathEncryptionSecretKey key = new AuthPathEncryptionSecretKey( + new UserID("user"), + new SecretKeyIDWithKey(secretKeyId, secretKey), + new SecretKeyIDWithKey(counterKeyId, counterSecretKey) ); assertThat(key.getSecretKey().getSecretKey()).isEqualTo(secretKey); assertThat(key.getCounterSecretKey().getSecretKey()).isEqualTo(counterSecretKey); } + @Test + void validateNullUserImpossible() { + assertThrows(NullPointerException.class, () -> + new AuthPathEncryptionSecretKey( + null, + new SecretKeyIDWithKey(secretKeyId, secretKey), + new SecretKeyIDWithKey(counterKeyId, counterSecretKey)) + ); + } + @Test void validateNullSecretKeyImpossible() { assertThrows(NullPointerException.class, () -> - new PathEncryptionSecretKey(null, new SecretKeyIDWithKey(counterKeyId, counterSecretKey)) + new AuthPathEncryptionSecretKey( + user, + null, + new SecretKeyIDWithKey(counterKeyId, counterSecretKey)) ); } @Test void validateNullCounterKeyImpossible() { assertThrows(NullPointerException.class, () -> - new PathEncryptionSecretKey(new SecretKeyIDWithKey(secretKeyId, secretKey), null) + new AuthPathEncryptionSecretKey( + user, + new SecretKeyIDWithKey(secretKeyId, secretKey), + null) ); } } diff --git a/datasafe-directory/datasafe-directory-api/src/main/java/de/adorsys/datasafe/directory/api/profile/keys/PrivateKeyService.java b/datasafe-directory/datasafe-directory-api/src/main/java/de/adorsys/datasafe/directory/api/profile/keys/PrivateKeyService.java index 2fe948296..9b0c23f90 100644 --- a/datasafe-directory/datasafe-directory-api/src/main/java/de/adorsys/datasafe/directory/api/profile/keys/PrivateKeyService.java +++ b/datasafe-directory/datasafe-directory-api/src/main/java/de/adorsys/datasafe/directory/api/profile/keys/PrivateKeyService.java @@ -1,7 +1,7 @@ package de.adorsys.datasafe.directory.api.profile.keys; import de.adorsys.datasafe.encrypiton.api.types.UserIDAuth; -import de.adorsys.datasafe.encrypiton.api.types.keystore.PathEncryptionSecretKey; +import de.adorsys.datasafe.encrypiton.api.types.keystore.AuthPathEncryptionSecretKey; import de.adorsys.datasafe.encrypiton.api.types.keystore.SecretKeyIDWithKey; import java.security.Key; @@ -18,7 +18,7 @@ public interface PrivateKeyService { * @param forUser Key owner * @return Path encryption entity which contain secret keys and key ID. */ - PathEncryptionSecretKey pathEncryptionSecretKey(UserIDAuth forUser); + AuthPathEncryptionSecretKey pathEncryptionSecretKey(UserIDAuth forUser); /** * Get document-encryption key diff --git a/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/keys/DFSPrivateKeyServiceImpl.java b/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/keys/DFSPrivateKeyServiceImpl.java index 0220efaf1..f721d9315 100644 --- a/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/keys/DFSPrivateKeyServiceImpl.java +++ b/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/keys/DFSPrivateKeyServiceImpl.java @@ -4,7 +4,7 @@ import de.adorsys.datasafe.directory.api.profile.keys.PrivateKeyService; import de.adorsys.datasafe.encrypiton.api.types.UserIDAuth; import de.adorsys.datasafe.encrypiton.api.types.keystore.KeyID; -import de.adorsys.datasafe.encrypiton.api.types.keystore.PathEncryptionSecretKey; +import de.adorsys.datasafe.encrypiton.api.types.keystore.AuthPathEncryptionSecretKey; import de.adorsys.datasafe.encrypiton.api.types.keystore.SecretKeyIDWithKey; import de.adorsys.datasafe.types.api.context.annotations.RuntimeDelegate; import lombok.SneakyThrows; @@ -37,12 +37,13 @@ public DFSPrivateKeyServiceImpl(DocumentKeyStoreOperations keyStoreOper) { * Reads path encryption secret key from DFS and caches the result. */ @Override - public PathEncryptionSecretKey pathEncryptionSecretKey(UserIDAuth forUser) { + public AuthPathEncryptionSecretKey pathEncryptionSecretKey(UserIDAuth forUser) { Set aliases = keyStoreOper.readAliases(forUser); SecretKeyIDWithKey secretPathKeyId = keyByPrefix(forUser, aliases, PATH_KEY_ID_PREFIX); SecretKeyIDWithKey secretPathCtrKeyId = keyByPrefix(forUser, aliases, PATH_KEY_ID_PREFIX_CTR); - return new PathEncryptionSecretKey( + return new AuthPathEncryptionSecretKey( + forUser.getUserID(), secretPathKeyId, secretPathCtrKeyId ); diff --git a/datasafe-encryption/datasafe-encryption-api/src/main/java/de/adorsys/datasafe/encrypiton/api/pathencryption/encryption/SymmetricPathEncryptionService.java b/datasafe-encryption/datasafe-encryption-api/src/main/java/de/adorsys/datasafe/encrypiton/api/pathencryption/encryption/SymmetricPathEncryptionService.java index ee6f9a414..eb19adacd 100644 --- a/datasafe-encryption/datasafe-encryption-api/src/main/java/de/adorsys/datasafe/encrypiton/api/pathencryption/encryption/SymmetricPathEncryptionService.java +++ b/datasafe-encryption/datasafe-encryption-api/src/main/java/de/adorsys/datasafe/encrypiton/api/pathencryption/encryption/SymmetricPathEncryptionService.java @@ -1,6 +1,6 @@ package de.adorsys.datasafe.encrypiton.api.pathencryption.encryption; -import de.adorsys.datasafe.encrypiton.api.types.keystore.PathEncryptionSecretKey; +import de.adorsys.datasafe.encrypiton.api.types.keystore.AuthPathEncryptionSecretKey; import de.adorsys.datasafe.types.api.resource.Uri; /** @@ -14,7 +14,7 @@ public interface SymmetricPathEncryptionService { * @param bucketPath Path to encrypt * @return Encrypted relative URI that can be safely published. */ - Uri encrypt(PathEncryptionSecretKey pathEncryptionSecretKey, Uri bucketPath); + Uri encrypt(AuthPathEncryptionSecretKey pathEncryptionSecretKey, Uri bucketPath); /** * Decrypts relative URI using secret key. @@ -22,6 +22,6 @@ public interface SymmetricPathEncryptionService { * @param bucketPath Path to decrypt * @return Decrypted relative URI typically containing some sensitive information. */ - Uri decrypt(PathEncryptionSecretKey pathEncryptionSecretKey, Uri bucketPath); + Uri decrypt(AuthPathEncryptionSecretKey pathEncryptionSecretKey, Uri bucketPath); } diff --git a/datasafe-encryption/datasafe-encryption-api/src/main/java/de/adorsys/datasafe/encrypiton/api/types/keystore/PathEncryptionSecretKey.java b/datasafe-encryption/datasafe-encryption-api/src/main/java/de/adorsys/datasafe/encrypiton/api/types/keystore/AuthPathEncryptionSecretKey.java similarity index 56% rename from datasafe-encryption/datasafe-encryption-api/src/main/java/de/adorsys/datasafe/encrypiton/api/types/keystore/PathEncryptionSecretKey.java rename to datasafe-encryption/datasafe-encryption-api/src/main/java/de/adorsys/datasafe/encrypiton/api/types/keystore/AuthPathEncryptionSecretKey.java index d495070c1..4e2383066 100644 --- a/datasafe-encryption/datasafe-encryption-api/src/main/java/de/adorsys/datasafe/encrypiton/api/types/keystore/PathEncryptionSecretKey.java +++ b/datasafe-encryption/datasafe-encryption-api/src/main/java/de/adorsys/datasafe/encrypiton/api/types/keystore/AuthPathEncryptionSecretKey.java @@ -1,12 +1,19 @@ package de.adorsys.datasafe.encrypiton.api.types.keystore; +import de.adorsys.datasafe.encrypiton.api.types.UserID; import lombok.*; +/** + * Authenticated path encryption secret key holder. + */ @Getter @ToString @Value @RequiredArgsConstructor -public class PathEncryptionSecretKey { +public class AuthPathEncryptionSecretKey { + + @NonNull + private final UserID user; @NonNull private final SecretKeyIDWithKey secretKey; diff --git a/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/pathencryption/DefaultPathEncryptorDecryptor.java b/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/pathencryption/DefaultPathEncryptorDecryptor.java index 0efbab159..ef3c93917 100644 --- a/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/pathencryption/DefaultPathEncryptorDecryptor.java +++ b/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/pathencryption/DefaultPathEncryptorDecryptor.java @@ -1,6 +1,6 @@ package de.adorsys.datasafe.encrypiton.impl.pathencryption; -import de.adorsys.datasafe.encrypiton.api.types.keystore.PathEncryptionSecretKey; +import de.adorsys.datasafe.encrypiton.api.types.keystore.AuthPathEncryptionSecretKey; import de.adorsys.datasafe.types.api.context.annotations.RuntimeDelegate; import lombok.SneakyThrows; import lombok.extern.slf4j.Slf4j; @@ -27,7 +27,7 @@ public DefaultPathEncryptorDecryptor(SivMode sivMode) { } @Override - public byte[] encrypt(PathEncryptionSecretKey pathSecretKey, byte[] originalPath, byte[] associated) { + public byte[] encrypt(AuthPathEncryptionSecretKey pathSecretKey, byte[] originalPath, byte[] associated) { return sivMode.encrypt( pathSecretKey.getCounterSecretKey().getSecretKey(), @@ -39,7 +39,7 @@ public byte[] encrypt(PathEncryptionSecretKey pathSecretKey, byte[] originalPath @Override @SneakyThrows - public byte[] decrypt(PathEncryptionSecretKey pathSecretKey, byte[] encryptedPath, byte[] associated) { + public byte[] decrypt(AuthPathEncryptionSecretKey pathSecretKey, byte[] encryptedPath, byte[] associated) { return sivMode.decrypt( pathSecretKey.getCounterSecretKey().getSecretKey(), diff --git a/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/pathencryption/PathEncryptionImpl.java b/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/pathencryption/PathEncryptionImpl.java index 5774e58c8..5a3758fbb 100644 --- a/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/pathencryption/PathEncryptionImpl.java +++ b/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/pathencryption/PathEncryptionImpl.java @@ -4,7 +4,7 @@ import de.adorsys.datasafe.encrypiton.api.pathencryption.PathEncryption; import de.adorsys.datasafe.encrypiton.api.pathencryption.encryption.SymmetricPathEncryptionService; import de.adorsys.datasafe.encrypiton.api.types.UserIDAuth; -import de.adorsys.datasafe.encrypiton.api.types.keystore.PathEncryptionSecretKey; +import de.adorsys.datasafe.encrypiton.api.types.keystore.AuthPathEncryptionSecretKey; import de.adorsys.datasafe.types.api.context.annotations.RuntimeDelegate; import de.adorsys.datasafe.types.api.resource.Uri; import lombok.extern.slf4j.Slf4j; @@ -35,7 +35,7 @@ public PathEncryptionImpl(SymmetricPathEncryptionService bucketPathEncryptionSer */ @Override public Uri encrypt(UserIDAuth forUser, Uri path) { - PathEncryptionSecretKey pathEncryptionSecretKey = privateKeyService.pathEncryptionSecretKey(forUser); + AuthPathEncryptionSecretKey pathEncryptionSecretKey = privateKeyService.pathEncryptionSecretKey(forUser); Uri encrypt = bucketPathEncryptionService.encrypt(pathEncryptionSecretKey, path); log.debug("encrypted path {} for user {} path {}", encrypt, forUser.getUserID(), path); return encrypt; @@ -46,7 +46,7 @@ public Uri encrypt(UserIDAuth forUser, Uri path) { */ @Override public Function decryptor(UserIDAuth forUser) { - PathEncryptionSecretKey pathEncryptionSecretKey = privateKeyService.pathEncryptionSecretKey(forUser); + AuthPathEncryptionSecretKey pathEncryptionSecretKey = privateKeyService.pathEncryptionSecretKey(forUser); return encryptedPath -> { Uri decrypt = bucketPathEncryptionService.decrypt(pathEncryptionSecretKey, encryptedPath); log.debug("decrypted path {} for user {} path {}", decrypt, forUser.getUserID(), encryptedPath); diff --git a/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/pathencryption/PathEncryptorDecryptor.java b/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/pathencryption/PathEncryptorDecryptor.java index 68ed15bb3..33010ab8c 100644 --- a/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/pathencryption/PathEncryptorDecryptor.java +++ b/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/pathencryption/PathEncryptorDecryptor.java @@ -1,6 +1,6 @@ package de.adorsys.datasafe.encrypiton.impl.pathencryption; -import de.adorsys.datasafe.encrypiton.api.types.keystore.PathEncryptionSecretKey; +import de.adorsys.datasafe.encrypiton.api.types.keystore.AuthPathEncryptionSecretKey; public interface PathEncryptorDecryptor { @@ -10,7 +10,7 @@ public interface PathEncryptorDecryptor { * @param associated Associated data to authenticate * @return Encrypted path using {@code pathSecretKey} */ - byte[] encrypt(PathEncryptionSecretKey pathSecretKey, byte[] originalPath, byte[] associated); + byte[] encrypt(AuthPathEncryptionSecretKey pathSecretKey, byte[] originalPath, byte[] associated); /** * @param pathSecretKey entity that contains keys for decrypt path @@ -18,5 +18,5 @@ public interface PathEncryptorDecryptor { * @param associated Associated data to authenticate * @return Decrypted path using {@code pathSecretKey} */ - byte[] decrypt(PathEncryptionSecretKey pathSecretKey, byte[] encryptedPath, byte[] associated); + byte[] decrypt(AuthPathEncryptionSecretKey pathSecretKey, byte[] encryptedPath, byte[] associated); } diff --git a/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/pathencryption/SymmetricPathEncryptionServiceImpl.java b/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/pathencryption/SymmetricPathEncryptionServiceImpl.java index 4b99fa0b5..5f080411c 100644 --- a/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/pathencryption/SymmetricPathEncryptionServiceImpl.java +++ b/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/pathencryption/SymmetricPathEncryptionServiceImpl.java @@ -1,8 +1,9 @@ package de.adorsys.datasafe.encrypiton.impl.pathencryption; +import com.google.common.primitives.Bytes; import com.google.common.primitives.Ints; import de.adorsys.datasafe.encrypiton.api.pathencryption.encryption.SymmetricPathEncryptionService; -import de.adorsys.datasafe.encrypiton.api.types.keystore.PathEncryptionSecretKey; +import de.adorsys.datasafe.encrypiton.api.types.keystore.AuthPathEncryptionSecretKey; import de.adorsys.datasafe.encrypiton.impl.pathencryption.dto.PathSegmentWithSecretKeyWith; import de.adorsys.datasafe.types.api.context.annotations.RuntimeDelegate; import de.adorsys.datasafe.types.api.resource.Uri; @@ -43,7 +44,7 @@ public SymmetricPathEncryptionServiceImpl(PathEncryptorDecryptor pathEncryptorDe pathEncryptorDecryptor.encrypt( keyEntryEncryptedDataPair.getPathEncryptionSecretKey(), keyEntryEncryptedDataPair.getPath().getBytes(StandardCharsets.UTF_8), - Ints.toByteArray(keyEntryEncryptedDataPair.getAuthenticationPosition()) + extractAuthentication(keyEntryEncryptedDataPair) ) ); @@ -52,7 +53,7 @@ public SymmetricPathEncryptionServiceImpl(PathEncryptorDecryptor pathEncryptorDe pathEncryptorDecryptor.decrypt( keyEntryDecryptedDataPair.getPathEncryptionSecretKey(), decode(keyEntryDecryptedDataPair.getPath()), - Ints.toByteArray(keyEntryDecryptedDataPair.getAuthenticationPosition()) + extractAuthentication(keyEntryDecryptedDataPair) ), StandardCharsets.UTF_8 ); @@ -63,7 +64,7 @@ public SymmetricPathEncryptionServiceImpl(PathEncryptorDecryptor pathEncryptorDe */ @Override @SneakyThrows - public Uri encrypt(PathEncryptionSecretKey pathEncryptionSecretKey, Uri bucketPath) { + public Uri encrypt(AuthPathEncryptionSecretKey pathEncryptionSecretKey, Uri bucketPath) { validateArgs(pathEncryptionSecretKey, bucketPath); validateUriIsRelative(bucketPath); @@ -81,7 +82,7 @@ public Uri encrypt(PathEncryptionSecretKey pathEncryptionSecretKey, Uri bucketPa */ @Override @SneakyThrows - public Uri decrypt(PathEncryptionSecretKey pathEncryptionSecretKey, Uri bucketPath) { + public Uri decrypt(AuthPathEncryptionSecretKey pathEncryptionSecretKey, Uri bucketPath) { validateArgs(pathEncryptionSecretKey, bucketPath); validateUriIsRelative(bucketPath); @@ -95,7 +96,7 @@ public Uri decrypt(PathEncryptionSecretKey pathEncryptionSecretKey, Uri bucketPa } @SneakyThrows - private static byte[] decode(String encryptedPath) { + private byte[] decode(String encryptedPath) { if (null == encryptedPath || encryptedPath.isEmpty()) { return null; } @@ -104,7 +105,7 @@ private static byte[] decode(String encryptedPath) { } @SneakyThrows - private static String encode(byte[] encryptedPath) { + private String encode(byte[] encryptedPath) { if (null == encryptedPath) { return null; } @@ -112,8 +113,8 @@ private static String encode(byte[] encryptedPath) { return Base64.getUrlEncoder().encodeToString(encryptedPath); } - private static Uri processURIparts( - PathEncryptionSecretKey secretKeyEntry, + private Uri processURIparts( + AuthPathEncryptionSecretKey secretKeyEntry, Uri bucketPath, Function process) { StringBuilder result = new StringBuilder(); @@ -133,7 +134,7 @@ private static Uri processURIparts( return new Uri(URI.create(processSegments(secretKeyEntry, process, segments))); } - private static String processSegments(PathEncryptionSecretKey secretKeyEntry, + private String processSegments(AuthPathEncryptionSecretKey secretKeyEntry, Function process, String[] segments) { return IntStream.range(0, segments.length) @@ -148,7 +149,15 @@ private static String processSegments(PathEncryptionSecretKey secretKeyEntry, ).collect(Collectors.joining(PATH_SEPARATOR)); } - private static void validateArgs(PathEncryptionSecretKey secretKeyEntry, Uri bucketPath) { + + private static byte[] extractAuthentication(PathSegmentWithSecretKeyWith holder) { + return Bytes.concat( + Ints.toByteArray(holder.getAuthenticationPosition()), + holder.getPathEncryptionSecretKey().getUser().getValue().getBytes(StandardCharsets.UTF_8) + ); + } + + private static void validateArgs(AuthPathEncryptionSecretKey secretKeyEntry, Uri bucketPath) { if (null == secretKeyEntry) { throw new IllegalArgumentException("Secret key should not be null"); } diff --git a/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/pathencryption/dto/PathSegmentWithSecretKeyWith.java b/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/pathencryption/dto/PathSegmentWithSecretKeyWith.java index 5c6fda11d..1d7a72b3d 100644 --- a/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/pathencryption/dto/PathSegmentWithSecretKeyWith.java +++ b/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/pathencryption/dto/PathSegmentWithSecretKeyWith.java @@ -1,6 +1,6 @@ package de.adorsys.datasafe.encrypiton.impl.pathencryption.dto; -import de.adorsys.datasafe.encrypiton.api.types.keystore.PathEncryptionSecretKey; +import de.adorsys.datasafe.encrypiton.api.types.keystore.AuthPathEncryptionSecretKey; import lombok.AllArgsConstructor; import lombok.Getter; import lombok.Setter; @@ -16,7 +16,7 @@ public class PathSegmentWithSecretKeyWith { /** * Keys for encryption and decryption path. */ - private final PathEncryptionSecretKey pathEncryptionSecretKey; + private final AuthPathEncryptionSecretKey pathEncryptionSecretKey; /** * Path segment position to authenticate. diff --git a/datasafe-encryption/datasafe-encryption-impl/src/test/java/de/adorsys/datasafe/encrypiton/impl/pathencryption/SymmetricPathEncryptionServiceImplTest.java b/datasafe-encryption/datasafe-encryption-impl/src/test/java/de/adorsys/datasafe/encrypiton/impl/pathencryption/SymmetricPathEncryptionServiceImplTest.java index 26a10270e..f3624c5bd 100644 --- a/datasafe-encryption/datasafe-encryption-impl/src/test/java/de/adorsys/datasafe/encrypiton/impl/pathencryption/SymmetricPathEncryptionServiceImplTest.java +++ b/datasafe-encryption/datasafe-encryption-impl/src/test/java/de/adorsys/datasafe/encrypiton/impl/pathencryption/SymmetricPathEncryptionServiceImplTest.java @@ -1,6 +1,7 @@ package de.adorsys.datasafe.encrypiton.impl.pathencryption; import de.adorsys.datasafe.encrypiton.api.keystore.KeyStoreService; +import de.adorsys.datasafe.encrypiton.api.types.UserID; import de.adorsys.datasafe.encrypiton.api.types.keystore.*; import de.adorsys.datasafe.encrypiton.impl.KeystoreUtil; import de.adorsys.datasafe.encrypiton.impl.keystore.DefaultPasswordBasedKeyConfig; @@ -42,13 +43,13 @@ void testEncryptionDoesNotLeakSameSegments() { String testPath = "path/to/path/file/to"; Uri testURI = new Uri(testPath); - PathEncryptionSecretKey pathEncryptionSecretKey = pathEncryptionSecretKey(); + AuthPathEncryptionSecretKey pathEncryptionSecretKey = pathEncryptionSecretKey(); Uri encrypted = bucketPathEncryptionService.encrypt(pathEncryptionSecretKey, testURI); String[] encryptedSegments = encrypted.asString().split("/"); - assertThat(encryptedSegments[0]).isNotEqualTo(encryptedSegments[2]); - assertThat(encryptedSegments[1]).isNotEqualTo(encryptedSegments[4]); + assertThat(encryptedSegments[1]).isNotEqualTo(encryptedSegments[3]); + assertThat(encryptedSegments[2]).isNotEqualTo(encryptedSegments[5]); } @Test @@ -56,7 +57,7 @@ void testSuccessEncryptDecryptPath() { String testPath = "path/to/file"; Uri testURI = new Uri(testPath); - PathEncryptionSecretKey pathEncryptionSecretKey = pathEncryptionSecretKey(); + AuthPathEncryptionSecretKey pathEncryptionSecretKey = pathEncryptionSecretKey(); Uri encrypted = bucketPathEncryptionService.encrypt(pathEncryptionSecretKey, testURI); log.debug("Encrypted path: {}", encrypted); @@ -69,7 +70,7 @@ void testSuccessEncryptDecryptPath() { @Test void testFailEncryptPathWithBrokenEncryptedPath() { - PathEncryptionSecretKey pathEncryptionSecretKey = pathEncryptionSecretKey(); + AuthPathEncryptionSecretKey pathEncryptionSecretKey = pathEncryptionSecretKey(); assertThrows(BadPaddingException.class, () -> bucketPathEncryptionService.decrypt(pathEncryptionSecretKey, @@ -78,7 +79,7 @@ void testFailEncryptPathWithBrokenEncryptedPath() { @Test void testFailEncryptPathWithTextPath() { - PathEncryptionSecretKey pathEncryptionSecretKey = pathEncryptionSecretKey(); + AuthPathEncryptionSecretKey pathEncryptionSecretKey = pathEncryptionSecretKey(); assertThrows( IllegalBlockSizeException.class, @@ -86,7 +87,7 @@ void testFailEncryptPathWithTextPath() { ); } - private PathEncryptionSecretKey pathEncryptionSecretKey() { + private AuthPathEncryptionSecretKey pathEncryptionSecretKey() { KeyID secretKeyId = KeystoreUtil.keyIdByPrefix(keyStore, KeyStoreCreationConfig.PATH_KEY_ID_PREFIX); SecretKeySpec secretKey = keyStoreService.getSecretKey( keyStoreAccess, @@ -99,7 +100,8 @@ private PathEncryptionSecretKey pathEncryptionSecretKey() { counterSecretKeyId ); - return new PathEncryptionSecretKey( + return new AuthPathEncryptionSecretKey( + new UserID("john"), new SecretKeyIDWithKey(secretKeyId, secretKey), new SecretKeyIDWithKey(counterSecretKeyId, secretKeyCtr) ); diff --git a/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/main/java/de/adorsys/datasafe/simple/adapter/impl/legacy/directory/LegacyDFSPrivateKeyServiceImpl.java b/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/main/java/de/adorsys/datasafe/simple/adapter/impl/legacy/directory/LegacyDFSPrivateKeyServiceImpl.java index 52bc98bb0..6fd723afb 100644 --- a/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/main/java/de/adorsys/datasafe/simple/adapter/impl/legacy/directory/LegacyDFSPrivateKeyServiceImpl.java +++ b/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/main/java/de/adorsys/datasafe/simple/adapter/impl/legacy/directory/LegacyDFSPrivateKeyServiceImpl.java @@ -3,7 +3,7 @@ import de.adorsys.datasafe.directory.api.profile.keys.DocumentKeyStoreOperations; import de.adorsys.datasafe.directory.impl.profile.keys.DFSPrivateKeyServiceImpl; import de.adorsys.datasafe.encrypiton.api.types.UserIDAuth; -import de.adorsys.datasafe.encrypiton.api.types.keystore.PathEncryptionSecretKey; +import de.adorsys.datasafe.encrypiton.api.types.keystore.AuthPathEncryptionSecretKey; import de.adorsys.datasafe.encrypiton.api.types.keystore.SecretKeyIDWithKey; import javax.inject.Inject; @@ -25,9 +25,11 @@ public LegacyDFSPrivateKeyServiceImpl(DocumentKeyStoreOperations keyStoreOper) { * Reads path encryption secret key from DFS and caches the result. */ @Override - public PathEncryptionSecretKey pathEncryptionSecretKey(UserIDAuth forUser) { + public AuthPathEncryptionSecretKey pathEncryptionSecretKey(UserIDAuth forUser) { SecretKeyIDWithKey secretKeyIDWithKey = keyByPrefix(forUser, PATH_KEY_ID_PREFIX); - return new PathEncryptionSecretKey( + + return new AuthPathEncryptionSecretKey( + forUser.getUserID(), secretKeyIDWithKey, secretKeyIDWithKey ); diff --git a/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/main/java/de/adorsys/datasafe/simple/adapter/impl/legacy/pathencryption/LegacyPathEncryptionImpl.java b/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/main/java/de/adorsys/datasafe/simple/adapter/impl/legacy/pathencryption/LegacyPathEncryptionImpl.java index 05a7963dc..893944015 100644 --- a/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/main/java/de/adorsys/datasafe/simple/adapter/impl/legacy/pathencryption/LegacyPathEncryptionImpl.java +++ b/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/main/java/de/adorsys/datasafe/simple/adapter/impl/legacy/pathencryption/LegacyPathEncryptionImpl.java @@ -3,7 +3,7 @@ import de.adorsys.datasafe.directory.api.profile.keys.PrivateKeyService; import de.adorsys.datasafe.encrypiton.api.pathencryption.PathEncryption; import de.adorsys.datasafe.encrypiton.api.types.UserIDAuth; -import de.adorsys.datasafe.encrypiton.api.types.keystore.PathEncryptionSecretKey; +import de.adorsys.datasafe.encrypiton.api.types.keystore.AuthPathEncryptionSecretKey; import de.adorsys.datasafe.simple.adapter.api.legacy.pathencryption.LegacySymmetricPathEncryptionService; import de.adorsys.datasafe.types.api.resource.Uri; import lombok.extern.slf4j.Slf4j; @@ -33,7 +33,7 @@ public LegacyPathEncryptionImpl(LegacySymmetricPathEncryptionService bucketPathE */ @Override public Uri encrypt(UserIDAuth forUser, Uri path) { - PathEncryptionSecretKey keySpec = privateKeyService.pathEncryptionSecretKey(forUser); + AuthPathEncryptionSecretKey keySpec = privateKeyService.pathEncryptionSecretKey(forUser); Uri encrypt = bucketPathEncryptionService.encrypt(keySpec.getSecretKey().getSecretKey(), path); log.debug("encrypted path {} for user {} path {}", encrypt, forUser.getUserID(), path); return encrypt; @@ -44,7 +44,7 @@ public Uri encrypt(UserIDAuth forUser, Uri path) { */ @Override public Function decryptor(UserIDAuth forUser) { - PathEncryptionSecretKey keySpec = privateKeyService.pathEncryptionSecretKey(forUser); + AuthPathEncryptionSecretKey keySpec = privateKeyService.pathEncryptionSecretKey(forUser); return encryptedPath -> { Uri decrypt = bucketPathEncryptionService.decrypt(keySpec.getSecretKey().getSecretKey(), encryptedPath); log.debug("decrypted path {} for user {} path {}", decrypt, forUser.getUserID(), encryptedPath); diff --git a/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/test/java/de/adorsys/datasafe/simple/adapter/impl/legacy/SymmetricPathEncryptionServiceImplTest.java b/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/test/java/de/adorsys/datasafe/simple/adapter/impl/legacy/LegacySymmetricPathEncryptionServiceImplTest.java similarity index 98% rename from datasafe-simple-adapter/datasafe-simple-adapter-impl/src/test/java/de/adorsys/datasafe/simple/adapter/impl/legacy/SymmetricPathEncryptionServiceImplTest.java rename to datasafe-simple-adapter/datasafe-simple-adapter-impl/src/test/java/de/adorsys/datasafe/simple/adapter/impl/legacy/LegacySymmetricPathEncryptionServiceImplTest.java index 0d696ecea..b476d0281 100644 --- a/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/test/java/de/adorsys/datasafe/simple/adapter/impl/legacy/SymmetricPathEncryptionServiceImplTest.java +++ b/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/test/java/de/adorsys/datasafe/simple/adapter/impl/legacy/LegacySymmetricPathEncryptionServiceImplTest.java @@ -25,7 +25,7 @@ import static org.junit.jupiter.api.Assertions.assertThrows; @Slf4j -class SymmetricPathEncryptionServiceImplTest extends BaseMockitoTest { +class LegacySymmetricPathEncryptionServiceImplTest extends BaseMockitoTest { private LegacySymmetricPathEncryptionService bucketPathEncryptionService = new LegacySymmetricPathEncryptionServiceImpl( new LegacyPathEncryptor(new LegacyPathDigestConfig()) From 8a4547824777127083963d48a01687dc290ce26e Mon Sep 17 00:00:00 2001 From: Valentyn Berezin Date: Wed, 18 Sep 2019 19:22:20 +0300 Subject: [PATCH 105/255] DOC-239. Make unnecessarily public method private --- .../impl/profile/keys/DocumentKeyStoreOperationsImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/keys/DocumentKeyStoreOperationsImpl.java b/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/keys/DocumentKeyStoreOperationsImpl.java index 127d86c0d..b1c683aaa 100644 --- a/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/keys/DocumentKeyStoreOperationsImpl.java +++ b/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/keys/DocumentKeyStoreOperationsImpl.java @@ -114,7 +114,7 @@ private > void writeKeystore(UserID forUser, KeySt log.debug("Keystore created for user {} in path {}", forUser, keystore); } - public KeyStore keyStore(UserIDAuth forUser) { + private KeyStore keyStore(UserIDAuth forUser) { return keystoreCache.getKeystore().computeIfAbsent( forUser.getUserID(), userId -> { From fd8e69288e28ca9c911485dc1cb7a4b75e6e424f Mon Sep 17 00:00:00 2001 From: Valentyn Berezin Date: Wed, 18 Sep 2019 20:03:13 +0300 Subject: [PATCH 106/255] DOC-239. Added tests that validate tampering resistance of encrypted content --- .../impl/e2e/DataTamperingResistanceTest.java | 146 ++++++++++++++++++ .../ProfileContainsDatasafeVersionTest.java | 7 +- 2 files changed, 149 insertions(+), 4 deletions(-) create mode 100644 datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/DataTamperingResistanceTest.java diff --git a/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/DataTamperingResistanceTest.java b/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/DataTamperingResistanceTest.java new file mode 100644 index 000000000..08b964522 --- /dev/null +++ b/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/DataTamperingResistanceTest.java @@ -0,0 +1,146 @@ +package de.adorsys.datasafe.business.impl.e2e; + +import de.adorsys.datasafe.business.impl.service.DefaultDatasafeServices; +import de.adorsys.datasafe.types.api.actions.ListRequest; +import de.adorsys.datasafe.types.api.actions.ReadRequest; +import de.adorsys.datasafe.types.api.actions.WriteRequest; +import de.adorsys.datasafe.types.api.resource.AbsoluteLocation; +import de.adorsys.datasafe.types.api.resource.ResolvedResource; +import lombok.SneakyThrows; +import lombok.extern.slf4j.Slf4j; +import org.bouncycastle.crypto.io.InvalidCipherTextIOException; +import org.cryptomator.siv.UnauthenticCiphertextException; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.testcontainers.shaded.com.google.common.io.ByteStreams; + +import java.io.InputStream; +import java.io.OutputStream; +import java.nio.charset.StandardCharsets; +import java.nio.file.Files; +import java.nio.file.Path; +import java.nio.file.Paths; +import java.nio.file.StandardOpenOption; +import java.util.Collections; +import java.util.concurrent.ThreadLocalRandom; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +/** + * This test validates that unauthorized filename and encrypted document content is prohibited - so + * attacker is unable to modify encrypted text without being detected. + */ +@Slf4j +class DataTamperingResistanceTest extends BaseE2ETest { + + private static final String TEXT = "Tampering test"; + private static final String FILENAME = "my_file.txt"; + + @BeforeEach + void prepare() { + init(); + registerJohnAndJane(); + } + + @Test + @SneakyThrows + void testPrivateDocumentContentTamperResistance() { + try (OutputStream os = writeToPrivate.write(WriteRequest.forDefaultPrivate(jane, FILENAME))) { + os.write(TEXT.getBytes(StandardCharsets.UTF_8)); + } + + AbsoluteLocation privateFile = getFirstFileInPrivate(jane); + tamperFileByReplacingOneByteOfEncryptedMessage(privateFile); + + try (InputStream is = readFromPrivate.read(ReadRequest.forDefaultPrivate(jane, FILENAME))) { + assertThrows( + InvalidCipherTextIOException.class, + () -> ByteStreams.copy(is, ByteStreams.nullOutputStream()) + ); + } + } + + @Test + @SneakyThrows + void testInboxDocumentContentTamperResistance() { + try (OutputStream os = writeToInbox.write( + WriteRequest.forDefaultPublic(Collections.singleton(john.getUserID()), FILENAME)) + ) { + os.write(TEXT.getBytes(StandardCharsets.UTF_8)); + } + + AbsoluteLocation inboxFile = getFirstFileInInbox(john); + tamperFileByReplacingOneByteOfEncryptedMessage(inboxFile); + + try (InputStream is = readFromInbox.read(ReadRequest.forDefaultPrivate(john, FILENAME))) { + assertThrows( + InvalidCipherTextIOException.class, + () -> ByteStreams.copy(is, ByteStreams.nullOutputStream()) + ); + } + } + + @Test + @SneakyThrows + void testPrivateDocumentPathTamperResistance() { + try (OutputStream os = writeToPrivate.write(WriteRequest.forDefaultPrivate(jane, FILENAME))) { + os.write(TEXT.getBytes(StandardCharsets.UTF_8)); + } + + AbsoluteLocation privateFile = getFirstFileInPrivate(jane); + tamperFilenameByReplacingOneCharOfPath(privateFile); + + assertThrows( + UnauthenticCiphertextException.class, + () -> listPrivate.list(ListRequest.forDefaultPrivate(jane, "")) + .forEach(it -> log.info("{}", it.location())) // consume stream + ); + } + + private void init() { + StorageDescriptor descriptor = fs(); + DefaultDatasafeServices datasafeServices = DatasafeServicesProvider + .defaultDatasafeServices(descriptor.getStorageService().get(), descriptor.getLocation()); + initialize(DatasafeServicesProvider.dfsConfig(descriptor.getLocation()), datasafeServices); + } + + @SneakyThrows + private void tamperFilenameByReplacingOneCharOfPath(AbsoluteLocation privateFile) { + // tamper the file by replacing 1 byte in it + Path physicalFile = Paths.get(privateFile.getResource().location().asURI()); + byte[] privateBytes = Files.readAllBytes(physicalFile); + String pathAsString = physicalFile.toAbsolutePath().toString(); + pathAsString = pathAsString.substring(0, pathAsString.length() - 1) + + randomChar(pathAsString.charAt(pathAsString.length() - 1)); + Files.write(Paths.get(pathAsString), privateBytes, StandardOpenOption.CREATE); + } + + @SneakyThrows + private void tamperFileByReplacingOneByteOfEncryptedMessage(AbsoluteLocation privateFile) { + // tamper the file by replacing 1 byte in it + Path physicalFile = Paths.get(privateFile.getResource().location().asURI()); + byte[] privateBytes = Files.readAllBytes(physicalFile); + // this should 'approximately' end at encrypted text + privateBytes[privateBytes.length - TEXT.length()] = + randomByte(privateBytes[privateBytes.length - TEXT.length()]); + Files.write(physicalFile, privateBytes, StandardOpenOption.TRUNCATE_EXISTING); + } + + private char randomChar(char notEqualTo) { + char result; + do { + result = (char) (ThreadLocalRandom.current().nextInt(26) + 'a'); + } while (result == notEqualTo); + + return result; + } + + private byte randomByte(byte notEqualTo) { + byte[] resultArray = new byte[1]; + do { + ThreadLocalRandom.current().nextBytes(resultArray); + } while (notEqualTo == resultArray[0]); + + return resultArray[0]; + } +} diff --git a/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/ProfileContainsDatasafeVersionTest.java b/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/ProfileContainsDatasafeVersionTest.java index 6b6f993c6..62c5f6f09 100644 --- a/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/ProfileContainsDatasafeVersionTest.java +++ b/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/ProfileContainsDatasafeVersionTest.java @@ -2,7 +2,6 @@ import de.adorsys.datasafe.business.impl.service.DefaultDatasafeServices; import de.adorsys.datasafe.encrypiton.api.types.UserIDAuth; -import de.adorsys.datasafe.teststorage.WithStorageProvider; import de.adorsys.datasafe.types.api.global.Version; import lombok.SneakyThrows; import org.junit.jupiter.api.Test; @@ -14,8 +13,7 @@ class ProfileContainsDatasafeVersionTest extends BaseE2ETest { @Test @SneakyThrows void getProfileVersionTest() { - StorageDescriptor fs = fs(); - init(fs); + init(); UserIDAuth bob = registerUser("bob"); @@ -23,7 +21,8 @@ void getProfileVersionTest() { assertThat(version).isEqualTo(Version.current()); } - private void init(WithStorageProvider.StorageDescriptor descriptor) { + private void init() { + StorageDescriptor descriptor = fs(); DefaultDatasafeServices datasafeServices = DatasafeServicesProvider .defaultDatasafeServices(descriptor.getStorageService().get(), descriptor.getLocation()); initialize(DatasafeServicesProvider.dfsConfig(descriptor.getLocation()), datasafeServices); From 426dcc4afd9cd7ee4b40df471130ec68e601f086 Mon Sep 17 00:00:00 2001 From: Valentyn Berezin Date: Wed, 18 Sep 2019 20:33:19 +0300 Subject: [PATCH 107/255] DOC-239. Better checks for tampering resistance --- .../impl/e2e/DataTamperingResistanceTest.java | 29 ++++++++++--------- 1 file changed, 16 insertions(+), 13 deletions(-) diff --git a/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/DataTamperingResistanceTest.java b/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/DataTamperingResistanceTest.java index 08b964522..9148f8baa 100644 --- a/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/DataTamperingResistanceTest.java +++ b/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/DataTamperingResistanceTest.java @@ -14,6 +14,7 @@ import org.junit.jupiter.api.Test; import org.testcontainers.shaded.com.google.common.io.ByteStreams; +import javax.crypto.AEADBadTagException; import java.io.InputStream; import java.io.OutputStream; import java.nio.charset.StandardCharsets; @@ -24,6 +25,7 @@ import java.util.Collections; import java.util.concurrent.ThreadLocalRandom; +import static org.assertj.core.api.Java6Assertions.assertThatThrownBy; import static org.junit.jupiter.api.Assertions.assertThrows; /** @@ -33,8 +35,8 @@ @Slf4j class DataTamperingResistanceTest extends BaseE2ETest { - private static final String TEXT = "Tampering test"; - private static final String FILENAME = "my_file.txt"; + private static final String TEXT = "Tampering test!!"; + private static final String FILENAME = "my_file_with_quite_a_long_name_to_check_stuff.txt"; @BeforeEach void prepare() { @@ -53,10 +55,9 @@ void testPrivateDocumentContentTamperResistance() { tamperFileByReplacingOneByteOfEncryptedMessage(privateFile); try (InputStream is = readFromPrivate.read(ReadRequest.forDefaultPrivate(jane, FILENAME))) { - assertThrows( - InvalidCipherTextIOException.class, + assertThatThrownBy( () -> ByteStreams.copy(is, ByteStreams.nullOutputStream()) - ); + ).isInstanceOf(InvalidCipherTextIOException.class).hasCauseInstanceOf(AEADBadTagException.class); } } @@ -73,10 +74,9 @@ void testInboxDocumentContentTamperResistance() { tamperFileByReplacingOneByteOfEncryptedMessage(inboxFile); try (InputStream is = readFromInbox.read(ReadRequest.forDefaultPrivate(john, FILENAME))) { - assertThrows( - InvalidCipherTextIOException.class, + assertThatThrownBy( () -> ByteStreams.copy(is, ByteStreams.nullOutputStream()) - ); + ).isInstanceOf(InvalidCipherTextIOException.class).hasCauseInstanceOf(AEADBadTagException.class); } } @@ -110,8 +110,11 @@ private void tamperFilenameByReplacingOneCharOfPath(AbsoluteLocation Date: Thu, 19 Sep 2019 11:41:11 +0300 Subject: [PATCH 108/255] DOC-239. Longer paddings in test --- .../business/impl/e2e/DataTamperingResistanceTest.java | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/DataTamperingResistanceTest.java b/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/DataTamperingResistanceTest.java index 9148f8baa..4ba349394 100644 --- a/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/DataTamperingResistanceTest.java +++ b/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/DataTamperingResistanceTest.java @@ -35,8 +35,12 @@ @Slf4j class DataTamperingResistanceTest extends BaseE2ETest { - private static final String TEXT = "Tampering test!!"; - private static final String FILENAME = "my_file_with_quite_a_long_name_to_check_stuff.txt"; + // Should be long enough to dominate compared to padding + private static final String TEXT = + "Tampering test!!Tampering test!!Tampering test!!Tampering test!!Tampering test!!"; + // Should be long enough to dominate compared to padding + private static final String FILENAME = + "my_file_with_quite_a__long_na.me_na.me_na.me_na.me_na.me_na.me_na.me_na.me"; @BeforeEach void prepare() { @@ -48,6 +52,7 @@ void prepare() { @SneakyThrows void testPrivateDocumentContentTamperResistance() { try (OutputStream os = writeToPrivate.write(WriteRequest.forDefaultPrivate(jane, FILENAME))) { + log.info("Write TEXT"); os.write(TEXT.getBytes(StandardCharsets.UTF_8)); } From dd13efaed7c49d4b4a0bb6a81fb53407044d2760 Mon Sep 17 00:00:00 2001 From: Valentyn Berezin Date: Thu, 19 Sep 2019 13:11:48 +0300 Subject: [PATCH 109/255] DOC-239. Authenticate parent paths too --- .../impl/e2e/DataTamperingResistanceTest.java | 39 ++++--- .../keystore/PathEncryptionSecretKeyTest.java | 16 --- .../keys/DFSPrivateKeyServiceImpl.java | 1 - .../keystore/AuthPathEncryptionSecretKey.java | 4 - .../SymmetricPathEncryptionServiceImpl.java | 102 +++++++++++------- .../dto/PathSegmentWithSecretKeyWith.java | 15 ++- ...ymmetricPathEncryptionServiceImplTest.java | 2 - .../LegacyDFSPrivateKeyServiceImpl.java | 1 - 8 files changed, 104 insertions(+), 76 deletions(-) diff --git a/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/DataTamperingResistanceTest.java b/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/DataTamperingResistanceTest.java index 4ba349394..9764f33e0 100644 --- a/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/DataTamperingResistanceTest.java +++ b/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/DataTamperingResistanceTest.java @@ -12,6 +12,8 @@ import org.cryptomator.siv.UnauthenticCiphertextException; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.ValueSource; import org.testcontainers.shaded.com.google.common.io.ByteStreams; import javax.crypto.AEADBadTagException; @@ -36,11 +38,17 @@ class DataTamperingResistanceTest extends BaseE2ETest { // Should be long enough to dominate compared to padding - private static final String TEXT = + private static final String FILE_TEXT = "Tampering test!!Tampering test!!Tampering test!!Tampering test!!Tampering test!!"; // Should be long enough to dominate compared to padding private static final String FILENAME = "my_file_with_quite_a__long_na.me_na.me_na.me_na.me_na.me_na.me_na.me_na.me"; + // Should be long enough to dominate compared to padding + private static final String DIR_AND_FILENAME = + "my_directory_with_quite_a__long_na.me_na.me_na.me_na.me_na.me_na.me_na.me_na.me/my_file"; + // Should be long enough to dominate compared to padding + private static final String DIR_DIR_AND_FILENAME = + "my_directory_with_quite_a__long_na.me_na.me_na.me_na.me_na.me_na.me_na.me_na.me/deeper/my_file"; @BeforeEach void prepare() { @@ -52,8 +60,7 @@ void prepare() { @SneakyThrows void testPrivateDocumentContentTamperResistance() { try (OutputStream os = writeToPrivate.write(WriteRequest.forDefaultPrivate(jane, FILENAME))) { - log.info("Write TEXT"); - os.write(TEXT.getBytes(StandardCharsets.UTF_8)); + os.write(FILE_TEXT.getBytes(StandardCharsets.UTF_8)); } AbsoluteLocation privateFile = getFirstFileInPrivate(jane); @@ -72,7 +79,7 @@ void testInboxDocumentContentTamperResistance() { try (OutputStream os = writeToInbox.write( WriteRequest.forDefaultPublic(Collections.singleton(john.getUserID()), FILENAME)) ) { - os.write(TEXT.getBytes(StandardCharsets.UTF_8)); + os.write(FILE_TEXT.getBytes(StandardCharsets.UTF_8)); } AbsoluteLocation inboxFile = getFirstFileInInbox(john); @@ -85,15 +92,16 @@ void testInboxDocumentContentTamperResistance() { } } - @Test + @ParameterizedTest + @ValueSource(strings = {FILENAME, DIR_AND_FILENAME, DIR_DIR_AND_FILENAME}) @SneakyThrows - void testPrivateDocumentPathTamperResistance() { - try (OutputStream os = writeToPrivate.write(WriteRequest.forDefaultPrivate(jane, FILENAME))) { - os.write(TEXT.getBytes(StandardCharsets.UTF_8)); + void testPrivateDocumentPathTamperResistance(String path) { + try (OutputStream os = writeToPrivate.write(WriteRequest.forDefaultPrivate(jane, path))) { + os.write(FILE_TEXT.getBytes(StandardCharsets.UTF_8)); } AbsoluteLocation privateFile = getFirstFileInPrivate(jane); - tamperFilenameByReplacingOneCharOfPath(privateFile); + tamperFilenameByReplacingOneCharOfPath(privateFile, path); assertThrows( UnauthenticCiphertextException.class, @@ -110,16 +118,23 @@ private void init() { } @SneakyThrows - private void tamperFilenameByReplacingOneCharOfPath(AbsoluteLocation privateFile) { + private void tamperFilenameByReplacingOneCharOfPath(AbsoluteLocation privateFile, + String origPath) { // tamper the file by replacing 1 byte in it Path physicalFile = Paths.get(privateFile.getResource().location().asURI()); byte[] privateBytes = Files.readAllBytes(physicalFile); String pathAsString = physicalFile.toAbsolutePath().toString(); + // this should 'approximately' be inside encrypted text - int somewhereInEncText = pathAsString.length() - FILENAME.length() / 2; + int somewhereInEncText = pathAsString.length() - origPath.length() / 2; + if (pathAsString.charAt(somewhereInEncText) == '/') { + somewhereInEncText = somewhereInEncText - 1; + } + pathAsString = pathAsString.substring(0, somewhereInEncText - 1) + randomChar(pathAsString.charAt(somewhereInEncText)) + pathAsString.substring(somewhereInEncText); + Files.createDirectories(Paths.get(pathAsString).getParent()); Files.write(Paths.get(pathAsString), privateBytes, StandardOpenOption.CREATE); } @@ -129,7 +144,7 @@ private void tamperFileByReplacingOneByteOfEncryptedMessage(AbsoluteLocation - new AuthPathEncryptionSecretKey( - null, - new SecretKeyIDWithKey(secretKeyId, secretKey), - new SecretKeyIDWithKey(counterKeyId, counterSecretKey)) - ); - } - @Test void validateNullSecretKeyImpossible() { assertThrows(NullPointerException.class, () -> new AuthPathEncryptionSecretKey( - user, null, new SecretKeyIDWithKey(counterKeyId, counterSecretKey)) ); @@ -62,7 +47,6 @@ void validateNullSecretKeyImpossible() { void validateNullCounterKeyImpossible() { assertThrows(NullPointerException.class, () -> new AuthPathEncryptionSecretKey( - user, new SecretKeyIDWithKey(secretKeyId, secretKey), null) ); diff --git a/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/keys/DFSPrivateKeyServiceImpl.java b/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/keys/DFSPrivateKeyServiceImpl.java index f721d9315..50a29d08b 100644 --- a/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/keys/DFSPrivateKeyServiceImpl.java +++ b/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/keys/DFSPrivateKeyServiceImpl.java @@ -43,7 +43,6 @@ public AuthPathEncryptionSecretKey pathEncryptionSecretKey(UserIDAuth forUser) { SecretKeyIDWithKey secretPathCtrKeyId = keyByPrefix(forUser, aliases, PATH_KEY_ID_PREFIX_CTR); return new AuthPathEncryptionSecretKey( - forUser.getUserID(), secretPathKeyId, secretPathCtrKeyId ); diff --git a/datasafe-encryption/datasafe-encryption-api/src/main/java/de/adorsys/datasafe/encrypiton/api/types/keystore/AuthPathEncryptionSecretKey.java b/datasafe-encryption/datasafe-encryption-api/src/main/java/de/adorsys/datasafe/encrypiton/api/types/keystore/AuthPathEncryptionSecretKey.java index 4e2383066..3c6491c62 100644 --- a/datasafe-encryption/datasafe-encryption-api/src/main/java/de/adorsys/datasafe/encrypiton/api/types/keystore/AuthPathEncryptionSecretKey.java +++ b/datasafe-encryption/datasafe-encryption-api/src/main/java/de/adorsys/datasafe/encrypiton/api/types/keystore/AuthPathEncryptionSecretKey.java @@ -1,6 +1,5 @@ package de.adorsys.datasafe.encrypiton.api.types.keystore; -import de.adorsys.datasafe.encrypiton.api.types.UserID; import lombok.*; /** @@ -12,9 +11,6 @@ @RequiredArgsConstructor public class AuthPathEncryptionSecretKey { - @NonNull - private final UserID user; - @NonNull private final SecretKeyIDWithKey secretKey; diff --git a/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/pathencryption/SymmetricPathEncryptionServiceImpl.java b/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/pathencryption/SymmetricPathEncryptionServiceImpl.java index 5f080411c..63ed1d517 100644 --- a/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/pathencryption/SymmetricPathEncryptionServiceImpl.java +++ b/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/pathencryption/SymmetricPathEncryptionServiceImpl.java @@ -1,7 +1,5 @@ package de.adorsys.datasafe.encrypiton.impl.pathencryption; -import com.google.common.primitives.Bytes; -import com.google.common.primitives.Ints; import de.adorsys.datasafe.encrypiton.api.pathencryption.encryption.SymmetricPathEncryptionService; import de.adorsys.datasafe.encrypiton.api.types.keystore.AuthPathEncryptionSecretKey; import de.adorsys.datasafe.encrypiton.impl.pathencryption.dto.PathSegmentWithSecretKeyWith; @@ -13,10 +11,11 @@ import javax.inject.Inject; import java.net.URI; import java.nio.charset.StandardCharsets; +import java.security.MessageDigest; +import java.util.Arrays; import java.util.Base64; import java.util.function.Function; import java.util.stream.Collectors; -import java.util.stream.IntStream; import static de.adorsys.datasafe.types.api.global.PathEncryptionId.AES_SIV; @@ -25,6 +24,8 @@ * It means that path/to/file is encrypted to cipher(path)/cipher(to)/cipher(file) and each invocation of example: * cipher(path) will yield same string, but cipher(path)/cipher(path) will not yield same segments - * it will be more like abc/cde and not like abc/abc. + * Additionally each segment is authenticated against its parent path hash, so attacker can't + * move a/file to b/file without being detected. */ @Slf4j @RuntimeDelegate @@ -39,24 +40,8 @@ public class SymmetricPathEncryptionServiceImpl implements SymmetricPathEncrypti @Inject public SymmetricPathEncryptionServiceImpl(PathEncryptorDecryptor pathEncryptorDecryptor) { - encryptAndEncode = keyEntryEncryptedDataPair -> - encode( - pathEncryptorDecryptor.encrypt( - keyEntryEncryptedDataPair.getPathEncryptionSecretKey(), - keyEntryEncryptedDataPair.getPath().getBytes(StandardCharsets.UTF_8), - extractAuthentication(keyEntryEncryptedDataPair) - ) - ); - - decryptAndDecode = keyEntryDecryptedDataPair -> - new String( - pathEncryptorDecryptor.decrypt( - keyEntryDecryptedDataPair.getPathEncryptionSecretKey(), - decode(keyEntryDecryptedDataPair.getPath()), - extractAuthentication(keyEntryDecryptedDataPair) - ), - StandardCharsets.UTF_8 - ); + encryptAndEncode = keyAndSegment -> encryptorAndEncoder(keyAndSegment, pathEncryptorDecryptor); + decryptAndDecode = keyAndSegment -> decryptorAndDecoder(keyAndSegment, pathEncryptorDecryptor); } /** @@ -95,6 +80,46 @@ public Uri decrypt(AuthPathEncryptionSecretKey pathEncryptionSecretKey, Uri buck ); } + /** + * Parent path authentication digest. a/b/c - each path segment on encryption will be authenticated: + * for a - will be authenticated against `` + * for b - will be authenticated against `/encrypted(a)` + * for c - will be authenticated against `/encrypted(a)/encrypted(b)` + */ + @SneakyThrows + protected MessageDigest getDigest() { + return MessageDigest.getInstance("SHA-256"); + } + + protected String decryptorAndDecoder(PathSegmentWithSecretKeyWith keyAndSegment, + PathEncryptorDecryptor pathEncryptorDecryptor) { + byte[] segment = keyAndSegment.getPath().getBytes(StandardCharsets.UTF_8); + keyAndSegment.getDigest().update(segment); + + return new String( + pathEncryptorDecryptor.decrypt( + keyAndSegment.getPathEncryptionSecretKey(), + decode(keyAndSegment.getPath()), + keyAndSegment.getParentHash() + ), + StandardCharsets.UTF_8 + ); + } + + protected String encryptorAndEncoder(PathSegmentWithSecretKeyWith keyAndSegment, + PathEncryptorDecryptor pathEncryptorDecryptor) { + String result = encode( + pathEncryptorDecryptor.encrypt( + keyAndSegment.getPathEncryptionSecretKey(), + keyAndSegment.getPath().getBytes(StandardCharsets.UTF_8), + keyAndSegment.getParentHash() + ) + ); + + keyAndSegment.getDigest().update(result.getBytes(StandardCharsets.UTF_8)); + return result; + } + @SneakyThrows private byte[] decode(String encryptedPath) { if (null == encryptedPath || encryptedPath.isEmpty()) { @@ -137,23 +162,28 @@ private Uri processURIparts( private String processSegments(AuthPathEncryptionSecretKey secretKeyEntry, Function process, String[] segments) { - return IntStream.range(0, segments.length) - .boxed() - .map(position -> - process.apply( - new PathSegmentWithSecretKeyWith( - secretKeyEntry, - position, - segments[position] - )) - ).collect(Collectors.joining(PATH_SEPARATOR)); - } + MessageDigest digest = getDigest(); + digest.update(PATH_SEPARATOR.getBytes(StandardCharsets.UTF_8)); + return Arrays.stream(segments) + .map(it -> processAndAuthenticateSegment(it, secretKeyEntry, process, digest)) + .collect(Collectors.joining(PATH_SEPARATOR)); + } - private static byte[] extractAuthentication(PathSegmentWithSecretKeyWith holder) { - return Bytes.concat( - Ints.toByteArray(holder.getAuthenticationPosition()), - holder.getPathEncryptionSecretKey().getUser().getValue().getBytes(StandardCharsets.UTF_8) + @SneakyThrows + private String processAndAuthenticateSegment( + String segment, + AuthPathEncryptionSecretKey secretKeyEntry, + Function process, + MessageDigest digest) { + MessageDigest currentDigest = (MessageDigest) digest.clone(); + return process.apply( + new PathSegmentWithSecretKeyWith( + digest, + currentDigest.digest(), + secretKeyEntry, + segment + ) ); } diff --git a/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/pathencryption/dto/PathSegmentWithSecretKeyWith.java b/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/pathencryption/dto/PathSegmentWithSecretKeyWith.java index 1d7a72b3d..5ad1609a3 100644 --- a/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/pathencryption/dto/PathSegmentWithSecretKeyWith.java +++ b/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/pathencryption/dto/PathSegmentWithSecretKeyWith.java @@ -5,6 +5,8 @@ import lombok.Getter; import lombok.Setter; +import java.security.MessageDigest; + /** * Contains path segment for encryption or decryption and related secret key entity. */ @@ -14,14 +16,19 @@ public class PathSegmentWithSecretKeyWith { /** - * Keys for encryption and decryption path. + * Digest to update with encrypted URI segment to authenticate. */ - private final AuthPathEncryptionSecretKey pathEncryptionSecretKey; + private final MessageDigest digest; + + /** + * Parent path hash. + */ + private final byte[] parentHash; /** - * Path segment position to authenticate. + * Keys for encryption and decryption path. */ - private final int authenticationPosition; + private final AuthPathEncryptionSecretKey pathEncryptionSecretKey; /** * Encrypted or decrypted path segment. diff --git a/datasafe-encryption/datasafe-encryption-impl/src/test/java/de/adorsys/datasafe/encrypiton/impl/pathencryption/SymmetricPathEncryptionServiceImplTest.java b/datasafe-encryption/datasafe-encryption-impl/src/test/java/de/adorsys/datasafe/encrypiton/impl/pathencryption/SymmetricPathEncryptionServiceImplTest.java index f3624c5bd..fb2ea2066 100644 --- a/datasafe-encryption/datasafe-encryption-impl/src/test/java/de/adorsys/datasafe/encrypiton/impl/pathencryption/SymmetricPathEncryptionServiceImplTest.java +++ b/datasafe-encryption/datasafe-encryption-impl/src/test/java/de/adorsys/datasafe/encrypiton/impl/pathencryption/SymmetricPathEncryptionServiceImplTest.java @@ -1,7 +1,6 @@ package de.adorsys.datasafe.encrypiton.impl.pathencryption; import de.adorsys.datasafe.encrypiton.api.keystore.KeyStoreService; -import de.adorsys.datasafe.encrypiton.api.types.UserID; import de.adorsys.datasafe.encrypiton.api.types.keystore.*; import de.adorsys.datasafe.encrypiton.impl.KeystoreUtil; import de.adorsys.datasafe.encrypiton.impl.keystore.DefaultPasswordBasedKeyConfig; @@ -101,7 +100,6 @@ private AuthPathEncryptionSecretKey pathEncryptionSecretKey() { ); return new AuthPathEncryptionSecretKey( - new UserID("john"), new SecretKeyIDWithKey(secretKeyId, secretKey), new SecretKeyIDWithKey(counterSecretKeyId, secretKeyCtr) ); diff --git a/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/main/java/de/adorsys/datasafe/simple/adapter/impl/legacy/directory/LegacyDFSPrivateKeyServiceImpl.java b/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/main/java/de/adorsys/datasafe/simple/adapter/impl/legacy/directory/LegacyDFSPrivateKeyServiceImpl.java index 6fd723afb..b51b1ff08 100644 --- a/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/main/java/de/adorsys/datasafe/simple/adapter/impl/legacy/directory/LegacyDFSPrivateKeyServiceImpl.java +++ b/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/main/java/de/adorsys/datasafe/simple/adapter/impl/legacy/directory/LegacyDFSPrivateKeyServiceImpl.java @@ -29,7 +29,6 @@ public AuthPathEncryptionSecretKey pathEncryptionSecretKey(UserIDAuth forUser) { SecretKeyIDWithKey secretKeyIDWithKey = keyByPrefix(forUser, PATH_KEY_ID_PREFIX); return new AuthPathEncryptionSecretKey( - forUser.getUserID(), secretKeyIDWithKey, secretKeyIDWithKey ); From 8e71461a646b97048b3fd5e12ccd6ceba5963861 Mon Sep 17 00:00:00 2001 From: Valentyn Berezin Date: Thu, 19 Sep 2019 15:18:51 +0300 Subject: [PATCH 110/255] DOC-239. Add tampering path to log --- .../business/impl/e2e/DataTamperingResistanceTest.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/DataTamperingResistanceTest.java b/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/DataTamperingResistanceTest.java index 9764f33e0..ffffa8529 100644 --- a/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/DataTamperingResistanceTest.java +++ b/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/DataTamperingResistanceTest.java @@ -92,7 +92,7 @@ void testInboxDocumentContentTamperResistance() { } } - @ParameterizedTest + @ParameterizedTest(name = "{arguments}") @ValueSource(strings = {FILENAME, DIR_AND_FILENAME, DIR_DIR_AND_FILENAME}) @SneakyThrows void testPrivateDocumentPathTamperResistance(String path) { @@ -131,9 +131,11 @@ private void tamperFilenameByReplacingOneCharOfPath(AbsoluteLocation Date: Fri, 20 Sep 2019 12:55:15 +0300 Subject: [PATCH 111/255] Start next iteration with 0.6.3-SNAPSHOT --- datasafe-business/pom.xml | 2 +- datasafe-directory/datasafe-directory-api/pom.xml | 2 +- datasafe-directory/datasafe-directory-impl/pom.xml | 2 +- datasafe-directory/pom.xml | 2 +- datasafe-encryption/datasafe-encryption-api/pom.xml | 2 +- datasafe-encryption/datasafe-encryption-impl/pom.xml | 2 +- datasafe-encryption/pom.xml | 2 +- datasafe-examples/datasafe-examples-business/pom.xml | 2 +- datasafe-examples/datasafe-examples-customize-dagger/pom.xml | 2 +- datasafe-examples/datasafe-examples-multidfs/pom.xml | 2 +- datasafe-examples/datasafe-examples-versioned-s3/pom.xml | 2 +- datasafe-examples/pom.xml | 2 +- datasafe-inbox/datasafe-inbox-api/pom.xml | 2 +- datasafe-inbox/datasafe-inbox-impl/pom.xml | 2 +- datasafe-inbox/pom.xml | 2 +- .../datasafe-business-tests-random-actions/pom.xml | 2 +- datasafe-long-run-tests/pom.xml | 2 +- datasafe-metainfo/datasafe-metainfo-version-api/pom.xml | 2 +- datasafe-metainfo/datasafe-metainfo-version-impl/pom.xml | 2 +- datasafe-metainfo/pom.xml | 2 +- datasafe-privatestore/datasafe-privatestore-api/pom.xml | 2 +- datasafe-privatestore/datasafe-privatestore-impl/pom.xml | 2 +- datasafe-privatestore/pom.xml | 2 +- datasafe-rest-impl/pom.xml | 4 ++-- datasafe-runtime-delegate/pom.xml | 2 +- datasafe-simple-adapter/datasafe-simple-adapter-api/pom.xml | 2 +- datasafe-simple-adapter/datasafe-simple-adapter-impl/pom.xml | 2 +- .../datasafe-simple-adapter-spring/pom.xml | 2 +- datasafe-simple-adapter/pom.xml | 2 +- datasafe-storage/datasafe-storage-api/pom.xml | 2 +- datasafe-storage/datasafe-storage-impl-db/pom.xml | 2 +- datasafe-storage/datasafe-storage-impl-fs/pom.xml | 2 +- datasafe-storage/datasafe-storage-impl-s3/pom.xml | 2 +- datasafe-storage/pom.xml | 2 +- datasafe-test-storages/pom.xml | 2 +- datasafe-types-api/pom.xml | 2 +- last-module-codecoverage-check/pom.xml | 2 +- pom.xml | 2 +- 38 files changed, 39 insertions(+), 39 deletions(-) diff --git a/datasafe-business/pom.xml b/datasafe-business/pom.xml index 958641c8a..6494eb371 100644 --- a/datasafe-business/pom.xml +++ b/datasafe-business/pom.xml @@ -5,7 +5,7 @@ datasafe de.adorsys - 0.6.2 + 0.6.3-SNAPSHOT 4.0.0 diff --git a/datasafe-directory/datasafe-directory-api/pom.xml b/datasafe-directory/datasafe-directory-api/pom.xml index a0eeeaac7..be715c65b 100644 --- a/datasafe-directory/datasafe-directory-api/pom.xml +++ b/datasafe-directory/datasafe-directory-api/pom.xml @@ -3,7 +3,7 @@ de.adorsys datasafe-directory - 0.6.2 + 0.6.3-SNAPSHOT datasafe-directory-api diff --git a/datasafe-directory/datasafe-directory-impl/pom.xml b/datasafe-directory/datasafe-directory-impl/pom.xml index 735062af1..f1ad227f2 100644 --- a/datasafe-directory/datasafe-directory-impl/pom.xml +++ b/datasafe-directory/datasafe-directory-impl/pom.xml @@ -3,7 +3,7 @@ de.adorsys datasafe-directory - 0.6.2 + 0.6.3-SNAPSHOT datasafe-directory-impl diff --git a/datasafe-directory/pom.xml b/datasafe-directory/pom.xml index d5def760a..86bebfda9 100644 --- a/datasafe-directory/pom.xml +++ b/datasafe-directory/pom.xml @@ -5,7 +5,7 @@ datasafe de.adorsys - 0.6.2 + 0.6.3-SNAPSHOT 4.0.0 diff --git a/datasafe-encryption/datasafe-encryption-api/pom.xml b/datasafe-encryption/datasafe-encryption-api/pom.xml index b9726844d..50bc06281 100644 --- a/datasafe-encryption/datasafe-encryption-api/pom.xml +++ b/datasafe-encryption/datasafe-encryption-api/pom.xml @@ -5,7 +5,7 @@ de.adorsys datasafe-encryption - 0.6.2 + 0.6.3-SNAPSHOT datasafe-encryption-api diff --git a/datasafe-encryption/datasafe-encryption-impl/pom.xml b/datasafe-encryption/datasafe-encryption-impl/pom.xml index 51cd4dbf7..e570d4a0f 100644 --- a/datasafe-encryption/datasafe-encryption-impl/pom.xml +++ b/datasafe-encryption/datasafe-encryption-impl/pom.xml @@ -5,7 +5,7 @@ de.adorsys datasafe-encryption - 0.6.2 + 0.6.3-SNAPSHOT datasafe-encryption-impl diff --git a/datasafe-encryption/pom.xml b/datasafe-encryption/pom.xml index 7fc6785ef..fcaffeb80 100644 --- a/datasafe-encryption/pom.xml +++ b/datasafe-encryption/pom.xml @@ -5,7 +5,7 @@ datasafe de.adorsys - 0.6.2 + 0.6.3-SNAPSHOT 4.0.0 diff --git a/datasafe-examples/datasafe-examples-business/pom.xml b/datasafe-examples/datasafe-examples-business/pom.xml index 7e13c8229..e7d6528a1 100644 --- a/datasafe-examples/datasafe-examples-business/pom.xml +++ b/datasafe-examples/datasafe-examples-business/pom.xml @@ -5,7 +5,7 @@ de.adorsys datasafe-examples - 0.6.2 + 0.6.3-SNAPSHOT datasafe-examples-business diff --git a/datasafe-examples/datasafe-examples-customize-dagger/pom.xml b/datasafe-examples/datasafe-examples-customize-dagger/pom.xml index b4c152fbb..ab6ab0456 100644 --- a/datasafe-examples/datasafe-examples-customize-dagger/pom.xml +++ b/datasafe-examples/datasafe-examples-customize-dagger/pom.xml @@ -5,7 +5,7 @@ de.adorsys datasafe-examples - 0.6.2 + 0.6.3-SNAPSHOT datasafe-examples-customize-dagger diff --git a/datasafe-examples/datasafe-examples-multidfs/pom.xml b/datasafe-examples/datasafe-examples-multidfs/pom.xml index d93da99e4..abd4b439c 100644 --- a/datasafe-examples/datasafe-examples-multidfs/pom.xml +++ b/datasafe-examples/datasafe-examples-multidfs/pom.xml @@ -5,7 +5,7 @@ de.adorsys datasafe-examples - 0.6.2 + 0.6.3-SNAPSHOT datasafe-examples-multidfs diff --git a/datasafe-examples/datasafe-examples-versioned-s3/pom.xml b/datasafe-examples/datasafe-examples-versioned-s3/pom.xml index 7cc8b4ad7..a38db686b 100644 --- a/datasafe-examples/datasafe-examples-versioned-s3/pom.xml +++ b/datasafe-examples/datasafe-examples-versioned-s3/pom.xml @@ -5,7 +5,7 @@ de.adorsys datasafe-examples - 0.6.2 + 0.6.3-SNAPSHOT datasafe-examples-versioned-s3 diff --git a/datasafe-examples/pom.xml b/datasafe-examples/pom.xml index ab3647c78..b98dc89c1 100644 --- a/datasafe-examples/pom.xml +++ b/datasafe-examples/pom.xml @@ -5,7 +5,7 @@ datasafe de.adorsys - 0.6.2 + 0.6.3-SNAPSHOT 4.0.0 diff --git a/datasafe-inbox/datasafe-inbox-api/pom.xml b/datasafe-inbox/datasafe-inbox-api/pom.xml index 3b4bfce7e..e4d4554b8 100644 --- a/datasafe-inbox/datasafe-inbox-api/pom.xml +++ b/datasafe-inbox/datasafe-inbox-api/pom.xml @@ -5,7 +5,7 @@ de.adorsys datasafe-inbox - 0.6.2 + 0.6.3-SNAPSHOT datasafe-inbox-api diff --git a/datasafe-inbox/datasafe-inbox-impl/pom.xml b/datasafe-inbox/datasafe-inbox-impl/pom.xml index 327b46c1b..a34a1df76 100644 --- a/datasafe-inbox/datasafe-inbox-impl/pom.xml +++ b/datasafe-inbox/datasafe-inbox-impl/pom.xml @@ -5,7 +5,7 @@ de.adorsys datasafe-inbox - 0.6.2 + 0.6.3-SNAPSHOT datasafe-inbox-impl diff --git a/datasafe-inbox/pom.xml b/datasafe-inbox/pom.xml index c035a5bf6..7af989bf8 100644 --- a/datasafe-inbox/pom.xml +++ b/datasafe-inbox/pom.xml @@ -5,7 +5,7 @@ datasafe de.adorsys - 0.6.2 + 0.6.3-SNAPSHOT 4.0.0 diff --git a/datasafe-long-run-tests/datasafe-business-tests-random-actions/pom.xml b/datasafe-long-run-tests/datasafe-business-tests-random-actions/pom.xml index e492293e3..99a2ce38b 100644 --- a/datasafe-long-run-tests/datasafe-business-tests-random-actions/pom.xml +++ b/datasafe-long-run-tests/datasafe-business-tests-random-actions/pom.xml @@ -5,7 +5,7 @@ datasafe-long-run-tests de.adorsys - 0.6.2 + 0.6.3-SNAPSHOT 4.0.0 diff --git a/datasafe-long-run-tests/pom.xml b/datasafe-long-run-tests/pom.xml index 3a54c34ed..7e767e9bf 100644 --- a/datasafe-long-run-tests/pom.xml +++ b/datasafe-long-run-tests/pom.xml @@ -5,7 +5,7 @@ datasafe de.adorsys - 0.6.2 + 0.6.3-SNAPSHOT 4.0.0 diff --git a/datasafe-metainfo/datasafe-metainfo-version-api/pom.xml b/datasafe-metainfo/datasafe-metainfo-version-api/pom.xml index de8f82093..d8b680a6f 100644 --- a/datasafe-metainfo/datasafe-metainfo-version-api/pom.xml +++ b/datasafe-metainfo/datasafe-metainfo-version-api/pom.xml @@ -5,7 +5,7 @@ de.adorsys datasafe-metainfo - 0.6.2 + 0.6.3-SNAPSHOT datasafe-metainfo-version-api diff --git a/datasafe-metainfo/datasafe-metainfo-version-impl/pom.xml b/datasafe-metainfo/datasafe-metainfo-version-impl/pom.xml index 8962f7572..3219000a0 100644 --- a/datasafe-metainfo/datasafe-metainfo-version-impl/pom.xml +++ b/datasafe-metainfo/datasafe-metainfo-version-impl/pom.xml @@ -5,7 +5,7 @@ de.adorsys datasafe-metainfo - 0.6.2 + 0.6.3-SNAPSHOT datasafe-metainfo-version-impl diff --git a/datasafe-metainfo/pom.xml b/datasafe-metainfo/pom.xml index 8a0058322..628ad3649 100644 --- a/datasafe-metainfo/pom.xml +++ b/datasafe-metainfo/pom.xml @@ -5,7 +5,7 @@ datasafe de.adorsys - 0.6.2 + 0.6.3-SNAPSHOT 4.0.0 diff --git a/datasafe-privatestore/datasafe-privatestore-api/pom.xml b/datasafe-privatestore/datasafe-privatestore-api/pom.xml index de4eb7c2d..6018e6c6e 100644 --- a/datasafe-privatestore/datasafe-privatestore-api/pom.xml +++ b/datasafe-privatestore/datasafe-privatestore-api/pom.xml @@ -5,7 +5,7 @@ datasafe-privatestore de.adorsys - 0.6.2 + 0.6.3-SNAPSHOT 4.0.0 diff --git a/datasafe-privatestore/datasafe-privatestore-impl/pom.xml b/datasafe-privatestore/datasafe-privatestore-impl/pom.xml index 62b6bb0bf..e5e3b0b37 100644 --- a/datasafe-privatestore/datasafe-privatestore-impl/pom.xml +++ b/datasafe-privatestore/datasafe-privatestore-impl/pom.xml @@ -5,7 +5,7 @@ datasafe-privatestore de.adorsys - 0.6.2 + 0.6.3-SNAPSHOT 4.0.0 diff --git a/datasafe-privatestore/pom.xml b/datasafe-privatestore/pom.xml index 48896e402..3609c1076 100644 --- a/datasafe-privatestore/pom.xml +++ b/datasafe-privatestore/pom.xml @@ -5,7 +5,7 @@ datasafe de.adorsys - 0.6.2 + 0.6.3-SNAPSHOT 4.0.0 diff --git a/datasafe-rest-impl/pom.xml b/datasafe-rest-impl/pom.xml index 01e768861..1388b6b99 100644 --- a/datasafe-rest-impl/pom.xml +++ b/datasafe-rest-impl/pom.xml @@ -5,11 +5,11 @@ datasafe de.adorsys - 0.6.2 + 0.6.3-SNAPSHOT datasafe-rest-impl - 0.6.2 + 0.6.3-SNAPSHOT datasafe-rest-impl Spring Boot DataSafe Application diff --git a/datasafe-runtime-delegate/pom.xml b/datasafe-runtime-delegate/pom.xml index e40f589b3..f2e8b0620 100644 --- a/datasafe-runtime-delegate/pom.xml +++ b/datasafe-runtime-delegate/pom.xml @@ -5,7 +5,7 @@ de.adorsys datasafe - 0.6.2 + 0.6.3-SNAPSHOT datasafe-runtime-delegate diff --git a/datasafe-simple-adapter/datasafe-simple-adapter-api/pom.xml b/datasafe-simple-adapter/datasafe-simple-adapter-api/pom.xml index 4dd956561..4aa9e89c3 100644 --- a/datasafe-simple-adapter/datasafe-simple-adapter-api/pom.xml +++ b/datasafe-simple-adapter/datasafe-simple-adapter-api/pom.xml @@ -5,7 +5,7 @@ datasafe-simple-adapter de.adorsys - 0.6.2 + 0.6.3-SNAPSHOT 4.0.0 diff --git a/datasafe-simple-adapter/datasafe-simple-adapter-impl/pom.xml b/datasafe-simple-adapter/datasafe-simple-adapter-impl/pom.xml index 6550801b3..c802dd1ee 100644 --- a/datasafe-simple-adapter/datasafe-simple-adapter-impl/pom.xml +++ b/datasafe-simple-adapter/datasafe-simple-adapter-impl/pom.xml @@ -5,7 +5,7 @@ datasafe-simple-adapter de.adorsys - 0.6.2 + 0.6.3-SNAPSHOT 4.0.0 diff --git a/datasafe-simple-adapter/datasafe-simple-adapter-spring/pom.xml b/datasafe-simple-adapter/datasafe-simple-adapter-spring/pom.xml index b303769eb..3cca37ec9 100644 --- a/datasafe-simple-adapter/datasafe-simple-adapter-spring/pom.xml +++ b/datasafe-simple-adapter/datasafe-simple-adapter-spring/pom.xml @@ -5,7 +5,7 @@ datasafe-simple-adapter de.adorsys - 0.6.2 + 0.6.3-SNAPSHOT 4.0.0 diff --git a/datasafe-simple-adapter/pom.xml b/datasafe-simple-adapter/pom.xml index 60e784185..7484b6ae3 100644 --- a/datasafe-simple-adapter/pom.xml +++ b/datasafe-simple-adapter/pom.xml @@ -5,7 +5,7 @@ datasafe de.adorsys - 0.6.2 + 0.6.3-SNAPSHOT 4.0.0 diff --git a/datasafe-storage/datasafe-storage-api/pom.xml b/datasafe-storage/datasafe-storage-api/pom.xml index f66f043a5..21ae87824 100644 --- a/datasafe-storage/datasafe-storage-api/pom.xml +++ b/datasafe-storage/datasafe-storage-api/pom.xml @@ -5,7 +5,7 @@ de.adorsys datasafe-storage - 0.6.2 + 0.6.3-SNAPSHOT datasafe-storage-api diff --git a/datasafe-storage/datasafe-storage-impl-db/pom.xml b/datasafe-storage/datasafe-storage-impl-db/pom.xml index 411d2ac57..7d73e8e04 100644 --- a/datasafe-storage/datasafe-storage-impl-db/pom.xml +++ b/datasafe-storage/datasafe-storage-impl-db/pom.xml @@ -5,7 +5,7 @@ datasafe-storage de.adorsys - 0.6.2 + 0.6.3-SNAPSHOT 4.0.0 diff --git a/datasafe-storage/datasafe-storage-impl-fs/pom.xml b/datasafe-storage/datasafe-storage-impl-fs/pom.xml index 859dc823b..5d893e3c8 100644 --- a/datasafe-storage/datasafe-storage-impl-fs/pom.xml +++ b/datasafe-storage/datasafe-storage-impl-fs/pom.xml @@ -5,7 +5,7 @@ datasafe-storage de.adorsys - 0.6.2 + 0.6.3-SNAPSHOT 4.0.0 diff --git a/datasafe-storage/datasafe-storage-impl-s3/pom.xml b/datasafe-storage/datasafe-storage-impl-s3/pom.xml index e6f36ad39..3cc31e980 100644 --- a/datasafe-storage/datasafe-storage-impl-s3/pom.xml +++ b/datasafe-storage/datasafe-storage-impl-s3/pom.xml @@ -5,7 +5,7 @@ datasafe-storage de.adorsys - 0.6.2 + 0.6.3-SNAPSHOT 4.0.0 diff --git a/datasafe-storage/pom.xml b/datasafe-storage/pom.xml index 1b3bcac8f..cd93feb51 100644 --- a/datasafe-storage/pom.xml +++ b/datasafe-storage/pom.xml @@ -5,7 +5,7 @@ datasafe de.adorsys - 0.6.2 + 0.6.3-SNAPSHOT 4.0.0 diff --git a/datasafe-test-storages/pom.xml b/datasafe-test-storages/pom.xml index a2b9f9967..97628cc71 100644 --- a/datasafe-test-storages/pom.xml +++ b/datasafe-test-storages/pom.xml @@ -5,7 +5,7 @@ datasafe de.adorsys - 0.6.2 + 0.6.3-SNAPSHOT 4.0.0 diff --git a/datasafe-types-api/pom.xml b/datasafe-types-api/pom.xml index fed5853ff..33eb62f1e 100644 --- a/datasafe-types-api/pom.xml +++ b/datasafe-types-api/pom.xml @@ -5,7 +5,7 @@ de.adorsys datasafe - 0.6.2 + 0.6.3-SNAPSHOT datasafe-types-api diff --git a/last-module-codecoverage-check/pom.xml b/last-module-codecoverage-check/pom.xml index b31231432..44109be36 100644 --- a/last-module-codecoverage-check/pom.xml +++ b/last-module-codecoverage-check/pom.xml @@ -5,7 +5,7 @@ datasafe de.adorsys - 0.6.2 + 0.6.3-SNAPSHOT 4.0.0 diff --git a/pom.xml b/pom.xml index 99d3e4f5a..78a71d029 100644 --- a/pom.xml +++ b/pom.xml @@ -24,7 +24,7 @@ de.adorsys datasafe - 0.6.2 + 0.6.3-SNAPSHOT datasafe Datasafe https://github.com/adorsys/datasafe From c6ca44e6bc8696d3cea6a79c830468cf77ed2c94 Mon Sep 17 00:00:00 2001 From: Maxim Grischenko Date: Thu, 19 Sep 2019 14:12:19 +0200 Subject: [PATCH 112/255] simple datasafe adapter simple script --- .../impl/SimpleDatasafeServiceImpl.java | 3 +- ...runSimpleDatasafeAdapterPerformanceTest.sh | 30 +++++++++++++++++++ 2 files changed, 32 insertions(+), 1 deletion(-) create mode 100644 scripts/runSimpleDatasafeAdapterPerformanceTest.sh diff --git a/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/main/java/de/adorsys/datasafe/simple/adapter/impl/SimpleDatasafeServiceImpl.java b/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/main/java/de/adorsys/datasafe/simple/adapter/impl/SimpleDatasafeServiceImpl.java index 0875b7c9a..b01292bef 100644 --- a/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/main/java/de/adorsys/datasafe/simple/adapter/impl/SimpleDatasafeServiceImpl.java +++ b/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/main/java/de/adorsys/datasafe/simple/adapter/impl/SimpleDatasafeServiceImpl.java @@ -117,7 +117,8 @@ public SimpleDatasafeServiceImpl(DFSCredentials dfsCredentials) { ) .enablePathStyleAccess(); - boolean useEndpoint = (!amazonS3DFSCredentials.getUrl().equals(AMAZON_URL)); + boolean useEndpoint = !amazonS3DFSCredentials.getUrl().equals(AMAZON_URL) + && !amazonS3DFSCredentials.getUrl().startsWith(S3_PREFIX); if (useEndpoint) { AwsClientBuilder.EndpointConfiguration endpoint = new AwsClientBuilder.EndpointConfiguration( amazonS3DFSCredentials.getUrl(), diff --git a/scripts/runSimpleDatasafeAdapterPerformanceTest.sh b/scripts/runSimpleDatasafeAdapterPerformanceTest.sh new file mode 100644 index 000000000..66894e321 --- /dev/null +++ b/scripts/runSimpleDatasafeAdapterPerformanceTest.sh @@ -0,0 +1,30 @@ +#!/bin/sh +if [ $# -eq 0 ]; then + echo "No arguments provided" + echo "Example usage: sh runSimpleDatasafeAdapterPerformanceTest.sh ACCESS=your_aws_access_key SECRET=your_aws_secret_key BUCKET=bucket_name" + exit 1 +fi + +for ARGUMENT in "$@" +do + KEY=$(echo $ARGUMENT | cut -f1 -d=) + VALUE=$(echo $ARGUMENT | cut -f2 -d=) + + case "$KEY" in + ACCESS) AWS_ACCESS_KEY=${VALUE} ;; + SECRET) AWS_SECRET_KEY=${VALUE} ;; + BUCKET) AWS_BUCKET=${VALUE} ;; + *) + esac +done + +cd "$(dirname "$0")/../datasafe-long-run-tests/datasafe-business-tests-random-actions/" || exit +mvn \ +-DAWS_ACCESS_KEY="$AWS_ACCESS_KEY" \ +-DAWS_SECRET_KEY="$AWS_SECRET_KEY" \ +-DAWS_BUCKET="$AWS_BUCKET" \ +-DDEFAULT_USER="username" \ +-DDEFAULT_PASSWORD="password" \ +-DAWS_REGION="eu-central-1" \ +-DtestArgs="-Xmx256m -DSTORAGE_PROVIDERS="AMAZON" -DFIXTURE_SIZE="SMALL" -DTHREADS=2 -DFILE_SIZES=100" \ +-Dtest=RandomActionsOnSimpleDatasafeAdapterTest test \ No newline at end of file From 79a87ec965be73517670e3e40b4a4dc13e4c6da8 Mon Sep 17 00:00:00 2001 From: Maxim Grischenko Date: Thu, 19 Sep 2019 15:08:22 +0200 Subject: [PATCH 113/255] added aws_url for ceph to script --- scripts/runSimpleDatasafeAdapterPerformanceTest.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/scripts/runSimpleDatasafeAdapterPerformanceTest.sh b/scripts/runSimpleDatasafeAdapterPerformanceTest.sh index 66894e321..26528b1ca 100644 --- a/scripts/runSimpleDatasafeAdapterPerformanceTest.sh +++ b/scripts/runSimpleDatasafeAdapterPerformanceTest.sh @@ -1,7 +1,8 @@ #!/bin/sh if [ $# -eq 0 ]; then echo "No arguments provided" - echo "Example usage: sh runSimpleDatasafeAdapterPerformanceTest.sh ACCESS=your_aws_access_key SECRET=your_aws_secret_key BUCKET=bucket_name" + echo "Example usage: sh runSimpleDatasafeAdapterPerformanceTest.sh" \ + "ACCESS=your_aws_access_key SECRET=your_aws_secret_key BUCKET=bucket_name [URL=ceph_url]" exit 1 fi @@ -14,6 +15,7 @@ do ACCESS) AWS_ACCESS_KEY=${VALUE} ;; SECRET) AWS_SECRET_KEY=${VALUE} ;; BUCKET) AWS_BUCKET=${VALUE} ;; + URL) AWS_URL=${VALUE} ;; *) esac done @@ -23,6 +25,7 @@ mvn \ -DAWS_ACCESS_KEY="$AWS_ACCESS_KEY" \ -DAWS_SECRET_KEY="$AWS_SECRET_KEY" \ -DAWS_BUCKET="$AWS_BUCKET" \ +-DAWS_URL="$AWS_URL" \ -DDEFAULT_USER="username" \ -DDEFAULT_PASSWORD="password" \ -DAWS_REGION="eu-central-1" \ From 2b0ece9dbcdba753214a9d3b046daec8bf2fcb04 Mon Sep 17 00:00:00 2001 From: Maxim Grischenko Date: Fri, 20 Sep 2019 13:17:26 +0200 Subject: [PATCH 114/255] script takes creds from env vars --- ...runSimpleDatasafeAdapterPerformanceTest.sh | 46 +++++++++++-------- 1 file changed, 27 insertions(+), 19 deletions(-) diff --git a/scripts/runSimpleDatasafeAdapterPerformanceTest.sh b/scripts/runSimpleDatasafeAdapterPerformanceTest.sh index 26528b1ca..6c5dd76ed 100644 --- a/scripts/runSimpleDatasafeAdapterPerformanceTest.sh +++ b/scripts/runSimpleDatasafeAdapterPerformanceTest.sh @@ -1,24 +1,32 @@ #!/bin/sh -if [ $# -eq 0 ]; then - echo "No arguments provided" - echo "Example usage: sh runSimpleDatasafeAdapterPerformanceTest.sh" \ - "ACCESS=your_aws_access_key SECRET=your_aws_secret_key BUCKET=bucket_name [URL=ceph_url]" - exit 1 -fi +ERR= +REQ_ENVS="AWS_ACCESS_KEY AWS_SECRET_KEY AWS_BUCKET AWS_REGION" +for ENV in ${REQ_ENVS}; do + if [ -z "${!ENV}" ] ; then + echo "ERROR: missing ${ENV} environment variable" + ERR=1 + fi +done -for ARGUMENT in "$@" -do - KEY=$(echo $ARGUMENT | cut -f1 -d=) - VALUE=$(echo $ARGUMENT | cut -f2 -d=) +help() +{ + echo + echo "********************************************************************************************" + echo "Script usage:" + echo "Before running test script ensures that environment variables are set." + echo "List of used variables:" + echo "AWS_ACCESS_KEY" + echo "AWS_SECRET_KEY" + echo "AWS_BUCKET" + echo "AWS_REGION" + echo "AWS_URL - optional. Used when storage location is not default aws s3 (for example for ceph)" + echo "********************************************************************************************" +} - case "$KEY" in - ACCESS) AWS_ACCESS_KEY=${VALUE} ;; - SECRET) AWS_SECRET_KEY=${VALUE} ;; - BUCKET) AWS_BUCKET=${VALUE} ;; - URL) AWS_URL=${VALUE} ;; - *) - esac -done +if [ "$ERR" = "1" ]; then + help + exit 1 +fi cd "$(dirname "$0")/../datasafe-long-run-tests/datasafe-business-tests-random-actions/" || exit mvn \ @@ -26,8 +34,8 @@ mvn \ -DAWS_SECRET_KEY="$AWS_SECRET_KEY" \ -DAWS_BUCKET="$AWS_BUCKET" \ -DAWS_URL="$AWS_URL" \ +-DAWS_REGION="$AWS_REGION" \ -DDEFAULT_USER="username" \ -DDEFAULT_PASSWORD="password" \ --DAWS_REGION="eu-central-1" \ -DtestArgs="-Xmx256m -DSTORAGE_PROVIDERS="AMAZON" -DFIXTURE_SIZE="SMALL" -DTHREADS=2 -DFILE_SIZES=100" \ -Dtest=RandomActionsOnSimpleDatasafeAdapterTest test \ No newline at end of file From 87ee2dd9e25d560f1a1072f4eb7f065fb4280460 Mon Sep 17 00:00:00 2001 From: Maxim Grischenko Date: Fri, 20 Sep 2019 16:10:46 +0200 Subject: [PATCH 115/255] script documentation --- datasafe-long-run-tests/README.md | 100 +++++++++++++++++- ...runSimpleDatasafeAdapterPerformanceTest.sh | 2 - 2 files changed, 97 insertions(+), 5 deletions(-) diff --git a/datasafe-long-run-tests/README.md b/datasafe-long-run-tests/README.md index a41a1432e..bf85dfbd3 100644 --- a/datasafe-long-run-tests/README.md +++ b/datasafe-long-run-tests/README.md @@ -1,6 +1,68 @@ # Datasafe long run test results -### 1. Testing procedure description. +### 1. Testing environment preparation +Datasafe throughput tests was run on different Amazon EC2 instances. On each instance after creation was installed JDK, maven and git. Then datasafe project was pulled and executed +[RandomActionsOnDatasafeTest](datasafe-business-tests-random-actions/src/test/java/de/adorsys/datasafe/business/impl/e2e/randomactions/RandomActionsOnDatasafeTest.java) which uses one bucket. Test was launched with all combinations of 2, 4, 8 and 16 parallel threads and 100kb, 1mb and 10mb file sizes. + +#### Preparation commands for running test: + +```text +ssh -i ~/Documents/mhr.pem ec2-user@x.x.x.x +``` + +where x.x.x.x - current ip address of ec2 instance. + +mhr.pem - key pair file to access remote console by ssh. + +Uploading jdk to remote server. jdk-8u221-linux-x64.rpm file should be first downloaded from Oracle website. +```text +scp -i ~/Documents/mhr.pem ~/jdk-8u221-linux-x64.rpm ec2-user@3.120.206.136:/home/ec2-user +``` +Installation of jdk, maven, git. +```text +sudo yum install -y jdk-8u221-linux-x64.rpm +sudo yum install -y git +sudo yum install -y maven +``` + +Datasafe checkout and compilation + +```text +git clone https://github.com/adorsys/datasafe.git +git checkout feature/DOC-236_RunThroughputTest +mvn -DskipTests=true install +cd datasafe-long-run-tests/datasafe-business-tests-random-actions/ +``` + +Test execution command. + +```text +mvn -DAWS_ACCESS_KEY="***" \ + -DAWS_SECRET_KEY="***" \ + -DAWS_BUCKET="***" \ + -DDEFAULT_USER="username" \ + -DDEFAULT_PASSWORD="password" \ + -DAWS_REGION="eu-central-1" \ + -DtestArgs="-Xmx512m \ + -Dcom.sun.management.jmxremote.ssl=false \ + -Dcom.sun.management.jmxremote.authenticate=false \ + -Dcom.sun.management.jmxremote.port=8090 \ + -Dcom.sun.management.jmxremote.rmi.port=8090 \ + -Djava.rmi.server.hostname=127.0.0.1 \ + -Dcom.sun.management.jmxremote.local.only=false" \ + -Dtest=RandomActionsOnDatasafeTest test +``` + +*** should be changed to real aws s3 bucket name, access key and secret key. + +With Xmx parameter used memory could be configured. But due to some memory leaks it was not used and test ran with all available memory. + +Enabling jmx monitoring +```text +ssh -i ~/Documents/mhr.pem -L 8090:127.0.0.1:8090 ec2-user@x.x.x.x +``` + +### 2. Testing procedure description. Tests were done on 6 different aws ec2 instances: @@ -73,7 +135,7 @@ Threads 100kb 1mb 10mb 2 118.67294777989376 42.735968236780366 6.102306403813942 ``` -### 2. Test result charts. +### 3. Test result charts. 1. WRITE operation @@ -108,7 +170,7 @@ MULTIBUCKET TEST All tests were made using AES256_CBC Encryption algorithm. On next chart test results using AES256_GCM comparing to AES256_CBC. ![](.images/CBCvsGCM.png) -### 3. CEPH S3 storage test +### 4. CEPH S3 storage test For Ceph testing, cluster consists of osd1, osd2, osd3 t2.xlarge ec2 instances and t2.large instances for ceph monitor and gateway. @@ -117,3 +179,35 @@ For Ceph testing, cluster consists of osd1, osd2, osd3 t2.xlarge ec2 instances a Each test was run with 2, 4, 8, 16 threads with single bucket and multi bucket(3 buckets were used) from ec2 c5n.2xlarge(8core) instance. ![](.images/ceph.png) + +### 5. Simple Datasafe Adapter test +There is also [RandomActionsOnSimpleDatasafeAdapterTest](datasafe-business-tests-random-actions/src/test/java/de/adorsys/datasafe/business/impl/e2e/randomactions/RandomActionsOnSimpleDatasafeAdapterTest.java) for testing functionality of Simple Datasafe Adapter (used for compatibility with predecessor of datasafe - docusafe). +To run test you need to have installed jdk and maven. +If your storage is aws s3 then command will be: +```text +mvn -DAWS_ACCESS_KEY="accesskey" \ + -DAWS_SECRET_KEY="secretkey" \ + -DAWS_BUCKET="datasafe-bucket" \ + -DAWS_REGION="eu-central-1" \ + -DtestArgs="-Xmx256m \ # memory limit for test + -DSTORAGE_PROVIDERS="AMAZON" \ # means that external s3 compatible storage will be used. By default local MINIO container is used. + -DFIXTURE_SIZE="MEDIUM" \ # available values: MEDIUM (1000 operations), BIG (10000 operations). By default small fixture is used with 200 operations. + -DTHREADS=16 \ # comma separated list of desired number of threads + -DFILE_SIZES=100,1024,10240" \ # comma separated list of file sizes used in test + -Dtest=RandomActionsOnSimpleDatasafeAdapterTest test +``` +For Ceph you have to add AWS_URL param. Without this parameter test by default trying to connect to Amazon. +```text +mvn -DAWS_ACCESS_KEY="accesskey" \ + -DAWS_SECRET_KEY="secretkey" \ + -DAWS_BUCKET="ceph-bucket" \ + -DAWS_URL="host.ceph.com:7480" \ + -DtestArgs="-Xmx256m -DSTORAGE_PROVIDERS="AMAZON" -DFIXTURE_SIZE="MEDIUM" -DTHREADS=2,4,8,16 -DFILE_SIZES=100,1024,10240" \ + -Dtest=RandomActionsOnSimpleDatasafeAdapterTest test +``` +Test will automatcally run in all combinations of values of threads, file_size and storage providers lists. + +For simplifying running this test there is [runSimpleDatasafeAdapterPerformanceTest.sh](/script/runSimpleDatasafeAdapterPerformanceTest.sh) +script which uses credentials from environment variables and by default runs test with small fixture size, 2 threads and 100kb file size. + + diff --git a/scripts/runSimpleDatasafeAdapterPerformanceTest.sh b/scripts/runSimpleDatasafeAdapterPerformanceTest.sh index 6c5dd76ed..e5480863d 100644 --- a/scripts/runSimpleDatasafeAdapterPerformanceTest.sh +++ b/scripts/runSimpleDatasafeAdapterPerformanceTest.sh @@ -35,7 +35,5 @@ mvn \ -DAWS_BUCKET="$AWS_BUCKET" \ -DAWS_URL="$AWS_URL" \ -DAWS_REGION="$AWS_REGION" \ --DDEFAULT_USER="username" \ --DDEFAULT_PASSWORD="password" \ -DtestArgs="-Xmx256m -DSTORAGE_PROVIDERS="AMAZON" -DFIXTURE_SIZE="SMALL" -DTHREADS=2 -DFILE_SIZES=100" \ -Dtest=RandomActionsOnSimpleDatasafeAdapterTest test \ No newline at end of file From ab50a70fc6ddc8c768fc387eb14f6af34b85eed5 Mon Sep 17 00:00:00 2001 From: Maxim Grischenko Date: Mon, 23 Sep 2019 12:09:24 +0200 Subject: [PATCH 116/255] script documentation --- datasafe-long-run-tests/README.md | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/datasafe-long-run-tests/README.md b/datasafe-long-run-tests/README.md index bf85dfbd3..3d648ba61 100644 --- a/datasafe-long-run-tests/README.md +++ b/datasafe-long-run-tests/README.md @@ -29,7 +29,6 @@ Datasafe checkout and compilation ```text git clone https://github.com/adorsys/datasafe.git -git checkout feature/DOC-236_RunThroughputTest mvn -DskipTests=true install cd datasafe-long-run-tests/datasafe-business-tests-random-actions/ ``` @@ -40,8 +39,6 @@ Test execution command. mvn -DAWS_ACCESS_KEY="***" \ -DAWS_SECRET_KEY="***" \ -DAWS_BUCKET="***" \ - -DDEFAULT_USER="username" \ - -DDEFAULT_PASSWORD="password" \ -DAWS_REGION="eu-central-1" \ -DtestArgs="-Xmx512m \ -Dcom.sun.management.jmxremote.ssl=false \ @@ -207,7 +204,8 @@ mvn -DAWS_ACCESS_KEY="accesskey" \ ``` Test will automatcally run in all combinations of values of threads, file_size and storage providers lists. -For simplifying running this test there is [runSimpleDatasafeAdapterPerformanceTest.sh](/script/runSimpleDatasafeAdapterPerformanceTest.sh) +For simplifying running this test there is [runSimpleDatasafeAdapterPerformanceTest.sh](../scripts/runSimpleDatasafeAdapterPerformanceTest.sh) script which uses credentials from environment variables and by default runs test with small fixture size, 2 threads and 100kb file size. +AWS_ACCESS_KEY, AWS_SECRET_KEY, AWS_BUCKET, AWS_REGION environment variables have to be set. And for Ceph also AWS_URL has to be set. From 64d1db8492ffd047eb372043406246bca1cb3445 Mon Sep 17 00:00:00 2001 From: Maxim Grischenko Date: Mon, 23 Sep 2019 16:00:51 +0200 Subject: [PATCH 117/255] fix clean up when bucket name contains slashes --- datasafe-long-run-tests/README.md | 10 ++++------ .../datasafe/teststorage/WithStorageProvider.java | 11 ++++++++--- 2 files changed, 12 insertions(+), 9 deletions(-) diff --git a/datasafe-long-run-tests/README.md b/datasafe-long-run-tests/README.md index 3d648ba61..ec85e75c3 100644 --- a/datasafe-long-run-tests/README.md +++ b/datasafe-long-run-tests/README.md @@ -4,7 +4,7 @@ Datasafe throughput tests was run on different Amazon EC2 instances. On each instance after creation was installed JDK, maven and git. Then datasafe project was pulled and executed [RandomActionsOnDatasafeTest](datasafe-business-tests-random-actions/src/test/java/de/adorsys/datasafe/business/impl/e2e/randomactions/RandomActionsOnDatasafeTest.java) which uses one bucket. Test was launched with all combinations of 2, 4, 8 and 16 parallel threads and 100kb, 1mb and 10mb file sizes. -#### Preparation commands for running test: +#### Preparation commands for running test ```text ssh -i ~/Documents/mhr.pem ec2-user@x.x.x.x @@ -59,7 +59,7 @@ Enabling jmx monitoring ssh -i ~/Documents/mhr.pem -L 8090:127.0.0.1:8090 ec2-user@x.x.x.x ``` -### 2. Testing procedure description. +### 2. Testing procedure description Tests were done on 6 different aws ec2 instances: @@ -132,7 +132,7 @@ Threads 100kb 1mb 10mb 2 118.67294777989376 42.735968236780366 6.102306403813942 ``` -### 3. Test result charts. +### 3. Test result charts 1. WRITE operation @@ -206,6 +206,4 @@ Test will automatcally run in all combinations of values of threads, file_size a For simplifying running this test there is [runSimpleDatasafeAdapterPerformanceTest.sh](../scripts/runSimpleDatasafeAdapterPerformanceTest.sh) script which uses credentials from environment variables and by default runs test with small fixture size, 2 threads and 100kb file size. -AWS_ACCESS_KEY, AWS_SECRET_KEY, AWS_BUCKET, AWS_REGION environment variables have to be set. And for Ceph also AWS_URL has to be set. - - +AWS_ACCESS_KEY, AWS_SECRET_KEY, AWS_BUCKET, AWS_REGION environment variables have to be set. And for Ceph also AWS_URL has to be set. \ No newline at end of file diff --git a/datasafe-test-storages/src/main/java/de/adorsys/datasafe/teststorage/WithStorageProvider.java b/datasafe-test-storages/src/main/java/de/adorsys/datasafe/teststorage/WithStorageProvider.java index ee16a859f..4d806b72b 100644 --- a/datasafe-test-storages/src/main/java/de/adorsys/datasafe/teststorage/WithStorageProvider.java +++ b/datasafe-test-storages/src/main/java/de/adorsys/datasafe/teststorage/WithStorageProvider.java @@ -97,8 +97,6 @@ public abstract class WithStorageProvider extends BaseMockitoTest { @BeforeAll static void init(@TempDir Path tempDir) { log.info("Executing init"); - // TODO fixme - log.info(""); // for some strange reason, the newline of the previous statement is gone WithStorageProvider.tempDir = tempDir; minioStorage = Suppliers.memoize(() -> { @@ -273,11 +271,18 @@ protected static StorageDescriptor s3() { } private void removeObjectFromS3(AmazonS3 amazonS3, String bucket, String prefix) { + // if bucket name contains slashes then move all after first slash to prefix + String[] parts = bucket.split("/", 2); + if (parts.length == 2) { + bucket = parts[0]; + prefix = parts[1] + "/" + prefix; + } + String lambdafinalBucket = bucket; amazonS3.listObjects(bucket, prefix) .getObjectSummaries() .forEach(it -> { log.debug("Remove {}", it.getKey()); - amazonS3.deleteObject(bucket, it.getKey()); + amazonS3.deleteObject(lambdafinalBucket, it.getKey()); }); } From 8b5c4a531960d04a99f95a20dc01ed5a795250fb Mon Sep 17 00:00:00 2001 From: Valentyn Berezin Date: Tue, 24 Sep 2019 14:22:13 +0300 Subject: [PATCH 118/255] DOC-165. Prepare release 1.0. CLI scripts migration --- .travis.yml | 67 +++++++++++++------ datasafe-cli/pom.xml | 2 +- .../datasafe/cli/commands/profile/Create.java | 2 +- ...DFSRelativeProfileUpdatingServiceImpl.java | 12 ---- .../impl/profile/HardcodedProfileModule.java | 7 ++ 5 files changed, 56 insertions(+), 34 deletions(-) diff --git a/.travis.yml b/.travis.yml index ea3bf7b27..97db77ffb 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,4 +1,7 @@ # Using bash because Travis CI does not support Java on Windows +sudo: required +services: + - docker branches: except: @@ -9,25 +12,47 @@ env: - GRAVIS="https://raw.githubusercontent.com/DanySK/Gravis-CI/master/" - JDK="graalvm@19.2.0" +### This section represents primary build actions before_install: - - echo "Before install" + - curl -L https://github.com/openshift/origin/releases/download/v3.11.0/openshift-origin-client-tools-v3.11.0-0cbc58b-linux-64bit.tar.gz > oc-cli.tar.gz + - tar -xzf oc-cli.tar.gz + - sudo mv ./openshift-origin-client-tools-v3.11.0-0cbc58b-linux-64bit/oc /usr/local/bin +# preparations to build frontend install: - - echo "Install" + - nvm install 11.12.0 + - npm install -g @angular/cli + - cd frontend/datasafe-ui && npm install && cd ../.. -# Original build script: - - echo "Script" - - ./mvnw --settings .travis/settings.xml clean verify -B -V -DAWS_BUCKET=${AWS_BUCKET} -DskipTests # FIXME remove skipTests + - mvn --settings .travis/settings.xml clean verify -B -V -DAWS_BUCKET=${AWS_BUCKET} + # make frontend available for REST-docker + - cd frontend/datasafe-ui && ng build --deploy-url /static/ --base-href /static/ && mv dist ../../datasafe-rest-impl/target/dist && cd ../.. -# Original deploy deploy: - provider: script skip_cleanup: true - script: echo "Deploy" + script: /bin/bash .travis/deploy.sh + on: + tags: true + condition: "$TRAVIS_TAG =~ ^v([[:digit:]]+\\.)+[[:digit:]]+(-[[:digit:]]+)?(-SNAPSHOT)?$" + + - provider: script + skip_cleanup: true + script: /bin/bash .travis/deploy_develop_to_openshift.sh + on: + branch: develop + + - provider: script + skip_cleanup: true + script: /bin/bash .travis/upload_dockerhub.sh + on: + all_branches: true + tags: true + condition: "$TRAVIS_TAG =~ ^v([[:digit:]]+\\.)+[[:digit:]]+(-[[:digit:]]+)?(-SNAPSHOT)?$" after_success: - - echo "Success" + - /bin/bash .travis/codecov_bash.sh ################ Custom build stages: # Special test-skipping stage to build CLI, using maven-wrapper @@ -61,37 +86,39 @@ deploy-cli: &deploy-cli # Build configuration definition: matrix: include: - #### ORIGINAL BUILD #### - # This is original build and deploy, that runs E2E tests and deploys docker images + + #### PRIMARY BUILD #### + # This is original build and deploy script, that runs E2E tests and deploys docker images - os: linux language: java jdk: openjdk8 + #### CLI-ORIENTED BUILD #### # These are CLI-only builds that produce Datasafe cli executable for each OS: + ### CLI for Linux: - os: linux language: bash before_install: - source .travis/drop_deploy_secrets.sh - /bin/bash .travis/install_maven_custom_jdk_and_add_security_providers.sh + install: + - echo 'Nothing to do' # Override primary build logic <<: *build-cli <<: *deploy-cli + after_success: + - echo 'Nothing to do' # Override primary build logic + ### CLI for MacOS: - os: osx language: bash before_install: - source .travis/drop_deploy_secrets.sh - /bin/bash .travis/install_maven_custom_jdk_and_add_security_providers.sh + install: + - echo 'Nothing to do' # Override primary build logic <<: *build-cli <<: *deploy-cli -# CLI for Windows (disabled as of now): -# - os: windows -# env: -# - NO_WIN_DEFENDER=$(curl "${GRAVIS}.disable-windows-defender.sh" --output .no-defender.sh && source .no-defender.sh) -# language: bash -# before_install: -# - source .travis/drop_deploy_secrets.sh -# - /bin/bash .travis/install_maven_custom_jdk_and_add_security_providers.sh -# <<: *build-cli -# <<: *deploy-cli + after_success: + - echo 'Nothing to do' # Override primary build logic \ No newline at end of file diff --git a/datasafe-cli/pom.xml b/datasafe-cli/pom.xml index 26eac247a..d1566e716 100644 --- a/datasafe-cli/pom.xml +++ b/datasafe-cli/pom.xml @@ -5,7 +5,7 @@ de.adorsys datasafe - 0.6.1-SNAPSHOT + 0.6.3-SNAPSHOT datasafe-cli diff --git a/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/commands/profile/Create.java b/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/commands/profile/Create.java index 39fb27863..5b1f0c208 100644 --- a/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/commands/profile/Create.java +++ b/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/commands/profile/Create.java @@ -49,7 +49,7 @@ public void run() { profile.getCli().datasafe().userProfile().registerPrivate(privateProfile); profile.getCli().datasafe().userProfile().createAllAllowableKeystores( profile.getCli().auth(), - privateProfile.removeAccess() + privateProfile.buildPrivateProfile() ); } diff --git a/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/main/java/de/adorsys/datasafe/simple/adapter/impl/profile/DFSRelativeProfileUpdatingServiceImpl.java b/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/main/java/de/adorsys/datasafe/simple/adapter/impl/profile/DFSRelativeProfileUpdatingServiceImpl.java index 434e9ac25..90e999b16 100644 --- a/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/main/java/de/adorsys/datasafe/simple/adapter/impl/profile/DFSRelativeProfileUpdatingServiceImpl.java +++ b/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/main/java/de/adorsys/datasafe/simple/adapter/impl/profile/DFSRelativeProfileUpdatingServiceImpl.java @@ -4,13 +4,11 @@ import de.adorsys.datasafe.directory.api.profile.keys.DocumentKeyStoreOperations; import de.adorsys.datasafe.directory.api.profile.keys.PrivateKeyService; import de.adorsys.datasafe.directory.api.profile.keys.StorageKeyStoreOperations; -import de.adorsys.datasafe.directory.api.types.StorageCredentials; import de.adorsys.datasafe.directory.api.types.UserPrivateProfile; import de.adorsys.datasafe.directory.api.types.UserPublicProfile; import de.adorsys.datasafe.directory.impl.profile.operations.actions.ProfileUpdatingServiceImpl; import de.adorsys.datasafe.encrypiton.api.types.UserIDAuth; import de.adorsys.datasafe.encrypiton.api.types.keystore.ReadKeyPassword; -import de.adorsys.datasafe.types.api.resource.StorageIdentifier; import javax.inject.Inject; @@ -41,14 +39,4 @@ public void updatePrivateProfile(UserIDAuth forUser, UserPrivateProfile profile) public void updateReadKeyPassword(UserIDAuth forUser, ReadKeyPassword newPassword) { super.updateReadKeyPassword(forUser, newPassword); } - - @Override - public void registerStorageCredentials(UserIDAuth user, StorageIdentifier storageId, StorageCredentials credentials) { - super.registerStorageCredentials(user, storageId, credentials); - } - - @Override - public void deregisterStorageCredentials(UserIDAuth user, StorageIdentifier storageId) { - super.deregisterStorageCredentials(user, storageId); - } } diff --git a/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/main/java/de/adorsys/datasafe/simple/adapter/impl/profile/HardcodedProfileModule.java b/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/main/java/de/adorsys/datasafe/simple/adapter/impl/profile/HardcodedProfileModule.java index b7a7c64a3..490e477a8 100644 --- a/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/main/java/de/adorsys/datasafe/simple/adapter/impl/profile/HardcodedProfileModule.java +++ b/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/main/java/de/adorsys/datasafe/simple/adapter/impl/profile/HardcodedProfileModule.java @@ -5,6 +5,7 @@ import de.adorsys.datasafe.directory.api.profile.operations.*; import de.adorsys.datasafe.directory.api.resource.ResourceResolver; import de.adorsys.datasafe.directory.impl.profile.operations.DFSBasedProfileStorageImplRuntimeDelegatable; +import de.adorsys.datasafe.directory.impl.profile.operations.actions.ProfileStorageCredentialsServiceImplRuntimeDelegatable; import de.adorsys.datasafe.directory.impl.profile.resource.ResourceResolverImplRuntimeDelegatable; @Module @@ -34,6 +35,12 @@ public abstract class HardcodedProfileModule { @Binds abstract ProfileRemovalService removalService(DFSRelativeProfileRemovalServiceImpl impl); + /** + * Storage credentials access. + */ + @Binds + abstract ProfileStorageCredentialsService profileStorageCredentialsService(ProfileStorageCredentialsServiceImplRuntimeDelegatable impl); + /** * Resource resolver that simply prepends relevant path segment from profile based on location type. */ From 44dbe2e8b356f9928f8982629b3b6d9ca3bb8029 Mon Sep 17 00:00:00 2001 From: Valentyn Berezin Date: Tue, 24 Sep 2019 19:33:00 +0300 Subject: [PATCH 119/255] DOC-165. Continue release preparation - add BouncyCastle security provider in tests --- .../encrypiton/impl/KeyPairGeneratorTest.java | 23 +++++++++++++++++-- .../impl/keystore/KeyStoreServiceTest.java | 7 ++++++ ...ymmetricPathEncryptionServiceImplTest.java | 8 +++++++ 3 files changed, 36 insertions(+), 2 deletions(-) diff --git a/datasafe-encryption/datasafe-encryption-impl/src/test/java/de/adorsys/datasafe/encrypiton/impl/KeyPairGeneratorTest.java b/datasafe-encryption/datasafe-encryption-impl/src/test/java/de/adorsys/datasafe/encrypiton/impl/KeyPairGeneratorTest.java index a49e6a82b..414ad94e0 100644 --- a/datasafe-encryption/datasafe-encryption-impl/src/test/java/de/adorsys/datasafe/encrypiton/impl/KeyPairGeneratorTest.java +++ b/datasafe-encryption/datasafe-encryption-impl/src/test/java/de/adorsys/datasafe/encrypiton/impl/KeyPairGeneratorTest.java @@ -1,9 +1,22 @@ package de.adorsys.datasafe.encrypiton.impl; import de.adorsys.datasafe.encrypiton.api.types.keystore.ReadKeyPassword; +import de.adorsys.datasafe.types.api.shared.BaseMockitoTest; +import org.bouncycastle.jce.provider.BouncyCastleProvider; +import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.Test; -class KeyPairGeneratorTest { +import java.security.Security; +import java.util.Date; + +import static org.assertj.core.api.Assertions.assertThat; + +class KeyPairGeneratorTest extends BaseMockitoTest { + + @BeforeAll + static void setupBouncyCastle() { + Security.addProvider(new BouncyCastleProvider()); + } @Test void testKeyPairGenerationWithCA() { @@ -11,6 +24,12 @@ void testKeyPairGenerationWithCA() { TestableKeyPairGeneratorImpl i = new TestableKeyPairGeneratorImpl("RSA", 2048, "SHA256withRSA", "enc"); i.setDayAfter(40); i.setWithCA(true); - i.generateEncryptionKey("affe", readKeyPassword); + + assertThat( + i.generateEncryptionKey("affe", readKeyPassword) + .getKeyPair() + .getSubjectCert() + .isValidOn(new Date()) + ).isTrue(); } } diff --git a/datasafe-encryption/datasafe-encryption-impl/src/test/java/de/adorsys/datasafe/encrypiton/impl/keystore/KeyStoreServiceTest.java b/datasafe-encryption/datasafe-encryption-impl/src/test/java/de/adorsys/datasafe/encrypiton/impl/keystore/KeyStoreServiceTest.java index a66c9384d..c931d073b 100644 --- a/datasafe-encryption/datasafe-encryption-impl/src/test/java/de/adorsys/datasafe/encrypiton/impl/keystore/KeyStoreServiceTest.java +++ b/datasafe-encryption/datasafe-encryption-impl/src/test/java/de/adorsys/datasafe/encrypiton/impl/keystore/KeyStoreServiceTest.java @@ -9,7 +9,9 @@ import de.adorsys.datasafe.encrypiton.impl.keystore.types.KeyPairEntry; import de.adorsys.datasafe.encrypiton.impl.keystore.types.KeyPairGenerator; import de.adorsys.datasafe.types.api.shared.BaseMockitoTest; +import org.bouncycastle.jce.provider.BouncyCastleProvider; import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; @@ -28,6 +30,11 @@ class KeyStoreServiceTest extends BaseMockitoTest { private KeyStoreService keyStoreService = new KeyStoreServiceImpl(new DefaultPasswordBasedKeyConfig()); private KeyStoreAuth keyStoreAuth; + @BeforeAll + static void setupBouncyCastle() { + Security.addProvider(new BouncyCastleProvider()); + } + @BeforeEach void setUp() { ReadStorePassword readStorePassword = new ReadStorePassword("keystorepass"); diff --git a/datasafe-encryption/datasafe-encryption-impl/src/test/java/de/adorsys/datasafe/encrypiton/impl/pathencryption/SymmetricPathEncryptionServiceImplTest.java b/datasafe-encryption/datasafe-encryption-impl/src/test/java/de/adorsys/datasafe/encrypiton/impl/pathencryption/SymmetricPathEncryptionServiceImplTest.java index fb2ea2066..402b826b9 100644 --- a/datasafe-encryption/datasafe-encryption-impl/src/test/java/de/adorsys/datasafe/encrypiton/impl/pathencryption/SymmetricPathEncryptionServiceImplTest.java +++ b/datasafe-encryption/datasafe-encryption-impl/src/test/java/de/adorsys/datasafe/encrypiton/impl/pathencryption/SymmetricPathEncryptionServiceImplTest.java @@ -8,7 +8,9 @@ import de.adorsys.datasafe.types.api.resource.Uri; import de.adorsys.datasafe.types.api.shared.BaseMockitoTest; import lombok.extern.slf4j.Slf4j; +import org.bouncycastle.jce.provider.BouncyCastleProvider; import org.cryptomator.siv.SivMode; +import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.Test; import javax.crypto.BadPaddingException; @@ -16,6 +18,7 @@ import javax.crypto.spec.SecretKeySpec; import java.net.URI; import java.security.KeyStore; +import java.security.Security; import static de.adorsys.datasafe.encrypiton.api.types.keystore.KeyStoreCreationConfig.PATH_KEY_ID_PREFIX_CTR; import static org.assertj.core.api.Assertions.assertThat; @@ -37,6 +40,11 @@ class SymmetricPathEncryptionServiceImplTest extends BaseMockitoTest { private KeyStore keyStore = keyStoreService.createKeyStore(keyStoreAuth, KeyStoreType.DEFAULT, config); private KeyStoreAccess keyStoreAccess = new KeyStoreAccess(keyStore, keyStoreAuth); + @BeforeAll + static void setupBouncyCastle() { + Security.addProvider(new BouncyCastleProvider()); + } + @Test void testEncryptionDoesNotLeakSameSegments() { String testPath = "path/to/path/file/to"; From e70a8f6df0958c0885153df1ff69df451578e5a1 Mon Sep 17 00:00:00 2001 From: Valentyn Berezin Date: Tue, 24 Sep 2019 19:33:16 +0300 Subject: [PATCH 120/255] DOC-165. Continue release preparation - add BouncyCastle security provider in tests --- .../adorsys/datasafe/business/impl/e2e/BaseE2ETest.java | 8 ++++++++ .../datasafe/business/impl/e2e/KeystoreE2ETest.java | 8 ++++++++ 2 files changed, 16 insertions(+) diff --git a/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/BaseE2ETest.java b/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/BaseE2ETest.java index 85ab6be95..c02526974 100644 --- a/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/BaseE2ETest.java +++ b/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/BaseE2ETest.java @@ -33,6 +33,8 @@ import lombok.RequiredArgsConstructor; import lombok.SneakyThrows; import lombok.extern.slf4j.Slf4j; +import org.bouncycastle.jce.provider.BouncyCastleProvider; +import org.junit.jupiter.api.BeforeAll; import java.io.ByteArrayOutputStream; import java.io.InputStream; @@ -41,6 +43,7 @@ import java.nio.file.Files; import java.nio.file.Path; import java.nio.file.Paths; +import java.security.Security; import java.util.Collections; import java.util.List; import java.util.stream.Collectors; @@ -73,6 +76,11 @@ public abstract class BaseE2ETest extends WithStorageProvider { protected UserIDAuth john; protected UserIDAuth jane; + @BeforeAll + static void addBouncyCastle() { + Security.addProvider(new BouncyCastleProvider()); + } + protected void initialize(DFSConfig dfsConfig, DefaultDatasafeServices datasafeServices) { this.dfsConfig = dfsConfig; this.listPrivate = datasafeServices.privateService(); diff --git a/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/KeystoreE2ETest.java b/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/KeystoreE2ETest.java index fc1d40a0b..c3a0e497f 100644 --- a/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/KeystoreE2ETest.java +++ b/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/KeystoreE2ETest.java @@ -9,6 +9,8 @@ import de.adorsys.datasafe.types.api.resource.Uri; import de.adorsys.datasafe.types.api.shared.BaseMockitoTest; import lombok.SneakyThrows; +import org.bouncycastle.jce.provider.BouncyCastleProvider; +import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.io.TempDir; @@ -18,6 +20,7 @@ import java.nio.file.Path; import java.nio.file.Paths; import java.security.KeyStore; +import java.security.Security; import java.util.Enumeration; import java.util.HashSet; import java.util.Set; @@ -34,6 +37,11 @@ class KeystoreE2ETest extends BaseMockitoTest { private DefaultDatasafeServices datasafeServices; + @BeforeAll + static void addBouncyCastle() { + Security.addProvider(new BouncyCastleProvider()); + } + @BeforeEach void init(@TempDir Path rootPath) { datasafeServices = DatasafeServicesProvider.defaultDatasafeServices( From edaa8dba389c9bae3f4e746aaa1c16973f4d3d8c Mon Sep 17 00:00:00 2001 From: Valentyn Berezin Date: Tue, 24 Sep 2019 19:33:25 +0300 Subject: [PATCH 121/255] DOC-165. Continue release preparation --- .../datasafe/business/impl/e2e/MultiDFSFunctionalityTest.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/MultiDFSFunctionalityTest.java b/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/MultiDFSFunctionalityTest.java index 1e4e70efb..1efad2e1c 100644 --- a/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/MultiDFSFunctionalityTest.java +++ b/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/MultiDFSFunctionalityTest.java @@ -32,6 +32,7 @@ import lombok.SneakyThrows; import lombok.experimental.Delegate; import lombok.extern.slf4j.Slf4j; +import org.bouncycastle.jce.provider.BouncyCastleProvider; import org.bouncycastle.util.io.Streams; import org.junit.jupiter.api.AfterAll; import org.junit.jupiter.api.BeforeAll; @@ -43,6 +44,7 @@ import java.io.InputStream; import java.io.OutputStream; +import java.security.Security; import java.security.UnrecoverableKeyException; import java.util.Collections; import java.util.HashMap; @@ -83,6 +85,7 @@ class MultiDFSFunctionalityTest extends BaseMockitoTest { @BeforeAll static void initDistributedMinios() { + Security.addProvider(new BouncyCastleProvider()); // Create all required minio-backed S3 buckets: Stream.of(CREDENTIALS, KEYSTORE, FILES_ONE, FILES_TWO, INBOX).forEach(it -> { GenericContainer minio = new GenericContainer("minio/minio") From 62b8a6624e244b60ead779ed80c92cb8bc85f466 Mon Sep 17 00:00:00 2001 From: Valentyn Berezin Date: Wed, 25 Sep 2019 11:45:53 +0300 Subject: [PATCH 122/255] DOC-165. Add abstract test class that makes BC available --- .../encrypiton/impl/KeyPairGeneratorTest.java | 11 +---------- .../encrypiton/impl/WithBouncyCastle.java | 15 +++++++++++++++ .../CmsEncryptionServiceImplTest.java | 6 ++---- .../cmsencryption/SymetricEncryptionTest.java | 3 ++- .../impl/keystore/KeyStoreServiceTest.java | 11 ++--------- .../SymmetricPathEncryptionServiceImplTest.java | 12 ++---------- 6 files changed, 24 insertions(+), 34 deletions(-) create mode 100644 datasafe-encryption/datasafe-encryption-impl/src/test/java/de/adorsys/datasafe/encrypiton/impl/WithBouncyCastle.java diff --git a/datasafe-encryption/datasafe-encryption-impl/src/test/java/de/adorsys/datasafe/encrypiton/impl/KeyPairGeneratorTest.java b/datasafe-encryption/datasafe-encryption-impl/src/test/java/de/adorsys/datasafe/encrypiton/impl/KeyPairGeneratorTest.java index 414ad94e0..09f4efbbe 100644 --- a/datasafe-encryption/datasafe-encryption-impl/src/test/java/de/adorsys/datasafe/encrypiton/impl/KeyPairGeneratorTest.java +++ b/datasafe-encryption/datasafe-encryption-impl/src/test/java/de/adorsys/datasafe/encrypiton/impl/KeyPairGeneratorTest.java @@ -1,22 +1,13 @@ package de.adorsys.datasafe.encrypiton.impl; import de.adorsys.datasafe.encrypiton.api.types.keystore.ReadKeyPassword; -import de.adorsys.datasafe.types.api.shared.BaseMockitoTest; -import org.bouncycastle.jce.provider.BouncyCastleProvider; -import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.Test; -import java.security.Security; import java.util.Date; import static org.assertj.core.api.Assertions.assertThat; -class KeyPairGeneratorTest extends BaseMockitoTest { - - @BeforeAll - static void setupBouncyCastle() { - Security.addProvider(new BouncyCastleProvider()); - } +class KeyPairGeneratorTest extends WithBouncyCastle { @Test void testKeyPairGenerationWithCA() { diff --git a/datasafe-encryption/datasafe-encryption-impl/src/test/java/de/adorsys/datasafe/encrypiton/impl/WithBouncyCastle.java b/datasafe-encryption/datasafe-encryption-impl/src/test/java/de/adorsys/datasafe/encrypiton/impl/WithBouncyCastle.java new file mode 100644 index 000000000..129875c1e --- /dev/null +++ b/datasafe-encryption/datasafe-encryption-impl/src/test/java/de/adorsys/datasafe/encrypiton/impl/WithBouncyCastle.java @@ -0,0 +1,15 @@ +package de.adorsys.datasafe.encrypiton.impl; + +import de.adorsys.datasafe.types.api.shared.BaseMockitoTest; +import org.bouncycastle.jce.provider.BouncyCastleProvider; +import org.junit.jupiter.api.BeforeAll; + +import java.security.Security; + +public abstract class WithBouncyCastle extends BaseMockitoTest { + + @BeforeAll + static void setupBouncyCastle() { + Security.addProvider(new BouncyCastleProvider()); + } +} diff --git a/datasafe-encryption/datasafe-encryption-impl/src/test/java/de/adorsys/datasafe/encrypiton/impl/cmsencryption/CmsEncryptionServiceImplTest.java b/datasafe-encryption/datasafe-encryption-impl/src/test/java/de/adorsys/datasafe/encrypiton/impl/cmsencryption/CmsEncryptionServiceImplTest.java index 879e3a230..c417a7b79 100644 --- a/datasafe-encryption/datasafe-encryption-impl/src/test/java/de/adorsys/datasafe/encrypiton/impl/cmsencryption/CmsEncryptionServiceImplTest.java +++ b/datasafe-encryption/datasafe-encryption-impl/src/test/java/de/adorsys/datasafe/encrypiton/impl/cmsencryption/CmsEncryptionServiceImplTest.java @@ -4,10 +4,10 @@ import de.adorsys.datasafe.encrypiton.api.cmsencryption.CMSEncryptionService; import de.adorsys.datasafe.encrypiton.api.keystore.KeyStoreService; import de.adorsys.datasafe.encrypiton.api.types.keystore.*; +import de.adorsys.datasafe.encrypiton.impl.WithBouncyCastle; import de.adorsys.datasafe.encrypiton.impl.cmsencryption.exceptions.DecryptionException; import de.adorsys.datasafe.encrypiton.impl.keystore.DefaultPasswordBasedKeyConfig; import de.adorsys.datasafe.encrypiton.impl.keystore.KeyStoreServiceImpl; -import de.adorsys.datasafe.types.api.shared.BaseMockitoTest; import lombok.SneakyThrows; import lombok.extern.slf4j.Slf4j; import org.assertj.core.util.Sets; @@ -28,7 +28,6 @@ import java.nio.file.Paths; import java.security.KeyStore; import java.security.MessageDigest; -import java.security.Security; import java.util.Arrays; import java.util.Collections; @@ -39,7 +38,7 @@ import static org.mockito.internal.util.io.IOUtil.closeQuietly; @Slf4j -class CmsEncryptionServiceImplTest extends BaseMockitoTest { +class CmsEncryptionServiceImplTest extends WithBouncyCastle { private static final String TEST_MESSAGE_CONTENT = "message content"; @@ -50,7 +49,6 @@ class CmsEncryptionServiceImplTest extends BaseMockitoTest { @BeforeAll static void setUp() { - Security.addProvider(new BouncyCastleProvider()); keyStoreAccess = getKeyStoreAccess(); } diff --git a/datasafe-encryption/datasafe-encryption-impl/src/test/java/de/adorsys/datasafe/encrypiton/impl/cmsencryption/SymetricEncryptionTest.java b/datasafe-encryption/datasafe-encryption-impl/src/test/java/de/adorsys/datasafe/encrypiton/impl/cmsencryption/SymetricEncryptionTest.java index 98971ad06..a7fc8428d 100644 --- a/datasafe-encryption/datasafe-encryption-impl/src/test/java/de/adorsys/datasafe/encrypiton/impl/cmsencryption/SymetricEncryptionTest.java +++ b/datasafe-encryption/datasafe-encryption-impl/src/test/java/de/adorsys/datasafe/encrypiton/impl/cmsencryption/SymetricEncryptionTest.java @@ -3,6 +3,7 @@ import de.adorsys.datasafe.encrypiton.api.cmsencryption.CMSEncryptionService; import de.adorsys.datasafe.encrypiton.api.keystore.KeyStoreService; import de.adorsys.datasafe.encrypiton.api.types.keystore.*; +import de.adorsys.datasafe.encrypiton.impl.WithBouncyCastle; import de.adorsys.datasafe.encrypiton.impl.keystore.DefaultPasswordBasedKeyConfig; import de.adorsys.datasafe.encrypiton.impl.keystore.KeyStoreServiceImpl; import lombok.SneakyThrows; @@ -25,7 +26,7 @@ import static org.assertj.core.api.Assertions.assertThat; @Slf4j -class SymetricEncryptionTest { +class SymetricEncryptionTest extends WithBouncyCastle { private static final String MESSAGE_CONTENT = "message content"; diff --git a/datasafe-encryption/datasafe-encryption-impl/src/test/java/de/adorsys/datasafe/encrypiton/impl/keystore/KeyStoreServiceTest.java b/datasafe-encryption/datasafe-encryption-impl/src/test/java/de/adorsys/datasafe/encrypiton/impl/keystore/KeyStoreServiceTest.java index c931d073b..31916178c 100644 --- a/datasafe-encryption/datasafe-encryption-impl/src/test/java/de/adorsys/datasafe/encrypiton/impl/keystore/KeyStoreServiceTest.java +++ b/datasafe-encryption/datasafe-encryption-impl/src/test/java/de/adorsys/datasafe/encrypiton/impl/keystore/KeyStoreServiceTest.java @@ -4,14 +4,12 @@ import de.adorsys.datasafe.encrypiton.api.types.keystore.*; import de.adorsys.datasafe.encrypiton.api.types.keystore.exceptions.KeyStoreConfigException; import de.adorsys.datasafe.encrypiton.impl.KeystoreUtil; +import de.adorsys.datasafe.encrypiton.impl.WithBouncyCastle; import de.adorsys.datasafe.encrypiton.impl.keystore.generator.KeyStoreCreationConfigImpl; import de.adorsys.datasafe.encrypiton.impl.keystore.generator.KeyStoreServiceImplBaseFunctions; import de.adorsys.datasafe.encrypiton.impl.keystore.types.KeyPairEntry; import de.adorsys.datasafe.encrypiton.impl.keystore.types.KeyPairGenerator; -import de.adorsys.datasafe.types.api.shared.BaseMockitoTest; -import org.bouncycastle.jce.provider.BouncyCastleProvider; import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; @@ -25,16 +23,11 @@ import static de.adorsys.datasafe.encrypiton.api.types.keystore.KeyStoreCreationConfig.DOCUMENT_KEY_ID_PREFIX; -class KeyStoreServiceTest extends BaseMockitoTest { +class KeyStoreServiceTest extends WithBouncyCastle { private KeyStoreService keyStoreService = new KeyStoreServiceImpl(new DefaultPasswordBasedKeyConfig()); private KeyStoreAuth keyStoreAuth; - @BeforeAll - static void setupBouncyCastle() { - Security.addProvider(new BouncyCastleProvider()); - } - @BeforeEach void setUp() { ReadStorePassword readStorePassword = new ReadStorePassword("keystorepass"); diff --git a/datasafe-encryption/datasafe-encryption-impl/src/test/java/de/adorsys/datasafe/encrypiton/impl/pathencryption/SymmetricPathEncryptionServiceImplTest.java b/datasafe-encryption/datasafe-encryption-impl/src/test/java/de/adorsys/datasafe/encrypiton/impl/pathencryption/SymmetricPathEncryptionServiceImplTest.java index 402b826b9..e90563458 100644 --- a/datasafe-encryption/datasafe-encryption-impl/src/test/java/de/adorsys/datasafe/encrypiton/impl/pathencryption/SymmetricPathEncryptionServiceImplTest.java +++ b/datasafe-encryption/datasafe-encryption-impl/src/test/java/de/adorsys/datasafe/encrypiton/impl/pathencryption/SymmetricPathEncryptionServiceImplTest.java @@ -3,14 +3,12 @@ import de.adorsys.datasafe.encrypiton.api.keystore.KeyStoreService; import de.adorsys.datasafe.encrypiton.api.types.keystore.*; import de.adorsys.datasafe.encrypiton.impl.KeystoreUtil; +import de.adorsys.datasafe.encrypiton.impl.WithBouncyCastle; import de.adorsys.datasafe.encrypiton.impl.keystore.DefaultPasswordBasedKeyConfig; import de.adorsys.datasafe.encrypiton.impl.keystore.KeyStoreServiceImpl; import de.adorsys.datasafe.types.api.resource.Uri; -import de.adorsys.datasafe.types.api.shared.BaseMockitoTest; import lombok.extern.slf4j.Slf4j; -import org.bouncycastle.jce.provider.BouncyCastleProvider; import org.cryptomator.siv.SivMode; -import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.Test; import javax.crypto.BadPaddingException; @@ -18,7 +16,6 @@ import javax.crypto.spec.SecretKeySpec; import java.net.URI; import java.security.KeyStore; -import java.security.Security; import static de.adorsys.datasafe.encrypiton.api.types.keystore.KeyStoreCreationConfig.PATH_KEY_ID_PREFIX_CTR; import static org.assertj.core.api.Assertions.assertThat; @@ -26,7 +23,7 @@ import static org.junit.jupiter.api.Assertions.assertThrows; @Slf4j -class SymmetricPathEncryptionServiceImplTest extends BaseMockitoTest { +class SymmetricPathEncryptionServiceImplTest extends WithBouncyCastle { private SymmetricPathEncryptionServiceImpl bucketPathEncryptionService = new SymmetricPathEncryptionServiceImpl( new DefaultPathEncryptorDecryptor(new SivMode()) @@ -40,11 +37,6 @@ class SymmetricPathEncryptionServiceImplTest extends BaseMockitoTest { private KeyStore keyStore = keyStoreService.createKeyStore(keyStoreAuth, KeyStoreType.DEFAULT, config); private KeyStoreAccess keyStoreAccess = new KeyStoreAccess(keyStore, keyStoreAuth); - @BeforeAll - static void setupBouncyCastle() { - Security.addProvider(new BouncyCastleProvider()); - } - @Test void testEncryptionDoesNotLeakSameSegments() { String testPath = "path/to/path/file/to"; From 5e335e2dc9984476fe906195b86a330ef317f8e4 Mon Sep 17 00:00:00 2001 From: Valentyn Berezin Date: Wed, 25 Sep 2019 13:56:49 +0300 Subject: [PATCH 123/255] DOC-165. Fixed bucket path resolution --- ...DefaultDatasafeOnVersionedStorageTest.java | 9 +++++---- datasafe-inbox/datasafe-inbox-api/pom.xml | 18 +++++++++++++++++ .../inbox/impl/actions/ListInboxImpl.java | 2 +- .../impl/actions/RemoveFromInboxImpl.java | 2 +- .../inbox/api/actions/ListInboxImplTest.java | 2 +- .../api/actions/RemoveFromInboxImplTest.java | 2 +- .../datasafe-metainfo-version-api/pom.xml | 18 +++++++++++++++++ .../datasafe-privatestore-api/pom.xml | 17 ++++++++++++++++ .../datasafe-simple-adapter-api/pom.xml | 20 ++++++++++++++++--- .../impl/SimpleAdapterFeatureTest.java | 2 +- .../SimpleDatasafeAdapter043CompatTest.java | 6 +----- .../impl/SimpleDatasafeAdapterTest.java | 8 -------- .../simple/adapter/impl/WithBouncyCastle.java | 15 ++++++++++++++ ...ymmetricPathEncryptionServiceImplTest.java | 4 ++-- datasafe-storage/datasafe-storage-api/pom.xml | 18 +++++++++++++++++ .../storage/impl/s3/StaticBucketRouter.java | 11 +++++++++- 16 files changed, 126 insertions(+), 28 deletions(-) create mode 100644 datasafe-simple-adapter/datasafe-simple-adapter-impl/src/test/java/de/adorsys/datasafe/simple/adapter/impl/WithBouncyCastle.java diff --git a/datasafe-examples/datasafe-examples-versioned-s3/src/test/java/de/adorsys/datasafe/examples/business/s3/BaseUserOperationsWithDefaultDatasafeOnVersionedStorageTest.java b/datasafe-examples/datasafe-examples-versioned-s3/src/test/java/de/adorsys/datasafe/examples/business/s3/BaseUserOperationsWithDefaultDatasafeOnVersionedStorageTest.java index 1da625a16..2a02971c8 100644 --- a/datasafe-examples/datasafe-examples-versioned-s3/src/test/java/de/adorsys/datasafe/examples/business/s3/BaseUserOperationsWithDefaultDatasafeOnVersionedStorageTest.java +++ b/datasafe-examples/datasafe-examples-versioned-s3/src/test/java/de/adorsys/datasafe/examples/business/s3/BaseUserOperationsWithDefaultDatasafeOnVersionedStorageTest.java @@ -12,7 +12,6 @@ import de.adorsys.datasafe.business.impl.service.DefaultDatasafeServices; import de.adorsys.datasafe.directory.impl.profile.config.DefaultDFSConfig; import de.adorsys.datasafe.encrypiton.api.types.UserIDAuth; -import de.adorsys.datasafe.types.api.utils.ExecutorServiceUtil; import de.adorsys.datasafe.storage.impl.s3.S3StorageService; import de.adorsys.datasafe.types.api.actions.ListRequest; import de.adorsys.datasafe.types.api.actions.ReadRequest; @@ -20,20 +19,21 @@ import de.adorsys.datasafe.types.api.actions.WriteRequest; import de.adorsys.datasafe.types.api.callback.PhysicalVersionCallback; import de.adorsys.datasafe.types.api.resource.StorageVersion; +import de.adorsys.datasafe.types.api.utils.ExecutorServiceUtil; import lombok.SneakyThrows; import lombok.extern.slf4j.Slf4j; +import org.bouncycastle.jce.provider.BouncyCastleProvider; import org.junit.jupiter.api.AfterAll; import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.condition.DisabledIfSystemProperty; -import org.junit.jupiter.api.io.TempDir; import org.testcontainers.containers.GenericContainer; import org.testcontainers.containers.wait.strategy.Wait; import java.io.OutputStream; import java.nio.charset.StandardCharsets; -import java.nio.file.Path; +import java.security.Security; import java.util.concurrent.atomic.AtomicReference; import static org.assertj.core.api.AssertionsForInterfaceTypes.assertThat; @@ -62,7 +62,7 @@ class BaseUserOperationsWithDefaultDatasafeOnVersionedStorageTest { * This creates CEPH Rados gateway in docker container and creates S3 client for it. */ @BeforeAll - static void createServices(@TempDir Path root) { + static void createServices() { log.info("Starting CEPH"); // Create CEPH container: cephContainer = new GenericContainer("ceph/daemon") @@ -135,6 +135,7 @@ void init() { @SneakyThrows void writeFileThenReadLatestAndReadByVersion() { // BEGIN_SNIPPET:Versioned storage support - writing file and reading back + Security.addProvider(new BouncyCastleProvider()); // creating new user UserIDAuth user = registerUser("john"); diff --git a/datasafe-inbox/datasafe-inbox-api/pom.xml b/datasafe-inbox/datasafe-inbox-api/pom.xml index e4d4554b8..70aa15d6d 100644 --- a/datasafe-inbox/datasafe-inbox-api/pom.xml +++ b/datasafe-inbox/datasafe-inbox-api/pom.xml @@ -20,4 +20,22 @@ ${project.version} + + + + + org.apache.maven.plugins + maven-compiler-plugin + + + + org.projectlombok + lombok + ${lombok.version} + + + + + + diff --git a/datasafe-inbox/datasafe-inbox-impl/src/main/java/de/adorsys/datasafe/inbox/impl/actions/ListInboxImpl.java b/datasafe-inbox/datasafe-inbox-impl/src/main/java/de/adorsys/datasafe/inbox/impl/actions/ListInboxImpl.java index 40238de3c..d732ac74b 100644 --- a/datasafe-inbox/datasafe-inbox-impl/src/main/java/de/adorsys/datasafe/inbox/impl/actions/ListInboxImpl.java +++ b/datasafe-inbox/datasafe-inbox-impl/src/main/java/de/adorsys/datasafe/inbox/impl/actions/ListInboxImpl.java @@ -37,7 +37,7 @@ public ListInboxImpl(PrivateKeyService keyService, ProfileRetrievalService profi @Override public Stream> list(ListRequest request) { - keyService.documentEncryptionSecretKey(request.getOwner()); // Just checking user has access + keyService.validateUserHasAccessOrThrow(request.getOwner()); return listService.list(resolveRelative(request)) .map(it -> fillEncryptedDecryptedSegments(request, it)); } diff --git a/datasafe-inbox/datasafe-inbox-impl/src/main/java/de/adorsys/datasafe/inbox/impl/actions/RemoveFromInboxImpl.java b/datasafe-inbox/datasafe-inbox-impl/src/main/java/de/adorsys/datasafe/inbox/impl/actions/RemoveFromInboxImpl.java index da372ee07..3ce26a8cc 100644 --- a/datasafe-inbox/datasafe-inbox-impl/src/main/java/de/adorsys/datasafe/inbox/impl/actions/RemoveFromInboxImpl.java +++ b/datasafe-inbox/datasafe-inbox-impl/src/main/java/de/adorsys/datasafe/inbox/impl/actions/RemoveFromInboxImpl.java @@ -31,7 +31,7 @@ public RemoveFromInboxImpl(PrivateKeyService keyService, ResourceResolver resolv @Override public void remove(RemoveRequest request) { - keyService.documentEncryptionSecretKey(request.getOwner()); // Just checking user has access + keyService.validateUserHasAccessOrThrow(request.getOwner()); remover.remove(resolver.resolveRelativeToPrivateInbox(request.getOwner(), request.getLocation())); } } diff --git a/datasafe-inbox/datasafe-inbox-impl/src/test/java/de/adorsys/datasafe/inbox/api/actions/ListInboxImplTest.java b/datasafe-inbox/datasafe-inbox-impl/src/test/java/de/adorsys/datasafe/inbox/api/actions/ListInboxImplTest.java index 40a4e26a8..76039de06 100644 --- a/datasafe-inbox/datasafe-inbox-impl/src/test/java/de/adorsys/datasafe/inbox/api/actions/ListInboxImplTest.java +++ b/datasafe-inbox/datasafe-inbox-impl/src/test/java/de/adorsys/datasafe/inbox/api/actions/ListInboxImplTest.java @@ -70,6 +70,6 @@ void list() { when(listService.list(resource)).thenReturn(Stream.of(absoluteResolvedResource)); assertThat(inbox.list(request)).hasSize(1); - verify(privateKeyService).documentEncryptionSecretKey(auth); + verify(privateKeyService).validateUserHasAccessOrThrow(auth); } } diff --git a/datasafe-inbox/datasafe-inbox-impl/src/test/java/de/adorsys/datasafe/inbox/api/actions/RemoveFromInboxImplTest.java b/datasafe-inbox/datasafe-inbox-impl/src/test/java/de/adorsys/datasafe/inbox/api/actions/RemoveFromInboxImplTest.java index 7baf30ce5..4414dd48d 100644 --- a/datasafe-inbox/datasafe-inbox-impl/src/test/java/de/adorsys/datasafe/inbox/api/actions/RemoveFromInboxImplTest.java +++ b/datasafe-inbox/datasafe-inbox-impl/src/test/java/de/adorsys/datasafe/inbox/api/actions/RemoveFromInboxImplTest.java @@ -54,6 +54,6 @@ void remove() { inbox.remove(request); verify(removeService).remove(resource); - verify(privateKeyService).documentEncryptionSecretKey(auth); + verify(privateKeyService).validateUserHasAccessOrThrow(auth); } } diff --git a/datasafe-metainfo/datasafe-metainfo-version-api/pom.xml b/datasafe-metainfo/datasafe-metainfo-version-api/pom.xml index d8b680a6f..345e03555 100644 --- a/datasafe-metainfo/datasafe-metainfo-version-api/pom.xml +++ b/datasafe-metainfo/datasafe-metainfo-version-api/pom.xml @@ -25,4 +25,22 @@ ${project.version} + + + + + org.apache.maven.plugins + maven-compiler-plugin + + + + org.projectlombok + lombok + ${lombok.version} + + + + + + diff --git a/datasafe-privatestore/datasafe-privatestore-api/pom.xml b/datasafe-privatestore/datasafe-privatestore-api/pom.xml index 6018e6c6e..871318695 100644 --- a/datasafe-privatestore/datasafe-privatestore-api/pom.xml +++ b/datasafe-privatestore/datasafe-privatestore-api/pom.xml @@ -24,4 +24,21 @@ + + + + org.apache.maven.plugins + maven-compiler-plugin + + + + org.projectlombok + lombok + ${lombok.version} + + + + + + diff --git a/datasafe-simple-adapter/datasafe-simple-adapter-api/pom.xml b/datasafe-simple-adapter/datasafe-simple-adapter-api/pom.xml index 03d841d5e..028a3faeb 100644 --- a/datasafe-simple-adapter/datasafe-simple-adapter-api/pom.xml +++ b/datasafe-simple-adapter/datasafe-simple-adapter-api/pom.xml @@ -34,9 +34,23 @@ 5.4.1 test - - - + + + + org.apache.maven.plugins + maven-compiler-plugin + + + + org.projectlombok + lombok + ${lombok.version} + + + + + + diff --git a/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/test/java/de/adorsys/datasafe/simple/adapter/impl/SimpleAdapterFeatureTest.java b/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/test/java/de/adorsys/datasafe/simple/adapter/impl/SimpleAdapterFeatureTest.java index a2a7235b4..5cdb3271c 100644 --- a/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/test/java/de/adorsys/datasafe/simple/adapter/impl/SimpleAdapterFeatureTest.java +++ b/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/test/java/de/adorsys/datasafe/simple/adapter/impl/SimpleAdapterFeatureTest.java @@ -30,7 +30,7 @@ import static org.junit.Assert.assertTrue; @Slf4j -class SimpleAdapterFeatureTest { +class SimpleAdapterFeatureTest extends WithBouncyCastle { private UserIDAuth userIDAuth = new UserIDAuth(new UserID("peter"), new ReadKeyPassword("password")); private String content = "content of document"; diff --git a/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/test/java/de/adorsys/datasafe/simple/adapter/impl/SimpleDatasafeAdapter043CompatTest.java b/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/test/java/de/adorsys/datasafe/simple/adapter/impl/SimpleDatasafeAdapter043CompatTest.java index 124e89246..5c200f050 100644 --- a/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/test/java/de/adorsys/datasafe/simple/adapter/impl/SimpleDatasafeAdapter043CompatTest.java +++ b/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/test/java/de/adorsys/datasafe/simple/adapter/impl/SimpleDatasafeAdapter043CompatTest.java @@ -4,17 +4,14 @@ import de.adorsys.datasafe.encrypiton.api.types.UserIDAuth; import de.adorsys.datasafe.encrypiton.api.types.keystore.ReadKeyPassword; import de.adorsys.datasafe.simple.adapter.api.types.*; -import de.adorsys.datasafe.types.api.shared.BaseMockitoTest; import de.adorsys.datasafe.types.api.shared.Dirs; import de.adorsys.datasafe.types.api.shared.Resources; import lombok.SneakyThrows; -import org.bouncycastle.jce.provider.BouncyCastleProvider; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.io.TempDir; import java.nio.file.Path; -import java.security.Security; import static org.assertj.core.api.Assertions.assertThat; @@ -22,7 +19,7 @@ * This test ensures that SimpleDatasafeAdapter can use setup and folder structure from version 0.4.3 * (backward compatibility) */ -class SimpleDatasafeAdapter043CompatTest extends BaseMockitoTest { +class SimpleDatasafeAdapter043CompatTest extends WithBouncyCastle { private UserIDAuth userIDAuth = new UserIDAuth(new UserID("peter"), new ReadKeyPassword("password")); private SimpleDatasafeServiceImpl simpleDatasafeService; @@ -31,7 +28,6 @@ class SimpleDatasafeAdapter043CompatTest extends BaseMockitoTest { @SneakyThrows @BeforeEach void extractFixtureAndPrepare(@TempDir Path tempDir) { - Security.addProvider(new BouncyCastleProvider()); dfsRoot = tempDir; Resources.copyResourceDir("compat-0.4.3", tempDir); simpleDatasafeService = new SimpleDatasafeServiceImpl( diff --git a/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/test/java/de/adorsys/datasafe/simple/adapter/impl/SimpleDatasafeAdapterTest.java b/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/test/java/de/adorsys/datasafe/simple/adapter/impl/SimpleDatasafeAdapterTest.java index a37f13289..a5ff4d024 100644 --- a/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/test/java/de/adorsys/datasafe/simple/adapter/impl/SimpleDatasafeAdapterTest.java +++ b/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/test/java/de/adorsys/datasafe/simple/adapter/impl/SimpleDatasafeAdapterTest.java @@ -11,17 +11,14 @@ import de.adorsys.datasafe.types.api.resource.BasePrivateResource; import lombok.SneakyThrows; import lombok.extern.slf4j.Slf4j; -import org.bouncycastle.jce.provider.BouncyCastleProvider; import org.bouncycastle.util.io.Streams; import org.junit.jupiter.api.AfterEach; -import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.MethodSource; import java.io.ByteArrayInputStream; import java.io.OutputStream; import java.nio.file.NoSuchFileException; -import java.security.Security; import java.security.UnrecoverableKeyException; import java.util.ArrayList; import java.util.List; @@ -46,11 +43,6 @@ private static Stream storages() { return allDefaultStorages(); } - @BeforeEach - void mybefore() { - Security.addProvider(new BouncyCastleProvider()); - } - void mystart() { if (dfsCredentials != null) { simpleDatasafeService = new SimpleDatasafeServiceImpl(dfsCredentials); diff --git a/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/test/java/de/adorsys/datasafe/simple/adapter/impl/WithBouncyCastle.java b/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/test/java/de/adorsys/datasafe/simple/adapter/impl/WithBouncyCastle.java new file mode 100644 index 000000000..feaae5787 --- /dev/null +++ b/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/test/java/de/adorsys/datasafe/simple/adapter/impl/WithBouncyCastle.java @@ -0,0 +1,15 @@ +package de.adorsys.datasafe.simple.adapter.impl; + +import de.adorsys.datasafe.types.api.shared.BaseMockitoTest; +import org.bouncycastle.jce.provider.BouncyCastleProvider; +import org.junit.jupiter.api.BeforeAll; + +import java.security.Security; + +public abstract class WithBouncyCastle extends BaseMockitoTest { + + @BeforeAll + static void setupBouncyCastle() { + Security.addProvider(new BouncyCastleProvider()); + } +} diff --git a/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/test/java/de/adorsys/datasafe/simple/adapter/impl/legacy/LegacySymmetricPathEncryptionServiceImplTest.java b/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/test/java/de/adorsys/datasafe/simple/adapter/impl/legacy/LegacySymmetricPathEncryptionServiceImplTest.java index b476d0281..837105068 100644 --- a/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/test/java/de/adorsys/datasafe/simple/adapter/impl/legacy/LegacySymmetricPathEncryptionServiceImplTest.java +++ b/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/test/java/de/adorsys/datasafe/simple/adapter/impl/legacy/LegacySymmetricPathEncryptionServiceImplTest.java @@ -5,11 +5,11 @@ import de.adorsys.datasafe.encrypiton.impl.keystore.DefaultPasswordBasedKeyConfig; import de.adorsys.datasafe.encrypiton.impl.keystore.KeyStoreServiceImpl; import de.adorsys.datasafe.simple.adapter.api.legacy.pathencryption.LegacySymmetricPathEncryptionService; +import de.adorsys.datasafe.simple.adapter.impl.WithBouncyCastle; import de.adorsys.datasafe.simple.adapter.impl.legacy.pathencryption.LegacyPathDigestConfig; import de.adorsys.datasafe.simple.adapter.impl.legacy.pathencryption.LegacyPathEncryptor; import de.adorsys.datasafe.simple.adapter.impl.legacy.pathencryption.LegacySymmetricPathEncryptionServiceImpl; import de.adorsys.datasafe.types.api.resource.Uri; -import de.adorsys.datasafe.types.api.shared.BaseMockitoTest; import lombok.extern.slf4j.Slf4j; import org.junit.jupiter.api.Test; @@ -25,7 +25,7 @@ import static org.junit.jupiter.api.Assertions.assertThrows; @Slf4j -class LegacySymmetricPathEncryptionServiceImplTest extends BaseMockitoTest { +class LegacySymmetricPathEncryptionServiceImplTest extends WithBouncyCastle { private LegacySymmetricPathEncryptionService bucketPathEncryptionService = new LegacySymmetricPathEncryptionServiceImpl( new LegacyPathEncryptor(new LegacyPathDigestConfig()) diff --git a/datasafe-storage/datasafe-storage-api/pom.xml b/datasafe-storage/datasafe-storage-api/pom.xml index 21ae87824..52187e414 100644 --- a/datasafe-storage/datasafe-storage-api/pom.xml +++ b/datasafe-storage/datasafe-storage-api/pom.xml @@ -43,4 +43,22 @@ test + + + + + org.apache.maven.plugins + maven-compiler-plugin + + + + org.projectlombok + lombok + ${lombok.version} + + + + + + diff --git a/datasafe-storage/datasafe-storage-impl-s3/src/main/java/de/adorsys/datasafe/storage/impl/s3/StaticBucketRouter.java b/datasafe-storage/datasafe-storage-impl-s3/src/main/java/de/adorsys/datasafe/storage/impl/s3/StaticBucketRouter.java index 6951d49cc..2c43345b5 100644 --- a/datasafe-storage/datasafe-storage-impl-s3/src/main/java/de/adorsys/datasafe/storage/impl/s3/StaticBucketRouter.java +++ b/datasafe-storage/datasafe-storage-impl-s3/src/main/java/de/adorsys/datasafe/storage/impl/s3/StaticBucketRouter.java @@ -3,6 +3,8 @@ import de.adorsys.datasafe.types.api.resource.AbsoluteLocation; import lombok.RequiredArgsConstructor; +import java.util.function.UnaryOperator; + @RequiredArgsConstructor public class StaticBucketRouter implements BucketRouter { @@ -15,6 +17,13 @@ public String bucketName(AbsoluteLocation resource) { @Override public String resourceKey(AbsoluteLocation resource) { - return resource.location().getRawPath().replaceFirst("^/", ""); + UnaryOperator trimStartingSlash = str -> str.replaceFirst("^/", ""); + + String resourcePath = trimStartingSlash.apply(resource.location().getRawPath()); + if (bucketName == null || "".equals(bucketName) || !resourcePath.contains(bucketName)) { + return resourcePath; + } + + return trimStartingSlash.apply(resourcePath.substring(resourcePath.indexOf(bucketName) + bucketName.length())); } } From 1e8efd8e0e1607acd93af6dfc7ace33b4a325a7e Mon Sep 17 00:00:00 2001 From: Valentyn Berezin Date: Wed, 25 Sep 2019 14:09:56 +0300 Subject: [PATCH 124/255] DOC-165. Fix parallel compilation and more robust path tampering --- .../impl/e2e/DataTamperingResistanceTest.java | 16 ++++++----- .../impl/e2e/MultiDFSFunctionalityTest.java | 8 +++--- .../datasafe-directory-api/pom.xml | 18 +++++++++++++ .../api/profile/keys/PrivateKeyService.java | 12 ++++++++- .../keys/DFSPrivateKeyServiceImpl.java | 27 +++++++++++++++++++ .../actions/ProfileRemovalServiceImpl.java | 2 +- .../ProfileStorageCredentialsServiceImpl.java | 2 +- .../actions/ProfileUpdatingServiceImpl.java | 15 +---------- ...fileStorageCredentialsServiceImplTest.java | 4 +-- .../ProfileUpdatingServiceImplTest.java | 6 ++--- .../datasafe-encryption-api/pom.xml | 18 +++++++++++++ 11 files changed, 96 insertions(+), 32 deletions(-) diff --git a/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/DataTamperingResistanceTest.java b/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/DataTamperingResistanceTest.java index ffffa8529..6d61def99 100644 --- a/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/DataTamperingResistanceTest.java +++ b/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/DataTamperingResistanceTest.java @@ -14,6 +14,7 @@ import org.junit.jupiter.api.Test; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.ValueSource; +import org.testcontainers.shaded.com.google.common.collect.ImmutableSet; import org.testcontainers.shaded.com.google.common.io.ByteStreams; import javax.crypto.AEADBadTagException; @@ -25,6 +26,7 @@ import java.nio.file.Paths; import java.nio.file.StandardOpenOption; import java.util.Collections; +import java.util.Set; import java.util.concurrent.ThreadLocalRandom; import static org.assertj.core.api.Java6Assertions.assertThatThrownBy; @@ -37,6 +39,8 @@ @Slf4j class DataTamperingResistanceTest extends BaseE2ETest { + private static final Set NOT_TO_REPLACE_IN_PATH = ImmutableSet.of('=', '/'); + // Should be long enough to dominate compared to padding private static final String FILE_TEXT = "Tampering test!!Tampering test!!Tampering test!!Tampering test!!Tampering test!!"; @@ -126,15 +130,15 @@ private void tamperFilenameByReplacingOneCharOfPath(AbsoluteLocationlombok + + + + + org.apache.maven.plugins + maven-compiler-plugin + + + + org.projectlombok + lombok + ${lombok.version} + + + + + + diff --git a/datasafe-directory/datasafe-directory-api/src/main/java/de/adorsys/datasafe/directory/api/profile/keys/PrivateKeyService.java b/datasafe-directory/datasafe-directory-api/src/main/java/de/adorsys/datasafe/directory/api/profile/keys/PrivateKeyService.java index 9b0c23f90..2acdc65de 100644 --- a/datasafe-directory/datasafe-directory-api/src/main/java/de/adorsys/datasafe/directory/api/profile/keys/PrivateKeyService.java +++ b/datasafe-directory/datasafe-directory-api/src/main/java/de/adorsys/datasafe/directory/api/profile/keys/PrivateKeyService.java @@ -15,20 +15,30 @@ public interface PrivateKeyService { /** * Get path-encryption key that will be used to encrypt URI paths. + * Access validation is not necessary - done by this function implicitly. * @param forUser Key owner * @return Path encryption entity which contain secret keys and key ID. */ AuthPathEncryptionSecretKey pathEncryptionSecretKey(UserIDAuth forUser); /** - * Get document-encryption key + * Get document-encryption key. Access validation is not necessary - done by this function implicitly. * @param forUser Key owner * @return Document encryption secret key. */ SecretKeyIDWithKey documentEncryptionSecretKey(UserIDAuth forUser); + /** + * Validates that user has access to his keystore. Should ignore any storage access exceptions + * to cover cases if keystore does not exist. + * @param forUser User to validate. + */ + void validateUserHasAccessOrThrow(UserIDAuth forUser); + /** * Raw access to get key by its ID specialized for getting multiple keys at a time. + * Access validation is not necessary - done by this function implicitly (but empty result set may indicate + * some problem). * @param forUser Key owner * @param keyIds Key IDs to receive keys for * @return Map (key id - Key) from database/storage associated with {@code keyId}, those key ids from diff --git a/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/keys/DFSPrivateKeyServiceImpl.java b/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/keys/DFSPrivateKeyServiceImpl.java index 50a29d08b..0aac3cfca 100644 --- a/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/keys/DFSPrivateKeyServiceImpl.java +++ b/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/keys/DFSPrivateKeyServiceImpl.java @@ -8,10 +8,14 @@ import de.adorsys.datasafe.encrypiton.api.types.keystore.SecretKeyIDWithKey; import de.adorsys.datasafe.types.api.context.annotations.RuntimeDelegate; import lombok.SneakyThrows; +import lombok.extern.slf4j.Slf4j; +import javax.crypto.BadPaddingException; import javax.crypto.SecretKey; import javax.inject.Inject; import java.security.Key; +import java.security.KeyStoreException; +import java.security.UnrecoverableKeyException; import java.util.Collection; import java.util.Map; import java.util.Set; @@ -23,6 +27,7 @@ * Retrieves and opens private keystore associated with user location DFS storage. * Attempts to re-read keystore if not able to open it. */ +@Slf4j @RuntimeDelegate public class DFSPrivateKeyServiceImpl implements PrivateKeyService { @@ -56,6 +61,28 @@ public SecretKeyIDWithKey documentEncryptionSecretKey(UserIDAuth forUser) { return keyByPrefix(forUser, DOCUMENT_KEY_ID_PREFIX); } + /** + * Read users' document access key to validate that he can open his keystore. + */ + @Override + @SneakyThrows + public void validateUserHasAccessOrThrow(UserIDAuth forUser) { + // avoid only unauthorized access + try { + keyByPrefix(forUser, DOCUMENT_KEY_ID_PREFIX); // for access check + } catch (RuntimeException ex) { + // lombok @SneakyThrows handling + if (ex.getCause() instanceof KeyStoreException + || ex.getCause() instanceof UnrecoverableKeyException + || ex.getCause() instanceof BadPaddingException) { + throw ex.getCause(); + } + + // It is safe to ignore other types of exceptions - i.e. keystore does not exist + log.debug("Caught exception while validating keystore access", ex.getCause()); + } + } + /** * Reads private or secret key from DFS and caches the keystore associated with it. */ diff --git a/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/operations/actions/ProfileRemovalServiceImpl.java b/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/operations/actions/ProfileRemovalServiceImpl.java index a6335c11e..f076872af 100644 --- a/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/operations/actions/ProfileRemovalServiceImpl.java +++ b/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/operations/actions/ProfileRemovalServiceImpl.java @@ -63,7 +63,7 @@ public void deregister(UserIDAuth userID) { } // NOP just check that user has access - privateKeyService.documentEncryptionSecretKey(userID); + privateKeyService.validateUserHasAccessOrThrow(userID); UserPublicProfile publicProfile = retrievalService.publicProfile(userID.getUserID()); UserPrivateProfile privateProfile = retrievalService.privateProfile(userID); diff --git a/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/operations/actions/ProfileStorageCredentialsServiceImpl.java b/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/operations/actions/ProfileStorageCredentialsServiceImpl.java index 662da6d9a..27e368214 100644 --- a/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/operations/actions/ProfileStorageCredentialsServiceImpl.java +++ b/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/operations/actions/ProfileStorageCredentialsServiceImpl.java @@ -45,6 +45,6 @@ public void deregisterStorageCredentials(UserIDAuth user, StorageIdentifier stor private void validateKeystoreAccess(UserIDAuth user) { // avoid only unauthorized access - privateKeyService.documentEncryptionSecretKey(user); // for access check + privateKeyService.validateUserHasAccessOrThrow(user); // for access check } } diff --git a/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/operations/actions/ProfileUpdatingServiceImpl.java b/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/operations/actions/ProfileUpdatingServiceImpl.java index dc9acd21d..a5d71db06 100644 --- a/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/operations/actions/ProfileUpdatingServiceImpl.java +++ b/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/operations/actions/ProfileUpdatingServiceImpl.java @@ -12,10 +12,7 @@ import lombok.SneakyThrows; import lombok.extern.slf4j.Slf4j; -import javax.crypto.BadPaddingException; import javax.inject.Inject; -import java.security.KeyStoreException; -import java.security.UnrecoverableKeyException; @Slf4j @RuntimeDelegate @@ -61,16 +58,6 @@ public void updateReadKeyPassword(UserIDAuth forUser, ReadKeyPassword newPasswor @SneakyThrows private void validateKeystoreAccess(UserIDAuth user) { - // avoid only unauthorized access - try { - privateKeyService.documentEncryptionSecretKey(user); // for access check - } catch (RuntimeException ex) { - // lombok @SneakyThrows handling - if (ex.getCause() instanceof KeyStoreException - || ex.getCause() instanceof UnrecoverableKeyException - || ex.getCause() instanceof BadPaddingException) { - throw ex.getCause(); - } - } + privateKeyService.validateUserHasAccessOrThrow(user); } } diff --git a/datasafe-directory/datasafe-directory-impl/src/test/java/de/adorsys/datasafe/directory/impl/profile/operations/actions/ProfileStorageCredentialsServiceImplTest.java b/datasafe-directory/datasafe-directory-impl/src/test/java/de/adorsys/datasafe/directory/impl/profile/operations/actions/ProfileStorageCredentialsServiceImplTest.java index ef4d4308e..81f3bb25a 100644 --- a/datasafe-directory/datasafe-directory-impl/src/test/java/de/adorsys/datasafe/directory/impl/profile/operations/actions/ProfileStorageCredentialsServiceImplTest.java +++ b/datasafe-directory/datasafe-directory-impl/src/test/java/de/adorsys/datasafe/directory/impl/profile/operations/actions/ProfileStorageCredentialsServiceImplTest.java @@ -36,7 +36,7 @@ class ProfileStorageCredentialsServiceImplTest extends BaseMockitoTest { void registerStorageCredentials() { tested.registerStorageCredentials(user, storageIdentifier, storageCredentials); - verify(privateKeyService).documentEncryptionSecretKey(user); + verify(privateKeyService).validateUserHasAccessOrThrow(user); verify(storageKeyStoreOper).addStorageCredentials(user, storageIdentifier, storageCredentials); } @@ -44,7 +44,7 @@ void registerStorageCredentials() { void deregisterStorageCredentials() { tested.deregisterStorageCredentials(user, storageIdentifier); - verify(privateKeyService).documentEncryptionSecretKey(user); + verify(privateKeyService).validateUserHasAccessOrThrow(user); verify(storageKeyStoreOper).removeStorageCredentials(user, storageIdentifier); } } diff --git a/datasafe-directory/datasafe-directory-impl/src/test/java/de/adorsys/datasafe/directory/impl/profile/operations/actions/ProfileUpdatingServiceImplTest.java b/datasafe-directory/datasafe-directory-impl/src/test/java/de/adorsys/datasafe/directory/impl/profile/operations/actions/ProfileUpdatingServiceImplTest.java index ba217abce..652f54009 100644 --- a/datasafe-directory/datasafe-directory-impl/src/test/java/de/adorsys/datasafe/directory/impl/profile/operations/actions/ProfileUpdatingServiceImplTest.java +++ b/datasafe-directory/datasafe-directory-impl/src/test/java/de/adorsys/datasafe/directory/impl/profile/operations/actions/ProfileUpdatingServiceImplTest.java @@ -48,7 +48,7 @@ class ProfileUpdatingServiceImplTest extends BaseMockitoTest { void updatePublicProfile() { tested.updatePublicProfile(user, publicProfile); - verify(privateKeyService).documentEncryptionSecretKey(user); + verify(privateKeyService).validateUserHasAccessOrThrow(user); verify(storeService).registerPublic(user.getUserID(), publicProfile); } @@ -56,7 +56,7 @@ void updatePublicProfile() { void updatePrivateProfile() { tested.updatePrivateProfile(user, privateProfile); - verify(privateKeyService).documentEncryptionSecretKey(user); + verify(privateKeyService).validateUserHasAccessOrThrow(user); verify(storeService).registerPrivate(user.getUserID(), privateProfile); } @@ -64,7 +64,7 @@ void updatePrivateProfile() { void updateReadKeyPassword() { tested.updateReadKeyPassword(user, readKeyPassword); - verify(privateKeyService, never()).documentEncryptionSecretKey(user); + verify(privateKeyService, never()).validateUserHasAccessOrThrow(user); verify(keyStoreOper).updateReadKeyPassword(user, readKeyPassword); } } diff --git a/datasafe-encryption/datasafe-encryption-api/pom.xml b/datasafe-encryption/datasafe-encryption-api/pom.xml index 50bc06281..e86de2087 100644 --- a/datasafe-encryption/datasafe-encryption-api/pom.xml +++ b/datasafe-encryption/datasafe-encryption-api/pom.xml @@ -15,4 +15,22 @@ ${project.version} + + + + + org.apache.maven.plugins + maven-compiler-plugin + + + + org.projectlombok + lombok + ${lombok.version} + + + + + + From c292799be979bf90b4b5c8262372a8ee132c99db Mon Sep 17 00:00:00 2001 From: Valentyn Berezin Date: Wed, 25 Sep 2019 14:10:24 +0300 Subject: [PATCH 125/255] DOC-165. Drop backup travis --- .travis_old.yml | 53 ------------------------------------------------- 1 file changed, 53 deletions(-) delete mode 100644 .travis_old.yml diff --git a/.travis_old.yml b/.travis_old.yml deleted file mode 100644 index 9d77a3fa2..000000000 --- a/.travis_old.yml +++ /dev/null @@ -1,53 +0,0 @@ -language: java - -jdk: - - oraclejdk8 - -sudo: required - -services: - - docker - -# travis is quite limited for multi-language projects when one needs to share artifacts: -# https://github.com/travis-ci/travis-ci/issues/4090 - -script: - - mvn --settings .travis/settings.xml clean verify -B -V -DAWS_BUCKET=${AWS_BUCKET} -# make frontend available for REST-docker - - cd frontend/datasafe-ui && ng build --deploy-url /static/ --base-href /static/ && mv dist ../../datasafe-rest-impl/target/dist && cd ../.. - -deploy: - - provider: script - skip_cleanup: true - script: /bin/bash .travis/deploy.sh - on: - tags: true - condition: "$TRAVIS_TAG =~ ^v([[:digit:]]+\\.)+[[:digit:]]+(-[[:digit:]]+)?(-SNAPSHOT)?$" - - - provider: script - skip_cleanup: true - script: /bin/bash .travis/deploy_develop_to_openshift.sh - on: - branch: develop - - - provider: script - skip_cleanup: true - script: /bin/bash .travis/upload_dockerhub.sh - on: - all_branches: true - tags: true - condition: "$TRAVIS_TAG =~ ^v([[:digit:]]+\\.)+[[:digit:]]+(-[[:digit:]]+)?(-SNAPSHOT)?$" - -before_install: - - curl -L https://github.com/openshift/origin/releases/download/v3.11.0/openshift-origin-client-tools-v3.11.0-0cbc58b-linux-64bit.tar.gz > oc-cli.tar.gz - - tar -xzf oc-cli.tar.gz - - sudo mv ./openshift-origin-client-tools-v3.11.0-0cbc58b-linux-64bit/oc /usr/local/bin - -# preparations to build frontend -install: - - nvm install 11.12.0 - - npm install -g @angular/cli - - cd frontend/datasafe-ui && npm install && cd ../.. - -after_success: - - /bin/bash .travis/codecov_bash.sh From 2b29f518db0b0fdc604d8b1891a32673e4630ec2 Mon Sep 17 00:00:00 2001 From: Valentyn Berezin Date: Wed, 25 Sep 2019 14:17:21 +0300 Subject: [PATCH 126/255] DOC-165. Add BouncyCastle for spring bundle too --- .../simple/adapter/spring/DatasafeSpringConfiguration.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/datasafe-simple-adapter/datasafe-simple-adapter-spring/src/main/java/de/adorsys/datasafe/simple/adapter/spring/DatasafeSpringConfiguration.java b/datasafe-simple-adapter/datasafe-simple-adapter-spring/src/main/java/de/adorsys/datasafe/simple/adapter/spring/DatasafeSpringConfiguration.java index 839339870..6a866eb39 100644 --- a/datasafe-simple-adapter/datasafe-simple-adapter-spring/src/main/java/de/adorsys/datasafe/simple/adapter/spring/DatasafeSpringConfiguration.java +++ b/datasafe-simple-adapter/datasafe-simple-adapter-spring/src/main/java/de/adorsys/datasafe/simple/adapter/spring/DatasafeSpringConfiguration.java @@ -1,11 +1,18 @@ package de.adorsys.datasafe.simple.adapter.spring; import lombok.extern.slf4j.Slf4j; +import org.bouncycastle.jce.provider.BouncyCastleProvider; import org.springframework.context.annotation.ComponentScan; import org.springframework.context.annotation.Configuration; +import java.security.Security; + @Configuration @ComponentScan(basePackageClasses = DatasafeSpringBeans.class) @Slf4j public class DatasafeSpringConfiguration { + + public DatasafeSpringConfiguration() { + Security.addProvider(new BouncyCastleProvider()); + } } From 7e29b6bd5f3a1221cb71f5e1e76b44725467445a Mon Sep 17 00:00:00 2001 From: Valentyn Berezin Date: Wed, 25 Sep 2019 14:21:47 +0300 Subject: [PATCH 127/255] DOC-165. Deploy CLI on develop branch --- .travis.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 97db77ffb..052232a3e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -69,10 +69,9 @@ build-cli: &build-cli # CLI artifacts publishing: deploy-cli: &deploy-cli - # FIXME Enabling temporary deploy rule for cli deploy: on: - branch: feature/datasafe-cli-w-s3 + branch: develop provider: s3 access_key_id: ${AWS_ACCESS_KEY_ID} secret_access_key: ${AWS_SECRET_ACCESS_KEY} From d1d27ba1d39bcf1c71bc1e63aa19ef5976777f0d Mon Sep 17 00:00:00 2001 From: Valentyn Berezin Date: Wed, 25 Sep 2019 15:18:26 +0300 Subject: [PATCH 128/255] DOC-165. Add BouncyCastle into more tests --- .../datasafe/simple/adapter/impl/CleanupDbTest.java | 9 +++++++++ .../simple/adapter/impl/SimpleDatasafeAdapterTest.java | 8 ++++++++ 2 files changed, 17 insertions(+) diff --git a/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/test/java/de/adorsys/datasafe/simple/adapter/impl/CleanupDbTest.java b/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/test/java/de/adorsys/datasafe/simple/adapter/impl/CleanupDbTest.java index c320b4480..36249a7da 100644 --- a/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/test/java/de/adorsys/datasafe/simple/adapter/impl/CleanupDbTest.java +++ b/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/test/java/de/adorsys/datasafe/simple/adapter/impl/CleanupDbTest.java @@ -8,9 +8,13 @@ import de.adorsys.datasafe.simple.adapter.api.types.DocumentFQN; import de.adorsys.datasafe.teststorage.WithStorageProvider; import de.adorsys.datasafe.types.api.resource.BasePrivateResource; +import org.bouncycastle.jce.provider.BouncyCastleProvider; +import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.MethodSource; +import java.security.Security; + import static org.junit.jupiter.api.Assertions.assertEquals; class CleanupDbTest extends WithStorageProvider { @@ -18,6 +22,11 @@ class CleanupDbTest extends WithStorageProvider { private SimpleDatasafeService simpleDatasafeService; private DFSCredentials dfsCredentials; + @BeforeAll + static void setupBouncyCastle() { + Security.addProvider(new BouncyCastleProvider()); + } + private void createSimpleService(WithStorageProvider.StorageDescriptor descriptor) { dfsCredentials = InitFromStorageProvider.dfsFromDescriptor(descriptor); if (dfsCredentials != null) { diff --git a/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/test/java/de/adorsys/datasafe/simple/adapter/impl/SimpleDatasafeAdapterTest.java b/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/test/java/de/adorsys/datasafe/simple/adapter/impl/SimpleDatasafeAdapterTest.java index a5ff4d024..da6824d01 100644 --- a/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/test/java/de/adorsys/datasafe/simple/adapter/impl/SimpleDatasafeAdapterTest.java +++ b/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/test/java/de/adorsys/datasafe/simple/adapter/impl/SimpleDatasafeAdapterTest.java @@ -11,14 +11,17 @@ import de.adorsys.datasafe.types.api.resource.BasePrivateResource; import lombok.SneakyThrows; import lombok.extern.slf4j.Slf4j; +import org.bouncycastle.jce.provider.BouncyCastleProvider; import org.bouncycastle.util.io.Streams; import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.MethodSource; import java.io.ByteArrayInputStream; import java.io.OutputStream; import java.nio.file.NoSuchFileException; +import java.security.Security; import java.security.UnrecoverableKeyException; import java.util.ArrayList; import java.util.List; @@ -35,6 +38,11 @@ class SimpleDatasafeAdapterTest extends WithStorageProvider { private UserIDAuth userIDAuth; private DFSCredentials dfsCredentials; + @BeforeAll + static void setupBouncyCastle() { + Security.addProvider(new BouncyCastleProvider()); + } + void myinit(StorageDescriptor descriptor) { dfsCredentials = InitFromStorageProvider.dfsFromDescriptor(descriptor); } From 62e6fe77959f4f2b8122c90bf9cb52484cf589f9 Mon Sep 17 00:00:00 2001 From: Valentyn Berezin Date: Wed, 25 Sep 2019 15:30:15 +0300 Subject: [PATCH 129/255] DOC-165. Add BouncyCastle into RandomActions --- .../impl/e2e/randomactions/framework/BaseRandomActions.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/datasafe-long-run-tests/datasafe-business-tests-random-actions/src/test/java/de/adorsys/datasafe/business/impl/e2e/randomactions/framework/BaseRandomActions.java b/datasafe-long-run-tests/datasafe-business-tests-random-actions/src/test/java/de/adorsys/datasafe/business/impl/e2e/randomactions/framework/BaseRandomActions.java index da46fd9ca..1af3505be 100644 --- a/datasafe-long-run-tests/datasafe-business-tests-random-actions/src/test/java/de/adorsys/datasafe/business/impl/e2e/randomactions/framework/BaseRandomActions.java +++ b/datasafe-long-run-tests/datasafe-business-tests-random-actions/src/test/java/de/adorsys/datasafe/business/impl/e2e/randomactions/framework/BaseRandomActions.java @@ -21,9 +21,11 @@ import org.junit.jupiter.params.provider.ValueSource; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import org.testcontainers.shaded.org.bouncycastle.jce.provider.BouncyCastleProvider; import java.io.Reader; import java.nio.charset.StandardCharsets; +import java.security.Security; import java.util.*; import java.util.concurrent.*; import java.util.stream.Collectors; @@ -69,6 +71,7 @@ public abstract class BaseRandomActions extends WithStorageProvider { @BeforeEach void prepare() { + Security.addProvider(new BouncyCastleProvider()); // Enable logging obfuscation System.setProperty("SECURE_LOGS", "on"); System.setProperty("SECURE_SENSITIVE", "on"); From 2d8bff93911232ebf41329dfcfa88d5a317e85e2 Mon Sep 17 00:00:00 2001 From: Valentyn Berezin Date: Wed, 25 Sep 2019 15:39:12 +0300 Subject: [PATCH 130/255] DOC-165. Drop unused class --- .../java/de/adorsys/datasafe/cli/CliOld.java | 184 ------------------ 1 file changed, 184 deletions(-) delete mode 100644 datasafe-cli/src/main/java/de/adorsys/datasafe/cli/CliOld.java diff --git a/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/CliOld.java b/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/CliOld.java deleted file mode 100644 index 59f651eee..000000000 --- a/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/CliOld.java +++ /dev/null @@ -1,184 +0,0 @@ -package de.adorsys.datasafe.cli; - -import com.google.common.collect.ImmutableMap; -import com.google.common.collect.ImmutableSet; -import com.google.common.io.ByteStreams; -import dagger.Lazy; -import de.adorsys.datasafe.business.impl.service.DaggerDefaultDatasafeServices; -import de.adorsys.datasafe.business.impl.service.DefaultDatasafeServices; -import de.adorsys.datasafe.directory.api.profile.keys.StorageKeyStoreOperations; -import de.adorsys.datasafe.directory.api.types.CreateUserPrivateProfile; -import de.adorsys.datasafe.directory.api.types.CreateUserPublicProfile; -import de.adorsys.datasafe.directory.api.types.StorageCredentials; -import de.adorsys.datasafe.directory.impl.profile.config.DFSConfigWithStorageCreds; -import de.adorsys.datasafe.directory.impl.profile.dfs.BucketAccessServiceImpl; -import de.adorsys.datasafe.directory.impl.profile.dfs.BucketAccessServiceImplRuntimeDelegatable; -import de.adorsys.datasafe.directory.impl.profile.dfs.RegexAccessServiceWithStorageCredentialsImpl; -import de.adorsys.datasafe.encrypiton.api.types.UserID; -import de.adorsys.datasafe.encrypiton.api.types.UserIDAuth; -import de.adorsys.datasafe.storage.api.RegexDelegatingStorage; -import de.adorsys.datasafe.storage.api.StorageService; -import de.adorsys.datasafe.storage.api.UriBasedAuthStorageService; -import de.adorsys.datasafe.storage.impl.fs.FileSystemStorageService; -import de.adorsys.datasafe.storage.impl.s3.S3ClientFactory; -import de.adorsys.datasafe.storage.impl.s3.S3StorageService; -import de.adorsys.datasafe.types.api.actions.ListRequest; -import de.adorsys.datasafe.types.api.actions.ReadRequest; -import de.adorsys.datasafe.types.api.actions.WriteRequest; -import de.adorsys.datasafe.types.api.context.BaseOverridesRegistry; -import de.adorsys.datasafe.types.api.context.overrides.OverridesRegistry; -import de.adorsys.datasafe.types.api.resource.BasePrivateResource; -import de.adorsys.datasafe.types.api.resource.StorageIdentifier; -import de.adorsys.datasafe.types.api.utils.ExecutorServiceUtil; -import lombok.SneakyThrows; -import lombok.experimental.Delegate; -import org.bouncycastle.jce.provider.BouncyCastleProvider; - -import java.io.OutputStream; -import java.nio.file.Path; -import java.nio.file.Paths; -import java.security.Security; -import java.util.regex.Pattern; - -public class CliOld { - - @SneakyThrows - public static void main(String[] args) { - Path root = Paths.get("/Users/valentyn.berezin/IdeaProjects/datasafe/datasafe-cli/target/datasafe/"); - - Security.addProvider(new BouncyCastleProvider()); - // To register provider you need to: - /* - Share the JCE provider JAR file to java-home/jre/lib/ext/. - Stop the Application Server. - If the Application Server is not stopped and then restarted later in this process, the JCE provider will not be recognized by the Application Server. - Edit the java-home/jre/lib/security/java.security properties file in any text editor. Add the JCE provider you’ve just downloaded to this file. - The java.security file contains detailed instructions for adding this provider. Basically, you need to add a line of the following format in a location with similar properties: - security.provider.n=provider-class-name - */ - - // this will create all Datasafe files and user documents under - DefaultDatasafeServices datasafe = datasafeServices(root, "PAZZWORT"); - - UserIDAuth user = new UserIDAuth("me", "mememe"); - UserIDAuth userRecipient = new UserIDAuth("recipient", "RRRE!!"); - - datasafe.userProfile().registerUsingDefaults(user); - datasafe.userProfile().registerUsingDefaults(userRecipient); - - datasafe.userProfile().registerStorageCredentials(user, StorageIdentifier.DEFAULT, awsCredentials()); - datasafe.userProfile().registerStorageCredentials(userRecipient, StorageIdentifier.DEFAULT, awsCredentials()); - - try (OutputStream os = - datasafe.privateService().write(WriteRequest.forDefaultPrivate(user, "my-file")) - ) { - os.write("Hello from Datasafe".getBytes()); - } - - - long sz = datasafe.privateService().list(ListRequest.forDefaultPrivate(user, "./")).count(); - System.out.println("User has " + sz + " files"); - - System.out.println(new String( - ByteStreams.toByteArray( - datasafe.privateService().read(ReadRequest.forDefaultPrivate(user, "my-file")) - ) - )); - - try (OutputStream os = - datasafe.inboxService().write(WriteRequest.forDefaultPublic( - ImmutableSet.of(user.getUserID(), userRecipient.getUserID()), "hello-recipient")) - ) { - os.write("Hello from INBOX!".getBytes()); - } - - long szInb = datasafe.inboxService().list(ListRequest.forDefaultPrivate(user, "./")).count(); - System.out.println("User has " + szInb + " files in INBOX"); - - System.out.println(new String( - ByteStreams.toByteArray( - datasafe.inboxService().read(ReadRequest.forDefaultPrivate(user, "hello-recipient")) - ) - )); - } - - private static DefaultDatasafeServices datasafeServices(Path fsRoot, String systemPassword) { - OverridesRegistry registry = new BaseOverridesRegistry(); - DefaultDatasafeServices multiDfsDatasafe = DaggerDefaultDatasafeServices - .builder() - .config(new DataOnS3(fsRoot.toUri().toASCIIString(), systemPassword)) - .storage( - new RegexDelegatingStorage( - ImmutableMap.builder() - .put(Pattern.compile("file:/.+"), localFs(fsRoot)) - .put(Pattern.compile("s3://.+"), amazonS3()).build() - ) - ) - .overridesRegistry(registry) - .build(); - - BucketAccessServiceImplRuntimeDelegatable.overrideWith( - registry, args -> new WithCredentialProvider(args.getStorageKeyStoreOperations()) - ); - - return multiDfsDatasafe; - } - - private static StorageCredentials awsCredentials() { - return new StorageCredentials( - System.getenv("AWS_ACCESS_KEY"), - System.getenv("AWS_SECRET_KEY") - ); - } - - private static StorageService localFs(Path fsRoot) { - return new FileSystemStorageService(fsRoot); - } - - private static StorageService amazonS3() { - return new UriBasedAuthStorageService( - acc -> new S3StorageService( - S3ClientFactory.getClientByRegion( - acc.getOnlyHostPart().toString().split("://")[1], - acc.getAccessKey(), - acc.getSecretKey() - ), - // Bucket name is encoded in first path segment - acc.getBucketName(), - ExecutorServiceUtil.submitterExecutesOnStarvationExecutingService() - ) - ); - } - - private static class WithCredentialProvider extends BucketAccessServiceImpl { - - @Delegate - private final RegexAccessServiceWithStorageCredentialsImpl delegate; - - private WithCredentialProvider(Lazy storageKeyStoreOperations) { - super(null); - this.delegate = new RegexAccessServiceWithStorageCredentialsImpl(storageKeyStoreOperations); - } - } - - private static class DataOnS3 extends DFSConfigWithStorageCreds { - - private DataOnS3(String systemRoot, String systemPassword) { - super(systemRoot, systemPassword); - } - - @Override - public CreateUserPublicProfile defaultPublicTemplate(UserID id) { - return super.defaultPublicTemplate(id); - } - - @Override - public CreateUserPrivateProfile defaultPrivateTemplate(UserIDAuth id) { - return super.defaultPrivateTemplate(id).toBuilder() - .privateStorage(BasePrivateResource.forAbsolutePrivate( - "s3://eu-central-1/adorsys-docusafe/" + id.getUserID() + "/") - ) - .build(); - } - } -} From eae260e32d34c70f41a71656ee76224e33392801 Mon Sep 17 00:00:00 2001 From: Valentyn Berezin Date: Wed, 25 Sep 2019 15:43:47 +0300 Subject: [PATCH 131/255] DOC-165. Minor typos fixed --- README.md | 2 +- datasafe-cli/README.md | 2 +- .../de/adorsys/datasafe/cli/config/DatasafeFactory.java | 7 ++++--- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 8b41af887..ebb34ce22 100644 --- a/README.md +++ b/README.md @@ -56,7 +56,7 @@ locally - on your machine. 1. Windows executable (N/A yet), please use java version below 1. [Java-based jar](https://github.com/adorsys/datasafe/releases/download/v0.6.0/datasafe-cli.jar), requires JRE (1.8+), use `java -jar datasafe-cli.jar` to execute -(Files above are built from [feature/datasafe-cli-w-s3](https://github.com/adorsys/datasafe/tree/feature/datasafe-cli-w-s3) currently) +(Files above are built from [Datasafe-CLI](datasafe-cli) currently) #### Example actions: ##### Download application and create new user: diff --git a/datasafe-cli/README.md b/datasafe-cli/README.md index d63bdba07..9db88030d 100644 --- a/datasafe-cli/README.md +++ b/datasafe-cli/README.md @@ -14,7 +14,7 @@ Further you have a bucket named "affe" in that minio. Before you run the Cli (which is the main class) in the project directory, create a temporary folder <$projectDir>/tmp. And than allways start the Cli in this tmp directory. In this case, you can use the default confirms and all profiles/keys/secrets will be stored in the tmp directory. As this example is to store the data in minio, the data is not stored in the tmp directory, but in minio. -1. First you create a profile. Simple confirm all asked questions with enter. +1. First you create a profile. Simply confirm all asked questions with enter. ``` -u=peter -p=peter -sp=system profile create ``` diff --git a/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/config/DatasafeFactory.java b/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/config/DatasafeFactory.java index 78b422fca..cf14f6bbf 100644 --- a/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/config/DatasafeFactory.java +++ b/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/config/DatasafeFactory.java @@ -106,7 +106,8 @@ private WithCredentialProvider(Lazy storageKeyStoreOp } } - private static S3StorageService getStorageService(String accessKey, String secretKey, String url, String region, String bucket) { + private static S3StorageService getStorageService(String accessKey, String secretKey, String url, String region, + String bucket) { AmazonS3ClientBuilder amazonS3ClientBuilder = AmazonS3ClientBuilder.standard() .withCredentials( new AWSStaticCredentialsProvider( @@ -131,7 +132,8 @@ private static S3StorageService getStorageService(String accessKey, String secre } AmazonS3 amazons3 = amazonS3ClientBuilder.build(); - S3StorageService storageService = new S3StorageService( + + return new S3StorageService( amazons3, bucket, ExecutorServiceUtil @@ -140,7 +142,6 @@ private static S3StorageService getStorageService(String accessKey, String secre 5 ) ); - return storageService; } } From 3f859f7ded6b8d64e2945d866ee0fbd144b1d249 Mon Sep 17 00:00:00 2001 From: Valentyn Berezin Date: Wed, 25 Sep 2019 16:00:27 +0300 Subject: [PATCH 132/255] DOC-165. Reorder initialization stuff --- .../src/main/java/de/adorsys/datasafe/cli/Cli.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/Cli.java b/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/Cli.java index 06ebf6975..29c0f7399 100644 --- a/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/Cli.java +++ b/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/Cli.java @@ -16,7 +16,6 @@ import org.bouncycastle.jce.provider.BouncyCastleProvider; import picocli.CommandLine; -import java.io.Console; import java.io.Reader; import java.nio.file.Files; import java.nio.file.Path; @@ -48,11 +47,13 @@ public class Cli implements Runnable { @SneakyThrows public static void main(String[] args) { + // Only needed when running using JRE, unnecessary for CLI: + Security.addProvider(new BouncyCastleProvider()); // silencing AWS SDK: System.setProperty("org.apache.commons.logging.Log", "org.apache.commons.logging.impl.NoOpLog"); - // Hi Valentyn, did not get it running locally without the registration - Security.addProvider(new BouncyCastleProvider()); + int exitCode = new CommandLine(new Cli()).execute(args); + System.exit(exitCode); } From f5d82767102a7c5c6f1e19cf4064479044b9894c Mon Sep 17 00:00:00 2001 From: Maxim Grischenko Date: Thu, 26 Sep 2019 13:19:58 +0200 Subject: [PATCH 133/255] simple datasafe adapter test improvements --- datasafe-long-run-tests/README.md | 2 +- ...domActionsOnSimpleDatasafeAdapterTest.java | 37 +- .../framework/BaseRandomActions.java | 10 +- .../fixture_simple_datasafe_10000_ops.json | 92123 ++++++++++++++++ .../fixture_simple_datasafe_1000_ops.json | 9283 ++ .../fixture_simple_datasafe_200_ops.json | 1161 +- 6 files changed, 102480 insertions(+), 136 deletions(-) create mode 100644 datasafe-long-run-tests/datasafe-business-tests-random-actions/src/test/resources/fixture/fixture_simple_datasafe_10000_ops.json create mode 100644 datasafe-long-run-tests/datasafe-business-tests-random-actions/src/test/resources/fixture/fixture_simple_datasafe_1000_ops.json diff --git a/datasafe-long-run-tests/README.md b/datasafe-long-run-tests/README.md index ec85e75c3..d49af3632 100644 --- a/datasafe-long-run-tests/README.md +++ b/datasafe-long-run-tests/README.md @@ -188,7 +188,7 @@ mvn -DAWS_ACCESS_KEY="accesskey" \ -DAWS_REGION="eu-central-1" \ -DtestArgs="-Xmx256m \ # memory limit for test -DSTORAGE_PROVIDERS="AMAZON" \ # means that external s3 compatible storage will be used. By default local MINIO container is used. - -DFIXTURE_SIZE="MEDIUM" \ # available values: MEDIUM (1000 operations), BIG (10000 operations). By default small fixture is used with 200 operations. + -DFIXTURE_SIZE="MEDIUM" \ # available values: MEDIUM (1000 operations), LARGE (10000 operations). By default small fixture is used with 200 operations. -DTHREADS=16 \ # comma separated list of desired number of threads -DFILE_SIZES=100,1024,10240" \ # comma separated list of file sizes used in test -Dtest=RandomActionsOnSimpleDatasafeAdapterTest test diff --git a/datasafe-long-run-tests/datasafe-business-tests-random-actions/src/test/java/de/adorsys/datasafe/business/impl/e2e/randomactions/RandomActionsOnSimpleDatasafeAdapterTest.java b/datasafe-long-run-tests/datasafe-business-tests-random-actions/src/test/java/de/adorsys/datasafe/business/impl/e2e/randomactions/RandomActionsOnSimpleDatasafeAdapterTest.java index 3e2775d72..f66e870b0 100644 --- a/datasafe-long-run-tests/datasafe-business-tests-random-actions/src/test/java/de/adorsys/datasafe/business/impl/e2e/randomactions/RandomActionsOnSimpleDatasafeAdapterTest.java +++ b/datasafe-long-run-tests/datasafe-business-tests-random-actions/src/test/java/de/adorsys/datasafe/business/impl/e2e/randomactions/RandomActionsOnSimpleDatasafeAdapterTest.java @@ -20,12 +20,12 @@ import de.adorsys.datasafe.types.api.actions.RemoveRequest; import de.adorsys.datasafe.types.api.actions.WriteRequest; import de.adorsys.datasafe.types.api.resource.*; -import lombok.RequiredArgsConstructor; import org.junit.jupiter.api.condition.DisabledIfSystemProperty; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.MethodSource; -import java.io.*; +import java.io.InputStream; +import java.io.OutputStream; import java.time.Instant; import java.util.Set; import java.util.stream.Stream; @@ -50,7 +50,7 @@ void testRandomActionsParallelThreads(StorageDescriptor descriptor, int threadCo StatisticService statisticService = new StatisticService(); executeTest( - smallSimpleDocusafeAdapterFixture(), + getSimpleDatasafeAdapterFixture(), descriptor.getName(), filesizeInKb, threadCount, @@ -81,11 +81,10 @@ public Stream> list(ListRequest request) { - return new ByteArrayInputStream( - datasafeService.readDocument( - request.getOwner(), - asFqnDoc(request.getLocation())).getDocumentContent().getValue() - ); + return datasafeService.readDocumentStream( + request.getOwner(), + asFqnDoc(request.getLocation()) + ).getDocumentStream(); } @Override @@ -95,24 +94,10 @@ public void remove(RemoveRequest request) { @Override public OutputStream write(WriteRequest request) { - return new PutBlobOnClose(asFqnDoc(request.getLocation()), request.getOwner(), datasafeService); - } - - @RequiredArgsConstructor - final class PutBlobOnClose extends ByteArrayOutputStream { - - private final DocumentFQN documentFQN; - private final UserIDAuth userIDAuth; - private final SimpleDatasafeService datasafeService; - - @Override - public void close() throws IOException { - super.close(); - datasafeService.storeDocument( - userIDAuth, - new DSDocument(documentFQN, new DocumentContent(super.toByteArray())) - ); - } + return datasafeService.storeDocumentStream( + request.getOwner(), + asFqnDoc(request.getLocation()) + ); } }; } diff --git a/datasafe-long-run-tests/datasafe-business-tests-random-actions/src/test/java/de/adorsys/datasafe/business/impl/e2e/randomactions/framework/BaseRandomActions.java b/datasafe-long-run-tests/datasafe-business-tests-random-actions/src/test/java/de/adorsys/datasafe/business/impl/e2e/randomactions/framework/BaseRandomActions.java index da46fd9ca..4f02bc073 100644 --- a/datasafe-long-run-tests/datasafe-business-tests-random-actions/src/test/java/de/adorsys/datasafe/business/impl/e2e/randomactions/framework/BaseRandomActions.java +++ b/datasafe-long-run-tests/datasafe-business-tests-random-actions/src/test/java/de/adorsys/datasafe/business/impl/e2e/randomactions/framework/BaseRandomActions.java @@ -77,13 +77,17 @@ void prepare() { protected Fixture getFixture() { switch(FIXTURE_SIZE) { case "MEDIUM" : return fixture("fixture/fixture_1000_ops.json"); - case "BIG" : return fixture("fixture/fixture_10000_ops.json"); + case "LARGE" : return fixture("fixture/fixture_10000_ops.json"); default : return fixture("fixture/fixture_200_ops.json"); } } - protected Fixture smallSimpleDocusafeAdapterFixture() { - return fixture("fixture/fixture_simple_datasafe_200_ops.json"); + protected Fixture getSimpleDatasafeAdapterFixture() { + switch(FIXTURE_SIZE) { + case "MEDIUM" : return fixture("fixture/fixture_simple_datasafe_1000_ops.json"); + case "LARGE" : return fixture("fixture/fixture_simple_datasafe_10000_ops.json"); + default : return fixture("fixture/fixture_simple_datasafe_200_ops.json"); + } } @SneakyThrows diff --git a/datasafe-long-run-tests/datasafe-business-tests-random-actions/src/test/resources/fixture/fixture_simple_datasafe_10000_ops.json b/datasafe-long-run-tests/datasafe-business-tests-random-actions/src/test/resources/fixture/fixture_simple_datasafe_10000_ops.json new file mode 100644 index 000000000..b3ae16a2a --- /dev/null +++ b/datasafe-long-run-tests/datasafe-business-tests-random-actions/src/test/resources/fixture/fixture_simple_datasafe_10000_ops.json @@ -0,0 +1,92123 @@ +{ + "operations": [ + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + }, + "location": "important/presentation.ppt" + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-5", + "type": "READ", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "content": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + } + } + }, + { + "userId": "user-0", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/presentation.ppt", + "result": { + "content": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + } + } + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + }, + "location": "home/home/balance.xlsx" + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + }, + "location": "important/important/presentation.ppt" + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-0", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/presentation.ppt", + "result": { + "content": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + } + } + }, + { + "userId": "user-7", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/home/balance.xlsx", + "result": { + "content": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + } + } + }, + { + "userId": "user-7", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/home/" + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + }, + "location": "documents/home/balance.xlsx" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + }, + "location": "documents/home/file.txt" + }, + { + "userId": "user-2", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + }, + "location": "important/documents/file.txt" + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "important/presentation.ppt" + ] + } + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "documents/home/file.txt" + ] + } + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/home/balance.xlsx", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-8", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/important/presentation.ppt", + "result": { + "content": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + } + } + }, + { + "userId": "user-1", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/home/file.txt", + "result": { + "content": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + } + } + }, + { + "userId": "user-2", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/documents/file.txt", + "result": { + "content": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + } + } + }, + { + "userId": "user-0", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/" + }, + { + "userId": "user-1", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/home/" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + }, + "location": "important/balance.xlsx" + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/", + "result": { + "dirContent": [ + "important/balance.xlsx" + ] + } + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + }, + "location": "home/presentation.ppt" + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + }, + "location": "documents/presentation.ppt" + }, + { + "userId": "user-6", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + }, + "location": "file.txt" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + }, + "location": "documents/documents/presentation.ppt" + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "file.txt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-6", + "type": "READ", + "storageType": "PRIVATE", + "location": "file.txt", + "result": { + "content": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + } + } + }, + { + "userId": "user-1", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + }, + "location": "documents/home/file.txt" + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/", + "result": { + "dirContent": [ + "documents/presentation.ppt" + ] + } + }, + { + "userId": "user-7", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/presentation.ppt", + "result": { + "content": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + } + } + }, + { + "userId": "user-6", + "type": "READ", + "storageType": "PRIVATE", + "location": "file.txt", + "result": { + "content": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + } + } + }, + { + "userId": "user-9", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + }, + "location": "document.pdf" + }, + { + "userId": "user-2", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/documents/" + }, + { + "userId": "user-2", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-2", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/balance.xlsx", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + }, + "location": "home/file.txt" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + }, + "location": "documents/file.txt" + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "file.txt", + "result": { + "dirContent": [ + "file.txt" + ] + } + }, + { + "userId": "user-9", + "type": "READ", + "storageType": "PRIVATE", + "location": "document.pdf", + "result": { + "content": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + } + } + }, + { + "userId": "user-1", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/documents/presentation.ppt", + "result": { + "content": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + } + } + }, + { + "userId": "user-4", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + }, + "location": "document.pdf" + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "documents/home/balance.xlsx" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + }, + "location": "home/important/document.pdf" + }, + { + "userId": "user-6", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-2", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/home/balance.xlsx", + "result": { + "dirContent": [ + "documents/home/balance.xlsx" + ] + } + }, + { + "userId": "user-8", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/important/presentation.ppt", + "result": { + "content": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + } + } + }, + { + "userId": "user-6", + "type": "READ", + "storageType": "PRIVATE", + "location": "file.txt", + "result": { + "content": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + } + } + }, + { + "userId": "user-9", + "type": "READ", + "storageType": "PRIVATE", + "location": "document.pdf", + "result": { + "content": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + } + } + }, + { + "userId": "user-0", + "type": "READ", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "content": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + } + } + }, + { + "userId": "user-7", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/" + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "documents/document.pdf" + }, + { + "userId": "user-7", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/document.pdf", + "result": { + "content": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + } + } + }, + { + "userId": "user-3", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/" + }, + { + "userId": "user-4", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + }, + "location": "document.pdf" + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + }, + "location": "file.txt" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + }, + "location": "file.txt" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + }, + "location": "documents/documents/document.pdf" + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/important/presentation.ppt", + "result": { + "dirContent": [ + "important/important/presentation.ppt" + ] + } + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "document.pdf", + "file.txt", + "documents/home/balance.xlsx" + ] + } + }, + { + "userId": "user-2", + "type": "READ", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "content": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + } + } + }, + { + "userId": "user-4", + "type": "READ", + "storageType": "PRIVATE", + "location": "file.txt", + "result": { + "content": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + } + } + }, + { + "userId": "user-8", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/home/" + }, + { + "userId": "user-8", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/important/presentation.ppt", + "result": { + "content": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + } + } + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + }, + "location": "documents/documents/balance.xlsx" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + }, + "location": "documents/home/document.pdf" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + }, + "location": "important/important/file.txt" + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + }, + "location": "home/file.txt" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + }, + "location": "important/documents/document.pdf" + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/home/presentation.ppt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/home/balance.xlsx", + "result": { + "dirContent": [ + "documents/home/balance.xlsx" + ] + } + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "document.pdf", + "important/important/presentation.ppt", + "documents/documents/balance.xlsx" + ] + } + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/documents/document.pdf", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-1", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/documents/presentation.ppt", + "result": { + "content": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + } + } + }, + { + "userId": "user-7", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/" + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + }, + "location": "home/balance.xlsx" + }, + { + "userId": "user-7", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/balance.xlsx", + "result": { + "content": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + } + } + }, + { + "userId": "user-1", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/" + }, + { + "userId": "user-1", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/documents/document.pdf", + "result": { + "content": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + } + } + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + }, + "location": "home/documents/presentation.ppt" + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/", + "result": { + "dirContent": [ + "home/balance.xlsx" + ] + } + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/important/document.pdf", + "result": { + "dirContent": [ + "home/important/document.pdf" + ] + } + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/presentation.ppt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-7", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/balance.xlsx", + "result": { + "content": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + } + } + }, + { + "userId": "user-4", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/home/document.pdf", + "result": { + "content": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + } + } + }, + { + "userId": "user-0", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/file.txt", + "result": { + "content": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + } + } + }, + { + "userId": "user-1", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/documents/document.pdf", + "result": { + "content": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + } + } + }, + { + "userId": "user-8", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/documents/" + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + }, + "location": "important/documents/file.txt" + }, + { + "userId": "user-5", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/important/" + }, + { + "userId": "user-5", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/important/document.pdf", + "result": { + "content": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + } + } + }, + { + "userId": "user-1", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/documents/" + }, + { + "userId": "user-8", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/important/" + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/document.pdf", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + }, + "location": "important/documents/presentation.ppt" + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + }, + "location": "documents/document.pdf" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/", + "result": { + "dirContent": [ + "home/balance.xlsx" + ] + } + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "presentation.ppt", + "home/file.txt" + ] + } + }, + { + "userId": "user-3", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/documents/presentation.ppt", + "result": { + "content": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + } + } + }, + { + "userId": "user-5", + "type": "READ", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "content": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + } + } + }, + { + "userId": "user-4", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/home/document.pdf", + "result": { + "content": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + } + } + }, + { + "userId": "user-7", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/" + }, + { + "userId": "user-3", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/documents/" + }, + { + "userId": "user-2", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-8", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/documents/" + }, + { + "userId": "user-8", + "type": "READ", + "storageType": "PRIVATE", + "location": "document.pdf", + "result": { + "content": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + } + } + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + }, + "location": "home/documents/document.pdf" + }, + { + "userId": "user-6", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "documents/important/file.txt" + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + }, + "location": "important/presentation.ppt" + }, + { + "userId": "user-0", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/file.txt", + "result": { + "content": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + } + } + }, + { + "userId": "user-8", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + }, + "location": "home/balance.xlsx" + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/home/document.pdf", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-9", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-6", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + }, + "location": "document.pdf" + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/balance.xlsx", + "result": { + "dirContent": [ + "home/balance.xlsx" + ] + } + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/presentation.ppt", + "result": { + "dirContent": [ + "important/presentation.ppt" + ] + } + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-8", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/" + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "important/presentation.ppt" + }, + { + "userId": "user-4", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/home/" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + }, + "location": "documents/home/presentation.ppt" + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "file.txt", + "result": { + "dirContent": [ + "file.txt" + ] + } + }, + { + "userId": "user-0", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/" + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/balance.xlsx", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + }, + "location": "home/balance.xlsx" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + }, + "location": "documents/document.pdf" + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "document.pdf", + "documents/documents/document.pdf", + "home/documents/document.pdf", + "home/important/document.pdf", + "balance.xlsx" + ] + } + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "presentation.ppt" + ] + } + }, + { + "userId": "user-8", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/presentation.ppt", + "result": { + "content": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + } + } + }, + { + "userId": "user-0", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/presentation.ppt", + "result": { + "content": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + } + } + }, + { + "userId": "user-7", + "type": "READ", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "content": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + } + } + }, + { + "userId": "user-5", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-7", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "home/documents/balance.xlsx" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "document.pdf" + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + }, + "location": "home/file.txt" + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/document.pdf", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-3", + "type": "READ", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "content": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + } + } + }, + { + "userId": "user-4", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/document.pdf", + "result": { + "content": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + } + } + }, + { + "userId": "user-7", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/documents/balance.xlsx", + "result": { + "content": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + } + } + }, + { + "userId": "user-7", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/documents/" + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-5", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + }, + "location": "important/balance.xlsx" + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/file.txt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/documents/presentation.ppt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "file.txt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-0", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/presentation.ppt", + "result": { + "content": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + } + } + }, + { + "userId": "user-8", + "type": "READ", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "content": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + } + } + }, + { + "userId": "user-4", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/home/" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + }, + "location": "document.pdf" + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + }, + "location": "home/important/file.txt" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + }, + "location": "home/home/presentation.ppt" + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/presentation.ppt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "dirContent": [ + "presentation.ppt" + ] + } + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/file.txt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-4", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/document.pdf", + "result": { + "content": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + } + } + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-2", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + }, + "location": "file.txt" + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/presentation.ppt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "dirContent": [ + "presentation.ppt" + ] + } + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "balance.xlsx" + ] + } + }, + { + "userId": "user-2", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + }, + "location": "document.pdf" + }, + { + "userId": "user-6", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "important/presentation.ppt", + "home/balance.xlsx", + "balance.xlsx" + ] + } + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "home/home/presentation.ppt", + "balance.xlsx" + ] + } + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "dirContent": [ + "balance.xlsx" + ] + } + }, + { + "userId": "user-4", + "type": "READ", + "storageType": "PRIVATE", + "location": "file.txt", + "result": { + "content": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + } + } + }, + { + "userId": "user-5", + "type": "READ", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "content": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + } + } + }, + { + "userId": "user-0", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/important/" + }, + { + "userId": "user-0", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/file.txt", + "result": { + "content": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + } + } + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + }, + "location": "home/documents/document.pdf" + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "document.pdf", + "balance.xlsx" + ] + } + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/home/file.txt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "balance.xlsx" + ] + } + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/", + "result": { + "dirContent": [ + "home/home/presentation.ppt", + "home/documents/document.pdf" + ] + } + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/document.pdf", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-6", + "type": "READ", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "content": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + } + } + }, + { + "userId": "user-1", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/home/presentation.ppt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/file.txt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-3", + "type": "READ", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "content": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + } + } + }, + { + "userId": "user-4", + "type": "READ", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "content": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + } + } + }, + { + "userId": "user-8", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/" + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + }, + "location": "home/presentation.ppt" + }, + { + "userId": "user-0", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/" + }, + { + "userId": "user-0", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/presentation.ppt", + "result": { + "content": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + } + } + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + }, + "location": "home/home/file.txt" + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "document.pdf", + "balance.xlsx" + ] + } + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "document.pdf", + "presentation.ppt", + "documents/document.pdf", + "file.txt" + ] + } + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "dirContent": [ + "balance.xlsx" + ] + } + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "important/presentation.ppt", + "presentation.ppt" + ] + } + }, + { + "userId": "user-8", + "type": "READ", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "content": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + } + } + }, + { + "userId": "user-6", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-0", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-6", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + }, + "location": "document.pdf" + }, + { + "userId": "user-2", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + }, + "location": "file.txt" + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "document.pdf", + "balance.xlsx" + ] + } + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/balance.xlsx", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "document.pdf", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "file.txt" + ] + } + }, + { + "userId": "user-7", + "type": "READ", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "content": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + } + } + }, + { + "userId": "user-4", + "type": "READ", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "content": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + } + } + }, + { + "userId": "user-5", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + }, + "location": "home/file.txt" + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "home/documents/balance.xlsx" + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/presentation.ppt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "document.pdf", + "home/file.txt", + "balance.xlsx" + ] + } + }, + { + "userId": "user-7", + "type": "READ", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "content": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + } + } + }, + { + "userId": "user-7", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-3", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/documents/" + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "home/documents/presentation.ppt" + }, + { + "userId": "user-3", + "type": "READ", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "content": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + } + } + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/documents/document.pdf", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-2", + "type": "READ", + "storageType": "PRIVATE", + "location": "file.txt", + "result": { + "content": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + } + } + }, + { + "userId": "user-2", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-8", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/presentation.ppt", + "result": { + "content": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + } + } + }, + { + "userId": "user-4", + "type": "READ", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "content": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + } + } + }, + { + "userId": "user-6", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + }, + "location": "file.txt" + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/documents/", + "result": { + "dirContent": [ + "home/documents/presentation.ppt" + ] + } + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/important/file.txt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-6", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-2", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "home/documents/document.pdf" + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "home/presentation.ppt", + "important/presentation.ppt", + "presentation.ppt", + "home/home/file.txt", + "balance.xlsx" + ] + } + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/documents/balance.xlsx", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "dirContent": [ + "balance.xlsx" + ] + } + }, + { + "userId": "user-9", + "type": "READ", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "content": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + } + } + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + }, + "location": "important/home/document.pdf" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + }, + "location": "important/important/document.pdf" + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + }, + "location": "home/document.pdf" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "file.txt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-3", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/balance.xlsx", + "result": { + "content": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + } + } + }, + { + "userId": "user-4", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/document.pdf", + "result": { + "content": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + } + } + }, + { + "userId": "user-1", + "type": "READ", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "content": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + } + } + }, + { + "userId": "user-5", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/important/" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + }, + "location": "home/balance.xlsx" + }, + { + "userId": "user-1", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + }, + "location": "documents/presentation.ppt" + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + }, + "location": "home/file.txt" + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + }, + "location": "home/documents/document.pdf" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + }, + "location": "home/file.txt" + }, + { + "userId": "user-2", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + }, + "location": "document.pdf" + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/balance.xlsx", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + }, + "location": "home/document.pdf" + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "document.pdf" + }, + { + "userId": "user-2", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "document.pdf", + "presentation.ppt", + "documents/document.pdf", + "file.txt" + ] + } + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/balance.xlsx", + "result": { + "dirContent": [ + "home/balance.xlsx" + ] + } + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "document.pdf", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-3", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/home/document.pdf", + "result": { + "content": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + } + } + }, + { + "userId": "user-4", + "type": "READ", + "storageType": "PRIVATE", + "location": "file.txt", + "result": { + "content": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + } + } + }, + { + "userId": "user-8", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/" + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "home/presentation.ppt", + "documents/presentation.ppt", + "presentation.ppt", + "home/home/file.txt", + "balance.xlsx" + ] + } + }, + { + "userId": "user-9", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/" + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "balance.xlsx" + ] + } + }, + { + "userId": "user-0", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/documents/" + }, + { + "userId": "user-0", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/document.pdf", + "result": { + "content": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + } + } + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "dirContent": [ + "balance.xlsx" + ] + } + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/file.txt", + "result": { + "dirContent": [ + "home/file.txt" + ] + } + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/important/file.txt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "document.pdf", + "home/documents/document.pdf", + "file.txt", + "balance.xlsx" + ] + } + }, + { + "userId": "user-3", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/home/document.pdf", + "result": { + "content": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + } + } + }, + { + "userId": "user-0", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/document.pdf", + "result": { + "content": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + } + } + }, + { + "userId": "user-2", + "type": "READ", + "storageType": "PRIVATE", + "location": "document.pdf", + "result": { + "content": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + } + } + }, + { + "userId": "user-8", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-3", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-4", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/important/balance.xlsx", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "presentation.ppt", + "home/file.txt" + ] + } + }, + { + "userId": "user-9", + "type": "READ", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "content": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + } + } + }, + { + "userId": "user-5", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/balance.xlsx", + "result": { + "content": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + } + } + }, + { + "userId": "user-2", + "type": "READ", + "storageType": "PRIVATE", + "location": "file.txt", + "result": { + "content": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + } + } + }, + { + "userId": "user-2", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-2", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + }, + "location": "home/documents/presentation.ppt" + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/documents/", + "result": { + "dirContent": [ + "home/documents/presentation.ppt" + ] + } + }, + { + "userId": "user-0", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-2", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/documents/" + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + }, + "location": "documents/documents/document.pdf" + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/home/balance.xlsx", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/home/file.txt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/", + "result": { + "dirContent": [ + "home/file.txt" + ] + } + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/documents/", + "result": { + "dirContent": [ + "documents/documents/document.pdf" + ] + } + }, + { + "userId": "user-9", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + }, + "location": "home/document.pdf" + }, + { + "userId": "user-2", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + }, + "location": "documents/document.pdf" + }, + { + "userId": "user-5", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/" + }, + { + "userId": "user-2", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/" + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + }, + "location": "home/home/file.txt" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + }, + "location": "important/document.pdf" + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/", + "result": { + "dirContent": [ + "home/document.pdf", + "home/home/file.txt" + ] + } + }, + { + "userId": "user-0", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/documents/document.pdf", + "result": { + "content": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + } + } + }, + { + "userId": "user-1", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + }, + "location": "file.txt" + }, + { + "userId": "user-1", + "type": "READ", + "storageType": "PRIVATE", + "location": "file.txt", + "result": { + "content": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + } + } + }, + { + "userId": "user-1", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/" + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/balance.xlsx", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-1", + "type": "READ", + "storageType": "PRIVATE", + "location": "file.txt", + "result": { + "content": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + } + } + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + }, + "location": "document.pdf" + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + }, + "location": "important/file.txt" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + }, + "location": "documents/documents/document.pdf" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + }, + "location": "home/balance.xlsx" + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "file.txt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-0", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/documents/document.pdf", + "result": { + "content": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + } + } + }, + { + "userId": "user-1", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/balance.xlsx", + "result": { + "content": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + } + } + }, + { + "userId": "user-0", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/documents/" + }, + { + "userId": "user-8", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-3", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/" + }, + { + "userId": "user-1", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + }, + "location": "home/file.txt" + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "home/file.txt" + ] + } + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + }, + "location": "home/file.txt" + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + }, + "location": "documents/home/document.pdf" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "important/home/presentation.ppt" + }, + { + "userId": "user-6", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + }, + "location": "file.txt" + }, + { + "userId": "user-9", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/home/file.txt", + "result": { + "content": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + } + } + }, + { + "userId": "user-4", + "type": "READ", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "content": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + } + } + }, + { + "userId": "user-7", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/file.txt", + "result": { + "content": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + } + } + }, + { + "userId": "user-8", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/home/document.pdf", + "result": { + "content": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + } + } + }, + { + "userId": "user-9", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/home/" + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + }, + "location": "document.pdf" + }, + { + "userId": "user-8", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/home/" + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-5", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/home/" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + }, + "location": "document.pdf" + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "document.pdf" + ] + } + }, + { + "userId": "user-8", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "home/document.pdf" + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + }, + "location": "important/home/presentation.ppt" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "documents/presentation.ppt" + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/home/file.txt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/", + "result": { + "dirContent": [ + "home/document.pdf" + ] + } + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/presentation.ppt", + "result": { + "dirContent": [ + "documents/presentation.ppt" + ] + } + }, + { + "userId": "user-9", + "type": "READ", + "storageType": "PRIVATE", + "location": "document.pdf", + "result": { + "content": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + } + } + }, + { + "userId": "user-1", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/file.txt", + "result": { + "content": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + } + } + }, + { + "userId": "user-8", + "type": "READ", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "content": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + } + } + }, + { + "userId": "user-7", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + }, + "location": "home/important/balance.xlsx" + }, + { + "userId": "user-0", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/home/presentation.ppt", + "result": { + "content": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + } + } + }, + { + "userId": "user-1", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/file.txt", + "result": { + "content": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + } + } + }, + { + "userId": "user-8", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-9", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-5", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-6", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + }, + "location": "file.txt" + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "important/important/presentation.ppt" + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/home/file.txt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "file.txt" + ] + } + }, + { + "userId": "user-1", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/presentation.ppt", + "result": { + "content": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + } + } + }, + { + "userId": "user-5", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + }, + "location": "home/file.txt" + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "file.txt" + }, + { + "userId": "user-6", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + }, + "location": "documents/home/presentation.ppt" + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/documents/document.pdf", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/presentation.ppt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/documents/document.pdf", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-1", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/important/balance.xlsx", + "result": { + "content": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + } + } + }, + { + "userId": "user-6", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/home/presentation.ppt", + "result": { + "content": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + } + } + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + }, + "location": "document.pdf" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "home/file.txt" + ] + } + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/balance.xlsx", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-7", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/file.txt", + "result": { + "content": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + } + } + }, + { + "userId": "user-6", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/home/presentation.ppt", + "result": { + "content": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + } + } + }, + { + "userId": "user-4", + "type": "READ", + "storageType": "PRIVATE", + "location": "document.pdf", + "result": { + "content": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + } + } + }, + { + "userId": "user-5", + "type": "READ", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "content": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + } + } + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + }, + "location": "important/documents/presentation.ppt" + }, + { + "userId": "user-2", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "home/documents/document.pdf" + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/important/presentation.ppt", + "result": { + "dirContent": [ + "important/important/presentation.ppt" + ] + } + }, + { + "userId": "user-0", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/home/presentation.ppt", + "result": { + "content": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + } + } + }, + { + "userId": "user-7", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/documents/presentation.ppt", + "result": { + "content": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + } + } + }, + { + "userId": "user-2", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/documents/document.pdf", + "result": { + "content": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + } + } + }, + { + "userId": "user-3", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/" + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "file.txt" + ] + } + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + }, + "location": "important/document.pdf" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + }, + "location": "document.pdf" + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/balance.xlsx", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/home/presentation.ppt", + "result": { + "dirContent": [ + "important/home/presentation.ppt" + ] + } + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/documents/document.pdf", + "result": { + "dirContent": [ + "home/documents/document.pdf" + ] + } + }, + { + "userId": "user-0", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/home/presentation.ppt", + "result": { + "content": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + } + } + }, + { + "userId": "user-5", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-6", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/home/" + }, + { + "userId": "user-2", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/documents/" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + }, + "location": "important/presentation.ppt" + }, + { + "userId": "user-6", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + }, + "location": "file.txt" + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "file.txt" + ] + } + }, + { + "userId": "user-5", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/presentation.ppt", + "result": { + "content": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + } + } + }, + { + "userId": "user-6", + "type": "READ", + "storageType": "PRIVATE", + "location": "file.txt", + "result": { + "content": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + } + } + }, + { + "userId": "user-1", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "documents/documents/document.pdf" + }, + { + "userId": "user-5", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/" + }, + { + "userId": "user-6", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-1", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/documents/" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + }, + "location": "documents/documents/balance.xlsx" + }, + { + "userId": "user-2", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + }, + "location": "important/home/presentation.ppt" + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "file.txt" + ] + } + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-6", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + }, + "location": "important/document.pdf" + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + }, + "location": "home/important/presentation.ppt" + }, + { + "userId": "user-3", + "type": "READ", + "storageType": "PRIVATE", + "location": "file.txt", + "result": { + "content": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + } + } + }, + { + "userId": "user-4", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/documents/balance.xlsx", + "result": { + "content": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + } + } + }, + { + "userId": "user-6", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/document.pdf", + "result": { + "content": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + } + } + }, + { + "userId": "user-4", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-0", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/important/" + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/file.txt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + }, + "location": "home/important/document.pdf" + }, + { + "userId": "user-6", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + }, + "location": "file.txt" + }, + { + "userId": "user-2", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + }, + "location": "file.txt" + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/presentation.ppt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/home/presentation.ppt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-3", + "type": "READ", + "storageType": "PRIVATE", + "location": "file.txt", + "result": { + "content": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + } + } + }, + { + "userId": "user-2", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/home/presentation.ppt", + "result": { + "content": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + } + } + }, + { + "userId": "user-3", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-4", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/important/" + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/home/balance.xlsx", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + }, + "location": "important/documents/document.pdf" + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + }, + "location": "important/file.txt" + }, + { + "userId": "user-6", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + }, + "location": "important/balance.xlsx" + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/documents/file.txt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "documents/presentation.ppt" + ] + } + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "file.txt", + "important/home/presentation.ppt" + ] + } + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "important/documents/document.pdf" + ] + } + }, + { + "userId": "user-0", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/home/presentation.ppt", + "result": { + "content": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + } + } + }, + { + "userId": "user-9", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/file.txt", + "result": { + "content": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + } + } + }, + { + "userId": "user-6", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/document.pdf", + "result": { + "content": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + } + } + }, + { + "userId": "user-0", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/important/" + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "home/documents/document.pdf" + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/documents/", + "result": { + "dirContent": [ + "home/documents/document.pdf" + ] + } + }, + { + "userId": "user-0", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/documents/document.pdf", + "result": { + "content": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + } + } + }, + { + "userId": "user-2", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/home/" + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "file.txt" + ] + } + }, + { + "userId": "user-8", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/documents/" + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + }, + "location": "document.pdf" + }, + { + "userId": "user-8", + "type": "READ", + "storageType": "PRIVATE", + "location": "document.pdf", + "result": { + "content": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + } + } + }, + { + "userId": "user-6", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/" + }, + { + "userId": "user-6", + "type": "READ", + "storageType": "PRIVATE", + "location": "file.txt", + "result": { + "content": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + } + } + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + }, + "location": "important/file.txt" + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + }, + "location": "documents/file.txt" + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "home/balance.xlsx" + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + }, + "location": "document.pdf" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "document.pdf", + "documents/file.txt" + ] + } + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "document.pdf" + ] + } + }, + { + "userId": "user-0", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/home/presentation.ppt", + "result": { + "content": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + } + } + }, + { + "userId": "user-1", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/presentation.ppt", + "result": { + "content": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + } + } + }, + { + "userId": "user-0", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/documents/" + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + }, + "location": "home/important/presentation.ppt" + }, + { + "userId": "user-2", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-8", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + }, + "location": "home/presentation.ppt" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "document.pdf" + ] + } + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-8", + "type": "READ", + "storageType": "PRIVATE", + "location": "document.pdf", + "result": { + "content": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + } + } + }, + { + "userId": "user-9", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/balance.xlsx", + "result": { + "content": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + } + } + }, + { + "userId": "user-1", + "type": "READ", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "content": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + } + } + }, + { + "userId": "user-9", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/" + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "documents/important/document.pdf" + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/important/document.pdf", + "result": { + "dirContent": [ + "documents/important/document.pdf" + ] + } + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "documents/documents/presentation.ppt" + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "balance.xlsx" + ] + } + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/documents/file.txt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-6", + "type": "READ", + "storageType": "PRIVATE", + "location": "file.txt", + "result": { + "content": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + } + } + }, + { + "userId": "user-1", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/presentation.ppt", + "result": { + "content": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + } + } + }, + { + "userId": "user-7", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/documents/" + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-9", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/" + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-9", + "type": "READ", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "content": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + } + } + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + }, + "location": "important/file.txt" + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + }, + "location": "home/document.pdf" + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + }, + "location": "important/balance.xlsx" + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "dirContent": [ + "presentation.ppt" + ] + } + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/file.txt", + "result": { + "dirContent": [ + "home/file.txt" + ] + } + }, + { + "userId": "user-8", + "type": "READ", + "storageType": "PRIVATE", + "location": "document.pdf", + "result": { + "content": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + } + } + }, + { + "userId": "user-0", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/home/presentation.ppt", + "result": { + "content": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + } + } + }, + { + "userId": "user-5", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-6", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-6", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + }, + "location": "important/file.txt" + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/", + "result": { + "dirContent": [ + "important/balance.xlsx" + ] + } + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-7", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/file.txt", + "result": { + "content": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + } + } + }, + { + "userId": "user-3", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/balance.xlsx", + "result": { + "content": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + } + } + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "documents/important/document.pdf", + "home/document.pdf", + "presentation.ppt", + "balance.xlsx" + ] + } + }, + { + "userId": "user-7", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/" + }, + { + "userId": "user-3", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-6", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-6", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "home/document.pdf" + }, + { + "userId": "user-1", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/" + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "documents/documents/balance.xlsx" + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "dirContent": [ + "balance.xlsx" + ] + } + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/documents/file.txt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-7", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/file.txt", + "result": { + "content": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + } + } + }, + { + "userId": "user-4", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/presentation.ppt", + "result": { + "content": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + } + } + }, + { + "userId": "user-6", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/document.pdf", + "result": { + "content": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + } + } + }, + { + "userId": "user-0", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/home/presentation.ppt", + "result": { + "content": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + } + } + }, + { + "userId": "user-1", + "type": "READ", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "content": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + } + } + }, + { + "userId": "user-4", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + }, + "location": "home/balance.xlsx" + }, + { + "userId": "user-0", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/important/" + }, + { + "userId": "user-3", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/file.txt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "important/home/presentation.ppt" + ] + } + }, + { + "userId": "user-9", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/important/" + }, + { + "userId": "user-1", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-6", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + }, + "location": "important/presentation.ppt" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + }, + "location": "documents/file.txt" + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/documents/", + "result": { + "dirContent": [ + "documents/documents/balance.xlsx" + ] + } + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/", + "result": { + "dirContent": [ + "important/presentation.ppt", + "important/home/presentation.ppt" + ] + } + }, + { + "userId": "user-8", + "type": "READ", + "storageType": "PRIVATE", + "location": "document.pdf", + "result": { + "content": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + } + } + }, + { + "userId": "user-9", + "type": "READ", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "content": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + } + } + }, + { + "userId": "user-8", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-4", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-5", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/documents/" + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + }, + "location": "file.txt" + }, + { + "userId": "user-2", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "home/file.txt", + "balance.xlsx" + ] + } + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "dirContent": [ + "balance.xlsx" + ] + } + }, + { + "userId": "user-7", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/file.txt", + "result": { + "content": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + } + } + }, + { + "userId": "user-2", + "type": "READ", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "content": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + } + } + }, + { + "userId": "user-6", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/" + }, + { + "userId": "user-6", + "type": "READ", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "content": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + } + } + }, + { + "userId": "user-1", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + }, + "location": "important/presentation.ppt" + }, + { + "userId": "user-2", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-2", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-2", + "type": "READ", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "content": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + } + } + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + }, + "location": "home/documents/balance.xlsx" + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + }, + "location": "file.txt" + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + }, + "location": "important/balance.xlsx" + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "balance.xlsx" + ] + } + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/file.txt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/presentation.ppt", + "result": { + "dirContent": [ + "important/presentation.ppt" + ] + } + }, + { + "userId": "user-7", + "type": "READ", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "content": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + } + } + }, + { + "userId": "user-9", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/document.pdf", + "result": { + "content": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + } + } + }, + { + "userId": "user-1", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/presentation.ppt", + "result": { + "content": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + } + } + }, + { + "userId": "user-7", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/" + }, + { + "userId": "user-6", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-0", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/home/" + }, + { + "userId": "user-0", + "type": "READ", + "storageType": "PRIVATE", + "location": "file.txt", + "result": { + "content": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + } + } + }, + { + "userId": "user-9", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/documents/presentation.ppt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-3", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + }, + "location": "home/presentation.ppt" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + }, + "location": "home/document.pdf" + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "file.txt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/document.pdf", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "important/balance.xlsx", + "home/document.pdf", + "important/presentation.ppt" + ] + } + }, + { + "userId": "user-0", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/" + }, + { + "userId": "user-2", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "file.txt" + ] + } + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/presentation.ppt", + "result": { + "dirContent": [ + "important/presentation.ppt" + ] + } + }, + { + "userId": "user-7", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/presentation.ppt", + "result": { + "content": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + } + } + }, + { + "userId": "user-8", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/documents/balance.xlsx", + "result": { + "content": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + } + } + }, + { + "userId": "user-0", + "type": "READ", + "storageType": "PRIVATE", + "location": "file.txt", + "result": { + "content": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + } + } + }, + { + "userId": "user-1", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/presentation.ppt", + "result": { + "content": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + } + } + }, + { + "userId": "user-7", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + }, + "location": "important/balance.xlsx" + }, + { + "userId": "user-7", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/balance.xlsx", + "result": { + "content": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + } + } + }, + { + "userId": "user-8", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/documents/" + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + }, + "location": "home/presentation.ppt" + }, + { + "userId": "user-8", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/presentation.ppt", + "result": { + "content": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + } + } + }, + { + "userId": "user-8", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/" + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-2", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "file.txt" + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/important/presentation.ppt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "file.txt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + }, + "location": "home/file.txt" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + }, + "location": "documents/document.pdf" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + }, + "location": "documents/presentation.ppt" + }, + { + "userId": "user-2", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + }, + "location": "document.pdf" + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/", + "result": { + "dirContent": [ + "important/balance.xlsx" + ] + } + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/presentation.ppt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/file.txt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-2", + "type": "READ", + "storageType": "PRIVATE", + "location": "document.pdf", + "result": { + "content": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + } + } + }, + { + "userId": "user-1", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/document.pdf", + "result": { + "content": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + } + } + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/balance.xlsx", + "result": { + "dirContent": [ + "important/balance.xlsx" + ] + } + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "document.pdf", + "file.txt" + ] + } + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/important/presentation.ppt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-7", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/" + }, + { + "userId": "user-9", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/" + }, + { + "userId": "user-1", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + }, + "location": "document.pdf" + }, + { + "userId": "user-2", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/file.txt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/", + "result": { + "dirContent": [ + "documents/document.pdf" + ] + } + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/presentation.ppt", + "result": { + "dirContent": [ + "important/presentation.ppt" + ] + } + }, + { + "userId": "user-1", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/presentation.ppt", + "result": { + "content": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + } + } + }, + { + "userId": "user-3", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + }, + "location": "document.pdf" + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "document.pdf", + "result": { + "dirContent": [ + "document.pdf" + ] + } + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "file.txt" + ] + } + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "file.txt", + "result": { + "dirContent": [ + "file.txt" + ] + } + }, + { + "userId": "user-0", + "type": "READ", + "storageType": "PRIVATE", + "location": "file.txt", + "result": { + "content": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + } + } + }, + { + "userId": "user-1", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/balance.xlsx", + "result": { + "content": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + } + } + }, + { + "userId": "user-2", + "type": "READ", + "storageType": "PRIVATE", + "location": "file.txt", + "result": { + "content": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + } + } + }, + { + "userId": "user-0", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + }, + "location": "home/home/balance.xlsx" + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-2", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "important/balance.xlsx", + "home/document.pdf", + "important/presentation.ppt" + ] + } + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "dirContent": [ + "presentation.ppt" + ] + } + }, + { + "userId": "user-8", + "type": "READ", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "content": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + } + } + }, + { + "userId": "user-3", + "type": "READ", + "storageType": "PRIVATE", + "location": "document.pdf", + "result": { + "content": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + } + } + }, + { + "userId": "user-8", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + }, + "location": "documents/presentation.ppt" + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "documents/presentation.ppt" + ] + } + }, + { + "userId": "user-8", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/presentation.ppt", + "result": { + "content": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + } + } + }, + { + "userId": "user-5", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/" + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + }, + "location": "important/important/file.txt" + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + }, + "location": "home/home/file.txt" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "important/important/file.txt" + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/important/file.txt", + "result": { + "dirContent": [ + "important/important/file.txt" + ] + } + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "important/balance.xlsx", + "home/document.pdf", + "important/presentation.ppt", + "important/important/file.txt" + ] + } + }, + { + "userId": "user-4", + "type": "READ", + "storageType": "PRIVATE", + "location": "document.pdf", + "result": { + "content": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + } + } + }, + { + "userId": "user-7", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/important/" + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "home/home/balance.xlsx" + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + }, + "location": "document.pdf" + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/presentation.ppt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/home/presentation.ppt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/", + "result": { + "dirContent": [ + "home/home/balance.xlsx" + ] + } + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "document.pdf", + "result": { + "dirContent": [ + "document.pdf" + ] + } + }, + { + "userId": "user-0", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/home/file.txt", + "result": { + "content": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + } + } + }, + { + "userId": "user-7", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/home/balance.xlsx", + "result": { + "content": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + } + } + }, + { + "userId": "user-4", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-7", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/home/" + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-9", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + }, + "location": "important/file.txt" + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + }, + "location": "important/presentation.ppt" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + }, + "location": "home/home/document.pdf" + }, + { + "userId": "user-6", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "important/balance.xlsx", + "home/document.pdf", + "important/presentation.ppt", + "important/important/file.txt" + ] + } + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-9", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/" + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/important/file.txt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-4", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/home/" + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + }, + "location": "file.txt" + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-3", + "type": "READ", + "storageType": "PRIVATE", + "location": "file.txt", + "result": { + "content": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + } + } + }, + { + "userId": "user-8", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-6", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-6", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-0", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/home/" + }, + { + "userId": "user-6", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + }, + "location": "important/file.txt" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + }, + "location": "important/presentation.ppt" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + }, + "location": "documents/important/presentation.ppt" + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/important/document.pdf", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/file.txt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/presentation.ppt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-8", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/file.txt", + "result": { + "content": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + } + } + }, + { + "userId": "user-4", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/presentation.ppt", + "result": { + "content": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + } + } + }, + { + "userId": "user-5", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/important/presentation.ppt", + "result": { + "content": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + } + } + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "important/document.pdf" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + }, + "location": "home/important/document.pdf" + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/", + "result": { + "dirContent": [ + "important/file.txt" + ] + } + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "dirContent": [ + "presentation.ppt" + ] + } + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "presentation.ppt" + ] + } + }, + { + "userId": "user-3", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/presentation.ppt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "important/home/document.pdf" + }, + { + "userId": "user-6", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + }, + "location": "home/balance.xlsx" + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + }, + "location": "important/document.pdf" + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/balance.xlsx", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/document.pdf", + "result": { + "dirContent": [ + "important/document.pdf" + ] + } + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "home/balance.xlsx" + ] + } + }, + { + "userId": "user-9", + "type": "READ", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "content": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + } + } + }, + { + "userId": "user-0", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/document.pdf", + "result": { + "content": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + } + } + }, + { + "userId": "user-7", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "home/home/file.txt" + }, + { + "userId": "user-8", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-4", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/" + }, + { + "userId": "user-9", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/home/" + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + }, + "location": "home/balance.xlsx" + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "dirContent": [ + "presentation.ppt" + ] + } + }, + { + "userId": "user-9", + "type": "READ", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "content": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + } + } + }, + { + "userId": "user-6", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/" + }, + { + "userId": "user-7", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/home/" + }, + { + "userId": "user-9", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + }, + "location": "important/important/document.pdf" + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + }, + "location": "document.pdf" + }, + { + "userId": "user-0", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/presentation.ppt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "important/important/document.pdf" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-6", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + }, + "location": "important/important/balance.xlsx" + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + }, + "location": "documents/home/document.pdf" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + }, + "location": "documents/important/presentation.ppt" + }, + { + "userId": "user-2", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + }, + "location": "home/file.txt" + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/important/document.pdf", + "result": { + "dirContent": [ + "important/important/document.pdf" + ] + } + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "balance.xlsx" + ] + } + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "important/balance.xlsx", + "home/document.pdf", + "important/presentation.ppt", + "home/important/document.pdf", + "documents/important/presentation.ppt", + "important/important/file.txt" + ] + } + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-5", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/document.pdf", + "result": { + "content": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + } + } + }, + { + "userId": "user-0", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/home/document.pdf", + "result": { + "content": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + } + } + }, + { + "userId": "user-2", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/file.txt", + "result": { + "content": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + } + } + }, + { + "userId": "user-4", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-2", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/" + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + }, + "location": "home/home/document.pdf" + }, + { + "userId": "user-5", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/document.pdf", + "result": { + "content": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + } + } + }, + { + "userId": "user-0", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/home/document.pdf", + "result": { + "content": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + } + } + }, + { + "userId": "user-9", + "type": "READ", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "content": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + } + } + }, + { + "userId": "user-3", + "type": "READ", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "content": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + } + } + }, + { + "userId": "user-1", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/important/" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "documents/balance.xlsx" + }, + { + "userId": "user-9", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-4", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/home/" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "home/presentation.ppt" + }, + { + "userId": "user-1", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/important/" + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + }, + "location": "documents/balance.xlsx" + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + }, + "location": "important/home/document.pdf" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "document.pdf" + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/", + "result": { + "dirContent": [ + "home/presentation.ppt" + ] + } + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/document.pdf", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-6", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/important/balance.xlsx", + "result": { + "content": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + } + } + }, + { + "userId": "user-3", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/home/document.pdf", + "result": { + "content": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + } + } + }, + { + "userId": "user-5", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-1", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/" + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "home/document.pdf", + "documents/balance.xlsx", + "documents/important/presentation.ppt" + ] + } + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + }, + "location": "home/presentation.ppt" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + }, + "location": "document.pdf" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + }, + "location": "documents/home/presentation.ppt" + }, + { + "userId": "user-2", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + }, + "location": "home/file.txt" + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/presentation.ppt", + "result": { + "dirContent": [ + "home/presentation.ppt" + ] + } + }, + { + "userId": "user-2", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/file.txt", + "result": { + "content": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + } + } + }, + { + "userId": "user-3", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-4", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/" + }, + { + "userId": "user-9", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/" + }, + { + "userId": "user-5", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "documents/presentation.ppt" + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + }, + "location": "important/balance.xlsx" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "document.pdf", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/documents/presentation.ppt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-5", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/presentation.ppt", + "result": { + "content": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + } + } + }, + { + "userId": "user-6", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/important/balance.xlsx", + "result": { + "content": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + } + } + }, + { + "userId": "user-2", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/file.txt", + "result": { + "content": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + } + } + }, + { + "userId": "user-1", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/important/" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + }, + "location": "document.pdf" + }, + { + "userId": "user-8", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/important/" + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + }, + "location": "important/important/balance.xlsx" + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + }, + "location": "important/presentation.ppt" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + }, + "location": "home/balance.xlsx" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "home/file.txt" + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "important/important/balance.xlsx" + ] + } + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/file.txt", + "result": { + "dirContent": [ + "home/file.txt" + ] + } + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "important/balance.xlsx", + "documents/balance.xlsx", + "presentation.ppt", + "important/important/balance.xlsx" + ] + } + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/", + "result": { + "dirContent": [ + "documents/home/presentation.ppt", + "documents/balance.xlsx" + ] + } + }, + { + "userId": "user-1", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/home/presentation.ppt", + "result": { + "content": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + } + } + }, + { + "userId": "user-2", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/file.txt", + "result": { + "content": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + } + } + }, + { + "userId": "user-5", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/" + }, + { + "userId": "user-6", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/important/" + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "document.pdf", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-8", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "important/documents/balance.xlsx" + }, + { + "userId": "user-8", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/documents/balance.xlsx", + "result": { + "content": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + } + } + }, + { + "userId": "user-4", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + }, + "location": "home/file.txt" + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/file.txt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/presentation.ppt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-3", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/presentation.ppt", + "result": { + "content": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + } + } + }, + { + "userId": "user-4", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/file.txt", + "result": { + "content": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + } + } + }, + { + "userId": "user-0", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/" + }, + { + "userId": "user-2", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/" + }, + { + "userId": "user-2", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + }, + "location": "home/home/presentation.ppt" + }, + { + "userId": "user-2", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/home/" + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + }, + "location": "documents/documents/file.txt" + }, + { + "userId": "user-6", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + }, + "location": "important/document.pdf" + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/home/balance.xlsx", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/document.pdf", + "result": { + "dirContent": [ + "important/document.pdf" + ] + } + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "balance.xlsx", + "documents/home/document.pdf" + ] + } + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/", + "result": { + "dirContent": [ + "home/document.pdf", + "home/file.txt" + ] + } + }, + { + "userId": "user-8", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/documents/balance.xlsx", + "result": { + "content": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + } + } + }, + { + "userId": "user-4", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/file.txt", + "result": { + "content": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + } + } + }, + { + "userId": "user-8", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/documents/" + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + }, + "location": "home/home/presentation.ppt" + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/", + "result": { + "dirContent": [ + "home/home/presentation.ppt" + ] + } + }, + { + "userId": "user-3", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/" + }, + { + "userId": "user-6", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/" + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-2", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + }, + "location": "home/home/balance.xlsx" + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/balance.xlsx", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-4", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/file.txt", + "result": { + "content": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + } + } + }, + { + "userId": "user-0", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/home/document.pdf", + "result": { + "content": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + } + } + }, + { + "userId": "user-1", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/home/presentation.ppt", + "result": { + "content": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + } + } + }, + { + "userId": "user-8", + "type": "READ", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "content": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + } + } + }, + { + "userId": "user-2", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/home/balance.xlsx", + "result": { + "content": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + } + } + }, + { + "userId": "user-1", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/home/" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + }, + "location": "documents/balance.xlsx" + }, + { + "userId": "user-6", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + }, + "location": "documents/home/balance.xlsx" + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/documents/file.txt", + "result": { + "dirContent": [ + "documents/documents/file.txt" + ] + } + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/", + "result": { + "dirContent": [ + "documents/balance.xlsx" + ] + } + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/important/file.txt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-1", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/file.txt", + "result": { + "content": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + } + } + }, + { + "userId": "user-4", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/balance.xlsx", + "result": { + "content": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + } + } + }, + { + "userId": "user-6", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/home/balance.xlsx", + "result": { + "content": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + } + } + }, + { + "userId": "user-1", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/" + }, + { + "userId": "user-7", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + }, + "location": "important/home/document.pdf" + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/home/document.pdf", + "result": { + "dirContent": [ + "important/home/document.pdf" + ] + } + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "important/documents/document.pdf" + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + }, + "location": "home/document.pdf" + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/home/", + "result": { + "dirContent": [ + "important/home/document.pdf" + ] + } + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "documents/home/balance.xlsx" + ] + } + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "dirContent": [ + "balance.xlsx" + ] + } + }, + { + "userId": "user-6", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/home/balance.xlsx", + "result": { + "content": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + } + } + }, + { + "userId": "user-0", + "type": "READ", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "content": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + } + } + }, + { + "userId": "user-1", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/balance.xlsx", + "result": { + "content": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + } + } + }, + { + "userId": "user-2", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/home/balance.xlsx", + "result": { + "content": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + } + } + }, + { + "userId": "user-4", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + }, + "location": "documents/home/balance.xlsx" + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + }, + "location": "documents/presentation.ppt" + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/important/file.txt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "home/document.pdf", + "balance.xlsx", + "documents/home/document.pdf" + ] + } + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/home/", + "result": { + "dirContent": [ + "home/home/balance.xlsx" + ] + } + }, + { + "userId": "user-8", + "type": "READ", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "content": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + } + } + }, + { + "userId": "user-6", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/home/balance.xlsx", + "result": { + "content": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + } + } + }, + { + "userId": "user-0", + "type": "READ", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "content": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + } + } + }, + { + "userId": "user-4", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/" + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-2", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "file.txt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/home/file.txt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "dirContent": [ + "balance.xlsx" + ] + } + }, + { + "userId": "user-8", + "type": "READ", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "content": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + } + } + }, + { + "userId": "user-4", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/home/balance.xlsx", + "result": { + "content": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + } + } + }, + { + "userId": "user-9", + "type": "READ", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "content": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + } + } + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + }, + "location": "important/document.pdf" + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-9", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/" + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + }, + "location": "documents/file.txt" + }, + { + "userId": "user-0", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/" + }, + { + "userId": "user-0", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/home/document.pdf", + "result": { + "content": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + } + } + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + }, + "location": "documents/file.txt" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "home/documents/balance.xlsx" + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "documents/file.txt", + "balance.xlsx" + ] + } + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "important/document.pdf" + ] + } + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/", + "result": { + "dirContent": [ + "documents/home/document.pdf" + ] + } + }, + { + "userId": "user-6", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/home/balance.xlsx", + "result": { + "content": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + } + } + }, + { + "userId": "user-0", + "type": "READ", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "content": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + } + } + }, + { + "userId": "user-9", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/" + }, + { + "userId": "user-3", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/" + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-1", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/" + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + }, + "location": "home/file.txt" + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + }, + "location": "important/documents/balance.xlsx" + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-4", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/home/balance.xlsx", + "result": { + "content": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + } + } + }, + { + "userId": "user-5", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/documents/balance.xlsx", + "result": { + "content": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + } + } + }, + { + "userId": "user-6", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/home/balance.xlsx", + "result": { + "content": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + } + } + }, + { + "userId": "user-9", + "type": "READ", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "content": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + } + } + }, + { + "userId": "user-5", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/documents/" + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/home/file.txt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-0", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/home/" + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + }, + "location": "home/documents/document.pdf" + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + }, + "location": "home/important/presentation.ppt" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "home/important/document.pdf" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "important/balance.xlsx" + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "document.pdf", + "balance.xlsx" + ] + } + }, + { + "userId": "user-7", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/home/" + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/important/balance.xlsx", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-1", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + }, + "location": "documents/home/file.txt" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + }, + "location": "document.pdf" + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/documents/file.txt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/", + "result": { + "dirContent": [ + "home/important/presentation.ppt" + ] + } + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/documents/balance.xlsx", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-2", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/home/balance.xlsx", + "result": { + "content": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + } + } + }, + { + "userId": "user-9", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/documents/" + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "balance.xlsx" + ] + } + }, + { + "userId": "user-9", + "type": "READ", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "content": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + } + } + }, + { + "userId": "user-3", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/important/" + }, + { + "userId": "user-5", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-6", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/home/" + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-5", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "important/important/balance.xlsx" + }, + { + "userId": "user-2", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + }, + "location": "home/documents/balance.xlsx" + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/documents/presentation.ppt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/document.pdf", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/important/document.pdf", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + }, + "location": "documents/documents/file.txt" + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + }, + "location": "file.txt" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + }, + "location": "file.txt" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "home/important/document.pdf" + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/important/presentation.ppt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-9", + "type": "READ", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "content": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + } + } + }, + { + "userId": "user-3", + "type": "READ", + "storageType": "PRIVATE", + "location": "file.txt", + "result": { + "content": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + } + } + }, + { + "userId": "user-7", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/documents/" + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-7", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + }, + "location": "document.pdf" + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "document.pdf" + ] + } + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + }, + "location": "file.txt" + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + }, + "location": "important/home/document.pdf" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-2", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + }, + "location": "documents/presentation.ppt" + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "dirContent": [ + "balance.xlsx" + ] + } + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/file.txt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "home/home/presentation.ppt", + "presentation.ppt", + "important/documents/document.pdf", + "home/file.txt", + "important/home/document.pdf" + ] + } + }, + { + "userId": "user-1", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/important/document.pdf", + "result": { + "content": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + } + } + }, + { + "userId": "user-4", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/file.txt", + "result": { + "content": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + } + } + }, + { + "userId": "user-1", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/important/" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + }, + "location": "home/file.txt" + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "dirContent": [ + "presentation.ppt" + ] + } + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/home/presentation.ppt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/home/balance.xlsx", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-7", + "type": "READ", + "storageType": "PRIVATE", + "location": "file.txt", + "result": { + "content": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + } + } + }, + { + "userId": "user-1", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/file.txt", + "result": { + "content": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + } + } + }, + { + "userId": "user-2", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/documents/" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + }, + "location": "home/file.txt" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + }, + "location": "important/important/document.pdf" + }, + { + "userId": "user-2", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "presentation.ppt", + "file.txt" + ] + } + }, + { + "userId": "user-8", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/documents/document.pdf", + "result": { + "content": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + } + } + }, + { + "userId": "user-4", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/home/" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-5", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/" + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-3", + "type": "READ", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "content": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + } + } + }, + { + "userId": "user-5", + "type": "READ", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "content": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + } + } + }, + { + "userId": "user-5", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + }, + "location": "home/presentation.ppt" + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "document.pdf", + "result": { + "dirContent": [ + "document.pdf" + ] + } + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "home/home/presentation.ppt", + "presentation.ppt", + "important/documents/document.pdf", + "home/file.txt", + "important/home/document.pdf" + ] + } + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "file.txt", + "result": { + "dirContent": [ + "file.txt" + ] + } + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/document.pdf", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "file.txt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-9", + "type": "READ", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "content": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + } + } + }, + { + "userId": "user-9", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + }, + "location": "documents/documents/balance.xlsx" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "important/home/document.pdf" + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/important/", + "result": { + "dirContent": [ + "home/important/document.pdf" + ] + } + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/document.pdf", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-8", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/documents/document.pdf", + "result": { + "content": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + } + } + }, + { + "userId": "user-4", + "type": "READ", + "storageType": "PRIVATE", + "location": "file.txt", + "result": { + "content": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + } + } + }, + { + "userId": "user-2", + "type": "READ", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "content": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + } + } + }, + { + "userId": "user-9", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/documents/" + }, + { + "userId": "user-3", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + }, + "location": "important/document.pdf" + }, + { + "userId": "user-2", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + }, + "location": "important/presentation.ppt" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "important/balance.xlsx" + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/document.pdf", + "result": { + "dirContent": [ + "important/document.pdf" + ] + } + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "important/balance.xlsx", + "presentation.ppt" + ] + } + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-9", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/presentation.ppt", + "result": { + "content": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + } + } + }, + { + "userId": "user-7", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-8", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/home/" + }, + { + "userId": "user-8", + "type": "READ", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "content": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + } + } + }, + { + "userId": "user-0", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/documents/" + }, + { + "userId": "user-9", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/" + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/balance.xlsx", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-5", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/" + }, + { + "userId": "user-5", + "type": "READ", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "content": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + } + } + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + }, + "location": "document.pdf" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + }, + "location": "home/document.pdf" + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "document.pdf", + "result": { + "dirContent": [ + "document.pdf" + ] + } + }, + { + "userId": "user-8", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/home/" + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "document.pdf", + "presentation.ppt", + "important/documents/document.pdf", + "home/file.txt" + ] + } + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/document.pdf", + "result": { + "dirContent": [ + "home/document.pdf" + ] + } + }, + { + "userId": "user-8", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/documents/document.pdf", + "result": { + "content": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + } + } + }, + { + "userId": "user-4", + "type": "READ", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "content": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + } + } + }, + { + "userId": "user-0", + "type": "READ", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "content": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + } + } + }, + { + "userId": "user-3", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/" + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + }, + "location": "file.txt" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/", + "result": { + "dirContent": [ + "important/important/balance.xlsx" + ] + } + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-4", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/important/document.pdf", + "result": { + "content": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + } + } + }, + { + "userId": "user-7", + "type": "READ", + "storageType": "PRIVATE", + "location": "file.txt", + "result": { + "content": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + } + } + }, + { + "userId": "user-8", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/" + }, + { + "userId": "user-5", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/home/file.txt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "documents/home/document.pdf" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "document.pdf" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + }, + "location": "important/presentation.ppt" + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/balance.xlsx", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/", + "result": { + "dirContent": [ + "documents/home/document.pdf" + ] + } + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/presentation.ppt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-8", + "type": "READ", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "content": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + } + } + }, + { + "userId": "user-0", + "type": "READ", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "content": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + } + } + }, + { + "userId": "user-5", + "type": "READ", + "storageType": "PRIVATE", + "location": "document.pdf", + "result": { + "content": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + } + } + }, + { + "userId": "user-8", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-4", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + }, + "location": "home/documents/document.pdf" + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-0", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/important/" + }, + { + "userId": "user-1", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/home/" + }, + { + "userId": "user-1", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/presentation.ppt", + "result": { + "content": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + } + } + }, + { + "userId": "user-9", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/documents/" + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + }, + "location": "important/home/presentation.ppt" + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "documents/file.txt" + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "document.pdf" + ] + } + }, + { + "userId": "user-5", + "type": "READ", + "storageType": "PRIVATE", + "location": "document.pdf", + "result": { + "content": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + } + } + }, + { + "userId": "user-0", + "type": "READ", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "content": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + } + } + }, + { + "userId": "user-7", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/home/" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + }, + "location": "documents/home/balance.xlsx" + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/document.pdf", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/presentation.ppt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-7", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/home/presentation.ppt", + "result": { + "content": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + } + } + }, + { + "userId": "user-9", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/file.txt", + "result": { + "content": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + } + } + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/presentation.ppt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-7", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/home/presentation.ppt", + "result": { + "content": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + } + } + }, + { + "userId": "user-5", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/home/balance.xlsx", + "result": { + "content": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + } + } + }, + { + "userId": "user-5", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/home/" + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "important/document.pdf" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "presentation.ppt" + ] + } + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/important/balance.xlsx", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-7", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/home/presentation.ppt", + "result": { + "content": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + } + } + }, + { + "userId": "user-9", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/document.pdf", + "result": { + "content": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + } + } + }, + { + "userId": "user-4", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + }, + "location": "file.txt" + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "home/documents/balance.xlsx" + }, + { + "userId": "user-6", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + }, + "location": "important/presentation.ppt" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + }, + "location": "home/important/file.txt" + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "file.txt", + "important/home/presentation.ppt" + ] + } + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/", + "result": { + "dirContent": [ + "important/document.pdf" + ] + } + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/balance.xlsx", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/document.pdf", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/", + "result": { + "dirContent": [ + "important/presentation.ppt" + ] + } + }, + { + "userId": "user-9", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/documents/balance.xlsx", + "result": { + "content": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + } + } + }, + { + "userId": "user-0", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "document.pdf", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-1", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "home/home/document.pdf" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + }, + "location": "important/documents/file.txt" + }, + { + "userId": "user-2", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + }, + "location": "important/documents/document.pdf" + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/important/file.txt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-2", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/documents/document.pdf", + "result": { + "content": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + } + } + }, + { + "userId": "user-8", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-5", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-2", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/documents/" + }, + { + "userId": "user-2", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-2", + "type": "READ", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "content": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + } + } + }, + { + "userId": "user-2", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + }, + "location": "documents/documents/document.pdf" + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + }, + "location": "file.txt" + }, + { + "userId": "user-2", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-7", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/home/presentation.ppt", + "result": { + "content": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + } + } + }, + { + "userId": "user-9", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/documents/" + }, + { + "userId": "user-6", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/" + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + }, + "location": "document.pdf" + }, + { + "userId": "user-7", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/home/presentation.ppt", + "result": { + "content": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + } + } + }, + { + "userId": "user-9", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/document.pdf", + "result": { + "content": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + } + } + }, + { + "userId": "user-0", + "type": "READ", + "storageType": "PRIVATE", + "location": "file.txt", + "result": { + "content": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + } + } + }, + { + "userId": "user-7", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-3", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/documents/" + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "documents/document.pdf" + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "important/balance.xlsx" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + }, + "location": "file.txt" + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/file.txt", + "result": { + "dirContent": [ + "documents/file.txt" + ] + } + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/document.pdf", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "important/balance.xlsx", + "presentation.ppt" + ] + } + }, + { + "userId": "user-8", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + }, + "location": "documents/presentation.ppt" + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + }, + "location": "documents/document.pdf" + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "documents/document.pdf" + ] + } + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "important/presentation.ppt", + "important/important/document.pdf", + "balance.xlsx" + ] + } + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/documents/document.pdf", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-0", + "type": "READ", + "storageType": "PRIVATE", + "location": "file.txt", + "result": { + "content": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + } + } + }, + { + "userId": "user-8", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/presentation.ppt", + "result": { + "content": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + } + } + }, + { + "userId": "user-3", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/balance.xlsx", + "result": { + "content": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + } + } + }, + { + "userId": "user-4", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-2", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "documents/presentation.ppt" + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + }, + "location": "documents/presentation.ppt" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + }, + "location": "important/important/balance.xlsx" + }, + { + "userId": "user-2", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + }, + "location": "home/home/file.txt" + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/", + "result": { + "dirContent": [ + "documents/document.pdf" + ] + } + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/", + "result": { + "dirContent": [ + "documents/presentation.ppt" + ] + } + }, + { + "userId": "user-7", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/document.pdf", + "result": { + "content": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + } + } + }, + { + "userId": "user-5", + "type": "READ", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "content": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + } + } + }, + { + "userId": "user-1", + "type": "READ", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "content": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + } + } + }, + { + "userId": "user-5", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + }, + "location": "important/presentation.ppt" + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/home/presentation.ppt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/home/file.txt", + "result": { + "dirContent": [ + "home/home/file.txt" + ] + } + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "important/presentation.ppt", + "documents/document.pdf" + ] + } + }, + { + "userId": "user-0", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/presentation.ppt", + "result": { + "content": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + } + } + }, + { + "userId": "user-9", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/" + }, + { + "userId": "user-3", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/" + }, + { + "userId": "user-7", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/" + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + }, + "location": "file.txt" + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + }, + "location": "file.txt" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + }, + "location": "documents/document.pdf" + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "presentation.ppt", + "file.txt", + "important/document.pdf" + ] + } + }, + { + "userId": "user-7", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/document.pdf", + "result": { + "content": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + } + } + }, + { + "userId": "user-1", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/presentation.ppt", + "result": { + "content": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + } + } + }, + { + "userId": "user-8", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-0", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + }, + "location": "document.pdf" + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "important/documents/presentation.ppt" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "important/document.pdf" + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-2", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/home/file.txt", + "result": { + "content": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + } + } + }, + { + "userId": "user-0", + "type": "READ", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "content": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + } + } + }, + { + "userId": "user-1", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/important/" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + }, + "location": "important/presentation.ppt" + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "file.txt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-8", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/home/document.pdf", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-3", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/documents/" + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "important/balance.xlsx", + "presentation.ppt", + "file.txt" + ] + } + }, + { + "userId": "user-3", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/balance.xlsx", + "result": { + "content": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + } + } + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-2", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + }, + "location": "documents/document.pdf" + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/", + "result": { + "dirContent": [ + "important/document.pdf" + ] + } + }, + { + "userId": "user-3", + "type": "READ", + "storageType": "PRIVATE", + "location": "file.txt", + "result": { + "content": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + } + } + }, + { + "userId": "user-4", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/document.pdf", + "result": { + "content": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + } + } + }, + { + "userId": "user-0", + "type": "READ", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "content": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + } + } + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + }, + "location": "important/balance.xlsx" + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/presentation.ppt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "important/balance.xlsx", + "important/presentation.ppt", + "balance.xlsx" + ] + } + }, + { + "userId": "user-4", + "type": "READ", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "content": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + } + } + }, + { + "userId": "user-1", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/balance.xlsx", + "result": { + "content": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + } + } + }, + { + "userId": "user-4", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/" + }, + { + "userId": "user-4", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/document.pdf", + "result": { + "content": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + } + } + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + }, + "location": "home/important/presentation.ppt" + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-9", + "type": "READ", + "storageType": "PRIVATE", + "location": "file.txt", + "result": { + "content": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + } + } + }, + { + "userId": "user-0", + "type": "READ", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "content": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + } + } + }, + { + "userId": "user-4", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/" + }, + { + "userId": "user-4", + "type": "READ", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "content": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + } + } + }, + { + "userId": "user-0", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + }, + "location": "documents/important/balance.xlsx" + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "important/important/document.pdf" + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-7", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/document.pdf", + "result": { + "content": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + } + } + }, + { + "userId": "user-3", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + }, + "location": "important/presentation.ppt" + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "important/balance.xlsx", + "home/important/presentation.ppt", + "important/presentation.ppt", + "balance.xlsx" + ] + } + }, + { + "userId": "user-8", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/important/balance.xlsx", + "result": { + "content": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + } + } + }, + { + "userId": "user-4", + "type": "READ", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "content": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + } + } + }, + { + "userId": "user-7", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/document.pdf", + "result": { + "content": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + } + } + }, + { + "userId": "user-4", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + }, + "location": "document.pdf" + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "important/home/document.pdf" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "home/document.pdf" + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/important/presentation.ppt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "file.txt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-7", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/document.pdf", + "result": { + "content": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + } + } + }, + { + "userId": "user-1", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/balance.xlsx", + "result": { + "content": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + } + } + }, + { + "userId": "user-1", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + }, + "location": "documents/important/balance.xlsx" + }, + { + "userId": "user-9", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "important/documents/document.pdf" + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-8", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/documents/document.pdf", + "result": { + "content": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + } + } + }, + { + "userId": "user-3", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/home/document.pdf", + "result": { + "content": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + } + } + }, + { + "userId": "user-2", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/home/file.txt", + "result": { + "content": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + } + } + }, + { + "userId": "user-7", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/" + }, + { + "userId": "user-1", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/important/" + }, + { + "userId": "user-8", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/documents/" + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + }, + "location": "documents/file.txt" + }, + { + "userId": "user-6", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/file.txt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/home/document.pdf", + "result": { + "dirContent": [ + "important/home/document.pdf" + ] + } + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-5", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/document.pdf", + "result": { + "content": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + } + } + }, + { + "userId": "user-3", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/home/document.pdf", + "result": { + "content": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + } + } + }, + { + "userId": "user-6", + "type": "READ", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "content": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + } + } + }, + { + "userId": "user-0", + "type": "READ", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "content": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + } + } + }, + { + "userId": "user-0", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "presentation.ppt" + ] + } + }, + { + "userId": "user-0", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + }, + "location": "documents/file.txt" + }, + { + "userId": "user-0", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/file.txt", + "result": { + "content": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + } + } + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + }, + "location": "documents/presentation.ppt" + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + }, + "location": "important/important/document.pdf" + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/home/balance.xlsx", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/document.pdf", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "documents/document.pdf", + "home/home/file.txt" + ] + } + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/presentation.ppt", + "result": { + "dirContent": [ + "documents/presentation.ppt" + ] + } + }, + { + "userId": "user-6", + "type": "READ", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "content": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + } + } + }, + { + "userId": "user-0", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/file.txt", + "result": { + "content": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + } + } + }, + { + "userId": "user-7", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/document.pdf", + "result": { + "content": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + } + } + }, + { + "userId": "user-8", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/important/balance.xlsx", + "result": { + "content": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + } + } + }, + { + "userId": "user-3", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/home/" + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "documents/presentation.ppt" + }, + { + "userId": "user-5", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/" + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-6", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-0", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/" + }, + { + "userId": "user-8", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/document.pdf", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + }, + "location": "documents/home/presentation.ppt" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + }, + "location": "home/presentation.ppt" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "important/balance.xlsx" + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/file.txt", + "result": { + "dirContent": [ + "documents/file.txt" + ] + } + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/balance.xlsx", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-7", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/presentation.ppt", + "result": { + "content": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + } + } + }, + { + "userId": "user-4", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/presentation.ppt", + "result": { + "content": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + } + } + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + }, + "location": "documents/presentation.ppt" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + }, + "location": "home/documents/file.txt" + }, + { + "userId": "user-6", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + }, + "location": "important/presentation.ppt" + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "documents/presentation.ppt", + "documents/document.pdf" + ] + } + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "balance.xlsx" + ] + } + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/home/file.txt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-2", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/home/file.txt", + "result": { + "content": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + } + } + }, + { + "userId": "user-7", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/" + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-4", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/" + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + }, + "location": "important/document.pdf" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + }, + "location": "documents/file.txt" + }, + { + "userId": "user-2", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "document.pdf" + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/", + "result": { + "dirContent": [ + "important/balance.xlsx" + ] + } + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/home/", + "result": { + "dirContent": [ + "home/home/file.txt" + ] + } + }, + { + "userId": "user-1", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/file.txt", + "result": { + "content": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + } + } + }, + { + "userId": "user-9", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/" + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "file.txt" + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/file.txt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-3", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/home/" + }, + { + "userId": "user-3", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/file.txt", + "result": { + "content": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + } + } + }, + { + "userId": "user-2", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + }, + "location": "important/presentation.ppt" + }, + { + "userId": "user-8", + "type": "READ", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "content": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + } + } + }, + { + "userId": "user-6", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/presentation.ppt", + "result": { + "content": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + } + } + }, + { + "userId": "user-3", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/file.txt", + "result": { + "content": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + } + } + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/presentation.ppt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "important/balance.xlsx", + "documents/file.txt" + ] + } + }, + { + "userId": "user-9", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + }, + "location": "important/important/file.txt" + }, + { + "userId": "user-6", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/" + }, + { + "userId": "user-5", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-9", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/important/" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + }, + "location": "document.pdf" + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/documents/balance.xlsx", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "important/balance.xlsx", + "documents/file.txt" + ] + } + }, + { + "userId": "user-3", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/file.txt", + "result": { + "content": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + } + } + }, + { + "userId": "user-8", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-1", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/" + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/balance.xlsx", + "result": { + "dirContent": [ + "important/balance.xlsx" + ] + } + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + }, + "location": "file.txt" + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + }, + "location": "documents/presentation.ppt" + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + }, + "location": "home/document.pdf" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + }, + "location": "documents/important/presentation.ppt" + }, + { + "userId": "user-6", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + }, + "location": "important/documents/balance.xlsx" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + }, + "location": "important/important/balance.xlsx" + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/documents/balance.xlsx", + "result": { + "dirContent": [ + "important/documents/balance.xlsx" + ] + } + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/documents/balance.xlsx", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-3", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/presentation.ppt", + "result": { + "content": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + } + } + }, + { + "userId": "user-6", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/documents/balance.xlsx", + "result": { + "content": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + } + } + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + }, + "location": "file.txt" + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + }, + "location": "home/presentation.ppt" + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/documents/file.txt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/documents/balance.xlsx", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-3", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/presentation.ppt", + "result": { + "content": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + } + } + }, + { + "userId": "user-7", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-3", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/" + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + }, + "location": "important/home/balance.xlsx" + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/presentation.ppt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-8", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/presentation.ppt", + "result": { + "content": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + } + } + }, + { + "userId": "user-3", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/presentation.ppt", + "result": { + "content": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + } + } + }, + { + "userId": "user-4", + "type": "READ", + "storageType": "PRIVATE", + "location": "document.pdf", + "result": { + "content": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + } + } + }, + { + "userId": "user-0", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/home/balance.xlsx", + "result": { + "content": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + } + } + }, + { + "userId": "user-1", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/important/" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "home/home/file.txt" + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + }, + "location": "documents/important/balance.xlsx" + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + }, + "location": "documents/document.pdf" + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + }, + "location": "document.pdf" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + }, + "location": "home/documents/file.txt" + }, + { + "userId": "user-2", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + }, + "location": "home/documents/balance.xlsx" + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/documents/document.pdf", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-8", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/presentation.ppt", + "result": { + "content": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + } + } + }, + { + "userId": "user-0", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/home/balance.xlsx", + "result": { + "content": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + } + } + }, + { + "userId": "user-2", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/documents/balance.xlsx", + "result": { + "content": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + } + } + }, + { + "userId": "user-6", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/documents/" + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + }, + "location": "home/document.pdf" + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-6", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + }, + "location": "home/home/document.pdf" + }, + { + "userId": "user-8", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/document.pdf", + "result": { + "content": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + } + } + }, + { + "userId": "user-5", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/documents/file.txt", + "result": { + "content": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + } + } + }, + { + "userId": "user-0", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/home/balance.xlsx", + "result": { + "content": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + } + } + }, + { + "userId": "user-0", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/home/" + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + }, + "location": "home/documents/presentation.ppt" + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + }, + "location": "important/home/file.txt" + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + }, + "location": "home/file.txt" + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + }, + "location": "important/balance.xlsx" + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "document.pdf", + "home/presentation.ppt", + "home/file.txt" + ] + } + }, + { + "userId": "user-4", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/important/presentation.ppt", + "result": { + "content": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + } + } + }, + { + "userId": "user-1", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/balance.xlsx", + "result": { + "content": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + } + } + }, + { + "userId": "user-2", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/documents/balance.xlsx", + "result": { + "content": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + } + } + }, + { + "userId": "user-3", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/file.txt", + "result": { + "content": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + } + } + }, + { + "userId": "user-0", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/documents/" + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/file.txt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-1", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-1", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/home/file.txt", + "result": { + "content": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + } + } + }, + { + "userId": "user-7", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/important/" + }, + { + "userId": "user-7", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/home/file.txt", + "result": { + "content": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + } + } + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + }, + "location": "documents/documents/document.pdf" + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + }, + "location": "file.txt" + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "document.pdf", + "home/presentation.ppt", + "home/file.txt" + ] + } + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "documents/documents/document.pdf", + "home/document.pdf", + "important/home/file.txt" + ] + } + }, + { + "userId": "user-4", + "type": "READ", + "storageType": "PRIVATE", + "location": "document.pdf", + "result": { + "content": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + } + } + }, + { + "userId": "user-7", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/documents/" + }, + { + "userId": "user-1", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/home/" + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/important/file.txt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-0", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-0", + "type": "READ", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "content": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + } + } + }, + { + "userId": "user-2", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + }, + "location": "document.pdf" + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/", + "result": { + "dirContent": [ + "important/balance.xlsx", + "important/presentation.ppt" + ] + } + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "dirContent": [ + "balance.xlsx" + ] + } + }, + { + "userId": "user-7", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/home/" + }, + { + "userId": "user-3", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/" + }, + { + "userId": "user-6", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/home/" + }, + { + "userId": "user-2", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/documents/" + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "home/important/document.pdf" + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "balance.xlsx" + ] + } + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "documents/presentation.ppt", + "documents/document.pdf", + "presentation.ppt", + "home/important/document.pdf" + ] + } + }, + { + "userId": "user-9", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/presentation.ppt", + "result": { + "content": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + } + } + }, + { + "userId": "user-2", + "type": "READ", + "storageType": "PRIVATE", + "location": "document.pdf", + "result": { + "content": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + } + } + }, + { + "userId": "user-7", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/" + }, + { + "userId": "user-3", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/" + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "dirContent": [ + "balance.xlsx" + ] + } + }, + { + "userId": "user-1", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + }, + "location": "file.txt" + }, + { + "userId": "user-1", + "type": "READ", + "storageType": "PRIVATE", + "location": "file.txt", + "result": { + "content": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + } + } + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + }, + "location": "important/home/file.txt" + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + }, + "location": "home/home/document.pdf" + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + }, + "location": "documents/important/presentation.ppt" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-2", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + }, + "location": "file.txt" + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/balance.xlsx", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-5", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/documents/file.txt", + "result": { + "content": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + } + } + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "home/presentation.ppt" + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + }, + "location": "important/documents/file.txt" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-2", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + }, + "location": "home/home/presentation.ppt" + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "file.txt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-3", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "important/balance.xlsx" + }, + { + "userId": "user-3", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/balance.xlsx", + "result": { + "content": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + } + } + }, + { + "userId": "user-5", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/documents/" + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "document.pdf", + "result": { + "dirContent": [ + "document.pdf" + ] + } + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "file.txt" + ] + } + }, + { + "userId": "user-1", + "type": "READ", + "storageType": "PRIVATE", + "location": "file.txt", + "result": { + "content": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + } + } + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + }, + "location": "file.txt" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "file.txt" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + }, + "location": "document.pdf" + }, + { + "userId": "user-6", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + }, + "location": "important/balance.xlsx" + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + }, + "location": "important/document.pdf" + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/important/document.pdf", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "document.pdf", + "home/home/presentation.ppt", + "file.txt" + ] + } + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "file.txt", + "result": { + "dirContent": [ + "file.txt" + ] + } + }, + { + "userId": "user-2", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/home/" + }, + { + "userId": "user-2", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + }, + "location": "documents/file.txt" + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "documents/presentation.ppt" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + }, + "location": "documents/balance.xlsx" + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/home/presentation.ppt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/important/document.pdf", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-8", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/home/file.txt", + "result": { + "content": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + } + } + }, + { + "userId": "user-2", + "type": "READ", + "storageType": "PRIVATE", + "location": "document.pdf", + "result": { + "content": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + } + } + }, + { + "userId": "user-9", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-5", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + }, + "location": "file.txt" + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + }, + "location": "document.pdf" + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/", + "result": { + "dirContent": [ + "important/balance.xlsx" + ] + } + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/", + "result": { + "dirContent": [ + "important/balance.xlsx" + ] + } + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "document.pdf", + "documents/file.txt", + "file.txt" + ] + } + }, + { + "userId": "user-3", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/" + }, + { + "userId": "user-4", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-1", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/" + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + }, + "location": "home/file.txt" + }, + { + "userId": "user-6", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + }, + "location": "home/documents/file.txt" + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + }, + "location": "documents/documents/presentation.ppt" + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "file.txt", + "result": { + "dirContent": [ + "file.txt" + ] + } + }, + { + "userId": "user-6", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/documents/file.txt", + "result": { + "content": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + } + } + }, + { + "userId": "user-0", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/document.pdf", + "result": { + "content": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + } + } + }, + { + "userId": "user-8", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + }, + "location": "document.pdf" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + }, + "location": "document.pdf" + }, + { + "userId": "user-2", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-3", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "file.txt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "document.pdf", + "result": { + "dirContent": [ + "document.pdf" + ] + } + }, + { + "userId": "user-5", + "type": "READ", + "storageType": "PRIVATE", + "location": "document.pdf", + "result": { + "content": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + } + } + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "documents/home/presentation.ppt" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + }, + "location": "documents/balance.xlsx" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "home/important/document.pdf" + }, + { + "userId": "user-6", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + }, + "location": "documents/documents/balance.xlsx" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + }, + "location": "home/documents/balance.xlsx" + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/", + "result": { + "dirContent": [ + "important/document.pdf" + ] + } + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "document.pdf", + "home/important/document.pdf" + ] + } + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/balance.xlsx", + "result": { + "dirContent": [ + "important/balance.xlsx" + ] + } + }, + { + "userId": "user-9", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/file.txt", + "result": { + "content": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + } + } + }, + { + "userId": "user-9", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/home/" + }, + { + "userId": "user-5", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/important/" + }, + { + "userId": "user-6", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/documents/" + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/important/file.txt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-1", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/documents/balance.xlsx", + "result": { + "content": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + } + } + }, + { + "userId": "user-6", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/documents/" + }, + { + "userId": "user-6", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + }, + "location": "important/documents/file.txt" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + }, + "location": "important/documents/presentation.ppt" + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "important/documents/document.pdf" + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/", + "result": { + "dirContent": [ + "home/file.txt" + ] + } + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "documents/balance.xlsx" + ] + } + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/documents/file.txt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-4", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/balance.xlsx", + "result": { + "content": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + } + } + }, + { + "userId": "user-1", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/important/document.pdf", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/file.txt", + "result": { + "dirContent": [ + "home/file.txt" + ] + } + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/", + "result": { + "dirContent": [ + "important/documents/presentation.ppt" + ] + } + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "documents/presentation.ppt", + "documents/documents/presentation.ppt", + "important/documents/document.pdf", + "balance.xlsx", + "important/document.pdf" + ] + } + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "home/presentation.ppt" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + }, + "location": "home/important/file.txt" + }, + { + "userId": "user-2", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "home/balance.xlsx" + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/document.pdf", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "home/balance.xlsx" + ] + } + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/presentation.ppt", + "result": { + "dirContent": [ + "home/presentation.ppt" + ] + } + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "document.pdf", + "important/documents/presentation.ppt", + "balance.xlsx" + ] + } + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/presentation.ppt", + "result": { + "dirContent": [ + "documents/presentation.ppt" + ] + } + }, + { + "userId": "user-0", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/important/file.txt", + "result": { + "content": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + } + } + }, + { + "userId": "user-4", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/balance.xlsx", + "result": { + "content": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + } + } + }, + { + "userId": "user-2", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/balance.xlsx", + "result": { + "content": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + } + } + }, + { + "userId": "user-6", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/" + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + }, + "location": "file.txt" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + }, + "location": "document.pdf" + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "home/file.txt" + ] + } + }, + { + "userId": "user-9", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/file.txt", + "result": { + "content": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + } + } + }, + { + "userId": "user-5", + "type": "READ", + "storageType": "PRIVATE", + "location": "document.pdf", + "result": { + "content": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + } + } + }, + { + "userId": "user-0", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/important/" + }, + { + "userId": "user-2", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/" + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + }, + "location": "home/documents/file.txt" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + }, + "location": "home/file.txt" + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/", + "result": { + "dirContent": [ + "home/file.txt" + ] + } + }, + { + "userId": "user-9", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/file.txt", + "result": { + "content": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + } + } + }, + { + "userId": "user-8", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/documents/file.txt", + "result": { + "content": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + } + } + }, + { + "userId": "user-5", + "type": "READ", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "content": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + } + } + }, + { + "userId": "user-3", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + }, + "location": "home/documents/presentation.ppt" + }, + { + "userId": "user-3", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/documents/presentation.ppt", + "result": { + "content": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + } + } + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + }, + "location": "document.pdf" + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/important/presentation.ppt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/home/balance.xlsx", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-4", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/presentation.ppt", + "result": { + "content": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + } + } + }, + { + "userId": "user-0", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/" + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/documents/", + "result": { + "dirContent": [ + "documents/documents/presentation.ppt" + ] + } + }, + { + "userId": "user-0", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/presentation.ppt", + "result": { + "content": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + } + } + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + }, + "location": "home/presentation.ppt" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + }, + "location": "file.txt" + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/file.txt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/documents/file.txt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/file.txt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-8", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/documents/file.txt", + "result": { + "content": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + } + } + }, + { + "userId": "user-3", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/documents/presentation.ppt", + "result": { + "content": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + } + } + }, + { + "userId": "user-0", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/" + }, + { + "userId": "user-9", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/" + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "important/document.pdf" + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + }, + "location": "home/presentation.ppt" + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "important/documents/balance.xlsx" + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-4", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/balance.xlsx", + "result": { + "content": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + } + } + }, + { + "userId": "user-9", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/documents/balance.xlsx", + "result": { + "content": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + } + } + }, + { + "userId": "user-4", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-5", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + }, + "location": "home/presentation.ppt" + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + }, + "location": "important/presentation.ppt" + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "home/file.txt" + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "dirContent": [ + "presentation.ppt" + ] + } + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/documents/", + "result": { + "dirContent": [ + "important/documents/balance.xlsx" + ] + } + }, + { + "userId": "user-3", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/documents/presentation.ppt", + "result": { + "content": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + } + } + }, + { + "userId": "user-7", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + }, + "location": "important/home/document.pdf" + }, + { + "userId": "user-7", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/home/" + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "home/file.txt" + }, + { + "userId": "user-7", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/file.txt", + "result": { + "content": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + } + } + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "documents/documents/presentation.ppt" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + }, + "location": "important/important/file.txt" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + }, + "location": "documents/balance.xlsx" + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "important/presentation.ppt", + "important/documents/balance.xlsx" + ] + } + }, + { + "userId": "user-7", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/file.txt", + "result": { + "content": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + } + } + }, + { + "userId": "user-8", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/documents/file.txt", + "result": { + "content": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + } + } + }, + { + "userId": "user-5", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/balance.xlsx", + "result": { + "content": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + } + } + }, + { + "userId": "user-9", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/documents/" + }, + { + "userId": "user-4", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/important/" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + }, + "location": "documents/documents/presentation.ppt" + }, + { + "userId": "user-4", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/documents/presentation.ppt", + "result": { + "content": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + } + } + }, + { + "userId": "user-4", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/documents/" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + }, + "location": "important/document.pdf" + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/document.pdf", + "result": { + "dirContent": [ + "important/document.pdf" + ] + } + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + }, + "location": "file.txt" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + }, + "location": "documents/presentation.ppt" + }, + { + "userId": "user-6", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + }, + "location": "documents/file.txt" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + }, + "location": "important/documents/file.txt" + }, + { + "userId": "user-2", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + }, + "location": "documents/document.pdf" + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "home/file.txt", + "documents/documents/presentation.ppt" + ] + } + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "document.pdf", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "documents/document.pdf" + ] + } + }, + { + "userId": "user-7", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/file.txt", + "result": { + "content": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + } + } + }, + { + "userId": "user-9", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/presentation.ppt", + "result": { + "content": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + } + } + }, + { + "userId": "user-6", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/file.txt", + "result": { + "content": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + } + } + }, + { + "userId": "user-1", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/documents/file.txt", + "result": { + "content": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + } + } + }, + { + "userId": "user-7", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/documents/" + }, + { + "userId": "user-7", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/file.txt", + "result": { + "content": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + } + } + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + }, + "location": "important/balance.xlsx" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + }, + "location": "document.pdf" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + }, + "location": "documents/file.txt" + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "dirContent": [ + "balance.xlsx" + ] + } + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "document.pdf", + "file.txt", + "important/document.pdf" + ] + } + }, + { + "userId": "user-6", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/file.txt", + "result": { + "content": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + } + } + }, + { + "userId": "user-0", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/file.txt", + "result": { + "content": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + } + } + }, + { + "userId": "user-7", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/" + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "important/important/presentation.ppt" + }, + { + "userId": "user-7", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/balance.xlsx", + "result": { + "content": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + } + } + }, + { + "userId": "user-8", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/" + }, + { + "userId": "user-3", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/documents/" + }, + { + "userId": "user-1", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/documents/" + }, + { + "userId": "user-4", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-7", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/important/" + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + }, + "location": "documents/home/file.txt" + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-7", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/balance.xlsx", + "result": { + "content": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + } + } + }, + { + "userId": "user-5", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/presentation.ppt", + "result": { + "content": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + } + } + }, + { + "userId": "user-0", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/" + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/balance.xlsx", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-0", + "type": "READ", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "content": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + } + } + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + }, + "location": "important/file.txt" + }, + { + "userId": "user-6", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + }, + "location": "documents/home/document.pdf" + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/presentation.ppt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-6", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/home/document.pdf", + "result": { + "content": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + } + } + }, + { + "userId": "user-2", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/" + }, + { + "userId": "user-2", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "documents/presentation.ppt" + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-2", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + }, + "location": "document.pdf" + }, + { + "userId": "user-9", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/home/file.txt", + "result": { + "content": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + } + } + }, + { + "userId": "user-5", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/file.txt", + "result": { + "content": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + } + } + }, + { + "userId": "user-7", + "type": "READ", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "content": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + } + } + }, + { + "userId": "user-9", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/" + }, + { + "userId": "user-9", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/home/file.txt", + "result": { + "content": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + } + } + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "documents/presentation.ppt" + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + }, + "location": "documents/file.txt" + }, + { + "userId": "user-2", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + }, + "location": "home/balance.xlsx" + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/balance.xlsx", + "result": { + "dirContent": [ + "documents/balance.xlsx" + ] + } + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "documents/file.txt", + "documents/home/document.pdf" + ] + } + }, + { + "userId": "user-7", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + }, + "location": "important/documents/presentation.ppt" + }, + { + "userId": "user-2", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "important/balance.xlsx" + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/presentation.ppt", + "result": { + "dirContent": [ + "documents/presentation.ppt" + ] + } + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-7", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/documents/presentation.ppt", + "result": { + "content": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + } + } + }, + { + "userId": "user-5", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + }, + "location": "home/documents/balance.xlsx" + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/", + "result": { + "dirContent": [ + "home/documents/balance.xlsx" + ] + } + }, + { + "userId": "user-5", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/documents/balance.xlsx", + "result": { + "content": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + } + } + }, + { + "userId": "user-2", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "documents/home/file.txt" + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "home/balance.xlsx" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + }, + "location": "document.pdf" + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/", + "result": { + "dirContent": [ + "important/documents/presentation.ppt" + ] + } + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/", + "result": { + "dirContent": [ + "documents/file.txt", + "documents/home/document.pdf" + ] + } + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "document.pdf" + ] + } + }, + { + "userId": "user-9", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/home/file.txt", + "result": { + "content": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + } + } + }, + { + "userId": "user-9", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/home/" + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-3", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/home/" + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-2", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "file.txt" + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "documents/file.txt", + "presentation.ppt", + "home/balance.xlsx", + "balance.xlsx" + ] + } + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "file.txt", + "result": { + "dirContent": [ + "file.txt" + ] + } + }, + { + "userId": "user-5", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/documents/balance.xlsx", + "result": { + "content": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + } + } + }, + { + "userId": "user-5", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/documents/" + }, + { + "userId": "user-0", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/" + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + }, + "location": "home/presentation.ppt" + }, + { + "userId": "user-1", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-2", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-2", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + }, + "location": "document.pdf" + }, + { + "userId": "user-0", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + }, + "location": "important/document.pdf" + }, + { + "userId": "user-0", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/document.pdf", + "result": { + "content": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + } + } + }, + { + "userId": "user-0", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + }, + "location": "documents/balance.xlsx" + }, + { + "userId": "user-6", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + }, + "location": "file.txt" + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + }, + "location": "home/file.txt" + }, + { + "userId": "user-2", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + }, + "location": "home/document.pdf" + }, + { + "userId": "user-7", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/documents/presentation.ppt", + "result": { + "content": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + } + } + }, + { + "userId": "user-8", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/presentation.ppt", + "result": { + "content": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + } + } + }, + { + "userId": "user-6", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/file.txt", + "result": { + "content": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + } + } + }, + { + "userId": "user-0", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/" + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + }, + "location": "important/presentation.ppt" + }, + { + "userId": "user-6", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + }, + "location": "documents/balance.xlsx" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + }, + "location": "file.txt" + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "important/documents/presentation.ppt" + ] + } + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "file.txt", + "result": { + "dirContent": [ + "file.txt" + ] + } + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/documents/document.pdf", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-5", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/balance.xlsx", + "result": { + "content": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + } + } + }, + { + "userId": "user-2", + "type": "READ", + "storageType": "PRIVATE", + "location": "document.pdf", + "result": { + "content": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + } + } + }, + { + "userId": "user-7", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/documents/" + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-5", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/" + }, + { + "userId": "user-2", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/important/file.txt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/", + "result": { + "dirContent": [ + "documents/presentation.ppt" + ] + } + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "documents/file.txt", + "documents/balance.xlsx", + "file.txt", + "documents/home/document.pdf" + ] + } + }, + { + "userId": "user-6", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/home/" + }, + { + "userId": "user-3", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "important/important/file.txt" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + }, + "location": "important/important/document.pdf" + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/", + "result": { + "dirContent": [ + "important/presentation.ppt" + ] + } + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-9", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/" + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + }, + "location": "home/document.pdf" + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "home/document.pdf" + ] + } + }, + { + "userId": "user-9", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/document.pdf", + "result": { + "content": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + } + } + }, + { + "userId": "user-9", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/" + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + }, + "location": "home/home/balance.xlsx" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + }, + "location": "home/document.pdf" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + }, + "location": "documents/home/file.txt" + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-3", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/important/" + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + }, + "location": "document.pdf" + }, + { + "userId": "user-6", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/" + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "file.txt", + "result": { + "dirContent": [ + "file.txt" + ] + } + }, + { + "userId": "user-5", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/" + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + }, + "location": "file.txt" + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + }, + "location": "important/important/balance.xlsx" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + }, + "location": "documents/home/presentation.ppt" + }, + { + "userId": "user-6", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + }, + "location": "important/balance.xlsx" + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + }, + "location": "documents/important/balance.xlsx" + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/home/file.txt", + "result": { + "dirContent": [ + "documents/home/file.txt" + ] + } + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/important/", + "result": { + "dirContent": [ + "important/important/balance.xlsx" + ] + } + }, + { + "userId": "user-7", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + }, + "location": "home/document.pdf" + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/", + "result": { + "dirContent": [ + "home/document.pdf" + ] + } + }, + { + "userId": "user-8", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/home/" + }, + { + "userId": "user-8", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/important/balance.xlsx", + "result": { + "content": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + } + } + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "important/documents/document.pdf" + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + }, + "location": "important/presentation.ppt" + }, + { + "userId": "user-6", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-7", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/documents/" + }, + { + "userId": "user-8", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/important/" + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/presentation.ppt", + "result": { + "dirContent": [ + "documents/presentation.ppt" + ] + } + }, + { + "userId": "user-1", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-3", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-6", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "file.txt" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + }, + "location": "home/balance.xlsx" + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "home/balance.xlsx" + ] + } + }, + { + "userId": "user-5", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/home/" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + }, + "location": "documents/balance.xlsx" + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + }, + "location": "home/document.pdf" + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "important/presentation.ppt" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + }, + "location": "document.pdf" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + }, + "location": "important/important/balance.xlsx" + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/balance.xlsx", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "important/balance.xlsx", + "presentation.ppt", + "file.txt", + "balance.xlsx" + ] + } + }, + { + "userId": "user-8", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/presentation.ppt", + "result": { + "content": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + } + } + }, + { + "userId": "user-0", + "type": "READ", + "storageType": "PRIVATE", + "location": "file.txt", + "result": { + "content": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + } + } + }, + { + "userId": "user-9", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/presentation.ppt", + "result": { + "content": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + } + } + }, + { + "userId": "user-5", + "type": "READ", + "storageType": "PRIVATE", + "location": "document.pdf", + "result": { + "content": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + } + } + }, + { + "userId": "user-6", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/" + }, + { + "userId": "user-7", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/" + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + }, + "location": "home/home/file.txt" + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "file.txt", + "result": { + "dirContent": [ + "file.txt" + ] + } + }, + { + "userId": "user-9", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/presentation.ppt", + "result": { + "content": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + } + } + }, + { + "userId": "user-5", + "type": "READ", + "storageType": "PRIVATE", + "location": "document.pdf", + "result": { + "content": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + } + } + }, + { + "userId": "user-6", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-6", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + }, + "location": "home/file.txt" + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/balance.xlsx", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-1", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/important/" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/home/presentation.ppt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-1", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "file.txt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + }, + "location": "documents/document.pdf" + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-8", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/presentation.ppt", + "result": { + "content": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + } + } + }, + { + "userId": "user-9", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/presentation.ppt", + "result": { + "content": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + } + } + }, + { + "userId": "user-4", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/document.pdf", + "result": { + "content": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + } + } + }, + { + "userId": "user-9", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/" + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-6", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/" + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + }, + "location": "documents/balance.xlsx" + }, + { + "userId": "user-6", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-4", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/document.pdf", + "result": { + "content": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + } + } + }, + { + "userId": "user-8", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/balance.xlsx", + "result": { + "content": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + } + } + }, + { + "userId": "user-4", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/" + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-0", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + }, + "location": "documents/home/file.txt" + }, + { + "userId": "user-0", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/home/file.txt", + "result": { + "content": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + } + } + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + }, + "location": "important/presentation.ppt" + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/home/document.pdf", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/documents/presentation.ppt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/balance.xlsx", + "result": { + "dirContent": [ + "documents/balance.xlsx" + ] + } + }, + { + "userId": "user-0", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/home/file.txt", + "result": { + "content": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + } + } + }, + { + "userId": "user-6", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + }, + "location": "documents/home/presentation.ppt" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + }, + "location": "document.pdf" + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "document.pdf", + "result": { + "dirContent": [ + "document.pdf" + ] + } + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/home/presentation.ppt", + "result": { + "dirContent": [ + "documents/home/presentation.ppt" + ] + } + }, + { + "userId": "user-8", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/presentation.ppt", + "result": { + "content": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + } + } + }, + { + "userId": "user-0", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/home/file.txt", + "result": { + "content": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + } + } + }, + { + "userId": "user-3", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/home/" + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-3", + "type": "READ", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "content": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + } + } + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + }, + "location": "document.pdf" + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + }, + "location": "important/presentation.ppt" + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + }, + "location": "important/important/document.pdf" + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/presentation.ppt", + "result": { + "dirContent": [ + "documents/presentation.ppt" + ] + } + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-8", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/presentation.ppt", + "result": { + "content": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + } + } + }, + { + "userId": "user-5", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/balance.xlsx", + "result": { + "content": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + } + } + }, + { + "userId": "user-8", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/" + }, + { + "userId": "user-5", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-1", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-9", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/" + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + }, + "location": "documents/documents/balance.xlsx" + }, + { + "userId": "user-9", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/documents/" + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + }, + "location": "document.pdf" + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/presentation.ppt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/file.txt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-3", + "type": "READ", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "content": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + } + } + }, + { + "userId": "user-5", + "type": "READ", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "content": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + } + } + }, + { + "userId": "user-0", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/home/" + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + }, + "location": "document.pdf" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + }, + "location": "home/documents/file.txt" + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "file.txt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "document.pdf" + ] + } + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "home/documents/file.txt" + ] + } + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "document.pdf", + "result": { + "dirContent": [ + "document.pdf" + ] + } + }, + { + "userId": "user-0", + "type": "READ", + "storageType": "PRIVATE", + "location": "document.pdf", + "result": { + "content": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + } + } + }, + { + "userId": "user-1", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/documents/file.txt", + "result": { + "content": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + } + } + }, + { + "userId": "user-5", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + }, + "location": "important/file.txt" + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/important/balance.xlsx", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/important/file.txt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "document.pdf", + "result": { + "dirContent": [ + "document.pdf" + ] + } + }, + { + "userId": "user-7", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-3", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/important/" + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "file.txt" + }, + { + "userId": "user-3", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-0", + "type": "READ", + "storageType": "PRIVATE", + "location": "document.pdf", + "result": { + "content": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + } + } + }, + { + "userId": "user-1", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/documents/" + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-2", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "documents/balance.xlsx" + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "document.pdf", + "result": { + "dirContent": [ + "document.pdf" + ] + } + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "document.pdf", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-8", + "type": "READ", + "storageType": "PRIVATE", + "location": "document.pdf", + "result": { + "content": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + } + } + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + }, + "location": "documents/home/document.pdf" + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "important/home/document.pdf" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + }, + "location": "home/home/file.txt" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + }, + "location": "home/balance.xlsx" + }, + { + "userId": "user-2", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-8", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/file.txt", + "result": { + "content": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + } + } + }, + { + "userId": "user-8", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-1", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/" + }, + { + "userId": "user-2", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "home/presentation.ppt" + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "dirContent": [ + "balance.xlsx" + ] + } + }, + { + "userId": "user-0", + "type": "READ", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "content": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + } + } + }, + { + "userId": "user-6", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + }, + "location": "document.pdf" + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + }, + "location": "file.txt" + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/home/file.txt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-4", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/home/" + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "presentation.ppt" + ] + } + }, + { + "userId": "user-0", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + }, + "location": "important/home/balance.xlsx" + }, + { + "userId": "user-0", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/home/" + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "important/important/document.pdf" + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + }, + "location": "documents/presentation.ppt" + }, + { + "userId": "user-6", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/", + "result": { + "dirContent": [ + "important/home/document.pdf" + ] + } + }, + { + "userId": "user-7", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/presentation.ppt", + "result": { + "content": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + } + } + }, + { + "userId": "user-3", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/home/document.pdf", + "result": { + "content": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + } + } + }, + { + "userId": "user-9", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/presentation.ppt", + "result": { + "content": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + } + } + }, + { + "userId": "user-7", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/" + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + }, + "location": "home/document.pdf" + }, + { + "userId": "user-6", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "documents/documents/file.txt" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + }, + "location": "documents/documents/document.pdf" + }, + { + "userId": "user-3", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/home/document.pdf", + "result": { + "content": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + } + } + }, + { + "userId": "user-4", + "type": "READ", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "content": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + } + } + }, + { + "userId": "user-7", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/" + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + }, + "location": "home/home/file.txt" + }, + { + "userId": "user-7", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/home/file.txt", + "result": { + "content": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + } + } + }, + { + "userId": "user-1", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/documents/" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + }, + "location": "file.txt" + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "file.txt", + "result": { + "dirContent": [ + "file.txt" + ] + } + }, + { + "userId": "user-1", + "type": "READ", + "storageType": "PRIVATE", + "location": "file.txt", + "result": { + "content": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + } + } + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + }, + "location": "documents/documents/presentation.ppt" + }, + { + "userId": "user-2", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + }, + "location": "file.txt" + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/home/file.txt", + "result": { + "dirContent": [ + "home/home/file.txt" + ] + } + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "file.txt" + ] + } + }, + { + "userId": "user-9", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/presentation.ppt", + "result": { + "content": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + } + } + }, + { + "userId": "user-2", + "type": "READ", + "storageType": "PRIVATE", + "location": "file.txt", + "result": { + "content": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + } + } + }, + { + "userId": "user-9", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/" + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-0", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/important/" + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/documents/file.txt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-1", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + }, + "location": "documents/balance.xlsx" + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/balance.xlsx", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-9", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + }, + "location": "home/important/document.pdf" + }, + { + "userId": "user-6", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + }, + "location": "documents/home/balance.xlsx" + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/file.txt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "documents/balance.xlsx" + ] + } + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/home/document.pdf", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/", + "result": { + "dirContent": [ + "documents/home/balance.xlsx" + ] + } + }, + { + "userId": "user-4", + "type": "READ", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "content": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + } + } + }, + { + "userId": "user-1", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/" + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + }, + "location": "home/presentation.ppt" + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/presentation.ppt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/documents/balance.xlsx", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-7", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/important/document.pdf", + "result": { + "content": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + } + } + }, + { + "userId": "user-4", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/documents/file.txt", + "result": { + "content": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + } + } + }, + { + "userId": "user-2", + "type": "READ", + "storageType": "PRIVATE", + "location": "file.txt", + "result": { + "content": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + } + } + }, + { + "userId": "user-6", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/home/" + }, + { + "userId": "user-2", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-2", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + }, + "location": "important/documents/file.txt" + }, + { + "userId": "user-2", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/documents/file.txt", + "result": { + "content": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + } + } + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "document.pdf" + }, + { + "userId": "user-2", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "document.pdf" + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "important/home/document.pdf" + ] + } + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "presentation.ppt", + "documents/documents/file.txt", + "balance.xlsx" + ] + } + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/presentation.ppt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-2", + "type": "READ", + "storageType": "PRIVATE", + "location": "document.pdf", + "result": { + "content": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + } + } + }, + { + "userId": "user-2", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + }, + "location": "home/balance.xlsx" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + }, + "location": "file.txt" + }, + { + "userId": "user-2", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "documents/balance.xlsx" + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/home/document.pdf", + "result": { + "dirContent": [ + "important/home/document.pdf" + ] + } + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/documents/presentation.ppt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/document.pdf", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/", + "result": { + "dirContent": [ + "documents/balance.xlsx" + ] + } + }, + { + "userId": "user-3", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/home/" + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/documents/balance.xlsx", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-5", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "home/documents/presentation.ppt" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + }, + "location": "important/balance.xlsx" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + }, + "location": "important/file.txt" + }, + { + "userId": "user-2", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-9", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/documents/" + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "important/file.txt" + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + }, + "location": "important/important/document.pdf" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "documents/file.txt" + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/file.txt", + "result": { + "dirContent": [ + "important/file.txt" + ] + } + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/presentation.ppt", + "result": { + "dirContent": [ + "home/presentation.ppt" + ] + } + }, + { + "userId": "user-8", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/" + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-9", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/important/" + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-9", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/presentation.ppt", + "result": { + "content": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + } + } + }, + { + "userId": "user-1", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/" + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + }, + "location": "documents/documents/file.txt" + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + }, + "location": "documents/file.txt" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + }, + "location": "home/important/presentation.ppt" + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + }, + "location": "home/file.txt" + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-7", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/home/" + }, + { + "userId": "user-7", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/documents/file.txt", + "result": { + "content": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + } + } + }, + { + "userId": "user-9", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/" + }, + { + "userId": "user-2", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/" + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "document.pdf", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-2", + "type": "READ", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "content": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + } + } + }, + { + "userId": "user-0", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/" + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "home/home/presentation.ppt" + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + }, + "location": "file.txt" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + }, + "location": "important/important/balance.xlsx" + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "presentation.ppt" + ] + } + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/document.pdf", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-7", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/home/presentation.ppt", + "result": { + "content": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + } + } + }, + { + "userId": "user-1", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + }, + "location": "file.txt" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "file.txt" + }, + { + "userId": "user-2", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "file.txt" + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "dirContent": [ + "presentation.ppt" + ] + } + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/balance.xlsx", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-9", + "type": "READ", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "content": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + } + } + }, + { + "userId": "user-5", + "type": "READ", + "storageType": "PRIVATE", + "location": "file.txt", + "result": { + "content": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + } + } + }, + { + "userId": "user-1", + "type": "READ", + "storageType": "PRIVATE", + "location": "file.txt", + "result": { + "content": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + } + } + }, + { + "userId": "user-7", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/" + }, + { + "userId": "user-9", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-5", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/important/" + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "file.txt" + ] + } + }, + { + "userId": "user-1", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + }, + "location": "home/home/file.txt" + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + }, + "location": "documents/file.txt" + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "file.txt" + }, + { + "userId": "user-6", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "dirContent": [ + "presentation.ppt" + ] + } + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "file.txt", + "result": { + "dirContent": [ + "file.txt" + ] + } + }, + { + "userId": "user-7", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/documents/file.txt", + "result": { + "content": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + } + } + }, + { + "userId": "user-4", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/balance.xlsx", + "result": { + "content": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + } + } + }, + { + "userId": "user-9", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/file.txt", + "result": { + "content": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + } + } + }, + { + "userId": "user-0", + "type": "READ", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "content": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + } + } + }, + { + "userId": "user-8", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/" + }, + { + "userId": "user-8", + "type": "READ", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "content": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + } + } + }, + { + "userId": "user-4", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-2", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-9", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/" + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + }, + "location": "important/document.pdf" + }, + { + "userId": "user-6", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + }, + "location": "documents/home/balance.xlsx" + }, + { + "userId": "user-2", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + }, + "location": "important/home/file.txt" + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/home/file.txt", + "result": { + "dirContent": [ + "home/home/file.txt" + ] + } + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-7", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/documents/presentation.ppt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-5", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-0", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-6", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + }, + "location": "file.txt" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + }, + "location": "home/important/balance.xlsx" + }, + { + "userId": "user-7", + "type": "READ", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "content": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + } + } + }, + { + "userId": "user-9", + "type": "READ", + "storageType": "PRIVATE", + "location": "file.txt", + "result": { + "content": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + } + } + }, + { + "userId": "user-5", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/important/balance.xlsx", + "result": { + "content": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + } + } + }, + { + "userId": "user-2", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/home/" + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + }, + "location": "document.pdf" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + }, + "location": "important/file.txt" + }, + { + "userId": "user-1", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/file.txt", + "result": { + "content": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + } + } + }, + { + "userId": "user-5", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/important/" + }, + { + "userId": "user-1", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/" + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + }, + "location": "important/presentation.ppt" + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "document.pdf", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "document.pdf", + "presentation.ppt", + "file.txt", + "important/document.pdf" + ] + } + }, + { + "userId": "user-8", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + }, + "location": "documents/documents/balance.xlsx" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + }, + "location": "documents/home/document.pdf" + }, + { + "userId": "user-6", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "documents/file.txt" + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "document.pdf", + "result": { + "dirContent": [ + "document.pdf" + ] + } + }, + { + "userId": "user-7", + "type": "READ", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "content": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + } + } + }, + { + "userId": "user-4", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/documents/balance.xlsx", + "result": { + "content": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + } + } + }, + { + "userId": "user-1", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + }, + "location": "important/home/balance.xlsx" + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/", + "result": { + "dirContent": [ + "important/document.pdf" + ] + } + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "documents/documents/balance.xlsx" + ] + } + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "documents/file.txt" + ] + } + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-3", + "type": "READ", + "storageType": "PRIVATE", + "location": "file.txt", + "result": { + "content": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + } + } + }, + { + "userId": "user-6", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/file.txt", + "result": { + "content": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + } + } + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/balance.xlsx", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/", + "result": { + "dirContent": [ + "documents/file.txt" + ] + } + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/file.txt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-9", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "documents/home/document.pdf" + ] + } + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/home/", + "result": { + "dirContent": [ + "important/home/balance.xlsx" + ] + } + }, + { + "userId": "user-4", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/documents/balance.xlsx", + "result": { + "content": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + } + } + }, + { + "userId": "user-1", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/home/balance.xlsx", + "result": { + "content": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + } + } + }, + { + "userId": "user-5", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/home/" + }, + { + "userId": "user-6", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/" + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "file.txt" + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/home/presentation.ppt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/documents/", + "result": { + "dirContent": [ + "documents/documents/balance.xlsx" + ] + } + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/home/balance.xlsx", + "result": { + "dirContent": [ + "important/home/balance.xlsx" + ] + } + }, + { + "userId": "user-3", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/document.pdf", + "result": { + "content": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + } + } + }, + { + "userId": "user-1", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/home/" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + }, + "location": "important/important/presentation.ppt" + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "file.txt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-1", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/important/presentation.ppt", + "result": { + "content": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + } + } + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "home/documents/presentation.ppt" + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + }, + "location": "documents/home/presentation.ppt" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + }, + "location": "file.txt" + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + }, + "location": "documents/important/balance.xlsx" + }, + { + "userId": "user-2", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + }, + "location": "home/document.pdf" + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "document.pdf", + "presentation.ppt", + "file.txt", + "important/document.pdf" + ] + } + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/", + "result": { + "dirContent": [ + "documents/documents/balance.xlsx" + ] + } + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-3", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/document.pdf", + "result": { + "content": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + } + } + }, + { + "userId": "user-5", + "type": "READ", + "storageType": "PRIVATE", + "location": "file.txt", + "result": { + "content": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + } + } + }, + { + "userId": "user-0", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/important/balance.xlsx", + "result": { + "content": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + } + } + }, + { + "userId": "user-4", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/documents/" + }, + { + "userId": "user-8", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/documents/" + }, + { + "userId": "user-8", + "type": "READ", + "storageType": "PRIVATE", + "location": "file.txt", + "result": { + "content": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + } + } + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "document.pdf" + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/home/presentation.ppt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-3", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/" + }, + { + "userId": "user-0", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/important/" + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-7", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "document.pdf" + }, + { + "userId": "user-8", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + }, + "location": "file.txt" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + }, + "location": "documents/home/document.pdf" + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "file.txt" + ] + } + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "balance.xlsx" + ] + } + }, + { + "userId": "user-3", + "type": "READ", + "storageType": "PRIVATE", + "location": "document.pdf", + "result": { + "content": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + } + } + }, + { + "userId": "user-5", + "type": "READ", + "storageType": "PRIVATE", + "location": "file.txt", + "result": { + "content": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + } + } + }, + { + "userId": "user-0", + "type": "READ", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "content": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + } + } + }, + { + "userId": "user-9", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/home/presentation.ppt", + "result": { + "content": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + } + } + }, + { + "userId": "user-0", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-9", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + }, + "location": "documents/file.txt" + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "document.pdf" + ] + } + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "file.txt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-7", + "type": "READ", + "storageType": "PRIVATE", + "location": "document.pdf", + "result": { + "content": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + } + } + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + }, + "location": "home/documents/balance.xlsx" + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "document.pdf" + ] + } + }, + { + "userId": "user-2", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/document.pdf", + "result": { + "content": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + } + } + }, + { + "userId": "user-8", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/" + }, + { + "userId": "user-1", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/home/" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "important/file.txt" + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "presentation.ppt" + ] + } + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/important/file.txt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/important/presentation.ppt", + "result": { + "dirContent": [ + "important/important/presentation.ppt" + ] + } + }, + { + "userId": "user-0", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/documents/balance.xlsx", + "result": { + "content": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + } + } + }, + { + "userId": "user-5", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + }, + "location": "important/documents/document.pdf" + }, + { + "userId": "user-5", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/documents/" + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + }, + "location": "important/file.txt" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + }, + "location": "home/file.txt" + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "document.pdf", + "presentation.ppt", + "file.txt" + ] + } + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "home/document.pdf" + ] + } + }, + { + "userId": "user-3", + "type": "READ", + "storageType": "PRIVATE", + "location": "document.pdf", + "result": { + "content": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + } + } + }, + { + "userId": "user-8", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/file.txt", + "result": { + "content": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + } + } + }, + { + "userId": "user-1", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/file.txt", + "result": { + "content": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + } + } + }, + { + "userId": "user-3", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-2", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/" + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + }, + "location": "documents/presentation.ppt" + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + }, + "location": "important/balance.xlsx" + }, + { + "userId": "user-2", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + }, + "location": "important/home/document.pdf" + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "document.pdf", + "documents/presentation.ppt" + ] + } + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "presentation.ppt" + ] + } + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/home/document.pdf", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "important/balance.xlsx" + ] + } + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/home/", + "result": { + "dirContent": [ + "important/home/document.pdf" + ] + } + }, + { + "userId": "user-3", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/balance.xlsx", + "result": { + "content": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + } + } + }, + { + "userId": "user-9", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-1", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/" + }, + { + "userId": "user-3", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/" + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/balance.xlsx", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-2", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/home/" + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + }, + "location": "document.pdf" + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-8", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/file.txt", + "result": { + "content": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + } + } + }, + { + "userId": "user-0", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/documents/" + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + }, + "location": "file.txt" + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "file.txt" + ] + } + }, + { + "userId": "user-0", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "document.pdf" + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + }, + "location": "home/documents/balance.xlsx" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "file.txt" + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/document.pdf", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "file.txt", + "important/important/presentation.ppt" + ] + } + }, + { + "userId": "user-8", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/file.txt", + "result": { + "content": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + } + } + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + }, + "location": "documents/document.pdf" + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + }, + "location": "important/home/file.txt" + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + }, + "location": "important/file.txt" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-2", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "home/home/file.txt" + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "document.pdf", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "document.pdf", + "documents/presentation.ppt", + "documents/document.pdf" + ] + } + }, + { + "userId": "user-0", + "type": "READ", + "storageType": "PRIVATE", + "location": "document.pdf", + "result": { + "content": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + } + } + }, + { + "userId": "user-8", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/documents/balance.xlsx", + "result": { + "content": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + } + } + }, + { + "userId": "user-7", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-3", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/" + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + }, + "location": "file.txt" + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "documents/documents/file.txt" + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "file.txt" + ] + } + }, + { + "userId": "user-0", + "type": "READ", + "storageType": "PRIVATE", + "location": "document.pdf", + "result": { + "content": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + } + } + }, + { + "userId": "user-2", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/home/" + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + }, + "location": "home/important/document.pdf" + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "file.txt" + ] + } + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "document.pdf", + "documents/documents/file.txt" + ] + } + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "file.txt", + "important/important/presentation.ppt" + ] + } + }, + { + "userId": "user-8", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/documents/balance.xlsx", + "result": { + "content": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + } + } + }, + { + "userId": "user-9", + "type": "READ", + "storageType": "PRIVATE", + "location": "file.txt", + "result": { + "content": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + } + } + }, + { + "userId": "user-9", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + }, + "location": "file.txt" + }, + { + "userId": "user-9", + "type": "READ", + "storageType": "PRIVATE", + "location": "file.txt", + "result": { + "content": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + } + } + }, + { + "userId": "user-1", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/important/" + }, + { + "userId": "user-9", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + }, + "location": "documents/presentation.ppt" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + }, + "location": "home/document.pdf" + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/home/presentation.ppt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/presentation.ppt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/documents/", + "result": { + "dirContent": [ + "documents/documents/file.txt" + ] + } + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/documents/balance.xlsx", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/", + "result": { + "dirContent": [ + "documents/presentation.ppt" + ] + } + }, + { + "userId": "user-8", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/file.txt", + "result": { + "content": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + } + } + }, + { + "userId": "user-1", + "type": "READ", + "storageType": "PRIVATE", + "location": "file.txt", + "result": { + "content": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + } + } + }, + { + "userId": "user-7", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/presentation.ppt", + "result": { + "content": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + } + } + }, + { + "userId": "user-4", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/document.pdf", + "result": { + "content": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + } + } + }, + { + "userId": "user-4", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "documents/important/presentation.ppt" + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/important/", + "result": { + "dirContent": [ + "documents/important/presentation.ppt" + ] + } + }, + { + "userId": "user-4", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/important/presentation.ppt", + "result": { + "content": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + } + } + }, + { + "userId": "user-4", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/important/" + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + }, + "location": "documents/balance.xlsx" + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + }, + "location": "home/documents/document.pdf" + }, + { + "userId": "user-2", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/", + "result": { + "dirContent": [ + "important/file.txt", + "important/home/file.txt" + ] + } + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/important/", + "result": { + "dirContent": [ + "home/important/document.pdf" + ] + } + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/document.pdf", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-7", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/presentation.ppt", + "result": { + "content": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + } + } + }, + { + "userId": "user-8", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/home/" + }, + { + "userId": "user-2", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-2", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + }, + "location": "documents/file.txt" + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + }, + "location": "home/document.pdf" + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "important/documents/document.pdf" + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "document.pdf", + "result": { + "dirContent": [ + "document.pdf" + ] + } + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/important/file.txt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "home/document.pdf", + "important/file.txt", + "home/documents/balance.xlsx" + ] + } + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "important/documents/document.pdf" + ] + } + }, + { + "userId": "user-0", + "type": "READ", + "storageType": "PRIVATE", + "location": "document.pdf", + "result": { + "content": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + } + } + }, + { + "userId": "user-1", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-2", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/" + }, + { + "userId": "user-9", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + }, + "location": "home/file.txt" + }, + { + "userId": "user-6", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/", + "result": { + "dirContent": [ + "documents/presentation.ppt", + "documents/balance.xlsx" + ] + } + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-8", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/document.pdf", + "result": { + "content": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + } + } + }, + { + "userId": "user-0", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + }, + "location": "file.txt" + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + }, + "location": "important/documents/document.pdf" + }, + { + "userId": "user-2", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + }, + "location": "documents/file.txt" + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/file.txt", + "result": { + "dirContent": [ + "home/file.txt" + ] + } + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/balance.xlsx", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-4", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/documents/document.pdf", + "result": { + "content": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + } + } + }, + { + "userId": "user-6", + "type": "READ", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "content": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + } + } + }, + { + "userId": "user-8", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/documents/balance.xlsx", + "result": { + "content": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + } + } + }, + { + "userId": "user-5", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + }, + "location": "important/file.txt" + }, + { + "userId": "user-5", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/file.txt", + "result": { + "content": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + } + } + }, + { + "userId": "user-6", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-5", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/" + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "document.pdf", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-7", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/presentation.ppt", + "result": { + "content": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + } + } + }, + { + "userId": "user-8", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/file.txt", + "result": { + "content": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + } + } + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "home/important/document.pdf" + }, + { + "userId": "user-2", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + }, + "location": "documents/document.pdf" + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/home/document.pdf", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/document.pdf", + "result": { + "dirContent": [ + "documents/document.pdf" + ] + } + }, + { + "userId": "user-7", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/balance.xlsx", + "result": { + "content": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + } + } + }, + { + "userId": "user-4", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/important/document.pdf", + "result": { + "content": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + } + } + }, + { + "userId": "user-2", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/document.pdf", + "result": { + "content": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + } + } + }, + { + "userId": "user-3", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/documents/" + }, + { + "userId": "user-3", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/file.txt", + "result": { + "content": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + } + } + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "home/documents/document.pdf" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + }, + "location": "home/home/document.pdf" + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/documents/", + "result": { + "dirContent": [ + "home/documents/document.pdf" + ] + } + }, + { + "userId": "user-3", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/file.txt", + "result": { + "content": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + } + } + }, + { + "userId": "user-9", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/documents/document.pdf", + "result": { + "content": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + } + } + }, + { + "userId": "user-2", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/" + }, + { + "userId": "user-9", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/documents/" + }, + { + "userId": "user-4", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/important/" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + }, + "location": "important/presentation.ppt" + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + }, + "location": "documents/home/presentation.ppt" + }, + { + "userId": "user-4", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/documents/document.pdf", + "result": { + "content": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + } + } + }, + { + "userId": "user-3", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/" + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "document.pdf" + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/document.pdf", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "home/home/document.pdf" + ] + } + }, + { + "userId": "user-1", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/home/document.pdf", + "result": { + "content": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + } + } + }, + { + "userId": "user-4", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/" + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + }, + "location": "home/important/document.pdf" + }, + { + "userId": "user-2", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "documents/presentation.ppt" + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "file.txt", + "result": { + "dirContent": [ + "file.txt" + ] + } + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/documents/document.pdf", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-1", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/home/document.pdf", + "result": { + "content": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + } + } + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-6", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + }, + "location": "file.txt" + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/important/file.txt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-2", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/presentation.ppt", + "result": { + "content": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + } + } + }, + { + "userId": "user-5", + "type": "READ", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "content": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + } + } + }, + { + "userId": "user-1", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/home/" + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-5", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + }, + "location": "documents/home/file.txt" + }, + { + "userId": "user-6", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + }, + "location": "home/balance.xlsx" + }, + { + "userId": "user-2", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "documents/home/presentation.ppt", + "document.pdf", + "home/document.pdf", + "important/file.txt", + "home/important/document.pdf", + "home/documents/balance.xlsx", + "important/documents/document.pdf", + "balance.xlsx" + ] + } + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "documents/presentation.ppt", + "balance.xlsx" + ] + } + }, + { + "userId": "user-6", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/balance.xlsx", + "result": { + "content": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + } + } + }, + { + "userId": "user-7", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/" + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "file.txt" + ] + } + }, + { + "userId": "user-7", + "type": "READ", + "storageType": "PRIVATE", + "location": "file.txt", + "result": { + "content": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + } + } + }, + { + "userId": "user-2", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + }, + "location": "important/document.pdf" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + }, + "location": "documents/important/balance.xlsx" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-2", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/balance.xlsx", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/important/presentation.ppt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/file.txt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-6", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/balance.xlsx", + "result": { + "content": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + } + } + }, + { + "userId": "user-2", + "type": "READ", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "content": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + } + } + }, + { + "userId": "user-8", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/important/" + }, + { + "userId": "user-7", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + }, + "location": "home/file.txt" + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "important/home/balance.xlsx" + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/file.txt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-3", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/home/file.txt", + "result": { + "content": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + } + } + }, + { + "userId": "user-6", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/balance.xlsx", + "result": { + "content": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + } + } + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + }, + "location": "home/balance.xlsx" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-6", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + }, + "location": "home/document.pdf" + }, + { + "userId": "user-2", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "home/balance.xlsx" + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/important/document.pdf", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/", + "result": { + "dirContent": [ + "home/balance.xlsx" + ] + } + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "home/balance.xlsx", + "balance.xlsx" + ] + } + }, + { + "userId": "user-5", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/" + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-0", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/home/" + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-2", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + }, + "location": "home/document.pdf" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + }, + "location": "documents/document.pdf" + }, + { + "userId": "user-6", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + }, + "location": "important/presentation.ppt" + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/presentation.ppt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-8", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/documents/balance.xlsx", + "result": { + "content": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + } + } + }, + { + "userId": "user-3", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/home/file.txt", + "result": { + "content": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + } + } + }, + { + "userId": "user-8", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/documents/" + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "documents/home/presentation.ppt", + "document.pdf", + "home/document.pdf", + "important/file.txt", + "important/documents/document.pdf", + "balance.xlsx" + ] + } + }, + { + "userId": "user-8", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/documents/document.pdf", + "result": { + "content": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + } + } + }, + { + "userId": "user-9", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/" + }, + { + "userId": "user-1", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/" + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "balance.xlsx" + ] + } + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "important/documents/document.pdf" + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/documents/", + "result": { + "dirContent": [ + "important/documents/document.pdf" + ] + } + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "home/document.pdf", + "home/balance.xlsx", + "presentation.ppt", + "file.txt" + ] + } + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-3", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/home/file.txt", + "result": { + "content": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + } + } + }, + { + "userId": "user-6", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/document.pdf", + "result": { + "content": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + } + } + }, + { + "userId": "user-1", + "type": "READ", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "content": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + } + } + }, + { + "userId": "user-3", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/" + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "documents/presentation.ppt" + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "home/documents/document.pdf" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "document.pdf" + }, + { + "userId": "user-6", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + }, + "location": "home/important/presentation.ppt" + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "home/document.pdf", + "home/balance.xlsx", + "presentation.ppt", + "file.txt", + "balance.xlsx" + ] + } + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-1", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/documents/document.pdf", + "result": { + "content": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + } + } + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + }, + "location": "important/home/file.txt" + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "dirContent": [ + "balance.xlsx" + ] + } + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-8", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/documents/document.pdf", + "result": { + "content": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + } + } + }, + { + "userId": "user-8", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "document.pdf" + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/home/file.txt", + "result": { + "dirContent": [ + "important/home/file.txt" + ] + } + }, + { + "userId": "user-8", + "type": "READ", + "storageType": "PRIVATE", + "location": "document.pdf", + "result": { + "content": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + } + } + }, + { + "userId": "user-6", + "type": "READ", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "content": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + } + } + }, + { + "userId": "user-8", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/home/" + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-6", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-1", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/important/" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-4", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/important/" + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "file.txt" + }, + { + "userId": "user-6", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "important/documents/balance.xlsx" + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "document.pdf", + "documents/presentation.ppt", + "important/file.txt", + "presentation.ppt", + "important/documents/document.pdf", + "balance.xlsx" + ] + } + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "document.pdf", + "documents/document.pdf", + "balance.xlsx" + ] + } + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/documents/", + "result": { + "dirContent": [ + "important/documents/balance.xlsx" + ] + } + }, + { + "userId": "user-9", + "type": "READ", + "storageType": "PRIVATE", + "location": "file.txt", + "result": { + "content": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + } + } + }, + { + "userId": "user-4", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "documents/home/file.txt", + "home/documents/document.pdf" + ] + } + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "document.pdf" + ] + } + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "important/home/file.txt", + "important/documents/document.pdf", + "balance.xlsx" + ] + } + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/file.txt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-1", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/documents/document.pdf", + "result": { + "content": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + } + } + }, + { + "userId": "user-3", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/home/" + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/balance.xlsx", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "file.txt", + "result": { + "dirContent": [ + "file.txt" + ] + } + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/documents/document.pdf", + "result": { + "dirContent": [ + "home/documents/document.pdf" + ] + } + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/documents/balance.xlsx", + "result": { + "dirContent": [ + "important/documents/balance.xlsx" + ] + } + }, + { + "userId": "user-5", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + }, + "location": "documents/balance.xlsx" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "important/important/file.txt" + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "important/documents/balance.xlsx" + ] + } + }, + { + "userId": "user-9", + "type": "READ", + "storageType": "PRIVATE", + "location": "file.txt", + "result": { + "content": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + } + } + }, + { + "userId": "user-6", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/documents/balance.xlsx", + "result": { + "content": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + } + } + }, + { + "userId": "user-6", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/documents/" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + }, + "location": "home/documents/balance.xlsx" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + }, + "location": "file.txt" + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/balance.xlsx", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-8", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/presentation.ppt", + "result": { + "content": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + } + } + }, + { + "userId": "user-1", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/important/file.txt", + "result": { + "content": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + } + } + }, + { + "userId": "user-9", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-4", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "home/balance.xlsx" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-8", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-2", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/important/file.txt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/", + "result": { + "dirContent": [ + "home/documents/document.pdf" + ] + } + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "dirContent": [ + "balance.xlsx" + ] + } + }, + { + "userId": "user-3", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/documents/document.pdf", + "result": { + "content": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + } + } + }, + { + "userId": "user-4", + "type": "READ", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "content": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + } + } + }, + { + "userId": "user-2", + "type": "READ", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "content": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + } + } + }, + { + "userId": "user-5", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-1", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/important/" + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/home/file.txt", + "result": { + "dirContent": [ + "important/home/file.txt" + ] + } + }, + { + "userId": "user-2", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "documents/home/document.pdf" + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + }, + "location": "document.pdf" + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "balance.xlsx" + ] + } + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/presentation.ppt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/home/file.txt", + "result": { + "dirContent": [ + "important/home/file.txt" + ] + } + }, + { + "userId": "user-3", + "type": "READ", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "content": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + } + } + }, + { + "userId": "user-8", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/home/" + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "important/documents/file.txt" + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "important/documents/file.txt" + ] + } + }, + { + "userId": "user-8", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/documents/file.txt", + "result": { + "content": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + } + } + }, + { + "userId": "user-0", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + }, + "location": "home/home/presentation.ppt" + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/presentation.ppt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "important/home/file.txt", + "important/documents/document.pdf", + "balance.xlsx" + ] + } + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-8", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/documents/file.txt", + "result": { + "content": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + } + } + }, + { + "userId": "user-1", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/documents/document.pdf", + "result": { + "content": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + } + } + }, + { + "userId": "user-1", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/home/" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + }, + "location": "home/important/file.txt" + }, + { + "userId": "user-6", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + }, + "location": "documents/file.txt" + }, + { + "userId": "user-2", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + }, + "location": "documents/file.txt" + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/", + "result": { + "dirContent": [ + "home/important/file.txt" + ] + } + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "documents/file.txt" + ] + } + }, + { + "userId": "user-2", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/" + }, + { + "userId": "user-2", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + }, + "location": "file.txt" + }, + { + "userId": "user-2", + "type": "READ", + "storageType": "PRIVATE", + "location": "file.txt", + "result": { + "content": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + } + } + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + }, + "location": "important/presentation.ppt" + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + }, + "location": "document.pdf" + }, + { + "userId": "user-6", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "important/important/balance.xlsx" + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + }, + "location": "home/file.txt" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + }, + "location": "home/important/file.txt" + }, + { + "userId": "user-2", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "home/presentation.ppt" + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/presentation.ppt", + "result": { + "dirContent": [ + "important/presentation.ppt" + ] + } + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/", + "result": { + "dirContent": [ + "home/home/presentation.ppt", + "home/documents/document.pdf" + ] + } + }, + { + "userId": "user-6", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/important/balance.xlsx", + "result": { + "content": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + } + } + }, + { + "userId": "user-1", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/important/file.txt", + "result": { + "content": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + } + } + }, + { + "userId": "user-2", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/presentation.ppt", + "result": { + "content": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + } + } + }, + { + "userId": "user-8", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/" + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-8", + "type": "READ", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "content": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + } + } + }, + { + "userId": "user-3", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/documents/" + }, + { + "userId": "user-6", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/" + }, + { + "userId": "user-6", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + }, + "location": "home/document.pdf" + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/documents/file.txt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-0", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/" + }, + { + "userId": "user-1", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/documents/" + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "home/important/file.txt", + "balance.xlsx" + ] + } + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + }, + "location": "home/important/balance.xlsx" + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + }, + "location": "documents/document.pdf" + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "file.txt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "home/document.pdf", + "important/important/balance.xlsx" + ] + } + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "document.pdf", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-8", + "type": "READ", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "content": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + } + } + }, + { + "userId": "user-3", + "type": "READ", + "storageType": "PRIVATE", + "location": "document.pdf", + "result": { + "content": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + } + } + }, + { + "userId": "user-3", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-6", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/important/" + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + }, + "location": "home/important/presentation.ppt" + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + }, + "location": "home/presentation.ppt" + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "dirContent": [ + "presentation.ppt" + ] + } + }, + { + "userId": "user-8", + "type": "READ", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "content": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + } + } + }, + { + "userId": "user-6", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/document.pdf", + "result": { + "content": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + } + } + }, + { + "userId": "user-0", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/document.pdf", + "result": { + "content": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + } + } + }, + { + "userId": "user-5", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/presentation.ppt", + "result": { + "content": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + } + } + }, + { + "userId": "user-4", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-6", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/" + }, + { + "userId": "user-0", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/" + }, + { + "userId": "user-1", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/important/" + }, + { + "userId": "user-9", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/important/" + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-5", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/" + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + }, + "location": "documents/documents/document.pdf" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + }, + "location": "home/important/file.txt" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + }, + "location": "documents/important/file.txt" + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "file.txt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-2", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/presentation.ppt", + "result": { + "content": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + } + } + }, + { + "userId": "user-8", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "important/balance.xlsx" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "documents/important/balance.xlsx" + }, + { + "userId": "user-2", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-3", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + }, + "location": "important/documents/file.txt" + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + }, + "location": "home/important/presentation.ppt" + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + }, + "location": "important/balance.xlsx" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + }, + "location": "file.txt" + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + }, + "location": "important/balance.xlsx" + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/documents/", + "result": { + "dirContent": [ + "important/documents/file.txt" + ] + } + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/", + "result": { + "dirContent": [ + "important/balance.xlsx" + ] + } + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/important/balance.xlsx", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-4", + "type": "READ", + "storageType": "PRIVATE", + "location": "file.txt", + "result": { + "content": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + } + } + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + }, + "location": "documents/home/file.txt" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "important/file.txt" + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/file.txt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/documents/", + "result": { + "dirContent": [ + "important/documents/file.txt" + ] + } + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "home/presentation.ppt", + "file.txt", + "balance.xlsx" + ] + } + }, + { + "userId": "user-9", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/documents/document.pdf", + "result": { + "content": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + } + } + }, + { + "userId": "user-5", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/important/" + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + }, + "location": "home/home/document.pdf" + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "important/documents/document.pdf" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "document.pdf" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + }, + "location": "important/documents/document.pdf" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "balance.xlsx" + ] + } + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "dirContent": [ + "balance.xlsx" + ] + } + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "home/presentation.ppt", + "file.txt", + "balance.xlsx" + ] + } + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "home/home/document.pdf" + ] + } + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/documents/", + "result": { + "dirContent": [ + "important/documents/file.txt", + "important/documents/document.pdf" + ] + } + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/", + "result": { + "dirContent": [ + "important/balance.xlsx", + "important/file.txt" + ] + } + }, + { + "userId": "user-2", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "important/important/balance.xlsx" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-2", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + }, + "location": "important/balance.xlsx" + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/documents/", + "result": { + "dirContent": [ + "important/documents/file.txt", + "important/documents/document.pdf" + ] + } + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "important/balance.xlsx" + ] + } + }, + { + "userId": "user-8", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/home/document.pdf", + "result": { + "content": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + } + } + }, + { + "userId": "user-4", + "type": "READ", + "storageType": "PRIVATE", + "location": "document.pdf", + "result": { + "content": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + } + } + }, + { + "userId": "user-1", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/balance.xlsx", + "result": { + "content": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + } + } + }, + { + "userId": "user-0", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-2", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/" + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + }, + "location": "home/documents/presentation.ppt" + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + }, + "location": "file.txt" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + }, + "location": "documents/document.pdf" + }, + { + "userId": "user-6", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + }, + "location": "documents/file.txt" + }, + { + "userId": "user-2", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + }, + "location": "home/important/presentation.ppt" + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/home/", + "result": { + "dirContent": [ + "home/home/document.pdf" + ] + } + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "important/documents/file.txt", + "file.txt", + "important/documents/document.pdf" + ] + } + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/", + "result": { + "dirContent": [ + "documents/file.txt" + ] + } + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/", + "result": { + "dirContent": [ + "home/important/presentation.ppt" + ] + } + }, + { + "userId": "user-4", + "type": "READ", + "storageType": "PRIVATE", + "location": "document.pdf", + "result": { + "content": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + } + } + }, + { + "userId": "user-3", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/documents/document.pdf", + "result": { + "content": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + } + } + }, + { + "userId": "user-6", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/file.txt", + "result": { + "content": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + } + } + }, + { + "userId": "user-2", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/important/presentation.ppt", + "result": { + "content": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + } + } + }, + { + "userId": "user-7", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/important/" + }, + { + "userId": "user-4", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + }, + "location": "important/presentation.ppt" + }, + { + "userId": "user-4", + "type": "READ", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "content": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + } + } + }, + { + "userId": "user-9", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/" + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + }, + "location": "home/important/presentation.ppt" + }, + { + "userId": "user-3", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/documents/" + }, + { + "userId": "user-3", + "type": "READ", + "storageType": "PRIVATE", + "location": "file.txt", + "result": { + "content": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + } + } + }, + { + "userId": "user-6", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/" + }, + { + "userId": "user-6", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + }, + "location": "document.pdf" + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "document.pdf" + ] + } + }, + { + "userId": "user-2", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/important/" + }, + { + "userId": "user-4", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + }, + "location": "documents/file.txt" + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + }, + "location": "home/balance.xlsx" + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/balance.xlsx", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/documents/document.pdf", + "result": { + "dirContent": [ + "documents/documents/document.pdf" + ] + } + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "file.txt" + ] + } + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "file.txt", + "result": { + "dirContent": [ + "file.txt" + ] + } + }, + { + "userId": "user-9", + "type": "READ", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "content": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + } + } + }, + { + "userId": "user-0", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/balance.xlsx", + "result": { + "content": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + } + } + }, + { + "userId": "user-5", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/" + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/", + "result": { + "dirContent": [ + "important/documents/document.pdf" + ] + } + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + }, + "location": "important/document.pdf" + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + }, + "location": "document.pdf" + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + }, + "location": "home/important/document.pdf" + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/", + "result": { + "dirContent": [ + "home/home/document.pdf" + ] + } + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "document.pdf", + "result": { + "dirContent": [ + "document.pdf" + ] + } + }, + { + "userId": "user-9", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/balance.xlsx", + "result": { + "content": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + } + } + }, + { + "userId": "user-8", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/home/" + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + }, + "location": "documents/file.txt" + }, + { + "userId": "user-4", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-3", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + }, + "location": "documents/important/document.pdf" + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "home/important/document.pdf" + }, + { + "userId": "user-6", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "documents/important/balance.xlsx" + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "important/balance.xlsx", + "home/important/document.pdf", + "documents/important/file.txt", + "balance.xlsx" + ] + } + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-1", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "document.pdf" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + }, + "location": "home/documents/document.pdf" + }, + { + "userId": "user-2", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + }, + "location": "important/important/balance.xlsx" + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "documents/home/file.txt", + "home/important/document.pdf", + "important/important/balance.xlsx", + "important/document.pdf" + ] + } + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/", + "result": { + "dirContent": [ + "documents/important/document.pdf" + ] + } + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/presentation.ppt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-5", + "type": "READ", + "storageType": "PRIVATE", + "location": "document.pdf", + "result": { + "content": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + } + } + }, + { + "userId": "user-1", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/important/" + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "dirContent": [ + "balance.xlsx" + ] + } + }, + { + "userId": "user-2", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + }, + "location": "document.pdf" + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "important/balance.xlsx", + "documents/documents/document.pdf", + "home/important/presentation.ppt", + "balance.xlsx" + ] + } + }, + { + "userId": "user-7", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/document.pdf", + "result": { + "content": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + } + } + }, + { + "userId": "user-6", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/important/balance.xlsx", + "result": { + "content": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + } + } + }, + { + "userId": "user-2", + "type": "READ", + "storageType": "PRIVATE", + "location": "document.pdf", + "result": { + "content": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + } + } + }, + { + "userId": "user-9", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-6", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/important/" + }, + { + "userId": "user-6", + "type": "READ", + "storageType": "PRIVATE", + "location": "document.pdf", + "result": { + "content": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + } + } + }, + { + "userId": "user-0", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + }, + "location": "home/presentation.ppt" + }, + { + "userId": "user-6", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + }, + "location": "documents/home/presentation.ppt" + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/important/document.pdf", + "result": { + "dirContent": [ + "documents/important/document.pdf" + ] + } + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/documents/document.pdf", + "result": { + "dirContent": [ + "home/documents/document.pdf" + ] + } + }, + { + "userId": "user-9", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/presentation.ppt", + "result": { + "content": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + } + } + }, + { + "userId": "user-8", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/" + }, + { + "userId": "user-6", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-1", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/important/" + }, + { + "userId": "user-9", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/" + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "important/balance.xlsx" + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + }, + "location": "document.pdf" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + }, + "location": "important/file.txt" + }, + { + "userId": "user-6", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + }, + "location": "documents/important/presentation.ppt" + }, + { + "userId": "user-2", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + }, + "location": "important/file.txt" + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/important/", + "result": { + "dirContent": [ + "documents/important/presentation.ppt" + ] + } + }, + { + "userId": "user-1", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "important/balance.xlsx" + ] + } + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "document.pdf" + ] + } + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/important/document.pdf", + "result": { + "dirContent": [ + "documents/important/document.pdf" + ] + } + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/document.pdf", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "document.pdf", + "result": { + "dirContent": [ + "document.pdf" + ] + } + }, + { + "userId": "user-2", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/important/balance.xlsx", + "result": { + "content": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + } + } + }, + { + "userId": "user-9", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-3", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/important/" + }, + { + "userId": "user-2", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + }, + "location": "home/presentation.ppt" + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-5", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/important/" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + }, + "location": "document.pdf" + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + }, + "location": "documents/balance.xlsx" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + }, + "location": "important/file.txt" + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/", + "result": { + "dirContent": [ + "documents/important/presentation.ppt" + ] + } + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/important/balance.xlsx", + "result": { + "dirContent": [ + "important/important/balance.xlsx" + ] + } + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/documents/", + "result": { + "dirContent": [ + "important/documents/document.pdf" + ] + } + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/", + "result": { + "dirContent": [ + "important/file.txt" + ] + } + }, + { + "userId": "user-7", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/home/" + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "home/important/document.pdf", + "presentation.ppt", + "important/important/balance.xlsx", + "important/document.pdf" + ] + } + }, + { + "userId": "user-6", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/important/" + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + }, + "location": "home/important/presentation.ppt" + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "home/important/document.pdf", + "presentation.ppt", + "important/important/balance.xlsx", + "important/document.pdf" + ] + } + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/important/presentation.ppt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-7", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/document.pdf", + "result": { + "content": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + } + } + }, + { + "userId": "user-8", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/" + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + }, + "location": "documents/home/presentation.ppt" + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-5", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-8", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/home/" + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "document.pdf" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + }, + "location": "home/documents/document.pdf" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + }, + "location": "important/file.txt" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + }, + "location": "documents/presentation.ppt" + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-7", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/document.pdf", + "result": { + "content": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + } + } + }, + { + "userId": "user-2", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/" + }, + { + "userId": "user-2", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + }, + "location": "important/important/document.pdf" + }, + { + "userId": "user-2", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/important/balance.xlsx", + "result": { + "content": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + } + } + }, + { + "userId": "user-3", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/important/" + }, + { + "userId": "user-5", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/file.txt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + }, + "location": "file.txt" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + }, + "location": "document.pdf" + }, + { + "userId": "user-6", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + }, + "location": "home/balance.xlsx" + }, + { + "userId": "user-2", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-5", + "type": "READ", + "storageType": "PRIVATE", + "location": "document.pdf", + "result": { + "content": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + } + } + }, + { + "userId": "user-7", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/" + }, + { + "userId": "user-7", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/important/document.pdf", + "result": { + "content": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + } + } + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "documents/documents/file.txt" + }, + { + "userId": "user-6", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + }, + "location": "documents/file.txt" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + }, + "location": "home/file.txt" + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/home/presentation.ppt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "document.pdf" + ] + } + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/home/document.pdf", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/file.txt", + "result": { + "dirContent": [ + "important/file.txt" + ] + } + }, + { + "userId": "user-3", + "type": "READ", + "storageType": "PRIVATE", + "location": "document.pdf", + "result": { + "content": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + } + } + }, + { + "userId": "user-2", + "type": "READ", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "content": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + } + } + }, + { + "userId": "user-7", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/important/document.pdf", + "result": { + "content": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + } + } + }, + { + "userId": "user-7", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-6", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/" + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + }, + "location": "documents/presentation.ppt" + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "document.pdf", + "file.txt" + ] + } + }, + { + "userId": "user-3", + "type": "READ", + "storageType": "PRIVATE", + "location": "file.txt", + "result": { + "content": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + } + } + }, + { + "userId": "user-6", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/" + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "important/important/document.pdf" + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-8", + "type": "READ", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "content": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + } + } + }, + { + "userId": "user-8", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-4", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/documents/" + }, + { + "userId": "user-5", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-1", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/" + }, + { + "userId": "user-7", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/important/" + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + }, + "location": "documents/file.txt" + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/", + "result": { + "dirContent": [ + "documents/file.txt" + ] + } + }, + { + "userId": "user-9", + "type": "READ", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "content": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + } + } + }, + { + "userId": "user-0", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/balance.xlsx", + "result": { + "content": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + } + } + }, + { + "userId": "user-1", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/file.txt", + "result": { + "content": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + } + } + }, + { + "userId": "user-1", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/" + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/", + "result": { + "dirContent": [ + "documents/presentation.ppt" + ] + } + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + }, + "location": "documents/documents/balance.xlsx" + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "document.pdf" + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "documents/presentation.ppt" + ] + } + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/important/presentation.ppt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-4", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/file.txt", + "result": { + "content": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + } + } + }, + { + "userId": "user-9", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-1", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/" + }, + { + "userId": "user-6", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "file.txt" + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + }, + "location": "important/documents/file.txt" + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/file.txt", + "result": { + "dirContent": [ + "documents/file.txt" + ] + } + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "document.pdf", + "result": { + "dirContent": [ + "document.pdf" + ] + } + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + }, + "location": "file.txt" + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + }, + "location": "document.pdf" + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + }, + "location": "home/home/document.pdf" + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "file.txt" + ] + } + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "document.pdf", + "important/file.txt", + "presentation.ppt", + "important/important/document.pdf", + "important/important/balance.xlsx" + ] + } + }, + { + "userId": "user-4", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/documents/balance.xlsx", + "result": { + "content": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + } + } + }, + { + "userId": "user-6", + "type": "READ", + "storageType": "PRIVATE", + "location": "file.txt", + "result": { + "content": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + } + } + }, + { + "userId": "user-8", + "type": "READ", + "storageType": "PRIVATE", + "location": "file.txt", + "result": { + "content": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + } + } + }, + { + "userId": "user-4", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "document.pdf", + "result": { + "dirContent": [ + "document.pdf" + ] + } + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-5", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/home/document.pdf", + "result": { + "content": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + } + } + }, + { + "userId": "user-0", + "type": "READ", + "storageType": "PRIVATE", + "location": "document.pdf", + "result": { + "content": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + } + } + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + }, + "location": "important/balance.xlsx" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + }, + "location": "home/documents/document.pdf" + }, + { + "userId": "user-2", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/documents/file.txt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "important/balance.xlsx" + ] + } + }, + { + "userId": "user-9", + "type": "READ", + "storageType": "PRIVATE", + "location": "document.pdf", + "result": { + "content": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + } + } + }, + { + "userId": "user-5", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/home/document.pdf", + "result": { + "content": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + } + } + }, + { + "userId": "user-7", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/" + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + }, + "location": "home/home/presentation.ppt" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + }, + "location": "home/balance.xlsx" + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "home/documents/document.pdf", + "balance.xlsx" + ] + } + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "file.txt" + ] + } + }, + { + "userId": "user-9", + "type": "READ", + "storageType": "PRIVATE", + "location": "document.pdf", + "result": { + "content": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + } + } + }, + { + "userId": "user-6", + "type": "READ", + "storageType": "PRIVATE", + "location": "file.txt", + "result": { + "content": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + } + } + }, + { + "userId": "user-2", + "type": "READ", + "storageType": "PRIVATE", + "location": "document.pdf", + "result": { + "content": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + } + } + }, + { + "userId": "user-8", + "type": "READ", + "storageType": "PRIVATE", + "location": "file.txt", + "result": { + "content": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + } + } + }, + { + "userId": "user-5", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/balance.xlsx", + "result": { + "content": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + } + } + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + }, + "location": "documents/important/presentation.ppt" + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + }, + "location": "important/home/balance.xlsx" + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "file.txt", + "result": { + "dirContent": [ + "file.txt" + ] + } + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/", + "result": { + "dirContent": [ + "important/file.txt", + "important/important/document.pdf", + "important/important/balance.xlsx" + ] + } + }, + { + "userId": "user-4", + "type": "READ", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "content": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + } + } + }, + { + "userId": "user-0", + "type": "READ", + "storageType": "PRIVATE", + "location": "document.pdf", + "result": { + "content": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + } + } + }, + { + "userId": "user-6", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-0", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-2", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/" + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "important/file.txt" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + }, + "location": "file.txt" + }, + { + "userId": "user-6", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "important/important/presentation.ppt" + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + }, + "location": "important/important/balance.xlsx" + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "dirContent": [ + "presentation.ppt" + ] + } + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "important/important/balance.xlsx" + ] + } + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/", + "result": { + "dirContent": [ + "important/important/presentation.ppt" + ] + } + }, + { + "userId": "user-7", + "type": "READ", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "content": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + } + } + }, + { + "userId": "user-5", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/home/document.pdf", + "result": { + "content": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + } + } + }, + { + "userId": "user-8", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-2", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/file.txt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-7", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + }, + "location": "home/documents/file.txt" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + }, + "location": "home/presentation.ppt" + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/", + "result": { + "dirContent": [ + "important/file.txt", + "important/home/balance.xlsx" + ] + } + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "home/documents/document.pdf", + "balance.xlsx" + ] + } + }, + { + "userId": "user-4", + "type": "READ", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "content": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + } + } + }, + { + "userId": "user-1", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/presentation.ppt", + "result": { + "content": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + } + } + }, + { + "userId": "user-4", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/documents/" + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "balance.xlsx" + ] + } + }, + { + "userId": "user-0", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/important/" + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/documents/", + "result": { + "dirContent": [ + "home/documents/file.txt" + ] + } + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "important/important/presentation.ppt" + ] + } + }, + { + "userId": "user-9", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/important/presentation.ppt", + "result": { + "content": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + } + } + }, + { + "userId": "user-3", + "type": "READ", + "storageType": "PRIVATE", + "location": "document.pdf", + "result": { + "content": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + } + } + }, + { + "userId": "user-5", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/balance.xlsx", + "result": { + "content": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + } + } + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + }, + "location": "documents/file.txt" + }, + { + "userId": "user-6", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "document.pdf" + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "home/documents/file.txt" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-2", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + }, + "location": "home/documents/balance.xlsx" + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/home/file.txt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-0", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/documents/file.txt", + "result": { + "content": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + } + } + }, + { + "userId": "user-6", + "type": "READ", + "storageType": "PRIVATE", + "location": "document.pdf", + "result": { + "content": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + } + } + }, + { + "userId": "user-2", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/documents/balance.xlsx", + "result": { + "content": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + } + } + }, + { + "userId": "user-9", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + }, + "location": "home/important/document.pdf" + }, + { + "userId": "user-9", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/important/document.pdf", + "result": { + "content": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + } + } + }, + { + "userId": "user-7", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/" + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + }, + "location": "file.txt" + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "file.txt" + ] + } + }, + { + "userId": "user-7", + "type": "READ", + "storageType": "PRIVATE", + "location": "file.txt", + "result": { + "content": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + } + } + }, + { + "userId": "user-6", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-6", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "home/presentation.ppt" + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/presentation.ppt", + "result": { + "dirContent": [ + "home/presentation.ppt" + ] + } + }, + { + "userId": "user-1", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/" + }, + { + "userId": "user-6", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + }, + "location": "important/file.txt" + }, + { + "userId": "user-2", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + }, + "location": "documents/presentation.ppt" + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/important/file.txt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "presentation.ppt", + "important/file.txt" + ] + } + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + }, + "location": "important/document.pdf" + }, + { + "userId": "user-9", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/important/document.pdf", + "result": { + "content": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + } + } + }, + { + "userId": "user-4", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-5", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/home/" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-2", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "document.pdf" + }, + { + "userId": "user-9", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/important/" + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-3", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/" + }, + { + "userId": "user-5", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/" + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "file.txt", + "result": { + "dirContent": [ + "file.txt" + ] + } + }, + { + "userId": "user-0", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-1", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "home/home/balance.xlsx" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + }, + "location": "document.pdf" + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "dirContent": [ + "presentation.ppt" + ] + } + }, + { + "userId": "user-5", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/home/" + }, + { + "userId": "user-1", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + }, + "location": "important/home/balance.xlsx" + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/home/balance.xlsx", + "result": { + "dirContent": [ + "important/home/balance.xlsx" + ] + } + }, + { + "userId": "user-6", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + }, + "location": "documents/documents/balance.xlsx" + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "file.txt", + "result": { + "dirContent": [ + "file.txt" + ] + } + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/documents/file.txt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "dirContent": [ + "presentation.ppt" + ] + } + }, + { + "userId": "user-6", + "type": "READ", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "content": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + } + } + }, + { + "userId": "user-5", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + }, + "location": "documents/balance.xlsx" + }, + { + "userId": "user-3", + "type": "READ", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "content": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + } + } + }, + { + "userId": "user-1", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/home/" + }, + { + "userId": "user-1", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/documents/balance.xlsx", + "result": { + "content": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + } + } + }, + { + "userId": "user-2", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/documents/" + }, + { + "userId": "user-2", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + }, + "location": "file.txt" + }, + { + "userId": "user-2", + "type": "READ", + "storageType": "PRIVATE", + "location": "file.txt", + "result": { + "content": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + } + } + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + }, + "location": "file.txt" + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "dirContent": [ + "presentation.ppt" + ] + } + }, + { + "userId": "user-2", + "type": "READ", + "storageType": "PRIVATE", + "location": "document.pdf", + "result": { + "content": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + } + } + }, + { + "userId": "user-7", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-1", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/documents/" + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/balance.xlsx", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "documents/important/balance.xlsx" + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/document.pdf", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "document.pdf", + "documents/presentation.ppt", + "file.txt" + ] + } + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/important/", + "result": { + "dirContent": [ + "documents/important/balance.xlsx" + ] + } + }, + { + "userId": "user-0", + "type": "READ", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "content": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + } + } + }, + { + "userId": "user-3", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-4", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/" + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-0", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "important/balance.xlsx" + }, + { + "userId": "user-0", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/balance.xlsx", + "result": { + "content": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + } + } + }, + { + "userId": "user-9", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/important/" + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + }, + "location": "documents/documents/document.pdf" + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/file.txt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-9", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/documents/document.pdf", + "result": { + "content": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + } + } + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + }, + "location": "important/balance.xlsx" + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-6", + "type": "READ", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "content": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + } + } + }, + { + "userId": "user-1", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + }, + "location": "documents/home/document.pdf" + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/documents/file.txt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-5", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/home/document.pdf", + "result": { + "content": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + } + } + }, + { + "userId": "user-9", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/documents/" + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + }, + "location": "documents/file.txt" + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/file.txt", + "result": { + "dirContent": [ + "documents/file.txt" + ] + } + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + }, + "location": "home/important/document.pdf" + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/file.txt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-2", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/presentation.ppt", + "result": { + "content": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + } + } + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + }, + "location": "documents/documents/file.txt" + }, + { + "userId": "user-2", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + }, + "location": "important/home/balance.xlsx" + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "document.pdf", + "documents/presentation.ppt", + "file.txt", + "important/home/balance.xlsx" + ] + } + }, + { + "userId": "user-9", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/file.txt", + "result": { + "content": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + } + } + }, + { + "userId": "user-6", + "type": "READ", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "content": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + } + } + }, + { + "userId": "user-2", + "type": "READ", + "storageType": "PRIVATE", + "location": "document.pdf", + "result": { + "content": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + } + } + }, + { + "userId": "user-9", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/" + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + }, + "location": "important/presentation.ppt" + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + }, + "location": "document.pdf" + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/document.pdf", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/", + "result": { + "dirContent": [ + "home/important/document.pdf" + ] + } + }, + { + "userId": "user-5", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/home/document.pdf", + "result": { + "content": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + } + } + }, + { + "userId": "user-6", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + }, + "location": "home/presentation.ppt" + }, + { + "userId": "user-9", + "type": "READ", + "storageType": "PRIVATE", + "location": "document.pdf", + "result": { + "content": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + } + } + }, + { + "userId": "user-6", + "type": "READ", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "content": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + } + } + }, + { + "userId": "user-5", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/home/" + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + }, + "location": "file.txt" + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + }, + "location": "important/file.txt" + }, + { + "userId": "user-6", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + }, + "location": "documents/file.txt" + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + }, + "location": "file.txt" + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "important/balance.xlsx", + "file.txt" + ] + } + }, + { + "userId": "user-7", + "type": "READ", + "storageType": "PRIVATE", + "location": "file.txt", + "result": { + "content": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + } + } + }, + { + "userId": "user-0", + "type": "READ", + "storageType": "PRIVATE", + "location": "file.txt", + "result": { + "content": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + } + } + }, + { + "userId": "user-7", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-6", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/" + }, + { + "userId": "user-6", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/file.txt", + "result": { + "content": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + } + } + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "important/important/balance.xlsx" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "document.pdf" + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/documents/presentation.ppt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "document.pdf", + "documents/presentation.ppt", + "file.txt", + "important/home/balance.xlsx" + ] + } + }, + { + "userId": "user-6", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/file.txt", + "result": { + "content": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + } + } + }, + { + "userId": "user-4", + "type": "READ", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "content": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + } + } + }, + { + "userId": "user-1", + "type": "READ", + "storageType": "PRIVATE", + "location": "document.pdf", + "result": { + "content": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + } + } + }, + { + "userId": "user-5", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/documents/" + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-0", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-4", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-1", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "document.pdf" + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/balance.xlsx", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/home/file.txt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-8", + "type": "READ", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "content": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + } + } + }, + { + "userId": "user-0", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + }, + "location": "home/documents/balance.xlsx" + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + }, + "location": "home/documents/file.txt" + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "important/presentation.ppt", + "important/file.txt", + "presentation.ppt" + ] + } + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-9", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/important/document.pdf", + "result": { + "content": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + } + } + }, + { + "userId": "user-3", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/important/balance.xlsx", + "result": { + "content": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + } + } + }, + { + "userId": "user-6", + "type": "READ", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "content": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + } + } + }, + { + "userId": "user-7", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/documents/balance.xlsx", + "result": { + "content": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + } + } + }, + { + "userId": "user-6", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/" + }, + { + "userId": "user-6", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + }, + "location": "documents/balance.xlsx" + }, + { + "userId": "user-6", + "type": "READ", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "content": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + } + } + }, + { + "userId": "user-9", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + }, + "location": "home/important/file.txt" + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/document.pdf", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-6", + "type": "READ", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "content": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + } + } + }, + { + "userId": "user-2", + "type": "READ", + "storageType": "PRIVATE", + "location": "file.txt", + "result": { + "content": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + } + } + }, + { + "userId": "user-6", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/" + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + }, + "location": "important/important/balance.xlsx" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "documents/document.pdf" + }, + { + "userId": "user-2", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + }, + "location": "important/home/balance.xlsx" + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "home/documents/balance.xlsx" + ] + } + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "dirContent": [ + "balance.xlsx" + ] + } + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "important/important/balance.xlsx" + ] + } + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/", + "result": { + "dirContent": [ + "documents/document.pdf" + ] + } + }, + { + "userId": "user-7", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/documents/balance.xlsx", + "result": { + "content": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + } + } + }, + { + "userId": "user-1", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/document.pdf", + "result": { + "content": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + } + } + }, + { + "userId": "user-2", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/presentation.ppt", + "result": { + "content": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + } + } + }, + { + "userId": "user-6", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-2", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + }, + "location": "documents/documents/file.txt" + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/documents/balance.xlsx", + "result": { + "dirContent": [ + "home/documents/balance.xlsx" + ] + } + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/file.txt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "document.pdf", + "documents/presentation.ppt", + "file.txt", + "important/home/balance.xlsx", + "documents/documents/file.txt" + ] + } + }, + { + "userId": "user-1", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/document.pdf", + "result": { + "content": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + } + } + }, + { + "userId": "user-2", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/home/balance.xlsx", + "result": { + "content": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + } + } + }, + { + "userId": "user-8", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/important/" + }, + { + "userId": "user-8", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/presentation.ppt", + "result": { + "content": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + } + } + }, + { + "userId": "user-2", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + }, + "location": "documents/presentation.ppt" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "presentation.ppt" + ] + } + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "dirContent": [ + "presentation.ppt" + ] + } + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/home/presentation.ppt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/presentation.ppt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-8", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/file.txt", + "result": { + "content": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + } + } + }, + { + "userId": "user-7", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/documents/" + }, + { + "userId": "user-3", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/important/" + }, + { + "userId": "user-9", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/" + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + }, + "location": "home/file.txt" + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/important/file.txt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-9", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/file.txt", + "result": { + "content": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + } + } + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + }, + "location": "documents/balance.xlsx" + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/", + "result": { + "dirContent": [ + "important/presentation.ppt", + "important/file.txt" + ] + } + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "dirContent": [ + "presentation.ppt" + ] + } + }, + { + "userId": "user-0", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "document.pdf" + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + }, + "location": "important/balance.xlsx" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + }, + "location": "documents/presentation.ppt" + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "documents/presentation.ppt", + "documents/document.pdf" + ] + } + }, + { + "userId": "user-0", + "type": "READ", + "storageType": "PRIVATE", + "location": "document.pdf", + "result": { + "content": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + } + } + }, + { + "userId": "user-9", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/" + }, + { + "userId": "user-4", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + }, + "location": "document.pdf" + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-1", + "type": "READ", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "content": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + } + } + }, + { + "userId": "user-8", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-0", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + }, + "location": "important/document.pdf" + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/document.pdf", + "result": { + "dirContent": [ + "important/document.pdf" + ] + } + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "important/presentation.ppt" + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "presentation.ppt" + ] + } + }, + { + "userId": "user-1", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/presentation.ppt", + "result": { + "content": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + } + } + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + }, + "location": "documents/important/presentation.ppt" + }, + { + "userId": "user-2", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + }, + "location": "home/home/presentation.ppt" + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/documents/file.txt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/important/presentation.ppt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/home/file.txt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "documents/presentation.ppt", + "important/presentation.ppt", + "documents/document.pdf", + "presentation.ppt" + ] + } + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/home/presentation.ppt", + "result": { + "dirContent": [ + "home/home/presentation.ppt" + ] + } + }, + { + "userId": "user-0", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/" + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + }, + "location": "important/file.txt" + }, + { + "userId": "user-5", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/important/" + }, + { + "userId": "user-2", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/home/" + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + }, + "location": "file.txt" + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + }, + "location": "documents/balance.xlsx" + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "presentation.ppt" + ] + } + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/document.pdf", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-1", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + }, + "location": "documents/presentation.ppt" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + }, + "location": "important/home/file.txt" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + }, + "location": "documents/home/file.txt" + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/home/file.txt", + "result": { + "dirContent": [ + "important/home/file.txt" + ] + } + }, + { + "userId": "user-1", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/home/file.txt", + "result": { + "content": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + } + } + }, + { + "userId": "user-0", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/" + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/file.txt", + "result": { + "dirContent": [ + "important/file.txt" + ] + } + }, + { + "userId": "user-3", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/" + }, + { + "userId": "user-1", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/home/" + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + }, + "location": "document.pdf" + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/", + "result": { + "dirContent": [ + "important/file.txt" + ] + } + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/important/presentation.ppt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-4", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + }, + "location": "important/documents/balance.xlsx" + }, + { + "userId": "user-5", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-9", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "document.pdf", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-1", + "type": "READ", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "content": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + } + } + }, + { + "userId": "user-0", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/" + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + }, + "location": "important/file.txt" + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + }, + "location": "documents/balance.xlsx" + }, + { + "userId": "user-6", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + }, + "location": "home/document.pdf" + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "important/documents/balance.xlsx" + ] + } + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "balance.xlsx" + ] + } + }, + { + "userId": "user-6", + "type": "READ", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "content": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + } + } + }, + { + "userId": "user-6", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "important/presentation.ppt" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + }, + "location": "documents/document.pdf" + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "documents/balance.xlsx" + ] + } + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "dirContent": [ + "balance.xlsx" + ] + } + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/document.pdf", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-9", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/" + }, + { + "userId": "user-0", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/" + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + }, + "location": "home/document.pdf" + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + }, + "location": "file.txt" + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + }, + "location": "documents/home/file.txt" + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/home/document.pdf", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "file.txt" + ] + } + }, + { + "userId": "user-4", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/documents/balance.xlsx", + "result": { + "content": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + } + } + }, + { + "userId": "user-1", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/document.pdf", + "result": { + "content": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + } + } + }, + { + "userId": "user-0", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/home/" + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + }, + "location": "important/important/document.pdf" + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/document.pdf", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "dirContent": [ + "balance.xlsx" + ] + } + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/presentation.ppt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-4", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/documents/balance.xlsx", + "result": { + "content": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + } + } + }, + { + "userId": "user-0", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/document.pdf", + "result": { + "content": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + } + } + }, + { + "userId": "user-9", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + }, + "location": "document.pdf" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + }, + "location": "documents/file.txt" + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "home/document.pdf", + "documents/file.txt", + "balance.xlsx" + ] + } + }, + { + "userId": "user-8", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/important/document.pdf", + "result": { + "content": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + } + } + }, + { + "userId": "user-1", + "type": "READ", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "content": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + } + } + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "documents/home/balance.xlsx" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + }, + "location": "home/documents/document.pdf" + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "document.pdf" + ] + } + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/", + "result": { + "dirContent": [ + "important/important/document.pdf" + ] + } + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/home/document.pdf", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-9", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/home/balance.xlsx", + "result": { + "content": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + } + } + }, + { + "userId": "user-0", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/" + }, + { + "userId": "user-9", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/home/" + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "balance.xlsx" + ] + } + }, + { + "userId": "user-5", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/documents/" + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + }, + "location": "documents/presentation.ppt" + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + }, + "location": "home/document.pdf" + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "important/documents/balance.xlsx", + "balance.xlsx" + ] + } + }, + { + "userId": "user-7", + "type": "READ", + "storageType": "PRIVATE", + "location": "document.pdf", + "result": { + "content": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + } + } + }, + { + "userId": "user-8", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/important/document.pdf", + "result": { + "content": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + } + } + }, + { + "userId": "user-1", + "type": "READ", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "content": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + } + } + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + }, + "location": "important/documents/document.pdf" + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + }, + "location": "documents/balance.xlsx" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "file.txt" + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-7", + "type": "READ", + "storageType": "PRIVATE", + "location": "document.pdf", + "result": { + "content": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + } + } + }, + { + "userId": "user-9", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/document.pdf", + "result": { + "content": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + } + } + }, + { + "userId": "user-1", + "type": "READ", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "content": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + } + } + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + }, + "location": "documents/document.pdf" + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + }, + "location": "home/home/presentation.ppt" + }, + { + "userId": "user-2", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + }, + "location": "documents/documents/document.pdf" + }, + { + "userId": "user-7", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/document.pdf", + "result": { + "content": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + } + } + }, + { + "userId": "user-9", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/document.pdf", + "result": { + "content": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + } + } + }, + { + "userId": "user-5", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/documents/document.pdf", + "result": { + "content": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + } + } + }, + { + "userId": "user-0", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/home/presentation.ppt", + "result": { + "content": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + } + } + }, + { + "userId": "user-1", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/" + }, + { + "userId": "user-1", + "type": "READ", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "content": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + } + } + }, + { + "userId": "user-7", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-0", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/" + }, + { + "userId": "user-0", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/home/presentation.ppt", + "result": { + "content": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + } + } + }, + { + "userId": "user-2", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/documents/" + }, + { + "userId": "user-2", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + }, + "location": "important/important/balance.xlsx" + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/presentation.ppt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "home/balance.xlsx" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + }, + "location": "documents/important/file.txt" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + }, + "location": "file.txt" + }, + { + "userId": "user-2", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + }, + "location": "important/home/presentation.ppt" + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-4", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/documents/balance.xlsx", + "result": { + "content": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + } + } + }, + { + "userId": "user-0", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/home/presentation.ppt", + "result": { + "content": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + } + } + }, + { + "userId": "user-4", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-0", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/home/" + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "home/presentation.ppt" + }, + { + "userId": "user-1", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-5", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/documents/" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + }, + "location": "home/important/file.txt" + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-6", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + }, + "location": "home/important/balance.xlsx" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + }, + "location": "home/documents/document.pdf" + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "file.txt", + "home/important/file.txt" + ] + } + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/document.pdf", + "result": { + "dirContent": [ + "home/document.pdf" + ] + } + }, + { + "userId": "user-9", + "type": "READ", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "content": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + } + } + }, + { + "userId": "user-2", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/important/balance.xlsx", + "result": { + "content": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + } + } + }, + { + "userId": "user-8", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/presentation.ppt", + "result": { + "content": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + } + } + }, + { + "userId": "user-1", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/documents/document.pdf", + "result": { + "content": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + } + } + }, + { + "userId": "user-9", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/" + }, + { + "userId": "user-5", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-2", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/important/" + }, + { + "userId": "user-8", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/important/" + }, + { + "userId": "user-8", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/presentation.ppt", + "result": { + "content": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + } + } + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + }, + "location": "important/presentation.ppt" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + }, + "location": "home/balance.xlsx" + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "balance.xlsx" + ] + } + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/", + "result": { + "dirContent": [ + "important/presentation.ppt" + ] + } + }, + { + "userId": "user-7", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/balance.xlsx", + "result": { + "content": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + } + } + }, + { + "userId": "user-8", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/presentation.ppt", + "result": { + "content": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + } + } + }, + { + "userId": "user-6", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/important/balance.xlsx", + "result": { + "content": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + } + } + }, + { + "userId": "user-0", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/" + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/document.pdf", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "documents/important/document.pdf" + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + }, + "location": "important/presentation.ppt" + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/document.pdf", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/presentation.ppt", + "result": { + "dirContent": [ + "important/presentation.ppt" + ] + } + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-3", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/presentation.ppt", + "result": { + "content": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + } + } + }, + { + "userId": "user-2", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/home/presentation.ppt", + "result": { + "content": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + } + } + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + }, + "location": "home/documents/presentation.ppt" + }, + { + "userId": "user-2", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + }, + "location": "important/presentation.ppt" + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "dirContent": [ + "presentation.ppt" + ] + } + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/document.pdf", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-8", + "type": "READ", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "content": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + } + } + }, + { + "userId": "user-9", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/presentation.ppt", + "result": { + "content": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + } + } + }, + { + "userId": "user-1", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/documents/document.pdf", + "result": { + "content": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + } + } + }, + { + "userId": "user-8", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "documents/document.pdf" + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/documents/file.txt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-5", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/balance.xlsx", + "result": { + "content": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + } + } + }, + { + "userId": "user-3", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/presentation.ppt", + "result": { + "content": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + } + } + }, + { + "userId": "user-6", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/important/" + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-0", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + }, + "location": "important/presentation.ppt" + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + }, + "location": "documents/document.pdf" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + }, + "location": "documents/important/presentation.ppt" + }, + { + "userId": "user-6", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + }, + "location": "file.txt" + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + }, + "location": "home/home/presentation.ppt" + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/balance.xlsx", + "result": { + "dirContent": [ + "home/balance.xlsx" + ] + } + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "important/presentation.ppt", + "balance.xlsx" + ] + } + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-1", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/documents/document.pdf", + "result": { + "content": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + } + } + }, + { + "userId": "user-0", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/home/" + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/", + "result": { + "dirContent": [ + "important/presentation.ppt" + ] + } + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "documents/home/document.pdf" + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + }, + "location": "important/home/document.pdf" + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/", + "result": { + "dirContent": [ + "documents/document.pdf", + "documents/home/document.pdf" + ] + } + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "home/documents/presentation.ppt", + "home/balance.xlsx", + "documents/important/presentation.ppt" + ] + } + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/presentation.ppt", + "result": { + "dirContent": [ + "important/presentation.ppt" + ] + } + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "file.txt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-5", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/balance.xlsx", + "result": { + "content": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + } + } + }, + { + "userId": "user-2", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/home/presentation.ppt", + "result": { + "content": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + } + } + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + }, + "location": "home/home/presentation.ppt" + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/balance.xlsx", + "result": { + "dirContent": [ + "home/balance.xlsx" + ] + } + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "home/documents/document.pdf" + ] + } + }, + { + "userId": "user-7", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/balance.xlsx", + "result": { + "content": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + } + } + }, + { + "userId": "user-8", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/home/document.pdf", + "result": { + "content": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + } + } + }, + { + "userId": "user-7", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/" + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + }, + "location": "home/presentation.ppt" + }, + { + "userId": "user-0", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/home/" + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "important/presentation.ppt" + ] + } + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + }, + "location": "documents/presentation.ppt" + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "file.txt" + ] + } + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/documents/presentation.ppt", + "result": { + "dirContent": [ + "home/documents/presentation.ppt" + ] + } + }, + { + "userId": "user-0", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/presentation.ppt", + "result": { + "content": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + } + } + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + }, + "location": "documents/file.txt" + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "documents/document.pdf", + "documents/home/document.pdf" + ] + } + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "document.pdf", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/", + "result": { + "dirContent": [ + "home/documents/document.pdf" + ] + } + }, + { + "userId": "user-6", + "type": "READ", + "storageType": "PRIVATE", + "location": "file.txt", + "result": { + "content": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + } + } + }, + { + "userId": "user-1", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/documents/document.pdf", + "result": { + "content": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + } + } + }, + { + "userId": "user-8", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/" + }, + { + "userId": "user-6", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-1", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/documents/" + }, + { + "userId": "user-2", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/" + }, + { + "userId": "user-2", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + }, + "location": "important/home/file.txt" + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/important/balance.xlsx", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/", + "result": { + "dirContent": [ + "important/presentation.ppt" + ] + } + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/", + "result": { + "dirContent": [ + "important/home/file.txt" + ] + } + }, + { + "userId": "user-9", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/presentation.ppt", + "result": { + "content": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + } + } + }, + { + "userId": "user-3", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/file.txt", + "result": { + "content": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + } + } + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + }, + "location": "important/documents/file.txt" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "important/documents/presentation.ppt" + }, + { + "userId": "user-2", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + }, + "location": "home/presentation.ppt" + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/document.pdf", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-9", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/presentation.ppt", + "result": { + "content": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + } + } + }, + { + "userId": "user-2", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/" + }, + { + "userId": "user-2", + "type": "READ", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "content": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + } + } + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + }, + "location": "home/documents/balance.xlsx" + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + }, + "location": "home/balance.xlsx" + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/file.txt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-3", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/file.txt", + "result": { + "content": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + } + } + }, + { + "userId": "user-2", + "type": "READ", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "content": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + } + } + }, + { + "userId": "user-9", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/" + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "dirContent": [ + "balance.xlsx" + ] + } + }, + { + "userId": "user-3", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/home/" + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + }, + "location": "document.pdf" + }, + { + "userId": "user-3", + "type": "READ", + "storageType": "PRIVATE", + "location": "document.pdf", + "result": { + "content": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + } + } + }, + { + "userId": "user-1", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/documents/" + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/", + "result": { + "dirContent": [ + "important/home/file.txt" + ] + } + }, + { + "userId": "user-8", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/" + }, + { + "userId": "user-3", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + }, + "location": "important/balance.xlsx" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-6", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-2", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "file.txt" + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/", + "result": { + "dirContent": [ + "documents/presentation.ppt", + "documents/important/presentation.ppt" + ] + } + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/documents/balance.xlsx", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "home/presentation.ppt", + "home/documents/balance.xlsx", + "balance.xlsx" + ] + } + }, + { + "userId": "user-5", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/balance.xlsx", + "result": { + "content": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + } + } + }, + { + "userId": "user-0", + "type": "READ", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "content": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + } + } + }, + { + "userId": "user-9", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + }, + "location": "important/file.txt" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + }, + "location": "home/file.txt" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/home/file.txt", + "result": { + "dirContent": [ + "important/home/file.txt" + ] + } + }, + { + "userId": "user-5", + "type": "READ", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "content": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + } + } + }, + { + "userId": "user-1", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/home/file.txt", + "result": { + "content": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + } + } + }, + { + "userId": "user-4", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-5", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + }, + "location": "documents/documents/document.pdf" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "documents/home/document.pdf" + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + }, + "location": "home/home/document.pdf" + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "file.txt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-7", + "type": "READ", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "content": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + } + } + }, + { + "userId": "user-6", + "type": "READ", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "content": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + } + } + }, + { + "userId": "user-0", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/home/document.pdf", + "result": { + "content": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + } + } + }, + { + "userId": "user-3", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/documents/" + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + }, + "location": "important/important/balance.xlsx" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + }, + "location": "important/documents/document.pdf" + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "file.txt", + "result": { + "dirContent": [ + "file.txt" + ] + } + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/", + "result": { + "dirContent": [ + "important/balance.xlsx", + "important/file.txt", + "important/important/balance.xlsx" + ] + } + }, + { + "userId": "user-7", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/documents/balance.xlsx", + "result": { + "content": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + } + } + }, + { + "userId": "user-1", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/home/file.txt", + "result": { + "content": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + } + } + }, + { + "userId": "user-2", + "type": "READ", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "content": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + } + } + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + }, + "location": "file.txt" + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/balance.xlsx", + "result": { + "dirContent": [ + "important/balance.xlsx" + ] + } + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "dirContent": [ + "presentation.ppt" + ] + } + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "file.txt", + "result": { + "dirContent": [ + "file.txt" + ] + } + }, + { + "userId": "user-2", + "type": "READ", + "storageType": "PRIVATE", + "location": "file.txt", + "result": { + "content": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + } + } + }, + { + "userId": "user-7", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/" + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + }, + "location": "important/file.txt" + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + }, + "location": "important/balance.xlsx" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + }, + "location": "documents/presentation.ppt" + }, + { + "userId": "user-6", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + }, + "location": "important/documents/file.txt" + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "important/file.txt", + "balance.xlsx" + ] + } + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "important/balance.xlsx", + "important/file.txt", + "important/important/balance.xlsx" + ] + } + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "documents/presentation.ppt", + "important/documents/document.pdf" + ] + } + }, + { + "userId": "user-8", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/important/balance.xlsx", + "result": { + "content": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + } + } + }, + { + "userId": "user-8", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/important/" + }, + { + "userId": "user-2", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-7", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/" + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/presentation.ppt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-5", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/documents/" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + }, + "location": "file.txt" + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-6", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/documents/" + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "presentation.ppt" + ] + } + }, + { + "userId": "user-6", + "type": "READ", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "content": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + } + } + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + }, + "location": "documents/balance.xlsx" + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "important/document.pdf" + }, + { + "userId": "user-6", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + }, + "location": "home/home/document.pdf" + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + }, + "location": "documents/important/presentation.ppt" + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "important/balance.xlsx", + "important/file.txt" + ] + } + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "documents/presentation.ppt", + "file.txt" + ] + } + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/", + "result": { + "dirContent": [ + "home/home/document.pdf" + ] + } + }, + { + "userId": "user-8", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/file.txt", + "result": { + "content": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + } + } + }, + { + "userId": "user-0", + "type": "READ", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "content": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + } + } + }, + { + "userId": "user-3", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/" + }, + { + "userId": "user-3", + "type": "READ", + "storageType": "PRIVATE", + "location": "file.txt", + "result": { + "content": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + } + } + }, + { + "userId": "user-7", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/" + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "dirContent": [ + "balance.xlsx" + ] + } + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + }, + "location": "home/file.txt" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "documents/presentation.ppt" + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "file.txt" + ] + } + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/balance.xlsx", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-4", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/home/document.pdf", + "result": { + "content": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + } + } + }, + { + "userId": "user-5", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/" + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "file.txt" + ] + } + }, + { + "userId": "user-0", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/home/" + }, + { + "userId": "user-0", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/important/presentation.ppt", + "result": { + "content": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + } + } + }, + { + "userId": "user-1", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/home/" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + }, + "location": "documents/document.pdf" + }, + { + "userId": "user-7", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/" + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-7", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-7", + "type": "READ", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "content": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + } + } + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + }, + "location": "document.pdf" + }, + { + "userId": "user-2", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + }, + "location": "documents/important/file.txt" + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/presentation.ppt", + "result": { + "dirContent": [ + "important/presentation.ppt" + ] + } + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "presentation.ppt", + "file.txt" + ] + } + }, + { + "userId": "user-3", + "type": "READ", + "storageType": "PRIVATE", + "location": "file.txt", + "result": { + "content": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + } + } + }, + { + "userId": "user-4", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/home/document.pdf", + "result": { + "content": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + } + } + }, + { + "userId": "user-5", + "type": "READ", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "content": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + } + } + }, + { + "userId": "user-7", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-8", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/" + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "documents/balance.xlsx" + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/balance.xlsx", + "result": { + "dirContent": [ + "documents/balance.xlsx" + ] + } + }, + { + "userId": "user-3", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-4", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/" + }, + { + "userId": "user-0", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/important/" + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + }, + "location": "documents/presentation.ppt" + }, + { + "userId": "user-1", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/" + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + }, + "location": "file.txt" + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "documents/home/file.txt" + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + }, + "location": "documents/presentation.ppt" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "important/important/document.pdf" + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "file.txt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-8", + "type": "READ", + "storageType": "PRIVATE", + "location": "file.txt", + "result": { + "content": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + } + } + }, + { + "userId": "user-3", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/presentation.ppt", + "result": { + "content": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + } + } + }, + { + "userId": "user-8", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/" + }, + { + "userId": "user-5", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + }, + "location": "file.txt" + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "home/documents/presentation.ppt" + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + }, + "location": "file.txt" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "home/documents/presentation.ppt" + ] + } + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/", + "result": { + "dirContent": [ + "documents/home/file.txt" + ] + } + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "document.pdf" + ] + } + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "file.txt", + "balance.xlsx" + ] + } + }, + { + "userId": "user-5", + "type": "READ", + "storageType": "PRIVATE", + "location": "file.txt", + "result": { + "content": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + } + } + }, + { + "userId": "user-1", + "type": "READ", + "storageType": "PRIVATE", + "location": "document.pdf", + "result": { + "content": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + } + } + }, + { + "userId": "user-2", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/important/" + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + }, + "location": "important/important/document.pdf" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + }, + "location": "important/important/balance.xlsx" + }, + { + "userId": "user-6", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "document.pdf" + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + }, + "location": "home/balance.xlsx" + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "file.txt" + ] + } + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "documents/home/file.txt", + "important/document.pdf" + ] + } + }, + { + "userId": "user-8", + "type": "READ", + "storageType": "PRIVATE", + "location": "file.txt", + "result": { + "content": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + } + } + }, + { + "userId": "user-6", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/home/document.pdf", + "result": { + "content": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + } + } + }, + { + "userId": "user-0", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/presentation.ppt", + "result": { + "content": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + } + } + }, + { + "userId": "user-9", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/" + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + }, + "location": "home/important/presentation.ppt" + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + }, + "location": "home/presentation.ppt" + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "document.pdf" + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "file.txt" + ] + } + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "document.pdf", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "file.txt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-0", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/presentation.ppt", + "result": { + "content": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + } + } + }, + { + "userId": "user-1", + "type": "READ", + "storageType": "PRIVATE", + "location": "document.pdf", + "result": { + "content": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + } + } + }, + { + "userId": "user-9", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/home/file.txt", + "result": { + "content": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + } + } + }, + { + "userId": "user-1", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-7", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/" + }, + { + "userId": "user-9", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/important/" + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "document.pdf", + "documents/home/file.txt" + ] + } + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-6", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + }, + "location": "document.pdf" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "home/documents/presentation.ppt" + }, + { + "userId": "user-2", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + }, + "location": "home/important/document.pdf" + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/important/document.pdf", + "result": { + "dirContent": [ + "home/important/document.pdf" + ] + } + }, + { + "userId": "user-7", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/important/" + }, + { + "userId": "user-3", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/" + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "file.txt" + ] + } + }, + { + "userId": "user-3", + "type": "READ", + "storageType": "PRIVATE", + "location": "file.txt", + "result": { + "content": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + } + } + }, + { + "userId": "user-5", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + }, + "location": "important/home/file.txt" + }, + { + "userId": "user-1", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/documents/" + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + }, + "location": "important/balance.xlsx" + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + }, + "location": "home/file.txt" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + }, + "location": "important/documents/balance.xlsx" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "file.txt" + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "document.pdf", + "result": { + "dirContent": [ + "document.pdf" + ] + } + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-3", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/file.txt", + "result": { + "content": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + } + } + }, + { + "userId": "user-6", + "type": "READ", + "storageType": "PRIVATE", + "location": "document.pdf", + "result": { + "content": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + } + } + }, + { + "userId": "user-0", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/balance.xlsx", + "result": { + "content": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + } + } + }, + { + "userId": "user-5", + "type": "READ", + "storageType": "PRIVATE", + "location": "file.txt", + "result": { + "content": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + } + } + }, + { + "userId": "user-8", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + }, + "location": "home/file.txt" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + }, + "location": "documents/important/presentation.ppt" + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "document.pdf" + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "file.txt", + "home/file.txt" + ] + } + }, + { + "userId": "user-6", + "type": "READ", + "storageType": "PRIVATE", + "location": "document.pdf", + "result": { + "content": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + } + } + }, + { + "userId": "user-2", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/important/document.pdf", + "result": { + "content": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + } + } + }, + { + "userId": "user-0", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + }, + "location": "home/presentation.ppt" + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + }, + "location": "documents/important/balance.xlsx" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "file.txt" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "home/file.txt" + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-2", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/important/document.pdf", + "result": { + "content": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + } + } + }, + { + "userId": "user-4", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + }, + "location": "documents/home/file.txt" + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "document.pdf", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "file.txt", + "home/file.txt" + ] + } + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "document.pdf", + "home/home/document.pdf", + "presentation.ppt" + ] + } + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/file.txt", + "result": { + "dirContent": [ + "home/file.txt" + ] + } + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/document.pdf", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/important/document.pdf", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-9", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/important/balance.xlsx", + "result": { + "content": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + } + } + }, + { + "userId": "user-6", + "type": "READ", + "storageType": "PRIVATE", + "location": "document.pdf", + "result": { + "content": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + } + } + }, + { + "userId": "user-8", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/" + }, + { + "userId": "user-1", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/" + }, + { + "userId": "user-5", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/home/" + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "home/balance.xlsx" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + }, + "location": "file.txt" + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + }, + "location": "documents/home/balance.xlsx" + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/", + "result": { + "dirContent": [ + "home/balance.xlsx" + ] + } + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "document.pdf", + "documents/home/file.txt", + "documents/important/balance.xlsx" + ] + } + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/file.txt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-6", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-6", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + }, + "location": "important/presentation.ppt" + }, + { + "userId": "user-7", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/" + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + }, + "location": "documents/important/balance.xlsx" + }, + { + "userId": "user-0", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/home/" + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + }, + "location": "document.pdf" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + }, + "location": "home/documents/presentation.ppt" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-2", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "documents/documents/balance.xlsx" + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/document.pdf", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "document.pdf", + "result": { + "dirContent": [ + "document.pdf" + ] + } + }, + { + "userId": "user-7", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/important/balance.xlsx", + "result": { + "content": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + } + } + }, + { + "userId": "user-3", + "type": "READ", + "storageType": "PRIVATE", + "location": "file.txt", + "result": { + "content": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + } + } + }, + { + "userId": "user-9", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/important/balance.xlsx", + "result": { + "content": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + } + } + }, + { + "userId": "user-6", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/" + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-2", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/documents/" + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-1", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + }, + "location": "home/documents/file.txt" + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + }, + "location": "important/file.txt" + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "document.pdf", + "result": { + "dirContent": [ + "document.pdf" + ] + } + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/documents/presentation.ppt", + "result": { + "dirContent": [ + "home/documents/presentation.ppt" + ] + } + }, + { + "userId": "user-2", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/important/document.pdf", + "result": { + "content": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + } + } + }, + { + "userId": "user-7", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/important/" + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + }, + "location": "home/home/balance.xlsx" + }, + { + "userId": "user-7", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/home/balance.xlsx", + "result": { + "content": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + } + } + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + }, + "location": "document.pdf" + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + }, + "location": "important/balance.xlsx" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "important/important/document.pdf" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + }, + "location": "home/document.pdf" + }, + { + "userId": "user-6", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + }, + "location": "home/home/file.txt" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "home/document.pdf" + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "file.txt", + "result": { + "dirContent": [ + "file.txt" + ] + } + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/", + "result": { + "dirContent": [ + "home/documents/presentation.ppt" + ] + } + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "important/important/document.pdf" + ] + } + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "home/home/file.txt" + ] + } + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "home/document.pdf" + ] + } + }, + { + "userId": "user-9", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/home/file.txt", + "result": { + "content": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + } + } + }, + { + "userId": "user-4", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/important/document.pdf", + "result": { + "content": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + } + } + }, + { + "userId": "user-1", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/document.pdf", + "result": { + "content": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + } + } + }, + { + "userId": "user-0", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/" + }, + { + "userId": "user-2", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/important/" + }, + { + "userId": "user-6", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/home/" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "presentation.ppt", + "file.txt", + "home/file.txt" + ] + } + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "important/important/document.pdf" + ] + } + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/important/balance.xlsx", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-3", + "type": "READ", + "storageType": "PRIVATE", + "location": "file.txt", + "result": { + "content": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + } + } + }, + { + "userId": "user-4", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/important/document.pdf", + "result": { + "content": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + } + } + }, + { + "userId": "user-0", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/documents/presentation.ppt", + "result": { + "content": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + } + } + }, + { + "userId": "user-1", + "type": "READ", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "content": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + } + } + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + }, + "location": "home/home/balance.xlsx" + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/documents/presentation.ppt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-4", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/home/balance.xlsx", + "result": { + "content": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + } + } + }, + { + "userId": "user-1", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + }, + "location": "document.pdf" + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "document.pdf" + ] + } + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "document.pdf", + "important/balance.xlsx", + "home/documents/file.txt", + "documents/home/file.txt", + "documents/important/balance.xlsx" + ] + } + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "presentation.ppt", + "file.txt", + "home/file.txt" + ] + } + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/document.pdf", + "result": { + "dirContent": [ + "home/document.pdf" + ] + } + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-0", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/documents/presentation.ppt", + "result": { + "content": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + } + } + }, + { + "userId": "user-5", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/home/" + }, + { + "userId": "user-5", + "type": "READ", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "content": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + } + } + }, + { + "userId": "user-4", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-1", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + }, + "location": "home/balance.xlsx" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + }, + "location": "documents/presentation.ppt" + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "document.pdf", + "home/home/balance.xlsx" + ] + } + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/documents/file.txt", + "result": { + "dirContent": [ + "home/documents/file.txt" + ] + } + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/balance.xlsx", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-9", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/balance.xlsx", + "result": { + "content": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + } + } + }, + { + "userId": "user-4", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/balance.xlsx", + "result": { + "content": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + } + } + }, + { + "userId": "user-7", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/home/" + }, + { + "userId": "user-7", + "type": "READ", + "storageType": "PRIVATE", + "location": "document.pdf", + "result": { + "content": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + } + } + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + }, + "location": "home/balance.xlsx" + }, + { + "userId": "user-5", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/balance.xlsx", + "result": { + "content": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + } + } + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + }, + "location": "documents/documents/document.pdf" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + }, + "location": "file.txt" + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "file.txt" + ] + } + }, + { + "userId": "user-7", + "type": "READ", + "storageType": "PRIVATE", + "location": "document.pdf", + "result": { + "content": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + } + } + }, + { + "userId": "user-9", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/home/file.txt", + "result": { + "content": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + } + } + }, + { + "userId": "user-3", + "type": "READ", + "storageType": "PRIVATE", + "location": "file.txt", + "result": { + "content": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + } + } + }, + { + "userId": "user-0", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/documents/presentation.ppt", + "result": { + "content": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + } + } + }, + { + "userId": "user-1", + "type": "READ", + "storageType": "PRIVATE", + "location": "file.txt", + "result": { + "content": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + } + } + }, + { + "userId": "user-0", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/documents/" + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "home/documents/presentation.ppt" + ] + } + }, + { + "userId": "user-1", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "documents/home/balance.xlsx" + }, + { + "userId": "user-2", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "file.txt" + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "document.pdf", + "result": { + "dirContent": [ + "document.pdf" + ] + } + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "file.txt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-7", + "type": "READ", + "storageType": "PRIVATE", + "location": "document.pdf", + "result": { + "content": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + } + } + }, + { + "userId": "user-3", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/" + }, + { + "userId": "user-5", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/important/" + }, + { + "userId": "user-5", + "type": "READ", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "content": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + } + } + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + }, + "location": "documents/home/presentation.ppt" + }, + { + "userId": "user-2", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + }, + "location": "document.pdf" + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "document.pdf" + ] + } + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/documents/presentation.ppt", + "result": { + "dirContent": [ + "home/documents/presentation.ppt" + ] + } + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/document.pdf", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-7", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "important/document.pdf" + }, + { + "userId": "user-7", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/document.pdf", + "result": { + "content": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + } + } + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "home/home/document.pdf" + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + }, + "location": "home/balance.xlsx" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + }, + "location": "documents/home/balance.xlsx" + }, + { + "userId": "user-2", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/file.txt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/home/balance.xlsx", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/", + "result": { + "dirContent": [ + "home/home/document.pdf" + ] + } + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "home/balance.xlsx", + "documents/home/balance.xlsx" + ] + } + }, + { + "userId": "user-5", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/balance.xlsx", + "result": { + "content": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + } + } + }, + { + "userId": "user-2", + "type": "READ", + "storageType": "PRIVATE", + "location": "document.pdf", + "result": { + "content": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + } + } + }, + { + "userId": "user-5", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/" + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "file.txt", + "result": { + "dirContent": [ + "file.txt" + ] + } + }, + { + "userId": "user-6", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + }, + "location": "home/balance.xlsx" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "file.txt" + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/document.pdf", + "result": { + "dirContent": [ + "home/document.pdf" + ] + } + }, + { + "userId": "user-6", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/" + }, + { + "userId": "user-6", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-1", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + }, + "location": "documents/home/file.txt" + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "documents/home/file.txt" + ] + } + }, + { + "userId": "user-6", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-6", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "documents/presentation.ppt" + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/", + "result": { + "dirContent": [ + "documents/presentation.ppt" + ] + } + }, + { + "userId": "user-6", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/presentation.ppt", + "result": { + "content": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + } + } + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + }, + "location": "important/balance.xlsx" + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/presentation.ppt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "home/document.pdf", + "home/balance.xlsx", + "file.txt", + "balance.xlsx" + ] + } + }, + { + "userId": "user-3", + "type": "READ", + "storageType": "PRIVATE", + "location": "file.txt", + "result": { + "content": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + } + } + }, + { + "userId": "user-1", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/home/file.txt", + "result": { + "content": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + } + } + }, + { + "userId": "user-3", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/" + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + }, + "location": "documents/balance.xlsx" + }, + { + "userId": "user-6", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/" + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-2", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-2", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "file.txt" + }, + { + "userId": "user-2", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + }, + "location": "home/documents/balance.xlsx" + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "home/document.pdf", + "home/balance.xlsx", + "file.txt", + "balance.xlsx" + ] + } + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/important/document.pdf", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-7", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/" + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/documents/file.txt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-3", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/" + }, + { + "userId": "user-4", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/" + }, + { + "userId": "user-4", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/home/balance.xlsx", + "result": { + "content": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + } + } + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + }, + "location": "important/important/balance.xlsx" + }, + { + "userId": "user-2", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + }, + "location": "home/important/balance.xlsx" + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "file.txt", + "result": { + "dirContent": [ + "file.txt" + ] + } + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/", + "result": { + "dirContent": [ + "home/important/balance.xlsx" + ] + } + }, + { + "userId": "user-9", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/home/presentation.ppt", + "result": { + "content": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + } + } + }, + { + "userId": "user-5", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/document.pdf", + "result": { + "content": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + } + } + }, + { + "userId": "user-0", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/home/balance.xlsx", + "result": { + "content": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + } + } + }, + { + "userId": "user-2", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/important/balance.xlsx", + "result": { + "content": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + } + } + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + }, + "location": "important/balance.xlsx" + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + }, + "location": "file.txt" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + }, + "location": "important/documents/document.pdf" + }, + { + "userId": "user-2", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + }, + "location": "document.pdf" + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "document.pdf", + "important/balance.xlsx", + "documents/home/presentation.ppt", + "home/documents/file.txt", + "documents/home/file.txt", + "documents/important/balance.xlsx" + ] + } + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/documents/presentation.ppt", + "result": { + "dirContent": [ + "home/documents/presentation.ppt" + ] + } + }, + { + "userId": "user-2", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/important/balance.xlsx", + "result": { + "content": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + } + } + }, + { + "userId": "user-8", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/balance.xlsx", + "result": { + "content": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + } + } + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + }, + "location": "documents/home/file.txt" + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + }, + "location": "home/important/file.txt" + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "documents/important/document.pdf" + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/important/", + "result": { + "dirContent": [ + "important/important/balance.xlsx" + ] + } + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/home/", + "result": { + "dirContent": [ + "documents/home/file.txt" + ] + } + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/file.txt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-9", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/balance.xlsx", + "result": { + "content": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + } + } + }, + { + "userId": "user-4", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/important/balance.xlsx", + "result": { + "content": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + } + } + }, + { + "userId": "user-0", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/home/balance.xlsx", + "result": { + "content": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + } + } + }, + { + "userId": "user-1", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/home/file.txt", + "result": { + "content": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + } + } + }, + { + "userId": "user-7", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/home/file.txt", + "result": { + "content": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + } + } + }, + { + "userId": "user-1", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/home/" + }, + { + "userId": "user-8", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/important/" + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + }, + "location": "important/file.txt" + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/home/balance.xlsx", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-9", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/home/file.txt", + "result": { + "content": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + } + } + }, + { + "userId": "user-4", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/important/balance.xlsx", + "result": { + "content": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + } + } + }, + { + "userId": "user-2", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/important/balance.xlsx", + "result": { + "content": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + } + } + }, + { + "userId": "user-4", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/important/" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-0", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/documents/" + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + }, + "location": "file.txt" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + }, + "location": "documents/document.pdf" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + }, + "location": "home/home/presentation.ppt" + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "file.txt", + "result": { + "dirContent": [ + "file.txt" + ] + } + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/home/presentation.ppt", + "result": { + "dirContent": [ + "home/home/presentation.ppt" + ] + } + }, + { + "userId": "user-7", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-8", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "home/documents/presentation.ppt" + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/documents/presentation.ppt", + "result": { + "dirContent": [ + "home/documents/presentation.ppt" + ] + } + }, + { + "userId": "user-8", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/documents/" + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + }, + "location": "important/presentation.ppt" + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "dirContent": [ + "presentation.ppt" + ] + } + }, + { + "userId": "user-0", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/home/balance.xlsx", + "result": { + "content": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + } + } + }, + { + "userId": "user-9", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-3", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + }, + "location": "document.pdf" + }, + { + "userId": "user-2", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + }, + "location": "documents/important/document.pdf" + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-4", + "type": "READ", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "content": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + } + } + }, + { + "userId": "user-0", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/home/balance.xlsx", + "result": { + "content": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + } + } + }, + { + "userId": "user-0", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/home/" + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + }, + "location": "important/balance.xlsx" + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/important/balance.xlsx", + "result": { + "dirContent": [ + "home/important/balance.xlsx" + ] + } + }, + { + "userId": "user-5", + "type": "READ", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "content": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + } + } + }, + { + "userId": "user-2", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/important/balance.xlsx", + "result": { + "content": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + } + } + }, + { + "userId": "user-1", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/home/" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + }, + "location": "home/home/balance.xlsx" + }, + { + "userId": "user-1", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/home/" + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "documents/documents/balance.xlsx" + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + }, + "location": "documents/documents/presentation.ppt" + }, + { + "userId": "user-2", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "home/document.pdf" + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "documents/documents/balance.xlsx" + ] + } + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/home/document.pdf", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "documents/important/document.pdf", + "home/document.pdf", + "home/balance.xlsx", + "file.txt", + "important/documents/document.pdf", + "balance.xlsx" + ] + } + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-3", + "type": "READ", + "storageType": "PRIVATE", + "location": "document.pdf", + "result": { + "content": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + } + } + }, + { + "userId": "user-4", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/home/balance.xlsx", + "result": { + "content": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + } + } + }, + { + "userId": "user-2", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/important/balance.xlsx", + "result": { + "content": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + } + } + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/documents/balance.xlsx", + "result": { + "dirContent": [ + "documents/documents/balance.xlsx" + ] + } + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "dirContent": [ + "balance.xlsx" + ] + } + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/documents/file.txt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/balance.xlsx", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-7", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/documents/balance.xlsx", + "result": { + "content": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + } + } + }, + { + "userId": "user-9", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/documents/" + }, + { + "userId": "user-5", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/" + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "documents/home/presentation.ppt" + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "home/documents/file.txt" + }, + { + "userId": "user-2", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/important/file.txt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-9", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/balance.xlsx", + "result": { + "content": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + } + } + }, + { + "userId": "user-3", + "type": "READ", + "storageType": "PRIVATE", + "location": "document.pdf", + "result": { + "content": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + } + } + }, + { + "userId": "user-4", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/document.pdf", + "result": { + "content": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + } + } + }, + { + "userId": "user-5", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/important/document.pdf", + "result": { + "content": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + } + } + }, + { + "userId": "user-1", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/documents/file.txt", + "result": { + "content": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + } + } + }, + { + "userId": "user-2", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + }, + "location": "file.txt" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + }, + "location": "documents/documents/document.pdf" + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-8", + "type": "READ", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "content": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + } + } + }, + { + "userId": "user-4", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + }, + "location": "document.pdf" + }, + { + "userId": "user-5", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "document.pdf", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-4", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + }, + "location": "file.txt" + }, + { + "userId": "user-4", + "type": "READ", + "storageType": "PRIVATE", + "location": "file.txt", + "result": { + "content": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + } + } + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + }, + "location": "documents/document.pdf" + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + }, + "location": "home/home/file.txt" + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "dirContent": [ + "presentation.ppt" + ] + } + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/presentation.ppt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-4", + "type": "READ", + "storageType": "PRIVATE", + "location": "file.txt", + "result": { + "content": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + } + } + }, + { + "userId": "user-1", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/documents/document.pdf", + "result": { + "content": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + } + } + }, + { + "userId": "user-7", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/home/presentation.ppt", + "result": { + "content": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + } + } + }, + { + "userId": "user-5", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/document.pdf", + "result": { + "content": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + } + } + }, + { + "userId": "user-3", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-4", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + }, + "location": "important/document.pdf" + }, + { + "userId": "user-2", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "important/documents/presentation.ppt" + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/document.pdf", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-1", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/documents/" + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/", + "result": { + "dirContent": [ + "home/documents/file.txt" + ] + } + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "documents/important/document.pdf" + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "home/presentation.ppt" + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "documents/document.pdf" + ] + } + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/home/file.txt", + "result": { + "dirContent": [ + "home/home/file.txt" + ] + } + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "important/balance.xlsx", + "balance.xlsx" + ] + } + }, + { + "userId": "user-0", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/home/file.txt", + "result": { + "content": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + } + } + }, + { + "userId": "user-8", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "home/documents/balance.xlsx" + }, + { + "userId": "user-6", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + }, + "location": "file.txt" + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/", + "result": { + "dirContent": [ + "documents/home/presentation.ppt", + "documents/important/document.pdf", + "documents/documents/balance.xlsx" + ] + } + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-7", + "type": "READ", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "content": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + } + } + }, + { + "userId": "user-9", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/balance.xlsx", + "result": { + "content": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + } + } + }, + { + "userId": "user-2", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/documents/presentation.ppt", + "result": { + "content": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + } + } + }, + { + "userId": "user-5", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + }, + "location": "document.pdf" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "dirContent": [ + "balance.xlsx" + ] + } + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/home/", + "result": { + "dirContent": [ + "home/home/file.txt" + ] + } + }, + { + "userId": "user-3", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/documents/balance.xlsx", + "result": { + "content": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + } + } + }, + { + "userId": "user-0", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/home/file.txt", + "result": { + "content": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + } + } + }, + { + "userId": "user-2", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/documents/presentation.ppt", + "result": { + "content": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + } + } + }, + { + "userId": "user-6", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-2", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/documents/" + }, + { + "userId": "user-5", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "home/documents/presentation.ppt" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "documents/important/balance.xlsx" + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-3", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/documents/" + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + }, + "location": "documents/file.txt" + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + }, + "location": "important/document.pdf" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + }, + "location": "home/file.txt" + }, + { + "userId": "user-6", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + }, + "location": "documents/balance.xlsx" + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/important/file.txt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-7", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/home/presentation.ppt", + "result": { + "content": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + } + } + }, + { + "userId": "user-9", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/document.pdf", + "result": { + "content": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + } + } + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + }, + "location": "file.txt" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + }, + "location": "home/file.txt" + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/presentation.ppt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/important/balance.xlsx", + "result": { + "dirContent": [ + "documents/important/balance.xlsx" + ] + } + }, + { + "userId": "user-4", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/documents/" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + }, + "location": "important/home/document.pdf" + }, + { + "userId": "user-4", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/home/document.pdf", + "result": { + "content": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + } + } + }, + { + "userId": "user-5", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/" + }, + { + "userId": "user-1", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/" + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "dirContent": [ + "presentation.ppt" + ] + } + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + }, + "location": "documents/home/document.pdf" + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + }, + "location": "home/document.pdf" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + }, + "location": "documents/important/file.txt" + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + }, + "location": "home/balance.xlsx" + }, + { + "userId": "user-6", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/balance.xlsx", + "result": { + "content": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + } + } + }, + { + "userId": "user-9", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/balance.xlsx", + "result": { + "content": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + } + } + }, + { + "userId": "user-0", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/home/file.txt", + "result": { + "content": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + } + } + }, + { + "userId": "user-8", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + }, + "location": "home/home/balance.xlsx" + }, + { + "userId": "user-0", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/home/" + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + }, + "location": "documents/home/balance.xlsx" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/document.pdf", + "result": { + "dirContent": [ + "important/document.pdf" + ] + } + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "file.txt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-7", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/home/" + }, + { + "userId": "user-8", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/home/" + }, + { + "userId": "user-8", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/home/balance.xlsx", + "result": { + "content": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + } + } + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + }, + "location": "important/important/balance.xlsx" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + }, + "location": "documents/balance.xlsx" + }, + { + "userId": "user-6", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/presentation.ppt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/home/balance.xlsx", + "result": { + "dirContent": [ + "home/home/balance.xlsx" + ] + } + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "dirContent": [ + "presentation.ppt" + ] + } + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-7", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/important/document.pdf", + "result": { + "content": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + } + } + }, + { + "userId": "user-3", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/document.pdf", + "result": { + "content": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + } + } + }, + { + "userId": "user-4", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/home/document.pdf", + "result": { + "content": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + } + } + }, + { + "userId": "user-6", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/balance.xlsx", + "result": { + "content": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + } + } + }, + { + "userId": "user-8", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/home/" + }, + { + "userId": "user-9", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/" + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/", + "result": { + "dirContent": [ + "documents/home/document.pdf" + ] + } + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + }, + "location": "important/document.pdf" + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + }, + "location": "documents/home/file.txt" + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "important/balance.xlsx" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + }, + "location": "home/home/document.pdf" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + }, + "location": "home/documents/file.txt" + }, + { + "userId": "user-2", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "documents/home/balance.xlsx" + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/", + "result": { + "dirContent": [ + "home/balance.xlsx" + ] + } + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/documents/", + "result": { + "dirContent": [ + "home/documents/file.txt" + ] + } + }, + { + "userId": "user-2", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/home/balance.xlsx", + "result": { + "content": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + } + } + }, + { + "userId": "user-6", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/" + }, + { + "userId": "user-9", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/home/" + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + }, + "location": "documents/document.pdf" + }, + { + "userId": "user-1", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-2", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/home/" + }, + { + "userId": "user-2", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "document.pdf" + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + }, + "location": "important/file.txt" + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + }, + "location": "document.pdf" + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + }, + "location": "important/important/balance.xlsx" + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "documents/document.pdf", + "balance.xlsx" + ] + } + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "important/balance.xlsx", + "home/document.pdf" + ] + } + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "document.pdf", + "home/home/document.pdf", + "documents/important/file.txt", + "important/important/balance.xlsx", + "important/home/document.pdf" + ] + } + }, + { + "userId": "user-3", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/balance.xlsx", + "result": { + "content": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + } + } + }, + { + "userId": "user-4", + "type": "READ", + "storageType": "PRIVATE", + "location": "document.pdf", + "result": { + "content": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + } + } + }, + { + "userId": "user-7", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/important/document.pdf", + "result": { + "content": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + } + } + }, + { + "userId": "user-8", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/document.pdf", + "result": { + "content": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + } + } + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + }, + "location": "document.pdf" + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + }, + "location": "important/balance.xlsx" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + }, + "location": "home/balance.xlsx" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + }, + "location": "important/file.txt" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + }, + "location": "important/important/document.pdf" + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/", + "result": { + "dirContent": [ + "important/document.pdf" + ] + } + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "dirContent": [ + "balance.xlsx" + ] + } + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "file.txt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "document.pdf", + "result": { + "dirContent": [ + "document.pdf" + ] + } + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "important/balance.xlsx", + "documents/document.pdf", + "balance.xlsx" + ] + } + }, + { + "userId": "user-9", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/document.pdf", + "result": { + "content": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + } + } + }, + { + "userId": "user-5", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/balance.xlsx", + "result": { + "content": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + } + } + }, + { + "userId": "user-2", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-9", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/" + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + }, + "location": "home/presentation.ppt" + }, + { + "userId": "user-5", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/" + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "important/documents/presentation.ppt" + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "dirContent": [ + "presentation.ppt" + ] + } + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "file.txt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "important/balance.xlsx", + "home/document.pdf", + "important/documents/presentation.ppt" + ] + } + }, + { + "userId": "user-9", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/document.pdf", + "result": { + "content": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + } + } + }, + { + "userId": "user-8", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-9", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-5", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-6", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + }, + "location": "file.txt" + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + }, + "location": "documents/balance.xlsx" + }, + { + "userId": "user-6", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + }, + "location": "important/home/presentation.ppt" + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/document.pdf", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-0", + "type": "READ", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "content": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + } + } + }, + { + "userId": "user-1", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/important/balance.xlsx", + "result": { + "content": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + } + } + }, + { + "userId": "user-7", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/" + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/documents/balance.xlsx", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-7", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/file.txt", + "result": { + "content": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + } + } + }, + { + "userId": "user-1", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/important/" + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-8", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + }, + "location": "home/important/balance.xlsx" + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "presentation.ppt", + "important/file.txt" + ] + } + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/important/balance.xlsx", + "result": { + "dirContent": [ + "home/important/balance.xlsx" + ] + } + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/home/file.txt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-7", + "type": "READ", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "content": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + } + } + }, + { + "userId": "user-4", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/home/document.pdf", + "result": { + "content": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + } + } + }, + { + "userId": "user-4", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/important/balance.xlsx", + "result": { + "content": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + } + } + }, + { + "userId": "user-6", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/home/presentation.ppt", + "result": { + "content": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + } + } + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "important/file.txt" + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + }, + "location": "important/presentation.ppt" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + }, + "location": "important/home/document.pdf" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-2", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + }, + "location": "home/document.pdf" + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/", + "result": { + "dirContent": [ + "important/balance.xlsx", + "important/presentation.ppt", + "important/documents/presentation.ppt" + ] + } + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/important/balance.xlsx", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-3", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/balance.xlsx", + "result": { + "content": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + } + } + }, + { + "userId": "user-4", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/home/" + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/home/file.txt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + }, + "location": "important/balance.xlsx" + }, + { + "userId": "user-2", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + }, + "location": "important/presentation.ppt" + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/", + "result": { + "dirContent": [ + "home/balance.xlsx" + ] + } + }, + { + "userId": "user-0", + "type": "READ", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "content": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + } + } + }, + { + "userId": "user-7", + "type": "READ", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "content": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + } + } + }, + { + "userId": "user-8", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/" + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + }, + "location": "important/documents/balance.xlsx" + }, + { + "userId": "user-8", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/important/balance.xlsx", + "result": { + "content": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + } + } + }, + { + "userId": "user-2", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/" + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/file.txt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + }, + "location": "important/presentation.ppt" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + }, + "location": "documents/home/presentation.ppt" + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "file.txt" + }, + { + "userId": "user-2", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + }, + "location": "home/home/presentation.ppt" + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "file.txt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "important/presentation.ppt" + ] + } + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/home/presentation.ppt", + "result": { + "dirContent": [ + "documents/home/presentation.ppt" + ] + } + }, + { + "userId": "user-7", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/file.txt", + "result": { + "content": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + } + } + }, + { + "userId": "user-2", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/home/" + }, + { + "userId": "user-0", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + }, + "location": "important/important/document.pdf" + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/presentation.ppt", + "result": { + "dirContent": [ + "important/presentation.ppt" + ] + } + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/", + "result": { + "dirContent": [ + "important/presentation.ppt" + ] + } + }, + { + "userId": "user-4", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/important/" + }, + { + "userId": "user-2", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/" + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + }, + "location": "home/important/presentation.ppt" + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + }, + "location": "documents/important/file.txt" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + }, + "location": "important/important/balance.xlsx" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + }, + "location": "important/presentation.ppt" + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/", + "result": { + "dirContent": [ + "important/presentation.ppt" + ] + } + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/documents/", + "result": { + "dirContent": [ + "important/documents/presentation.ppt" + ] + } + }, + { + "userId": "user-5", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/home/" + }, + { + "userId": "user-6", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/home/" + }, + { + "userId": "user-1", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/" + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "presentation.ppt" + ] + } + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + }, + "location": "document.pdf" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + }, + "location": "home/home/document.pdf" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + }, + "location": "file.txt" + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/balance.xlsx", + "result": { + "dirContent": [ + "important/balance.xlsx" + ] + } + }, + { + "userId": "user-8", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/documents/" + }, + { + "userId": "user-4", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/important/" + }, + { + "userId": "user-5", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/home/" + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "important/file.txt" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-6", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + }, + "location": "documents/documents/balance.xlsx" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-5", + "type": "READ", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "content": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + } + } + }, + { + "userId": "user-6", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/documents/balance.xlsx", + "result": { + "content": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + } + } + }, + { + "userId": "user-3", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/documents/" + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/home/document.pdf", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-5", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-4", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/home/document.pdf", + "result": { + "content": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + } + } + }, + { + "userId": "user-3", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/" + }, + { + "userId": "user-6", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + }, + "location": "important/file.txt" + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/balance.xlsx", + "result": { + "dirContent": [ + "documents/balance.xlsx" + ] + } + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/", + "result": { + "dirContent": [ + "important/file.txt" + ] + } + }, + { + "userId": "user-7", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/file.txt", + "result": { + "content": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + } + } + }, + { + "userId": "user-8", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/important/" + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "document.pdf", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-4", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/important/" + }, + { + "userId": "user-1", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-6", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/documents/" + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "documents/presentation.ppt" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + }, + "location": "documents/important/file.txt" + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "document.pdf", + "home/balance.xlsx", + "important/home/document.pdf" + ] + } + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "important/file.txt" + ] + } + }, + { + "userId": "user-3", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/presentation.ppt", + "result": { + "content": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + } + } + }, + { + "userId": "user-6", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/file.txt", + "result": { + "content": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + } + } + }, + { + "userId": "user-3", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/" + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/", + "result": { + "dirContent": [ + "documents/balance.xlsx" + ] + } + }, + { + "userId": "user-4", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/" + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "document.pdf", + "important/home/document.pdf" + ] + } + }, + { + "userId": "user-7", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/" + }, + { + "userId": "user-7", + "type": "READ", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "content": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + } + } + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + }, + "location": "documents/home/presentation.ppt" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + }, + "location": "document.pdf" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + }, + "location": "home/file.txt" + }, + { + "userId": "user-2", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + }, + "location": "home/balance.xlsx" + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "document.pdf", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "documents/home/presentation.ppt", + "documents/balance.xlsx" + ] + } + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/important/", + "result": { + "dirContent": [ + "documents/important/file.txt" + ] + } + }, + { + "userId": "user-4", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/home/document.pdf", + "result": { + "content": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + } + } + }, + { + "userId": "user-3", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/home/presentation.ppt", + "result": { + "content": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + } + } + }, + { + "userId": "user-1", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/file.txt", + "result": { + "content": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + } + } + }, + { + "userId": "user-7", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/important/" + }, + { + "userId": "user-9", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/important/" + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + }, + "location": "document.pdf" + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "document.pdf", + "important/presentation.ppt" + ] + } + }, + { + "userId": "user-4", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-6", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/" + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/presentation.ppt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + }, + "location": "home/file.txt" + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "important/balance.xlsx", + "presentation.ppt", + "important/file.txt" + ] + } + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-3", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/balance.xlsx", + "result": { + "content": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + } + } + }, + { + "userId": "user-5", + "type": "READ", + "storageType": "PRIVATE", + "location": "document.pdf", + "result": { + "content": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + } + } + }, + { + "userId": "user-3", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + }, + "location": "important/documents/balance.xlsx" + }, + { + "userId": "user-8", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/important/" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + }, + "location": "home/home/presentation.ppt" + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/balance.xlsx", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-7", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + }, + "location": "documents/file.txt" + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + }, + "location": "home/documents/balance.xlsx" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + }, + "location": "documents/documents/balance.xlsx" + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/home/presentation.ppt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-1", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/file.txt", + "result": { + "content": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + } + } + }, + { + "userId": "user-1", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/documents/" + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + }, + "location": "home/file.txt" + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + }, + "location": "home/important/file.txt" + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/presentation.ppt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/home/balance.xlsx", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "document.pdf", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-4", + "type": "READ", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "content": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + } + } + }, + { + "userId": "user-5", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/home/presentation.ppt", + "result": { + "content": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + } + } + }, + { + "userId": "user-1", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/file.txt", + "result": { + "content": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + } + } + }, + { + "userId": "user-5", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/home/" + }, + { + "userId": "user-6", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + }, + "location": "documents/home/presentation.ppt" + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/documents/balance.xlsx", + "result": { + "dirContent": [ + "home/documents/balance.xlsx" + ] + } + }, + { + "userId": "user-7", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/file.txt", + "result": { + "content": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + } + } + }, + { + "userId": "user-8", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/file.txt", + "result": { + "content": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + } + } + }, + { + "userId": "user-9", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/presentation.ppt", + "result": { + "content": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + } + } + }, + { + "userId": "user-4", + "type": "READ", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "content": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + } + } + }, + { + "userId": "user-1", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/file.txt", + "result": { + "content": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + } + } + }, + { + "userId": "user-0", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/important/" + }, + { + "userId": "user-2", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/" + }, + { + "userId": "user-2", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + }, + "location": "documents/document.pdf" + }, + { + "userId": "user-2", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/document.pdf", + "result": { + "content": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + } + } + }, + { + "userId": "user-6", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/home/" + }, + { + "userId": "user-6", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + }, + "location": "document.pdf" + }, + { + "userId": "user-2", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/" + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + }, + "location": "home/presentation.ppt" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + }, + "location": "home/documents/document.pdf" + }, + { + "userId": "user-6", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + }, + "location": "document.pdf" + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/home/document.pdf", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-1", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/file.txt", + "result": { + "content": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + } + } + }, + { + "userId": "user-5", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + }, + "location": "document.pdf" + }, + { + "userId": "user-6", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/", + "result": { + "dirContent": [ + "documents/file.txt" + ] + } + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-6", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-6", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + }, + "location": "home/presentation.ppt" + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/presentation.ppt", + "result": { + "dirContent": [ + "home/presentation.ppt" + ] + } + }, + { + "userId": "user-6", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/" + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + }, + "location": "home/documents/presentation.ppt" + }, + { + "userId": "user-6", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + }, + "location": "document.pdf" + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/document.pdf", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/home/presentation.ppt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-9", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/presentation.ppt", + "result": { + "content": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + } + } + }, + { + "userId": "user-1", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/file.txt", + "result": { + "content": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + } + } + }, + { + "userId": "user-6", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-6", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + }, + "location": "file.txt" + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "file.txt" + ] + } + }, + { + "userId": "user-6", + "type": "READ", + "storageType": "PRIVATE", + "location": "file.txt", + "result": { + "content": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + } + } + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + }, + "location": "file.txt" + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + }, + "location": "important/documents/balance.xlsx" + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + }, + "location": "file.txt" + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/", + "result": { + "dirContent": [ + "home/documents/document.pdf" + ] + } + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "file.txt" + ] + } + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/home/balance.xlsx", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-4", + "type": "READ", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "content": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + } + } + }, + { + "userId": "user-6", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + }, + "location": "file.txt" + }, + { + "userId": "user-6", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + }, + "location": "file.txt" + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/documents/presentation.ppt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "home/documents/document.pdf", + "balance.xlsx" + ] + } + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "file.txt" + ] + } + }, + { + "userId": "user-6", + "type": "READ", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "content": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + } + } + }, + { + "userId": "user-6", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + }, + "location": "documents/important/file.txt" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + }, + "location": "home/balance.xlsx" + }, + { + "userId": "user-6", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + }, + "location": "home/presentation.ppt" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + }, + "location": "home/document.pdf" + }, + { + "userId": "user-2", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + }, + "location": "documents/home/balance.xlsx" + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "file.txt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "home/balance.xlsx" + ] + } + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "home/presentation.ppt", + "file.txt" + ] + } + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/document.pdf", + "result": { + "dirContent": [ + "home/document.pdf" + ] + } + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/home/balance.xlsx", + "result": { + "dirContent": [ + "documents/home/balance.xlsx" + ] + } + }, + { + "userId": "user-7", + "type": "READ", + "storageType": "PRIVATE", + "location": "file.txt", + "result": { + "content": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + } + } + }, + { + "userId": "user-8", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/documents/presentation.ppt", + "result": { + "content": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + } + } + }, + { + "userId": "user-9", + "type": "READ", + "storageType": "PRIVATE", + "location": "file.txt", + "result": { + "content": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + } + } + }, + { + "userId": "user-1", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/file.txt", + "result": { + "content": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + } + } + }, + { + "userId": "user-6", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-2", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/home/" + }, + { + "userId": "user-2", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "document.pdf" + }, + { + "userId": "user-2", + "type": "READ", + "storageType": "PRIVATE", + "location": "document.pdf", + "result": { + "content": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + } + } + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + }, + "location": "document.pdf" + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "documents/file.txt", + "file.txt", + "balance.xlsx" + ] + } + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "dirContent": [ + "balance.xlsx" + ] + } + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/", + "result": { + "dirContent": [ + "home/balance.xlsx" + ] + } + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "home/presentation.ppt", + "file.txt" + ] + } + }, + { + "userId": "user-0", + "type": "READ", + "storageType": "PRIVATE", + "location": "file.txt", + "result": { + "content": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + } + } + }, + { + "userId": "user-7", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-8", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/documents/" + }, + { + "userId": "user-4", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-8", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/file.txt", + "result": { + "content": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + } + } + }, + { + "userId": "user-9", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/presentation.ppt", + "result": { + "content": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + } + } + }, + { + "userId": "user-1", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/document.pdf", + "result": { + "content": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + } + } + }, + { + "userId": "user-8", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/" + }, + { + "userId": "user-2", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + }, + "location": "file.txt" + }, + { + "userId": "user-6", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "important/presentation.ppt" + }, + { + "userId": "user-2", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + }, + "location": "important/presentation.ppt" + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "document.pdf", + "balance.xlsx" + ] + } + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/", + "result": { + "dirContent": [ + "home/balance.xlsx" + ] + } + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/", + "result": { + "dirContent": [ + "home/presentation.ppt" + ] + } + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "important/presentation.ppt" + ] + } + }, + { + "userId": "user-9", + "type": "READ", + "storageType": "PRIVATE", + "location": "document.pdf", + "result": { + "content": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + } + } + }, + { + "userId": "user-0", + "type": "READ", + "storageType": "PRIVATE", + "location": "file.txt", + "result": { + "content": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + } + } + }, + { + "userId": "user-1", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/document.pdf", + "result": { + "content": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + } + } + }, + { + "userId": "user-6", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/presentation.ppt", + "result": { + "content": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + } + } + }, + { + "userId": "user-5", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/" + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/documents/document.pdf", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + }, + "location": "file.txt" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "important/document.pdf" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "home/documents/balance.xlsx" + }, + { + "userId": "user-2", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-2", + "type": "READ", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "content": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + } + } + }, + { + "userId": "user-8", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + }, + "location": "important/balance.xlsx" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + }, + "location": "documents/home/document.pdf" + }, + { + "userId": "user-6", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "home/file.txt" + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "document.pdf", + "home/presentation.ppt", + "important/presentation.ppt", + "file.txt", + "documents/important/file.txt", + "home/documents/balance.xlsx" + ] + } + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "important/presentation.ppt", + "home/file.txt" + ] + } + }, + { + "userId": "user-2", + "type": "READ", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "content": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + } + } + }, + { + "userId": "user-6", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/presentation.ppt", + "result": { + "content": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + } + } + }, + { + "userId": "user-2", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-2", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "home/documents/balance.xlsx" + }, + { + "userId": "user-5", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/home/" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "documents/documents/file.txt" + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "important/balance.xlsx" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + }, + "location": "file.txt" + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/important/document.pdf", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "important/document.pdf" + ] + } + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/documents/balance.xlsx", + "result": { + "dirContent": [ + "home/documents/balance.xlsx" + ] + } + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "document.pdf", + "important/balance.xlsx", + "balance.xlsx" + ] + } + }, + { + "userId": "user-1", + "type": "READ", + "storageType": "PRIVATE", + "location": "file.txt", + "result": { + "content": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + } + } + }, + { + "userId": "user-6", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/" + }, + { + "userId": "user-6", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/presentation.ppt", + "result": { + "content": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + } + } + }, + { + "userId": "user-2", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/documents/" + }, + { + "userId": "user-3", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/" + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + }, + "location": "home/document.pdf" + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "documents/document.pdf" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + }, + "location": "home/presentation.ppt" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + }, + "location": "documents/home/document.pdf" + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "documents/document.pdf", + "file.txt" + ] + } + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/document.pdf", + "result": { + "dirContent": [ + "important/document.pdf" + ] + } + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/presentation.ppt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-1", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/file.txt", + "result": { + "content": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + } + } + }, + { + "userId": "user-9", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/" + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "document.pdf", + "important/presentation.ppt", + "file.txt", + "documents/important/file.txt" + ] + } + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + }, + "location": "important/documents/document.pdf" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + }, + "location": "documents/documents/document.pdf" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + }, + "location": "documents/presentation.ppt" + }, + { + "userId": "user-7", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/document.pdf", + "result": { + "content": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + } + } + }, + { + "userId": "user-0", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + }, + "location": "important/balance.xlsx" + }, + { + "userId": "user-0", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/balance.xlsx", + "result": { + "content": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + } + } + }, + { + "userId": "user-0", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + }, + "location": "home/document.pdf" + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + }, + "location": "important/presentation.ppt" + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "document.pdf", + "home/document.pdf", + "important/documents/document.pdf", + "balance.xlsx" + ] + } + }, + { + "userId": "user-5", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/presentation.ppt", + "result": { + "content": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + } + } + }, + { + "userId": "user-7", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/" + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + }, + "location": "home/file.txt" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + }, + "location": "file.txt" + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "home/document.pdf", + "presentation.ppt", + "file.txt", + "home/documents/balance.xlsx", + "home/file.txt" + ] + } + }, + { + "userId": "user-6", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/" + }, + { + "userId": "user-1", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/documents/" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + }, + "location": "important/documents/balance.xlsx" + }, + { + "userId": "user-6", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + }, + "location": "documents/file.txt" + }, + { + "userId": "user-2", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + }, + "location": "file.txt" + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "file.txt", + "home/file.txt" + ] + } + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "document.pdf", + "result": { + "dirContent": [ + "document.pdf" + ] + } + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/", + "result": { + "dirContent": [ + "home/document.pdf" + ] + } + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/document.pdf", + "result": { + "dirContent": [ + "home/document.pdf" + ] + } + }, + { + "userId": "user-5", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/presentation.ppt", + "result": { + "content": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + } + } + }, + { + "userId": "user-9", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/important/" + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "document.pdf", + "result": { + "dirContent": [ + "document.pdf" + ] + } + }, + { + "userId": "user-9", + "type": "READ", + "storageType": "PRIVATE", + "location": "document.pdf", + "result": { + "content": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + } + } + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + }, + "location": "home/file.txt" + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/presentation.ppt", + "result": { + "dirContent": [ + "home/presentation.ppt" + ] + } + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "important/presentation.ppt" + ] + } + }, + { + "userId": "user-8", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/file.txt", + "result": { + "content": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + } + } + }, + { + "userId": "user-7", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/" + }, + { + "userId": "user-3", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/documents/" + }, + { + "userId": "user-5", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/documents/" + }, + { + "userId": "user-6", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/" + }, + { + "userId": "user-0", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/" + }, + { + "userId": "user-1", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-8", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/" + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + }, + "location": "home/balance.xlsx" + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + }, + "location": "home/home/file.txt" + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + }, + "location": "documents/file.txt" + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "document.pdf", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/documents/presentation.ppt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-9", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/presentation.ppt", + "result": { + "content": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + } + } + }, + { + "userId": "user-4", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + }, + "location": "important/file.txt" + }, + { + "userId": "user-5", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "home/presentation.ppt" + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "home/presentation.ppt", + "home/document.pdf", + "presentation.ppt" + ] + } + }, + { + "userId": "user-5", + "type": "READ", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "content": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + } + } + }, + { + "userId": "user-2", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "home/important/presentation.ppt" + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/presentation.ppt", + "result": { + "dirContent": [ + "important/presentation.ppt" + ] + } + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/", + "result": { + "dirContent": [ + "home/document.pdf" + ] + } + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/file.txt", + "result": { + "dirContent": [ + "documents/file.txt" + ] + } + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-7", + "type": "READ", + "storageType": "PRIVATE", + "location": "file.txt", + "result": { + "content": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + } + } + }, + { + "userId": "user-8", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/home/file.txt", + "result": { + "content": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + } + } + }, + { + "userId": "user-0", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/file.txt", + "result": { + "content": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + } + } + }, + { + "userId": "user-9", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-4", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/" + }, + { + "userId": "user-0", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/" + }, + { + "userId": "user-7", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/", + "result": { + "dirContent": [ + "home/document.pdf" + ] + } + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/file.txt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-3", + "type": "READ", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "content": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + } + } + }, + { + "userId": "user-5", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/document.pdf", + "result": { + "content": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + } + } + }, + { + "userId": "user-3", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + }, + "location": "documents/important/balance.xlsx" + }, + { + "userId": "user-3", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/important/balance.xlsx", + "result": { + "content": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + } + } + }, + { + "userId": "user-4", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-5", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/" + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "home/home/balance.xlsx" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + }, + "location": "important/file.txt" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + }, + "location": "home/home/balance.xlsx" + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + }, + "location": "file.txt" + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/document.pdf", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-3", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/important/balance.xlsx", + "result": { + "content": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + } + } + }, + { + "userId": "user-8", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/" + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "home/important/file.txt" + }, + { + "userId": "user-8", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/important/file.txt", + "result": { + "content": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + } + } + }, + { + "userId": "user-7", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/home/" + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-0", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-8", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/important/" + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "document.pdf", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "home/documents/document.pdf" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + }, + "location": "important/documents/presentation.ppt" + }, + { + "userId": "user-6", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "documents/balance.xlsx" + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + }, + "location": "important/document.pdf" + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/home/file.txt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/document.pdf", + "result": { + "dirContent": [ + "important/document.pdf" + ] + } + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/file.txt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/presentation.ppt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-3", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/important/balance.xlsx", + "result": { + "content": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + } + } + }, + { + "userId": "user-4", + "type": "READ", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "content": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + } + } + }, + { + "userId": "user-4", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/" + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "home/documents/document.pdf", + "balance.xlsx" + ] + } + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + }, + "location": "file.txt" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "documents/balance.xlsx" + ] + } + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/", + "result": { + "dirContent": [ + "important/document.pdf" + ] + } + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "dirContent": [ + "presentation.ppt" + ] + } + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "balance.xlsx" + ] + } + }, + { + "userId": "user-3", + "type": "READ", + "storageType": "PRIVATE", + "location": "file.txt", + "result": { + "content": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + } + } + }, + { + "userId": "user-0", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/" + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-4", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-1", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + }, + "location": "important/file.txt" + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "documents/balance.xlsx" + ] + } + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/important/presentation.ppt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-5", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/home/balance.xlsx", + "result": { + "content": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + } + } + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + }, + "location": "document.pdf" + }, + { + "userId": "user-6", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "home/balance.xlsx" + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "document.pdf", + "presentation.ppt", + "balance.xlsx" + ] + } + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/documents/document.pdf", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-3", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/important/balance.xlsx", + "result": { + "content": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + } + } + }, + { + "userId": "user-4", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/file.txt", + "result": { + "content": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + } + } + }, + { + "userId": "user-5", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/documents/presentation.ppt", + "result": { + "content": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + } + } + }, + { + "userId": "user-9", + "type": "READ", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "content": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + } + } + }, + { + "userId": "user-5", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + }, + "location": "home/balance.xlsx" + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + }, + "location": "file.txt" + }, + { + "userId": "user-2", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + }, + "location": "important/file.txt" + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-3", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/important/balance.xlsx", + "result": { + "content": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + } + } + }, + { + "userId": "user-4", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/file.txt", + "result": { + "content": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + } + } + }, + { + "userId": "user-3", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/important/" + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "file.txt", + "result": { + "dirContent": [ + "file.txt" + ] + } + }, + { + "userId": "user-4", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/" + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + }, + "location": "documents/home/balance.xlsx" + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + }, + "location": "important/presentation.ppt" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + }, + "location": "important/balance.xlsx" + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/", + "result": { + "dirContent": [ + "important/file.txt" + ] + } + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/home/", + "result": { + "dirContent": [ + "documents/home/balance.xlsx" + ] + } + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/presentation.ppt", + "result": { + "dirContent": [ + "important/presentation.ppt" + ] + } + }, + { + "userId": "user-8", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/home/balance.xlsx", + "result": { + "content": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + } + } + }, + { + "userId": "user-3", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "dirContent": [ + "presentation.ppt" + ] + } + }, + { + "userId": "user-2", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/" + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + }, + "location": "home/balance.xlsx" + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + }, + "location": "home/home/document.pdf" + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "important/important/file.txt" + }, + { + "userId": "user-2", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + }, + "location": "document.pdf" + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "file.txt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "home/balance.xlsx" + ] + } + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/", + "result": { + "dirContent": [ + "home/balance.xlsx" + ] + } + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "document.pdf", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-6", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/balance.xlsx", + "result": { + "content": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + } + } + }, + { + "userId": "user-9", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-3", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "documents/presentation.ppt" + }, + { + "userId": "user-6", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/" + }, + { + "userId": "user-6", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-7", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/" + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/home/balance.xlsx", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + }, + "location": "documents/presentation.ppt" + }, + { + "userId": "user-6", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "home/presentation.ppt" + }, + { + "userId": "user-3", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/presentation.ppt", + "result": { + "content": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + } + } + }, + { + "userId": "user-4", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/balance.xlsx", + "result": { + "content": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + } + } + }, + { + "userId": "user-2", + "type": "READ", + "storageType": "PRIVATE", + "location": "document.pdf", + "result": { + "content": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + } + } + }, + { + "userId": "user-4", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "important/documents/presentation.ppt" + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + }, + "location": "file.txt" + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + }, + "location": "documents/file.txt" + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "home/presentation.ppt" + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/balance.xlsx", + "result": { + "dirContent": [ + "documents/balance.xlsx" + ] + } + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-8", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/home/document.pdf", + "result": { + "content": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + } + } + }, + { + "userId": "user-8", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/home/" + }, + { + "userId": "user-8", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/home/balance.xlsx", + "result": { + "content": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + } + } + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + }, + "location": "documents/balance.xlsx" + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + }, + "location": "home/documents/balance.xlsx" + }, + { + "userId": "user-6", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + }, + "location": "home/important/presentation.ppt" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "home/documents/presentation.ppt" + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/home/balance.xlsx", + "result": { + "dirContent": [ + "documents/home/balance.xlsx" + ] + } + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/balance.xlsx", + "result": { + "dirContent": [ + "home/balance.xlsx" + ] + } + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/balance.xlsx", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-7", + "type": "READ", + "storageType": "PRIVATE", + "location": "file.txt", + "result": { + "content": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + } + } + }, + { + "userId": "user-4", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/documents/presentation.ppt", + "result": { + "content": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + } + } + }, + { + "userId": "user-9", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-5", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/" + }, + { + "userId": "user-5", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/balance.xlsx", + "result": { + "content": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + } + } + }, + { + "userId": "user-4", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/documents/" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "documents/home/presentation.ppt" + }, + { + "userId": "user-6", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/" + }, + { + "userId": "user-6", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + }, + "location": "home/document.pdf" + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "home/home/balance.xlsx" + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "home/presentation.ppt", + "documents/presentation.ppt" + ] + } + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/file.txt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-8", + "type": "READ", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "content": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + } + } + }, + { + "userId": "user-5", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + }, + "location": "document.pdf" + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "document.pdf", + "result": { + "dirContent": [ + "document.pdf" + ] + } + }, + { + "userId": "user-1", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/documents/" + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + }, + "location": "home/important/balance.xlsx" + }, + { + "userId": "user-6", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + }, + "location": "important/home/balance.xlsx" + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/file.txt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/important/", + "result": { + "dirContent": [ + "home/important/balance.xlsx" + ] + } + }, + { + "userId": "user-7", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/balance.xlsx", + "result": { + "content": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + } + } + }, + { + "userId": "user-8", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/home/balance.xlsx", + "result": { + "content": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + } + } + }, + { + "userId": "user-6", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/home/balance.xlsx", + "result": { + "content": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + } + } + }, + { + "userId": "user-7", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/" + }, + { + "userId": "user-7", + "type": "READ", + "storageType": "PRIVATE", + "location": "file.txt", + "result": { + "content": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + } + } + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + }, + "location": "file.txt" + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/important/balance.xlsx", + "result": { + "dirContent": [ + "home/important/balance.xlsx" + ] + } + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "document.pdf", + "result": { + "dirContent": [ + "document.pdf" + ] + } + }, + { + "userId": "user-7", + "type": "READ", + "storageType": "PRIVATE", + "location": "file.txt", + "result": { + "content": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + } + } + }, + { + "userId": "user-8", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/important/balance.xlsx", + "result": { + "content": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + } + } + }, + { + "userId": "user-5", + "type": "READ", + "storageType": "PRIVATE", + "location": "document.pdf", + "result": { + "content": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + } + } + }, + { + "userId": "user-0", + "type": "READ", + "storageType": "PRIVATE", + "location": "file.txt", + "result": { + "content": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + } + } + }, + { + "userId": "user-8", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/home/" + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/", + "result": { + "dirContent": [ + "home/important/balance.xlsx" + ] + } + }, + { + "userId": "user-8", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/important/balance.xlsx", + "result": { + "content": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + } + } + }, + { + "userId": "user-0", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-2", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "dirContent": [ + "balance.xlsx" + ] + } + }, + { + "userId": "user-7", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/balance.xlsx", + "result": { + "content": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + } + } + }, + { + "userId": "user-3", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/presentation.ppt", + "result": { + "content": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + } + } + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + }, + "location": "important/file.txt" + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + }, + "location": "important/documents/presentation.ppt" + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "document.pdf", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "document.pdf" + ] + } + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/", + "result": { + "dirContent": [ + "important/home/balance.xlsx" + ] + } + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/file.txt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-8", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/important/balance.xlsx", + "result": { + "content": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + } + } + }, + { + "userId": "user-3", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/" + }, + { + "userId": "user-4", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/home/" + }, + { + "userId": "user-4", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/home/balance.xlsx", + "result": { + "content": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + } + } + }, + { + "userId": "user-5", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + }, + "location": "document.pdf" + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "document.pdf" + ] + } + }, + { + "userId": "user-6", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/" + }, + { + "userId": "user-6", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + }, + "location": "home/presentation.ppt" + }, + { + "userId": "user-0", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/documents/" + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + }, + "location": "important/home/document.pdf" + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + }, + "location": "home/presentation.ppt" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + }, + "location": "home/file.txt" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + }, + "location": "documents/presentation.ppt" + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "documents/balance.xlsx", + "file.txt" + ] + } + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/documents/file.txt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/documents/balance.xlsx", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "document.pdf", + "balance.xlsx" + ] + } + }, + { + "userId": "user-7", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/balance.xlsx", + "result": { + "content": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + } + } + }, + { + "userId": "user-9", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/file.txt", + "result": { + "content": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + } + } + }, + { + "userId": "user-4", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/home/balance.xlsx", + "result": { + "content": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + } + } + }, + { + "userId": "user-8", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/important/balance.xlsx", + "result": { + "content": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + } + } + }, + { + "userId": "user-1", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/presentation.ppt", + "result": { + "content": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + } + } + }, + { + "userId": "user-7", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/" + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "file.txt" + ] + } + }, + { + "userId": "user-4", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/documents/" + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/", + "result": { + "dirContent": [ + "home/home/balance.xlsx" + ] + } + }, + { + "userId": "user-8", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/home/" + }, + { + "userId": "user-8", + "type": "READ", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "content": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + } + } + }, + { + "userId": "user-5", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + }, + "location": "document.pdf" + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "dirContent": [ + "balance.xlsx" + ] + } + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/presentation.ppt", + "result": { + "dirContent": [ + "home/presentation.ppt" + ] + } + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/", + "result": { + "dirContent": [ + "home/home/balance.xlsx" + ] + } + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "document.pdf", + "balance.xlsx" + ] + } + }, + { + "userId": "user-1", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/presentation.ppt", + "result": { + "content": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + } + } + }, + { + "userId": "user-3", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/" + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + }, + "location": "file.txt" + }, + { + "userId": "user-2", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + }, + "location": "home/documents/balance.xlsx" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + }, + "location": "important/balance.xlsx" + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "important/file.txt" + ] + } + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "home/home/balance.xlsx" + ] + } + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/", + "result": { + "dirContent": [ + "documents/presentation.ppt" + ] + } + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/documents/", + "result": { + "dirContent": [ + "home/documents/balance.xlsx" + ] + } + }, + { + "userId": "user-6", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-1", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + }, + "location": "home/documents/presentation.ppt" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + }, + "location": "documents/file.txt" + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/file.txt", + "result": { + "dirContent": [ + "important/file.txt" + ] + } + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/document.pdf", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-3", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/documents/balance.xlsx", + "result": { + "content": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + } + } + }, + { + "userId": "user-3", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-6", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + }, + "location": "home/important/document.pdf" + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/documents/balance.xlsx", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-7", + "type": "READ", + "storageType": "PRIVATE", + "location": "file.txt", + "result": { + "content": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + } + } + }, + { + "userId": "user-9", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/file.txt", + "result": { + "content": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + } + } + }, + { + "userId": "user-4", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/home/" + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + }, + "location": "documents/home/balance.xlsx" + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + }, + "location": "home/balance.xlsx" + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + }, + "location": "home/important/file.txt" + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + }, + "location": "document.pdf" + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "document.pdf", + "result": { + "dirContent": [ + "document.pdf" + ] + } + }, + { + "userId": "user-9", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/file.txt", + "result": { + "content": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + } + } + }, + { + "userId": "user-3", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/important/file.txt", + "result": { + "content": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + } + } + }, + { + "userId": "user-9", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/" + }, + { + "userId": "user-7", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + }, + "location": "home/documents/file.txt" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "documents/home/file.txt" + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/", + "result": { + "dirContent": [ + "home/important/document.pdf" + ] + } + }, + { + "userId": "user-4", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/home/file.txt", + "result": { + "content": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + } + } + }, + { + "userId": "user-3", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/important/" + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + }, + "location": "documents/document.pdf" + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + }, + "location": "home/home/document.pdf" + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/", + "result": { + "dirContent": [ + "home/important/balance.xlsx", + "home/balance.xlsx" + ] + } + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/important/document.pdf", + "result": { + "dirContent": [ + "home/important/document.pdf" + ] + } + }, + { + "userId": "user-7", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/documents/file.txt", + "result": { + "content": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + } + } + }, + { + "userId": "user-0", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/home/document.pdf", + "result": { + "content": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + } + } + }, + { + "userId": "user-7", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/documents/" + }, + { + "userId": "user-5", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/" + }, + { + "userId": "user-5", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/balance.xlsx", + "result": { + "content": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + } + } + }, + { + "userId": "user-0", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-3", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "documents/document.pdf" + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/home/file.txt", + "result": { + "dirContent": [ + "documents/home/file.txt" + ] + } + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/presentation.ppt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "file.txt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-4", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/home/file.txt", + "result": { + "content": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + } + } + }, + { + "userId": "user-6", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/important/document.pdf", + "result": { + "content": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + } + } + }, + { + "userId": "user-5", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/balance.xlsx", + "result": { + "content": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + } + } + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + }, + "location": "home/file.txt" + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/documents/document.pdf", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/", + "result": { + "dirContent": [ + "home/important/document.pdf" + ] + } + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/document.pdf", + "result": { + "dirContent": [ + "documents/document.pdf" + ] + } + }, + { + "userId": "user-5", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/file.txt", + "result": { + "content": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + } + } + }, + { + "userId": "user-6", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/important/" + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + }, + "location": "home/documents/presentation.ppt" + }, + { + "userId": "user-6", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + }, + "location": "important/file.txt" + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/important/balance.xlsx", + "result": { + "dirContent": [ + "home/important/balance.xlsx" + ] + } + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/balance.xlsx", + "result": { + "dirContent": [ + "important/balance.xlsx" + ] + } + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/home/file.txt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-4", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/documents/presentation.ppt", + "result": { + "content": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + } + } + }, + { + "userId": "user-6", + "type": "READ", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "content": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + } + } + }, + { + "userId": "user-8", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/important/" + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "dirContent": [ + "balance.xlsx" + ] + } + }, + { + "userId": "user-6", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-0", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/" + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + }, + "location": "documents/home/document.pdf" + }, + { + "userId": "user-6", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + }, + "location": "important/presentation.ppt" + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "file.txt" + }, + { + "userId": "user-2", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "home/balance.xlsx", + "balance.xlsx" + ] + } + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/presentation.ppt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-5", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/document.pdf", + "result": { + "content": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + } + } + }, + { + "userId": "user-9", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/home/document.pdf", + "result": { + "content": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + } + } + }, + { + "userId": "user-6", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/presentation.ppt", + "result": { + "content": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + } + } + }, + { + "userId": "user-4", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/documents/" + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "documents/home/file.txt" + ] + } + }, + { + "userId": "user-9", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/home/" + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/documents/", + "result": { + "dirContent": [ + "home/documents/presentation.ppt" + ] + } + }, + { + "userId": "user-9", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/documents/presentation.ppt", + "result": { + "content": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + } + } + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + }, + "location": "document.pdf" + }, + { + "userId": "user-6", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "document.pdf" + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "document.pdf", + "result": { + "dirContent": [ + "document.pdf" + ] + } + }, + { + "userId": "user-6", + "type": "READ", + "storageType": "PRIVATE", + "location": "document.pdf", + "result": { + "content": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + } + } + }, + { + "userId": "user-0", + "type": "READ", + "storageType": "PRIVATE", + "location": "file.txt", + "result": { + "content": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + } + } + }, + { + "userId": "user-0", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-2", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-6", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "important/balance.xlsx" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + }, + "location": "home/home/balance.xlsx" + }, + { + "userId": "user-6", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "home/presentation.ppt" + }, + { + "userId": "user-4", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/home/balance.xlsx", + "result": { + "content": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + } + } + }, + { + "userId": "user-9", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + }, + "location": "home/documents/document.pdf" + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "home/documents/document.pdf" + ] + } + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + }, + "location": "file.txt" + }, + { + "userId": "user-6", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + }, + "location": "home/home/balance.xlsx" + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/", + "result": { + "dirContent": [ + "important/balance.xlsx" + ] + } + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/important/presentation.ppt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "file.txt", + "result": { + "dirContent": [ + "file.txt" + ] + } + }, + { + "userId": "user-6", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/" + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + }, + "location": "file.txt" + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + }, + "location": "home/file.txt" + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/documents/file.txt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-4", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/home/balance.xlsx", + "result": { + "content": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + } + } + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + }, + "location": "home/balance.xlsx" + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + }, + "location": "important/documents/balance.xlsx" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + }, + "location": "documents/important/file.txt" + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/presentation.ppt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/file.txt", + "result": { + "dirContent": [ + "home/file.txt" + ] + } + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/file.txt", + "result": { + "dirContent": [ + "home/file.txt" + ] + } + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "home/documents/document.pdf", + "important/documents/balance.xlsx" + ] + } + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "documents/home/file.txt", + "home/home/balance.xlsx", + "file.txt", + "documents/important/file.txt" + ] + } + }, + { + "userId": "user-8", + "type": "READ", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "content": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + } + } + }, + { + "userId": "user-7", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/balance.xlsx", + "result": { + "content": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + } + } + }, + { + "userId": "user-9", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/documents/document.pdf", + "result": { + "content": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + } + } + }, + { + "userId": "user-5", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/" + }, + { + "userId": "user-7", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/" + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + }, + "location": "important/home/file.txt" + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/balance.xlsx", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-7", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/" + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + }, + "location": "document.pdf" + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + }, + "location": "important/document.pdf" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + }, + "location": "home/important/balance.xlsx" + }, + { + "userId": "user-6", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + }, + "location": "file.txt" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + }, + "location": "important/home/file.txt" + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "home/documents/document.pdf", + "important/documents/balance.xlsx", + "important/document.pdf" + ] + } + }, + { + "userId": "user-0", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/file.txt", + "result": { + "content": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + } + } + }, + { + "userId": "user-8", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/balance.xlsx", + "result": { + "content": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + } + } + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + }, + "location": "documents/file.txt" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + }, + "location": "file.txt" + }, + { + "userId": "user-8", + "type": "READ", + "storageType": "PRIVATE", + "location": "document.pdf", + "result": { + "content": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + } + } + }, + { + "userId": "user-9", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/documents/balance.xlsx", + "result": { + "content": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + } + } + }, + { + "userId": "user-0", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/file.txt", + "result": { + "content": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + } + } + }, + { + "userId": "user-8", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-6", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-1", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/home/" + }, + { + "userId": "user-9", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/documents/" + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + }, + "location": "home/balance.xlsx" + }, + { + "userId": "user-9", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/documents/balance.xlsx", + "result": { + "content": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + } + } + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + }, + "location": "important/home/document.pdf" + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + }, + "location": "home/home/balance.xlsx" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "important/file.txt" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-6", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + }, + "location": "file.txt" + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "documents/balance.xlsx" + }, + { + "userId": "user-2", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + }, + "location": "documents/home/file.txt" + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/", + "result": { + "dirContent": [ + "home/balance.xlsx", + "home/home/balance.xlsx" + ] + } + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "documents/home/file.txt", + "important/file.txt", + "home/home/balance.xlsx", + "file.txt", + "documents/important/file.txt" + ] + } + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/balance.xlsx", + "result": { + "dirContent": [ + "important/balance.xlsx" + ] + } + }, + { + "userId": "user-7", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/home/document.pdf", + "result": { + "content": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + } + } + }, + { + "userId": "user-9", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/home/balance.xlsx", + "result": { + "content": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + } + } + }, + { + "userId": "user-4", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/home/balance.xlsx", + "result": { + "content": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + } + } + }, + { + "userId": "user-5", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/document.pdf", + "result": { + "content": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + } + } + }, + { + "userId": "user-6", + "type": "READ", + "storageType": "PRIVATE", + "location": "file.txt", + "result": { + "content": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + } + } + }, + { + "userId": "user-0", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/file.txt", + "result": { + "content": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + } + } + }, + { + "userId": "user-2", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/home/file.txt", + "result": { + "content": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + } + } + }, + { + "userId": "user-9", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/" + }, + { + "userId": "user-4", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/home/" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + }, + "location": "documents/file.txt" + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + }, + "location": "important/important/presentation.ppt" + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "file.txt" + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/home/balance.xlsx", + "result": { + "dirContent": [ + "home/home/balance.xlsx" + ] + } + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-5", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/" + }, + { + "userId": "user-0", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/" + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + }, + "location": "home/presentation.ppt" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + }, + "location": "home/file.txt" + }, + { + "userId": "user-2", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + }, + "location": "documents/home/document.pdf" + }, + { + "userId": "user-6", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "documents/important/balance.xlsx" + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "file.txt", + "result": { + "dirContent": [ + "file.txt" + ] + } + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/", + "result": { + "dirContent": [ + "home/file.txt" + ] + } + }, + { + "userId": "user-0", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/file.txt", + "result": { + "content": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + } + } + }, + { + "userId": "user-0", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/" + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + }, + "location": "document.pdf" + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "documents/home/balance.xlsx" + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "document.pdf", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-9", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/documents/balance.xlsx", + "result": { + "content": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + } + } + }, + { + "userId": "user-4", + "type": "READ", + "storageType": "PRIVATE", + "location": "file.txt", + "result": { + "content": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + } + } + }, + { + "userId": "user-1", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/file.txt", + "result": { + "content": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + } + } + }, + { + "userId": "user-9", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/" + }, + { + "userId": "user-4", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/home/" + }, + { + "userId": "user-4", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/important/file.txt", + "result": { + "content": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + } + } + }, + { + "userId": "user-0", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "home/important/document.pdf" + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/", + "result": { + "dirContent": [ + "home/important/document.pdf", + "home/file.txt" + ] + } + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/file.txt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-7", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/home/document.pdf", + "result": { + "content": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + } + } + }, + { + "userId": "user-9", + "type": "READ", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "content": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + } + } + }, + { + "userId": "user-5", + "type": "READ", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "content": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + } + } + }, + { + "userId": "user-7", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-3", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + }, + "location": "documents/presentation.ppt" + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-6", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "important/home/balance.xlsx" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + }, + "location": "important/home/file.txt" + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/home/document.pdf", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-2", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/home/file.txt", + "result": { + "content": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + } + } + }, + { + "userId": "user-5", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/important/balance.xlsx", + "result": { + "content": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + } + } + }, + { + "userId": "user-1", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/important/document.pdf", + "result": { + "content": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + } + } + }, + { + "userId": "user-6", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/home/" + }, + { + "userId": "user-1", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/important/" + }, + { + "userId": "user-1", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/file.txt", + "result": { + "content": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + } + } + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + }, + "location": "documents/file.txt" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + }, + "location": "documents/document.pdf" + }, + { + "userId": "user-2", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/document.pdf", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/file.txt", + "result": { + "dirContent": [ + "home/file.txt" + ] + } + }, + { + "userId": "user-8", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/presentation.ppt", + "result": { + "content": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + } + } + }, + { + "userId": "user-4", + "type": "READ", + "storageType": "PRIVATE", + "location": "file.txt", + "result": { + "content": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + } + } + }, + { + "userId": "user-5", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/balance.xlsx", + "result": { + "content": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + } + } + }, + { + "userId": "user-1", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/file.txt", + "result": { + "content": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + } + } + }, + { + "userId": "user-8", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/" + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-8", + "type": "READ", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "content": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + } + } + }, + { + "userId": "user-5", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/important/" + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + }, + "location": "important/documents/balance.xlsx" + }, + { + "userId": "user-2", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "home/balance.xlsx" + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "presentation.ppt" + ] + } + }, + { + "userId": "user-8", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "home/home/balance.xlsx" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + }, + "location": "home/file.txt" + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/document.pdf", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/file.txt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-0", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/documents/balance.xlsx", + "result": { + "content": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + } + } + }, + { + "userId": "user-1", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/document.pdf", + "result": { + "content": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + } + } + }, + { + "userId": "user-4", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/file.txt", + "result": { + "content": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + } + } + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "documents/file.txt" + }, + { + "userId": "user-2", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + }, + "location": "documents/important/document.pdf" + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "documents/file.txt" + ] + } + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "home/presentation.ppt", + "documents/file.txt", + "home/balance.xlsx", + "presentation.ppt", + "home/home/balance.xlsx" + ] + } + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-4", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/important/file.txt", + "result": { + "content": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + } + } + }, + { + "userId": "user-8", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/file.txt", + "result": { + "content": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + } + } + }, + { + "userId": "user-9", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-3", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/home/" + }, + { + "userId": "user-4", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + }, + "location": "document.pdf" + }, + { + "userId": "user-5", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-0", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/documents/" + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + }, + "location": "documents/file.txt" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + }, + "location": "important/presentation.ppt" + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "presentation.ppt" + ] + } + }, + { + "userId": "user-2", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/home/file.txt", + "result": { + "content": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + } + } + }, + { + "userId": "user-5", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/documents/document.pdf", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-1", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/home/" + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "important/important/presentation.ppt" + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + }, + "location": "important/file.txt" + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + }, + "location": "home/home/balance.xlsx" + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + }, + "location": "important/document.pdf" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-6", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "important/presentation.ppt", + "documents/document.pdf", + "home/file.txt" + ] + } + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/", + "result": { + "dirContent": [ + "documents/home/file.txt", + "documents/important/document.pdf", + "documents/home/document.pdf" + ] + } + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "presentation.ppt", + "balance.xlsx" + ] + } + }, + { + "userId": "user-5", + "type": "READ", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "content": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + } + } + }, + { + "userId": "user-1", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/document.pdf", + "result": { + "content": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + } + } + }, + { + "userId": "user-9", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/home/balance.xlsx", + "result": { + "content": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + } + } + }, + { + "userId": "user-7", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/important/" + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + }, + "location": "home/file.txt" + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/", + "result": { + "dirContent": [ + "home/file.txt" + ] + } + }, + { + "userId": "user-7", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/file.txt", + "result": { + "content": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + } + } + }, + { + "userId": "user-3", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/" + }, + { + "userId": "user-3", + "type": "READ", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "content": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + } + } + }, + { + "userId": "user-5", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "documents/file.txt", + "important/file.txt" + ] + } + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/file.txt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "documents/home/file.txt", + "documents/important/document.pdf", + "home/balance.xlsx", + "balance.xlsx", + "documents/home/document.pdf" + ] + } + }, + { + "userId": "user-4", + "type": "READ", + "storageType": "PRIVATE", + "location": "document.pdf", + "result": { + "content": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + } + } + }, + { + "userId": "user-7", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/" + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "documents/important/presentation.ppt" + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "file.txt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-8", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/file.txt", + "result": { + "content": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + } + } + }, + { + "userId": "user-4", + "type": "READ", + "storageType": "PRIVATE", + "location": "document.pdf", + "result": { + "content": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + } + } + }, + { + "userId": "user-1", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/file.txt", + "result": { + "content": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + } + } + }, + { + "userId": "user-7", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/important/presentation.ppt", + "result": { + "content": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + } + } + }, + { + "userId": "user-1", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/" + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/", + "result": { + "dirContent": [ + "home/file.txt" + ] + } + }, + { + "userId": "user-7", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/important/" + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + }, + "location": "important/presentation.ppt" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + }, + "location": "documents/home/file.txt" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + }, + "location": "documents/documents/file.txt" + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "documents/file.txt", + "important/file.txt" + ] + } + }, + { + "userId": "user-8", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/file.txt", + "result": { + "content": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + } + } + }, + { + "userId": "user-3", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "home/documents/presentation.ppt" + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + }, + "location": "important/important/balance.xlsx" + }, + { + "userId": "user-2", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + }, + "location": "home/presentation.ppt" + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/presentation.ppt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "document.pdf" + ] + } + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "balance.xlsx" + ] + } + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/home/balance.xlsx", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-4", + "type": "READ", + "storageType": "PRIVATE", + "location": "document.pdf", + "result": { + "content": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + } + } + }, + { + "userId": "user-1", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/file.txt", + "result": { + "content": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + } + } + }, + { + "userId": "user-0", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/important/balance.xlsx", + "result": { + "content": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + } + } + }, + { + "userId": "user-8", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/" + }, + { + "userId": "user-9", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/" + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/", + "result": { + "dirContent": [ + "home/home/balance.xlsx" + ] + } + }, + { + "userId": "user-4", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-5", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/home/" + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-2", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/home/" + }, + { + "userId": "user-0", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/important/" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/important/file.txt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/file.txt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-8", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/file.txt", + "result": { + "content": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + } + } + }, + { + "userId": "user-3", + "type": "READ", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "content": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + } + } + }, + { + "userId": "user-4", + "type": "READ", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "content": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + } + } + }, + { + "userId": "user-3", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-6", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-2", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/" + }, + { + "userId": "user-4", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + }, + "location": "home/home/presentation.ppt" + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-4", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/home/presentation.ppt", + "result": { + "content": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + } + } + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + }, + "location": "documents/home/file.txt" + }, + { + "userId": "user-8", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/file.txt", + "result": { + "content": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + } + } + }, + { + "userId": "user-1", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/presentation.ppt", + "result": { + "content": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + } + } + }, + { + "userId": "user-2", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/important/document.pdf", + "result": { + "content": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + } + } + }, + { + "userId": "user-5", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/home/file.txt", + "result": { + "content": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + } + } + }, + { + "userId": "user-5", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/home/" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-5", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + }, + "location": "home/home/document.pdf" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "important/important/presentation.ppt" + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "document.pdf", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/", + "result": { + "dirContent": [ + "home/home/document.pdf" + ] + } + }, + { + "userId": "user-9", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/home/balance.xlsx", + "result": { + "content": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + } + } + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-2", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + }, + "location": "documents/presentation.ppt" + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-8", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/" + }, + { + "userId": "user-9", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/home/" + }, + { + "userId": "user-1", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/" + }, + { + "userId": "user-4", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + }, + "location": "important/documents/balance.xlsx" + }, + { + "userId": "user-2", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + }, + "location": "document.pdf" + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "home/home/document.pdf", + "balance.xlsx" + ] + } + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/document.pdf", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/documents/", + "result": { + "dirContent": [ + "important/documents/balance.xlsx" + ] + } + }, + { + "userId": "user-3", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/documents/" + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/presentation.ppt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + }, + "location": "important/document.pdf" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + }, + "location": "documents/home/presentation.ppt" + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + }, + "location": "home/important/document.pdf" + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/important/document.pdf", + "result": { + "dirContent": [ + "home/important/document.pdf" + ] + } + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/file.txt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/home/file.txt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-9", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/document.pdf", + "result": { + "content": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + } + } + }, + { + "userId": "user-4", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/home/presentation.ppt", + "result": { + "content": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + } + } + }, + { + "userId": "user-1", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-9", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/" + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/file.txt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-4", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/home/" + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/important/document.pdf", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-2", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/document.pdf", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-2", + "type": "READ", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "content": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + } + } + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-0", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/important/" + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + }, + "location": "documents/file.txt" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + }, + "location": "documents/file.txt" + }, + { + "userId": "user-2", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + }, + "location": "home/home/balance.xlsx" + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-2", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/home/balance.xlsx", + "result": { + "content": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + } + } + }, + { + "userId": "user-7", + "type": "READ", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "content": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + } + } + }, + { + "userId": "user-7", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/home/" + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + }, + "location": "home/documents/document.pdf" + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + }, + "location": "document.pdf" + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + }, + "location": "important/balance.xlsx" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + }, + "location": "important/file.txt" + }, + { + "userId": "user-6", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + }, + "location": "home/important/document.pdf" + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-1", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/file.txt", + "result": { + "content": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + } + } + }, + { + "userId": "user-8", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/balance.xlsx", + "result": { + "content": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + } + } + }, + { + "userId": "user-8", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/" + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/", + "result": { + "dirContent": [ + "home/documents/document.pdf" + ] + } + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/presentation.ppt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-4", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/file.txt", + "result": { + "content": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + } + } + }, + { + "userId": "user-1", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/file.txt", + "result": { + "content": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + } + } + }, + { + "userId": "user-7", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/documents/" + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + }, + "location": "important/documents/file.txt" + }, + { + "userId": "user-7", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/" + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + }, + "location": "important/balance.xlsx" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + }, + "location": "documents/presentation.ppt" + }, + { + "userId": "user-2", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + }, + "location": "documents/file.txt" + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/file.txt", + "result": { + "dirContent": [ + "documents/file.txt" + ] + } + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/home/file.txt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-3", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/balance.xlsx", + "result": { + "content": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + } + } + }, + { + "userId": "user-1", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + }, + "location": "home/home/presentation.ppt" + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "documents/file.txt" + }, + { + "userId": "user-2", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + }, + "location": "file.txt" + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "important/balance.xlsx" + ] + } + }, + { + "userId": "user-7", + "type": "READ", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "content": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + } + } + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + }, + "location": "documents/documents/file.txt" + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + }, + "location": "important/important/document.pdf" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + }, + "location": "home/document.pdf" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + }, + "location": "important/file.txt" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "documents/balance.xlsx" + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "file.txt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-1", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/balance.xlsx", + "result": { + "content": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + } + } + }, + { + "userId": "user-8", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/important/document.pdf", + "result": { + "content": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + } + } + }, + { + "userId": "user-4", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/document.pdf", + "result": { + "content": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + } + } + }, + { + "userId": "user-3", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/" + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + }, + "location": "home/presentation.ppt" + }, + { + "userId": "user-4", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/" + }, + { + "userId": "user-2", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/documents/file.txt", + "result": { + "dirContent": [ + "important/documents/file.txt" + ] + } + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "home/home/presentation.ppt", + "documents/balance.xlsx" + ] + } + }, + { + "userId": "user-8", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/important/document.pdf", + "result": { + "content": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + } + } + }, + { + "userId": "user-9", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/file.txt", + "result": { + "content": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + } + } + }, + { + "userId": "user-3", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/presentation.ppt", + "result": { + "content": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + } + } + }, + { + "userId": "user-1", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/balance.xlsx", + "result": { + "content": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + } + } + }, + { + "userId": "user-9", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/" + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + }, + "location": "document.pdf" + }, + { + "userId": "user-9", + "type": "READ", + "storageType": "PRIVATE", + "location": "document.pdf", + "result": { + "content": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + } + } + }, + { + "userId": "user-3", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/" + }, + { + "userId": "user-4", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + }, + "location": "documents/important/presentation.ppt" + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "documents/presentation.ppt", + "documents/important/presentation.ppt" + ] + } + }, + { + "userId": "user-1", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/home/" + }, + { + "userId": "user-4", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/important/" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + }, + "location": "important/file.txt" + }, + { + "userId": "user-4", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/file.txt", + "result": { + "content": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + } + } + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + }, + "location": "file.txt" + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + }, + "location": "home/document.pdf" + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + }, + "location": "document.pdf" + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + }, + "location": "important/home/file.txt" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "home/balance.xlsx" + }, + { + "userId": "user-2", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + }, + "location": "document.pdf" + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/home/file.txt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/presentation.ppt", + "result": { + "dirContent": [ + "documents/presentation.ppt" + ] + } + }, + { + "userId": "user-8", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/important/document.pdf", + "result": { + "content": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + } + } + }, + { + "userId": "user-0", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/home/file.txt", + "result": { + "content": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + } + } + }, + { + "userId": "user-1", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/balance.xlsx", + "result": { + "content": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + } + } + }, + { + "userId": "user-8", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/" + }, + { + "userId": "user-5", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/" + }, + { + "userId": "user-5", + "type": "READ", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "content": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + } + } + }, + { + "userId": "user-6", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/important/" + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-0", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/home/" + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "home/presentation.ppt" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + }, + "location": "documents/home/balance.xlsx" + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "document.pdf", + "important/documents/file.txt", + "file.txt", + "documents/documents/file.txt", + "balance.xlsx" + ] + } + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "document.pdf", + "result": { + "dirContent": [ + "document.pdf" + ] + } + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/presentation.ppt", + "result": { + "dirContent": [ + "home/presentation.ppt" + ] + } + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/documents/presentation.ppt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-1", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/balance.xlsx", + "result": { + "content": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + } + } + }, + { + "userId": "user-5", + "type": "READ", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "content": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + } + } + }, + { + "userId": "user-7", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-8", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/important/" + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + }, + "location": "documents/document.pdf" + }, + { + "userId": "user-9", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-3", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-4", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/" + }, + { + "userId": "user-1", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/" + }, + { + "userId": "user-1", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/balance.xlsx", + "result": { + "content": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + } + } + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + }, + "location": "home/document.pdf" + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + }, + "location": "file.txt" + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/", + "result": { + "dirContent": [ + "home/balance.xlsx" + ] + } + }, + { + "userId": "user-2", + "type": "READ", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "content": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + } + } + }, + { + "userId": "user-4", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/document.pdf", + "result": { + "content": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + } + } + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + }, + "location": "documents/documents/presentation.ppt" + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/", + "result": { + "dirContent": [ + "documents/document.pdf" + ] + } + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/documents/document.pdf", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/documents/", + "result": { + "dirContent": [ + "documents/documents/presentation.ppt" + ] + } + }, + { + "userId": "user-2", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + }, + "location": "file.txt" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "home/important/file.txt" + }, + { + "userId": "user-6", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "important/documents/document.pdf" + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + }, + "location": "documents/documents/balance.xlsx" + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "important/documents/document.pdf" + ] + } + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/", + "result": { + "dirContent": [ + "home/balance.xlsx" + ] + } + }, + { + "userId": "user-5", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/home/balance.xlsx", + "result": { + "content": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + } + } + }, + { + "userId": "user-1", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/balance.xlsx", + "result": { + "content": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + } + } + }, + { + "userId": "user-6", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/documents/document.pdf", + "result": { + "content": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + } + } + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + }, + "location": "home/documents/file.txt" + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "important/balance.xlsx" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + }, + "location": "important/home/document.pdf" + }, + { + "userId": "user-6", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/documents/" + }, + { + "userId": "user-0", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/documents/" + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "home/documents/presentation.ppt" + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + }, + "location": "important/documents/document.pdf" + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + }, + "location": "home/documents/file.txt" + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "document.pdf" + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "documents/file.txt" + }, + { + "userId": "user-2", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/documents/document.pdf", + "result": { + "dirContent": [ + "important/documents/document.pdf" + ] + } + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/", + "result": { + "dirContent": [ + "home/balance.xlsx" + ] + } + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "important/balance.xlsx", + "presentation.ppt" + ] + } + }, + { + "userId": "user-7", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/documents/document.pdf", + "result": { + "content": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + } + } + }, + { + "userId": "user-7", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/documents/" + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + }, + "location": "important/file.txt" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + }, + "location": "file.txt" + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/documents/file.txt", + "result": { + "dirContent": [ + "home/documents/file.txt" + ] + } + }, + { + "userId": "user-2", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + }, + "location": "home/home/balance.xlsx" + }, + { + "userId": "user-6", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + }, + "location": "important/documents/document.pdf" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + }, + "location": "documents/document.pdf" + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/file.txt", + "result": { + "dirContent": [ + "important/file.txt" + ] + } + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/home/document.pdf", + "result": { + "dirContent": [ + "important/home/document.pdf" + ] + } + }, + { + "userId": "user-4", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/presentation.ppt", + "result": { + "content": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + } + } + }, + { + "userId": "user-9", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/" + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + }, + "location": "important/important/presentation.ppt" + }, + { + "userId": "user-4", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/important/" + }, + { + "userId": "user-4", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/presentation.ppt", + "result": { + "content": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + } + } + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + }, + "location": "documents/document.pdf" + }, + { + "userId": "user-2", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + }, + "location": "home/important/document.pdf" + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/presentation.ppt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-6", + "type": "READ", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "content": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + } + } + }, + { + "userId": "user-0", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/file.txt", + "result": { + "content": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + } + } + }, + { + "userId": "user-2", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/important/document.pdf", + "result": { + "content": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + } + } + }, + { + "userId": "user-4", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + }, + "location": "important/file.txt" + }, + { + "userId": "user-4", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/presentation.ppt", + "result": { + "content": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + } + } + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + }, + "location": "home/presentation.ppt" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + }, + "location": "important/file.txt" + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "home/documents/file.txt", + "documents/document.pdf", + "file.txt" + ] + } + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "presentation.ppt", + "important/important/presentation.ppt" + ] + } + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/", + "result": { + "dirContent": [ + "home/documents/presentation.ppt" + ] + } + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "document.pdf", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/presentation.ppt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-0", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/file.txt", + "result": { + "content": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + } + } + }, + { + "userId": "user-1", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/document.pdf", + "result": { + "content": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + } + } + }, + { + "userId": "user-4", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + }, + "location": "documents/important/balance.xlsx" + }, + { + "userId": "user-4", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/file.txt", + "result": { + "content": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + } + } + }, + { + "userId": "user-2", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/important/" + }, + { + "userId": "user-3", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/" + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "home/presentation.ppt" + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "home/presentation.ppt" + ] + } + }, + { + "userId": "user-5", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/home/" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + }, + "location": "documents/important/presentation.ppt" + }, + { + "userId": "user-5", + "type": "READ", + "storageType": "PRIVATE", + "location": "document.pdf", + "result": { + "content": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + } + } + }, + { + "userId": "user-4", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/important/" + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/file.txt", + "result": { + "dirContent": [ + "important/file.txt" + ] + } + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + }, + "location": "home/documents/file.txt" + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "presentation.ppt", + "important/important/presentation.ppt" + ] + } + }, + { + "userId": "user-4", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/file.txt", + "result": { + "content": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + } + } + }, + { + "userId": "user-5", + "type": "READ", + "storageType": "PRIVATE", + "location": "document.pdf", + "result": { + "content": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + } + } + }, + { + "userId": "user-4", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "file.txt" + }, + { + "userId": "user-4", + "type": "READ", + "storageType": "PRIVATE", + "location": "file.txt", + "result": { + "content": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + } + } + }, + { + "userId": "user-4", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-2", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/important/document.pdf", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "file.txt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/", + "result": { + "dirContent": [ + "documents/home/balance.xlsx", + "documents/important/presentation.ppt" + ] + } + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "balance.xlsx" + ] + } + }, + { + "userId": "user-5", + "type": "READ", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "content": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + } + } + }, + { + "userId": "user-9", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "document.pdf" + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "document.pdf" + ] + } + }, + { + "userId": "user-9", + "type": "READ", + "storageType": "PRIVATE", + "location": "document.pdf", + "result": { + "content": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + } + } + }, + { + "userId": "user-3", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/" + }, + { + "userId": "user-1", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-9", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-2", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + }, + "location": "important/file.txt" + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "file.txt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "document.pdf", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-8", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/document.pdf", + "result": { + "content": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + } + } + }, + { + "userId": "user-6", + "type": "READ", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "content": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + } + } + }, + { + "userId": "user-8", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-6", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-0", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/" + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/documents/", + "result": { + "dirContent": [ + "home/documents/presentation.ppt" + ] + } + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + }, + "location": "file.txt" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + }, + "location": "important/file.txt" + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + }, + "location": "important/documents/file.txt" + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + }, + "location": "documents/home/document.pdf" + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "balance.xlsx" + ] + } + }, + { + "userId": "user-5", + "type": "READ", + "storageType": "PRIVATE", + "location": "file.txt", + "result": { + "content": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + } + } + }, + { + "userId": "user-7", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/documents/" + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "file.txt" + }, + { + "userId": "user-8", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + }, + "location": "documents/home/file.txt" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + }, + "location": "important/home/file.txt" + }, + { + "userId": "user-6", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + }, + "location": "home/balance.xlsx" + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/presentation.ppt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "balance.xlsx" + ] + } + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "important/file.txt", + "balance.xlsx" + ] + } + }, + { + "userId": "user-5", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/file.txt", + "result": { + "content": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + } + } + }, + { + "userId": "user-7", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-1", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + }, + "location": "documents/home/presentation.ppt" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + }, + "location": "important/file.txt" + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + }, + "location": "file.txt" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + }, + "location": "home/presentation.ppt" + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "balance.xlsx" + ] + } + }, + { + "userId": "user-1", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/presentation.ppt", + "result": { + "content": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + } + } + }, + { + "userId": "user-2", + "type": "READ", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "content": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + } + } + }, + { + "userId": "user-9", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-6", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-6", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "balance.xlsx" + ] + } + }, + { + "userId": "user-1", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-0", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + }, + "location": "documents/presentation.ppt" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + }, + "location": "important/document.pdf" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + }, + "location": "home/documents/document.pdf" + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/important/document.pdf", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-3", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/home/file.txt", + "result": { + "content": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + } + } + }, + { + "userId": "user-2", + "type": "READ", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "content": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + } + } + }, + { + "userId": "user-1", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/documents/document.pdf", + "result": { + "content": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + } + } + }, + { + "userId": "user-4", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/home/" + }, + { + "userId": "user-6", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-0", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/" + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "home/file.txt" + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/file.txt", + "result": { + "dirContent": [ + "important/file.txt" + ] + } + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/balance.xlsx", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/home/document.pdf", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "home/documents/document.pdf" + ] + } + }, + { + "userId": "user-4", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/home/presentation.ppt", + "result": { + "content": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + } + } + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "documents/document.pdf" + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + }, + "location": "important/presentation.ppt" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + }, + "location": "important/documents/document.pdf" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/documents/balance.xlsx", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/documents/", + "result": { + "dirContent": [ + "important/documents/document.pdf" + ] + } + }, + { + "userId": "user-8", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/file.txt", + "result": { + "content": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + } + } + }, + { + "userId": "user-4", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/documents/document.pdf", + "result": { + "content": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + } + } + }, + { + "userId": "user-1", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/documents/document.pdf", + "result": { + "content": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + } + } + }, + { + "userId": "user-7", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/document.pdf", + "result": { + "content": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + } + } + }, + { + "userId": "user-2", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/" + }, + { + "userId": "user-5", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + }, + "location": "important/home/balance.xlsx" + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/document.pdf", + "result": { + "dirContent": [ + "documents/document.pdf" + ] + } + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/home/", + "result": { + "dirContent": [ + "important/home/balance.xlsx" + ] + } + }, + { + "userId": "user-9", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/presentation.ppt", + "result": { + "content": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + } + } + }, + { + "userId": "user-3", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/home/file.txt", + "result": { + "content": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + } + } + }, + { + "userId": "user-2", + "type": "READ", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "content": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + } + } + }, + { + "userId": "user-1", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/documents/" + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + }, + "location": "home/documents/balance.xlsx" + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + }, + "location": "document.pdf" + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/presentation.ppt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-2", + "type": "READ", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "content": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + } + } + }, + { + "userId": "user-3", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/home/file.txt", + "result": { + "content": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + } + } + }, + { + "userId": "user-3", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/documents/" + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + }, + "location": "home/documents/file.txt" + }, + { + "userId": "user-3", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/documents/" + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + }, + "location": "documents/important/file.txt" + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + }, + "location": "important/presentation.ppt" + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + }, + "location": "file.txt" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "documents/document.pdf" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + }, + "location": "home/documents/document.pdf" + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "important/presentation.ppt", + "documents/document.pdf" + ] + } + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-4", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/home/balance.xlsx", + "result": { + "content": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + } + } + }, + { + "userId": "user-7", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + }, + "location": "file.txt" + }, + { + "userId": "user-6", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "documents/document.pdf" + }, + { + "userId": "user-0", + "type": "READ", + "storageType": "PRIVATE", + "location": "document.pdf", + "result": { + "content": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + } + } + }, + { + "userId": "user-5", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-0", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-6", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/" + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + }, + "location": "home/document.pdf" + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + }, + "location": "documents/balance.xlsx" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "document.pdf", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "balance.xlsx" + ] + } + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/presentation.ppt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-7", + "type": "READ", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "content": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + } + } + }, + { + "userId": "user-9", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/presentation.ppt", + "result": { + "content": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + } + } + }, + { + "userId": "user-2", + "type": "READ", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "content": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + } + } + }, + { + "userId": "user-0", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/balance.xlsx", + "result": { + "content": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + } + } + }, + { + "userId": "user-9", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/" + }, + { + "userId": "user-8", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/" + }, + { + "userId": "user-0", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/" + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-1", + "type": "READ", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "content": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + } + } + }, + { + "userId": "user-3", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/important/" + }, + { + "userId": "user-4", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/home/" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "home/presentation.ppt" + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "home/presentation.ppt", + "documents/document.pdf", + "important/home/balance.xlsx", + "important/documents/document.pdf", + "balance.xlsx" + ] + } + }, + { + "userId": "user-2", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-4", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/" + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/home/balance.xlsx", + "result": { + "dirContent": [ + "important/home/balance.xlsx" + ] + } + }, + { + "userId": "user-4", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/home/balance.xlsx", + "result": { + "content": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + } + } + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + }, + "location": "important/important/balance.xlsx" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "important/file.txt" + }, + { + "userId": "user-6", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + }, + "location": "document.pdf" + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + }, + "location": "documents/file.txt" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + }, + "location": "documents/documents/document.pdf" + }, + { + "userId": "user-2", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + }, + "location": "home/document.pdf" + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "file.txt" + ] + } + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "file.txt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "document.pdf" + ] + } + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "documents/file.txt" + ] + } + }, + { + "userId": "user-7", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/document.pdf", + "result": { + "content": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + } + } + }, + { + "userId": "user-5", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/file.txt", + "result": { + "content": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + } + } + }, + { + "userId": "user-1", + "type": "READ", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "content": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + } + } + }, + { + "userId": "user-9", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-3", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/home/" + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + }, + "location": "file.txt" + }, + { + "userId": "user-6", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "documents/home/balance.xlsx" + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/important/balance.xlsx", + "result": { + "dirContent": [ + "important/important/balance.xlsx" + ] + } + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/documents/document.pdf", + "result": { + "dirContent": [ + "documents/documents/document.pdf" + ] + } + }, + { + "userId": "user-7", + "type": "READ", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "content": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + } + } + }, + { + "userId": "user-3", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/important/balance.xlsx", + "result": { + "content": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + } + } + }, + { + "userId": "user-2", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/document.pdf", + "result": { + "content": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + } + } + }, + { + "userId": "user-8", + "type": "READ", + "storageType": "PRIVATE", + "location": "file.txt", + "result": { + "content": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + } + } + }, + { + "userId": "user-4", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/home/" + }, + { + "userId": "user-6", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "home/presentation.ppt" + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "home/file.txt" + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "file.txt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/home/presentation.ppt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/balance.xlsx", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/", + "result": { + "dirContent": [ + "important/important/balance.xlsx" + ] + } + }, + { + "userId": "user-7", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/document.pdf", + "result": { + "content": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + } + } + }, + { + "userId": "user-7", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/" + }, + { + "userId": "user-2", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/" + }, + { + "userId": "user-3", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/important/" + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "document.pdf" + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + }, + "location": "file.txt" + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + }, + "location": "home/home/document.pdf" + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/file.txt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/home/file.txt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/", + "result": { + "dirContent": [ + "home/home/document.pdf", + "home/file.txt" + ] + } + }, + { + "userId": "user-4", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/presentation.ppt", + "result": { + "content": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + } + } + }, + { + "userId": "user-4", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-1", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-8", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + }, + "location": "documents/important/balance.xlsx" + }, + { + "userId": "user-2", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "important/file.txt" + ] + } + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-5", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/" + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + }, + "location": "important/presentation.ppt" + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "dirContent": [ + "presentation.ppt" + ] + } + }, + { + "userId": "user-0", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/" + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + }, + "location": "important/home/file.txt" + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + }, + "location": "important/file.txt" + }, + { + "userId": "user-2", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "file.txt" + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/", + "result": { + "dirContent": [ + "important/presentation.ppt" + ] + } + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/document.pdf", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-4", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + }, + "location": "documents/balance.xlsx" + }, + { + "userId": "user-3", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/home/" + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + }, + "location": "home/important/file.txt" + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + }, + "location": "documents/balance.xlsx" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "documents/home/document.pdf" + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/", + "result": { + "dirContent": [ + "important/presentation.ppt" + ] + } + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/", + "result": { + "dirContent": [ + "documents/balance.xlsx" + ] + } + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-9", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/home/file.txt", + "result": { + "content": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + } + } + }, + { + "userId": "user-7", + "type": "READ", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "content": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + } + } + }, + { + "userId": "user-9", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/documents/balance.xlsx", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-2", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-6", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + }, + "location": "home/documents/file.txt" + }, + { + "userId": "user-2", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + }, + "location": "home/balance.xlsx" + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-8", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/presentation.ppt", + "result": { + "content": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + } + } + }, + { + "userId": "user-4", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/balance.xlsx", + "result": { + "content": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + } + } + }, + { + "userId": "user-6", + "type": "READ", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "content": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + } + } + }, + { + "userId": "user-6", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/balance.xlsx", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "home/documents/document.pdf" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + }, + "location": "documents/presentation.ppt" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "important/file.txt" + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/presentation.ppt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "important/presentation.ppt", + "presentation.ppt" + ] + } + }, + { + "userId": "user-0", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/documents/file.txt", + "result": { + "content": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + } + } + }, + { + "userId": "user-3", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/file.txt", + "result": { + "content": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + } + } + }, + { + "userId": "user-1", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/file.txt", + "result": { + "content": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + } + } + }, + { + "userId": "user-1", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/home/" + }, + { + "userId": "user-6", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "documents/documents/balance.xlsx" + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "documents/presentation.ppt", + "documents/balance.xlsx" + ] + } + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/", + "result": { + "dirContent": [ + "documents/documents/balance.xlsx" + ] + } + }, + { + "userId": "user-7", + "type": "READ", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "content": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + } + } + }, + { + "userId": "user-4", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/presentation.ppt", + "result": { + "content": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + } + } + }, + { + "userId": "user-1", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/file.txt", + "result": { + "content": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + } + } + }, + { + "userId": "user-3", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/" + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-4", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/" + }, + { + "userId": "user-6", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-0", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/documents/" + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + }, + "location": "important/presentation.ppt" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "home/document.pdf" + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/file.txt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-2", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/balance.xlsx", + "result": { + "content": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + } + } + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + }, + "location": "documents/important/file.txt" + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + }, + "location": "important/balance.xlsx" + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + }, + "location": "important/balance.xlsx" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + }, + "location": "documents/balance.xlsx" + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/important/document.pdf", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-8", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/presentation.ppt", + "result": { + "content": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + } + } + }, + { + "userId": "user-8", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-2", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/" + }, + { + "userId": "user-7", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + }, + "location": "important/file.txt" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + }, + "location": "important/file.txt" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + }, + "location": "documents/file.txt" + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/", + "result": { + "dirContent": [ + "documents/balance.xlsx" + ] + } + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/documents/balance.xlsx", + "result": { + "dirContent": [ + "documents/documents/balance.xlsx" + ] + } + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "home/document.pdf", + "documents/file.txt", + "documents/balance.xlsx", + "important/file.txt" + ] + } + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/file.txt", + "result": { + "dirContent": [ + "important/file.txt" + ] + } + }, + { + "userId": "user-5", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/file.txt", + "result": { + "content": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + } + } + }, + { + "userId": "user-3", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/" + }, + { + "userId": "user-5", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "important/balance.xlsx" + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + }, + "location": "home/document.pdf" + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/home/file.txt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/documents/presentation.ppt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "important/balance.xlsx", + "home/document.pdf", + "important/presentation.ppt", + "documents/documents/balance.xlsx" + ] + } + }, + { + "userId": "user-9", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/file.txt", + "result": { + "content": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + } + } + }, + { + "userId": "user-3", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/documents/document.pdf", + "result": { + "content": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + } + } + }, + { + "userId": "user-5", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/balance.xlsx", + "result": { + "content": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + } + } + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + }, + "location": "document.pdf" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + }, + "location": "home/documents/balance.xlsx" + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "documents/presentation.ppt" + }, + { + "userId": "user-2", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + }, + "location": "documents/document.pdf" + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/", + "result": { + "dirContent": [ + "home/documents/document.pdf", + "home/file.txt" + ] + } + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/presentation.ppt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/file.txt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-1", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/file.txt", + "result": { + "content": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + } + } + }, + { + "userId": "user-4", + "type": "READ", + "storageType": "PRIVATE", + "location": "document.pdf", + "result": { + "content": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + } + } + }, + { + "userId": "user-2", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/document.pdf", + "result": { + "content": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + } + } + }, + { + "userId": "user-4", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + }, + "location": "document.pdf" + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/file.txt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-4", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + }, + "location": "documents/documents/document.pdf" + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + }, + "location": "documents/important/document.pdf" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + }, + "location": "documents/file.txt" + }, + { + "userId": "user-6", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + }, + "location": "home/home/document.pdf" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-2", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + }, + "location": "documents/file.txt" + }, + { + "userId": "user-3", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/documents/document.pdf", + "result": { + "content": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + } + } + }, + { + "userId": "user-1", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/file.txt", + "result": { + "content": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + } + } + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-2", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + }, + "location": "documents/balance.xlsx" + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "balance.xlsx" + ] + } + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/documents/balance.xlsx", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-9", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/important/document.pdf", + "result": { + "content": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + } + } + }, + { + "userId": "user-0", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/home/document.pdf", + "result": { + "content": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + } + } + }, + { + "userId": "user-7", + "type": "READ", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "content": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + } + } + }, + { + "userId": "user-9", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/" + }, + { + "userId": "user-0", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/" + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + }, + "location": "documents/home/balance.xlsx" + }, + { + "userId": "user-2", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/" + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + }, + "location": "home/home/file.txt" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + }, + "location": "home/balance.xlsx" + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/", + "result": { + "dirContent": [ + "documents/documents/document.pdf" + ] + } + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/important/presentation.ppt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "dirContent": [ + "presentation.ppt" + ] + } + }, + { + "userId": "user-3", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/documents/document.pdf", + "result": { + "content": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + } + } + }, + { + "userId": "user-0", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/documents/balance.xlsx", + "result": { + "content": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + } + } + }, + { + "userId": "user-7", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + }, + "location": "file.txt" + }, + { + "userId": "user-7", + "type": "READ", + "storageType": "PRIVATE", + "location": "file.txt", + "result": { + "content": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + } + } + }, + { + "userId": "user-5", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/documents/" + }, + { + "userId": "user-5", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/file.txt", + "result": { + "content": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + } + } + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + }, + "location": "important/documents/balance.xlsx" + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + }, + "location": "documents/documents/presentation.ppt" + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/", + "result": { + "dirContent": [ + "home/documents/document.pdf", + "home/file.txt" + ] + } + }, + { + "userId": "user-5", + "type": "READ", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "content": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + } + } + }, + { + "userId": "user-6", + "type": "READ", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "content": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + } + } + }, + { + "userId": "user-0", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/document.pdf", + "result": { + "content": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + } + } + }, + { + "userId": "user-9", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/important/" + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "dirContent": [ + "balance.xlsx" + ] + } + }, + { + "userId": "user-6", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-9", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + }, + "location": "home/file.txt" + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/documents/balance.xlsx", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/documents/balance.xlsx", + "result": { + "dirContent": [ + "important/documents/balance.xlsx" + ] + } + }, + { + "userId": "user-0", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/home/balance.xlsx", + "result": { + "content": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + } + } + }, + { + "userId": "user-1", + "type": "READ", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "content": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + } + } + }, + { + "userId": "user-7", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + }, + "location": "home/file.txt" + }, + { + "userId": "user-8", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/documents/" + }, + { + "userId": "user-4", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/home/" + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + }, + "location": "home/home/balance.xlsx" + }, + { + "userId": "user-6", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + }, + "location": "documents/file.txt" + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/", + "result": { + "dirContent": [ + "home/home/balance.xlsx", + "home/file.txt" + ] + } + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "home/documents/document.pdf", + "home/file.txt" + ] + } + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/important/balance.xlsx", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-5", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/file.txt", + "result": { + "content": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + } + } + }, + { + "userId": "user-7", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/home/balance.xlsx", + "result": { + "content": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + } + } + }, + { + "userId": "user-6", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/file.txt", + "result": { + "content": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + } + } + }, + { + "userId": "user-3", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/" + }, + { + "userId": "user-0", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/home/" + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + }, + "location": "important/home/document.pdf" + }, + { + "userId": "user-0", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/home/document.pdf", + "result": { + "content": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + } + } + }, + { + "userId": "user-1", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/" + }, + { + "userId": "user-1", + "type": "READ", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "content": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + } + } + }, + { + "userId": "user-7", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/home/" + }, + { + "userId": "user-7", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/file.txt", + "result": { + "content": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + } + } + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + }, + "location": "documents/important/presentation.ppt" + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + }, + "location": "important/documents/presentation.ppt" + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "important/home/document.pdf" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/balance.xlsx", + "result": { + "dirContent": [ + "home/balance.xlsx" + ] + } + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/documents/", + "result": { + "dirContent": [ + "important/documents/presentation.ppt" + ] + } + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/home/presentation.ppt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-0", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/balance.xlsx", + "result": { + "content": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + } + } + }, + { + "userId": "user-9", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/documents/presentation.ppt", + "result": { + "content": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + } + } + }, + { + "userId": "user-6", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/" + }, + { + "userId": "user-6", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + }, + "location": "important/important/presentation.ppt" + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + }, + "location": "documents/presentation.ppt" + }, + { + "userId": "user-0", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/home/document.pdf", + "result": { + "content": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + } + } + }, + { + "userId": "user-3", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/home/" + }, + { + "userId": "user-5", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-1", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "important/important/document.pdf" + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/", + "result": { + "dirContent": [ + "documents/important/presentation.ppt" + ] + } + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/important/", + "result": { + "dirContent": [ + "important/important/presentation.ppt" + ] + } + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/important/balance.xlsx", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-6", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/important/presentation.ppt", + "result": { + "content": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + } + } + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + }, + "location": "important/balance.xlsx" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "home/file.txt" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + }, + "location": "home/document.pdf" + }, + { + "userId": "user-2", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + }, + "location": "documents/home/document.pdf" + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "home/file.txt", + "documents/important/presentation.ppt" + ] + } + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/documents/presentation.ppt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/important/presentation.ppt", + "result": { + "dirContent": [ + "important/important/presentation.ppt" + ] + } + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/file.txt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/document.pdf", + "result": { + "dirContent": [ + "home/document.pdf" + ] + } + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-1", + "type": "READ", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "content": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + } + } + }, + { + "userId": "user-9", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/documents/" + }, + { + "userId": "user-1", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + }, + "location": "documents/presentation.ppt" + }, + { + "userId": "user-2", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + }, + "location": "documents/document.pdf" + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "file.txt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "important/balance.xlsx" + ] + } + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/document.pdf", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "home/file.txt" + ] + } + }, + { + "userId": "user-7", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/file.txt", + "result": { + "content": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + } + } + }, + { + "userId": "user-6", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/important/presentation.ppt", + "result": { + "content": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + } + } + }, + { + "userId": "user-8", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/" + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + }, + "location": "home/presentation.ppt" + }, + { + "userId": "user-6", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/important/" + }, + { + "userId": "user-2", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/home/" + }, + { + "userId": "user-6", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + }, + "location": "home/file.txt" + }, + { + "userId": "user-2", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + }, + "location": "important/file.txt" + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-8", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/presentation.ppt", + "result": { + "content": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + } + } + }, + { + "userId": "user-6", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/file.txt", + "result": { + "content": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + } + } + }, + { + "userId": "user-7", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/" + }, + { + "userId": "user-0", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/" + }, + { + "userId": "user-0", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/home/balance.xlsx", + "result": { + "content": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + } + } + }, + { + "userId": "user-6", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/" + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + }, + "location": "important/important/document.pdf" + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + }, + "location": "documents/home/file.txt" + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + }, + "location": "home/home/presentation.ppt" + }, + { + "userId": "user-6", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + }, + "location": "documents/document.pdf" + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-8", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/presentation.ppt", + "result": { + "content": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + } + } + }, + { + "userId": "user-2", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/file.txt", + "result": { + "content": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + } + } + }, + { + "userId": "user-7", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/important/presentation.ppt", + "result": { + "content": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + } + } + }, + { + "userId": "user-9", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/home/file.txt", + "result": { + "content": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + } + } + }, + { + "userId": "user-3", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/home/presentation.ppt", + "result": { + "content": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + } + } + }, + { + "userId": "user-6", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/document.pdf", + "result": { + "content": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + } + } + }, + { + "userId": "user-7", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/important/" + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + }, + "location": "home/home/presentation.ppt" + }, + { + "userId": "user-7", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/important/presentation.ppt", + "result": { + "content": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + } + } + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + }, + "location": "home/presentation.ppt" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/document.pdf", + "result": { + "dirContent": [ + "documents/document.pdf" + ] + } + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "balance.xlsx" + ] + } + }, + { + "userId": "user-0", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/home/balance.xlsx", + "result": { + "content": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + } + } + }, + { + "userId": "user-2", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/document.pdf", + "result": { + "content": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + } + } + }, + { + "userId": "user-4", + "type": "READ", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "content": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + } + } + }, + { + "userId": "user-5", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/presentation.ppt", + "result": { + "content": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + } + } + }, + { + "userId": "user-9", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/home/" + }, + { + "userId": "user-6", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/" + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-0", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/" + }, + { + "userId": "user-2", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/" + }, + { + "userId": "user-2", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + }, + "location": "home/important/document.pdf" + }, + { + "userId": "user-4", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-5", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/" + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "file.txt" + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + }, + "location": "document.pdf" + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + }, + "location": "home/important/file.txt" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-6", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + }, + "location": "documents/home/balance.xlsx" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + }, + "location": "important/presentation.ppt" + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/balance.xlsx", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/", + "result": { + "dirContent": [ + "important/file.txt" + ] + } + }, + { + "userId": "user-9", + "type": "READ", + "storageType": "PRIVATE", + "location": "document.pdf", + "result": { + "content": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + } + } + }, + { + "userId": "user-6", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/home/balance.xlsx", + "result": { + "content": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + } + } + }, + { + "userId": "user-3", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/important/" + }, + { + "userId": "user-3", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/home/presentation.ppt", + "result": { + "content": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + } + } + }, + { + "userId": "user-9", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-6", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/home/" + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + }, + "location": "document.pdf" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "home/presentation.ppt", + "file.txt", + "balance.xlsx" + ] + } + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/file.txt", + "result": { + "dirContent": [ + "important/file.txt" + ] + } + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "document.pdf", + "presentation.ppt", + "important/home/document.pdf" + ] + } + }, + { + "userId": "user-7", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/important/presentation.ppt", + "result": { + "content": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + } + } + }, + { + "userId": "user-1", + "type": "READ", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "content": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + } + } + }, + { + "userId": "user-7", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/important/" + }, + { + "userId": "user-8", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-4", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + }, + "location": "important/home/document.pdf" + }, + { + "userId": "user-6", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + }, + "location": "important/document.pdf" + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-2", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + }, + "location": "document.pdf" + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "important/presentation.ppt", + "presentation.ppt", + "balance.xlsx" + ] + } + }, + { + "userId": "user-9", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + }, + "location": "file.txt" + }, + { + "userId": "user-1", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/" + }, + { + "userId": "user-6", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "important/presentation.ppt" + }, + { + "userId": "user-6", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "home/file.txt" + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/file.txt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/home/", + "result": { + "dirContent": [ + "important/home/document.pdf" + ] + } + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "document.pdf", + "presentation.ppt", + "home/file.txt", + "important/home/document.pdf" + ] + } + }, + { + "userId": "user-3", + "type": "READ", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "content": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + } + } + }, + { + "userId": "user-2", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/important/document.pdf", + "result": { + "content": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + } + } + }, + { + "userId": "user-3", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/home/" + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + }, + "location": "file.txt" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + }, + "location": "file.txt" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + }, + "location": "home/balance.xlsx" + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "dirContent": [ + "presentation.ppt" + ] + } + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "important/presentation.ppt" + ] + } + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/home/presentation.ppt", + "result": { + "dirContent": [ + "home/home/presentation.ppt" + ] + } + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "dirContent": [ + "balance.xlsx" + ] + } + }, + { + "userId": "user-0", + "type": "READ", + "storageType": "PRIVATE", + "location": "document.pdf", + "result": { + "content": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + } + } + }, + { + "userId": "user-2", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/important/document.pdf", + "result": { + "content": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + } + } + }, + { + "userId": "user-1", + "type": "READ", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "content": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + } + } + }, + { + "userId": "user-0", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-1", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + }, + "location": "file.txt" + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/", + "result": { + "dirContent": [ + "important/file.txt" + ] + } + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "file.txt" + ] + } + }, + { + "userId": "user-9", + "type": "READ", + "storageType": "PRIVATE", + "location": "file.txt", + "result": { + "content": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + } + } + }, + { + "userId": "user-2", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/file.txt", + "result": { + "content": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + } + } + }, + { + "userId": "user-9", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-3", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + }, + "location": "home/file.txt" + }, + { + "userId": "user-3", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/file.txt", + "result": { + "content": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + } + } + }, + { + "userId": "user-5", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/" + }, + { + "userId": "user-4", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/home/" + }, + { + "userId": "user-3", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/" + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "home/balance.xlsx" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + }, + "location": "important/file.txt" + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + }, + "location": "important/balance.xlsx" + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "file.txt", + "result": { + "dirContent": [ + "file.txt" + ] + } + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "presentation.ppt" + ] + } + }, + { + "userId": "user-4", + "type": "READ", + "storageType": "PRIVATE", + "location": "file.txt", + "result": { + "content": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + } + } + }, + { + "userId": "user-5", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/file.txt", + "result": { + "content": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + } + } + }, + { + "userId": "user-0", + "type": "READ", + "storageType": "PRIVATE", + "location": "file.txt", + "result": { + "content": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + } + } + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + }, + "location": "home/important/document.pdf" + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/home/presentation.ppt", + "result": { + "dirContent": [ + "home/home/presentation.ppt" + ] + } + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-8", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/" + }, + { + "userId": "user-1", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/important/" + }, + { + "userId": "user-1", + "type": "READ", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "content": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + } + } + }, + { + "userId": "user-2", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + }, + "location": "document.pdf" + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/home/presentation.ppt", + "result": { + "dirContent": [ + "home/home/presentation.ppt" + ] + } + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/balance.xlsx", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/important/file.txt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-4", + "type": "READ", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "content": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + } + } + }, + { + "userId": "user-0", + "type": "READ", + "storageType": "PRIVATE", + "location": "file.txt", + "result": { + "content": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + } + } + }, + { + "userId": "user-7", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-5", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/" + }, + { + "userId": "user-0", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + }, + "location": "home/document.pdf" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-6", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + }, + "location": "important/documents/file.txt" + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "home/document.pdf" + ] + } + }, + { + "userId": "user-3", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/document.pdf", + "result": { + "content": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + } + } + }, + { + "userId": "user-6", + "type": "READ", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "content": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + } + } + }, + { + "userId": "user-1", + "type": "READ", + "storageType": "PRIVATE", + "location": "document.pdf", + "result": { + "content": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + } + } + }, + { + "userId": "user-8", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/file.txt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-3", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/" + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/documents/document.pdf", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + }, + "location": "important/home/document.pdf" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + }, + "location": "file.txt" + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-4", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + }, + "location": "important/important/presentation.ppt" + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "home/presentation.ppt" + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "document.pdf", + "result": { + "dirContent": [ + "document.pdf" + ] + } + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-4", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/important/" + }, + { + "userId": "user-1", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "file.txt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-6", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + }, + "location": "home/balance.xlsx" + }, + { + "userId": "user-2", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + }, + "location": "important/documents/file.txt" + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + }, + "location": "documents/home/document.pdf" + }, + { + "userId": "user-6", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/", + "result": { + "dirContent": [ + "home/presentation.ppt" + ] + } + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/documents/", + "result": { + "dirContent": [ + "important/documents/file.txt" + ] + } + }, + { + "userId": "user-0", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/presentation.ppt", + "result": { + "content": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + } + } + }, + { + "userId": "user-9", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/home/document.pdf", + "result": { + "content": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + } + } + }, + { + "userId": "user-8", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/home/" + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + }, + "location": "home/important/presentation.ppt" + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-6", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "file.txt" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + }, + "location": "important/important/balance.xlsx" + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/", + "result": { + "dirContent": [ + "important/documents/file.txt" + ] + } + }, + { + "userId": "user-2", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/documents/file.txt", + "result": { + "content": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + } + } + }, + { + "userId": "user-0", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/" + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/document.pdf", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-8", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/important/presentation.ppt", + "result": { + "content": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + } + } + }, + { + "userId": "user-6", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/balance.xlsx", + "result": { + "content": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + } + } + }, + { + "userId": "user-6", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/" + }, + { + "userId": "user-2", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/documents/" + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + }, + "location": "documents/documents/balance.xlsx" + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + }, + "location": "important/document.pdf" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + }, + "location": "important/presentation.ppt" + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/file.txt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-8", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/important/presentation.ppt", + "result": { + "content": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + } + } + }, + { + "userId": "user-9", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/home/document.pdf", + "result": { + "content": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + } + } + }, + { + "userId": "user-4", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/document.pdf", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + }, + "location": "home/documents/file.txt" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-2", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "important/balance.xlsx" + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/", + "result": { + "dirContent": [ + "documents/documents/balance.xlsx" + ] + } + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/important/presentation.ppt", + "result": { + "dirContent": [ + "home/important/presentation.ppt" + ] + } + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/", + "result": { + "dirContent": [ + "important/balance.xlsx" + ] + } + }, + { + "userId": "user-8", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/important/presentation.ppt", + "result": { + "content": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + } + } + }, + { + "userId": "user-6", + "type": "READ", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "content": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + } + } + }, + { + "userId": "user-4", + "type": "READ", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "content": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + } + } + }, + { + "userId": "user-7", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/documents/" + }, + { + "userId": "user-6", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-1", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/important/" + }, + { + "userId": "user-4", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-6", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "home/documents/file.txt", + "balance.xlsx", + "important/document.pdf", + "documents/home/document.pdf" + ] + } + }, + { + "userId": "user-2", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/balance.xlsx", + "result": { + "content": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + } + } + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + }, + "location": "important/home/document.pdf" + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + }, + "location": "documents/documents/presentation.ppt" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + }, + "location": "important/balance.xlsx" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/", + "result": { + "dirContent": [ + "important/home/document.pdf" + ] + } + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "document.pdf", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/documents/balance.xlsx", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "presentation.ppt" + ] + } + }, + { + "userId": "user-6", + "type": "READ", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "content": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + } + } + }, + { + "userId": "user-1", + "type": "READ", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "content": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + } + } + }, + { + "userId": "user-8", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/important/" + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + }, + "location": "documents/balance.xlsx" + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/", + "result": { + "dirContent": [ + "documents/balance.xlsx" + ] + } + }, + { + "userId": "user-6", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-7", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/home/" + }, + { + "userId": "user-9", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/documents/" + }, + { + "userId": "user-9", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/home/document.pdf", + "result": { + "content": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + } + } + }, + { + "userId": "user-5", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + }, + "location": "home/important/presentation.ppt" + }, + { + "userId": "user-5", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/important/presentation.ppt", + "result": { + "content": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + } + } + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "important/home/presentation.ppt" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + }, + "location": "documents/documents/document.pdf" + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/important/file.txt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-8", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/balance.xlsx", + "result": { + "content": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + } + } + }, + { + "userId": "user-1", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "home/documents/balance.xlsx" + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-9", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/home/document.pdf", + "result": { + "content": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + } + } + }, + { + "userId": "user-4", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/balance.xlsx", + "result": { + "content": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + } + } + }, + { + "userId": "user-4", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + }, + "location": "documents/documents/balance.xlsx" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-2", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "documents/home/balance.xlsx" + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "documents/balance.xlsx", + "presentation.ppt", + "home/documents/balance.xlsx" + ] + } + }, + { + "userId": "user-8", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/balance.xlsx", + "result": { + "content": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + } + } + }, + { + "userId": "user-9", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/home/document.pdf", + "result": { + "content": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + } + } + }, + { + "userId": "user-2", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/" + }, + { + "userId": "user-2", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/home/balance.xlsx", + "result": { + "content": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + } + } + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + }, + "location": "home/important/file.txt" + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "home/documents/balance.xlsx" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-6", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + }, + "location": "important/balance.xlsx" + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + }, + "location": "documents/document.pdf" + }, + { + "userId": "user-2", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + }, + "location": "document.pdf" + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/documents/balance.xlsx", + "result": { + "dirContent": [ + "home/documents/balance.xlsx" + ] + } + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/home/document.pdf", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-3", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/documents/balance.xlsx", + "result": { + "content": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + } + } + }, + { + "userId": "user-2", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/home/balance.xlsx", + "result": { + "content": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + } + } + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + }, + "location": "documents/balance.xlsx" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + }, + "location": "important/documents/balance.xlsx" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + }, + "location": "home/important/document.pdf" + }, + { + "userId": "user-6", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + }, + "location": "important/documents/file.txt" + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "document.pdf", + "documents/home/balance.xlsx" + ] + } + }, + { + "userId": "user-3", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/documents/balance.xlsx", + "result": { + "content": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + } + } + }, + { + "userId": "user-0", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/document.pdf", + "result": { + "content": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + } + } + }, + { + "userId": "user-4", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/documents/balance.xlsx", + "result": { + "content": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + } + } + }, + { + "userId": "user-6", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/balance.xlsx", + "result": { + "content": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + } + } + }, + { + "userId": "user-3", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/documents/" + }, + { + "userId": "user-5", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/important/" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + }, + "location": "documents/important/presentation.ppt" + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "dirContent": [ + "presentation.ppt" + ] + } + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/documents/", + "result": { + "dirContent": [ + "important/documents/balance.xlsx" + ] + } + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/balance.xlsx", + "result": { + "dirContent": [ + "important/balance.xlsx" + ] + } + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/document.pdf", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/home/", + "result": { + "dirContent": [ + "documents/home/balance.xlsx" + ] + } + }, + { + "userId": "user-5", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/home/presentation.ppt", + "result": { + "content": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + } + } + }, + { + "userId": "user-8", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/documents/" + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "documents/balance.xlsx", + "presentation.ppt" + ] + } + }, + { + "userId": "user-4", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/documents/" + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "file.txt" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + }, + "location": "documents/file.txt" + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "documents/balance.xlsx" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + }, + "location": "documents/balance.xlsx" + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "file.txt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "document.pdf", + "documents/home/balance.xlsx" + ] + } + }, + { + "userId": "user-0", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/balance.xlsx", + "result": { + "content": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + } + } + }, + { + "userId": "user-9", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/important/" + }, + { + "userId": "user-1", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/" + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + }, + "location": "documents/document.pdf" + }, + { + "userId": "user-2", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + }, + "location": "home/important/file.txt" + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-8", + "type": "READ", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "content": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + } + } + }, + { + "userId": "user-6", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + }, + "location": "home/file.txt" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + }, + "location": "important/home/presentation.ppt" + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "documents/document.pdf", + "file.txt", + "documents/documents/presentation.ppt", + "balance.xlsx", + "important/document.pdf", + "documents/home/document.pdf", + "documents/documents/balance.xlsx" + ] + } + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/important/balance.xlsx", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-2", + "type": "READ", + "storageType": "PRIVATE", + "location": "document.pdf", + "result": { + "content": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + } + } + }, + { + "userId": "user-8", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + }, + "location": "important/document.pdf" + }, + { + "userId": "user-9", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/documents/" + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "document.pdf" + }, + { + "userId": "user-9", + "type": "READ", + "storageType": "PRIVATE", + "location": "file.txt", + "result": { + "content": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + } + } + }, + { + "userId": "user-2", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/important/" + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/balance.xlsx", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-6", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/" + }, + { + "userId": "user-1", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/home/" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "home/home/file.txt" + }, + { + "userId": "user-1", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/home/file.txt", + "result": { + "content": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + } + } + }, + { + "userId": "user-8", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/" + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-9", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/home/" + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "home/document.pdf" + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + }, + "location": "home/balance.xlsx" + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/document.pdf", + "result": { + "dirContent": [ + "documents/document.pdf" + ] + } + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/", + "result": { + "dirContent": [ + "documents/balance.xlsx", + "documents/document.pdf" + ] + } + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/home/presentation.ppt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-8", + "type": "READ", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "content": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + } + } + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + }, + "location": "documents/balance.xlsx" + }, + { + "userId": "user-2", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + }, + "location": "file.txt" + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/documents/document.pdf", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/documents/file.txt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-5", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/balance.xlsx", + "result": { + "content": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + } + } + }, + { + "userId": "user-6", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/documents/file.txt", + "result": { + "content": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + } + } + }, + { + "userId": "user-3", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/balance.xlsx", + "result": { + "content": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + } + } + }, + { + "userId": "user-2", + "type": "READ", + "storageType": "PRIVATE", + "location": "file.txt", + "result": { + "content": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + } + } + }, + { + "userId": "user-9", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-1", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/home/" + }, + { + "userId": "user-3", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/" + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + }, + "location": "home/presentation.ppt" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + }, + "location": "documents/presentation.ppt" + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/presentation.ppt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/home/presentation.ppt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "documents/balance.xlsx", + "documents/document.pdf" + ] + } + }, + { + "userId": "user-3", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/presentation.ppt", + "result": { + "content": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + } + } + }, + { + "userId": "user-5", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/home/presentation.ppt", + "result": { + "content": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + } + } + }, + { + "userId": "user-2", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/home/" + }, + { + "userId": "user-2", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + }, + "location": "important/balance.xlsx" + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "documents/documents/balance.xlsx" + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + }, + "location": "home/balance.xlsx" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + }, + "location": "documents/balance.xlsx" + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + }, + "location": "important/important/presentation.ppt" + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/documents/balance.xlsx", + "result": { + "dirContent": [ + "documents/documents/balance.xlsx" + ] + } + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/file.txt", + "result": { + "dirContent": [ + "documents/file.txt" + ] + } + }, + { + "userId": "user-3", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/presentation.ppt", + "result": { + "content": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + } + } + }, + { + "userId": "user-8", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-4", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/" + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-9", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/" + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + }, + "location": "documents/balance.xlsx" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + }, + "location": "home/file.txt" + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + }, + "location": "home/presentation.ppt" + }, + { + "userId": "user-2", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "documents/presentation.ppt" + }, + { + "userId": "user-3", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/presentation.ppt", + "result": { + "content": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + } + } + }, + { + "userId": "user-6", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/documents/file.txt", + "result": { + "content": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + } + } + }, + { + "userId": "user-1", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/presentation.ppt", + "result": { + "content": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + } + } + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + }, + "location": "home/important/document.pdf" + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + }, + "location": "home/document.pdf" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + }, + "location": "document.pdf" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + }, + "location": "home/balance.xlsx" + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + }, + "location": "document.pdf" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + }, + "location": "documents/documents/presentation.ppt" + }, + { + "userId": "user-2", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "home/file.txt" + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "home/presentation.ppt" + ] + } + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/home/presentation.ppt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-3", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/presentation.ppt", + "result": { + "content": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + } + } + }, + { + "userId": "user-4", + "type": "READ", + "storageType": "PRIVATE", + "location": "document.pdf", + "result": { + "content": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + } + } + }, + { + "userId": "user-3", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/" + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + }, + "location": "important/file.txt" + }, + { + "userId": "user-6", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/documents/" + }, + { + "userId": "user-6", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "important/file.txt" + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/file.txt", + "result": { + "dirContent": [ + "important/file.txt" + ] + } + }, + { + "userId": "user-5", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/home/" + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + }, + "location": "documents/document.pdf" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + }, + "location": "documents/home/file.txt" + }, + { + "userId": "user-6", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + }, + "location": "important/file.txt" + }, + { + "userId": "user-2", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + }, + "location": "home/home/presentation.ppt" + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "documents/balance.xlsx", + "presentation.ppt", + "home/balance.xlsx", + "home/file.txt", + "balance.xlsx", + "documents/important/presentation.ppt" + ] + } + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "document.pdf", + "home/presentation.ppt", + "documents/balance.xlsx", + "documents/document.pdf", + "important/important/presentation.ppt" + ] + } + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/", + "result": { + "dirContent": [ + "important/balance.xlsx", + "important/file.txt" + ] + } + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "document.pdf", + "important/balance.xlsx", + "documents/presentation.ppt", + "home/home/presentation.ppt", + "file.txt", + "home/file.txt" + ] + } + }, + { + "userId": "user-9", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/document.pdf", + "result": { + "content": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + } + } + }, + { + "userId": "user-5", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/file.txt", + "result": { + "content": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + } + } + }, + { + "userId": "user-1", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/presentation.ppt", + "result": { + "content": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + } + } + }, + { + "userId": "user-2", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + }, + "location": "home/documents/file.txt" + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "documents/document.pdf" + }, + { + "userId": "user-6", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "important/home/file.txt" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + }, + "location": "documents/presentation.ppt" + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "important/balance.xlsx", + "important/file.txt", + "important/home/file.txt" + ] + } + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "document.pdf", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-1", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/presentation.ppt", + "result": { + "content": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + } + } + }, + { + "userId": "user-6", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/" + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "home/presentation.ppt" + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + }, + "location": "documents/important/file.txt" + }, + { + "userId": "user-6", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "file.txt" + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/documents/", + "result": { + "dirContent": [ + "home/documents/file.txt" + ] + } + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "important/file.txt", + "documents/document.pdf", + "balance.xlsx" + ] + } + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/file.txt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "document.pdf", + "documents/home/file.txt", + "documents/important/file.txt" + ] + } + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "file.txt" + ] + } + }, + { + "userId": "user-7", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/documents/balance.xlsx", + "result": { + "content": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + } + } + }, + { + "userId": "user-9", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/document.pdf", + "result": { + "content": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + } + } + }, + { + "userId": "user-5", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/important/presentation.ppt", + "result": { + "content": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + } + } + }, + { + "userId": "user-0", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/presentation.ppt", + "result": { + "content": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + } + } + }, + { + "userId": "user-5", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/" + }, + { + "userId": "user-3", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/" + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "important/file.txt", + "balance.xlsx" + ] + } + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + }, + "location": "document.pdf" + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + }, + "location": "file.txt" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + }, + "location": "important/balance.xlsx" + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "home/document.pdf" + ] + } + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/important/file.txt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "file.txt" + ] + } + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/file.txt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/", + "result": { + "dirContent": [ + "documents/presentation.ppt", + "documents/documents/presentation.ppt" + ] + } + }, + { + "userId": "user-9", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/document.pdf", + "result": { + "content": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + } + } + }, + { + "userId": "user-3", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/file.txt", + "result": { + "content": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + } + } + }, + { + "userId": "user-0", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/presentation.ppt", + "result": { + "content": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + } + } + }, + { + "userId": "user-7", + "type": "READ", + "storageType": "PRIVATE", + "location": "document.pdf", + "result": { + "content": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + } + } + }, + { + "userId": "user-4", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-0", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/" + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + }, + "location": "home/presentation.ppt" + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/documents/document.pdf", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "file.txt", + "result": { + "dirContent": [ + "file.txt" + ] + } + }, + { + "userId": "user-7", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/documents/balance.xlsx", + "result": { + "content": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + } + } + }, + { + "userId": "user-1", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + }, + "location": "important/file.txt" + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + }, + "location": "important/home/file.txt" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + }, + "location": "important/important/balance.xlsx" + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + }, + "location": "important/document.pdf" + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/presentation.ppt", + "result": { + "dirContent": [ + "home/presentation.ppt" + ] + } + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/", + "result": { + "dirContent": [ + "important/important/balance.xlsx" + ] + } + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/document.pdf", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/presentation.ppt", + "result": { + "dirContent": [ + "home/presentation.ppt" + ] + } + }, + { + "userId": "user-7", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/balance.xlsx", + "result": { + "content": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + } + } + }, + { + "userId": "user-7", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/documents/" + }, + { + "userId": "user-6", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "documents/presentation.ppt" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-3", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/file.txt", + "result": { + "content": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + } + } + }, + { + "userId": "user-4", + "type": "READ", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "content": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + } + } + }, + { + "userId": "user-1", + "type": "READ", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "content": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + } + } + }, + { + "userId": "user-9", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/" + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/", + "result": { + "dirContent": [ + "documents/presentation.ppt" + ] + } + }, + { + "userId": "user-4", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-1", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/" + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "dirContent": [ + "presentation.ppt" + ] + } + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "important/presentation.ppt" + }, + { + "userId": "user-6", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + }, + "location": "home/file.txt" + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + }, + "location": "home/documents/file.txt" + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/", + "result": { + "dirContent": [ + "documents/balance.xlsx", + "documents/document.pdf" + ] + } + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/presentation.ppt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-7", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/document.pdf", + "result": { + "content": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + } + } + }, + { + "userId": "user-5", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/balance.xlsx", + "result": { + "content": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + } + } + }, + { + "userId": "user-0", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/important/presentation.ppt", + "result": { + "content": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + } + } + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + }, + "location": "important/file.txt" + }, + { + "userId": "user-2", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/important/balance.xlsx", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-7", + "type": "READ", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "content": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + } + } + }, + { + "userId": "user-8", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/documents/file.txt", + "result": { + "content": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + } + } + }, + { + "userId": "user-9", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/home/file.txt", + "result": { + "content": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + } + } + }, + { + "userId": "user-7", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + }, + "location": "documents/presentation.ppt" + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-6", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + }, + "location": "file.txt" + }, + { + "userId": "user-2", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + }, + "location": "home/home/balance.xlsx" + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/document.pdf", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "home/documents/file.txt", + "presentation.ppt" + ] + } + }, + { + "userId": "user-5", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/important/presentation.ppt", + "result": { + "content": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + } + } + }, + { + "userId": "user-8", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-9", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/" + }, + { + "userId": "user-3", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/" + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + }, + "location": "important/important/file.txt" + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/document.pdf", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-6", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/" + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "file.txt" + ] + } + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + }, + "location": "documents/home/file.txt" + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + }, + "location": "documents/file.txt" + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/documents/document.pdf", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-6", + "type": "READ", + "storageType": "PRIVATE", + "location": "file.txt", + "result": { + "content": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + } + } + }, + { + "userId": "user-2", + "type": "READ", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "content": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + } + } + }, + { + "userId": "user-3", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/important/file.txt", + "result": { + "content": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + } + } + }, + { + "userId": "user-5", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/" + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "presentation.ppt", + "file.txt", + "important/important/balance.xlsx", + "balance.xlsx" + ] + } + }, + { + "userId": "user-5", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/important/balance.xlsx", + "result": { + "content": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + } + } + }, + { + "userId": "user-3", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/" + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + }, + "location": "home/home/presentation.ppt" + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + }, + "location": "home/document.pdf" + }, + { + "userId": "user-2", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "home/important/document.pdf" + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "file.txt", + "result": { + "dirContent": [ + "file.txt" + ] + } + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "home/document.pdf", + "presentation.ppt", + "file.txt", + "important/important/balance.xlsx", + "balance.xlsx" + ] + } + }, + { + "userId": "user-3", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/home/presentation.ppt", + "result": { + "content": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + } + } + }, + { + "userId": "user-1", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/documents/file.txt", + "result": { + "content": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + } + } + }, + { + "userId": "user-2", + "type": "READ", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "content": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + } + } + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "document.pdf" + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + }, + "location": "document.pdf" + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "documents/home/file.txt" + ] + } + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "file.txt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "document.pdf", + "home/presentation.ppt", + "important/file.txt", + "important/document.pdf", + "balance.xlsx", + "important/important/presentation.ppt" + ] + } + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "document.pdf", + "result": { + "dirContent": [ + "document.pdf" + ] + } + }, + { + "userId": "user-8", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/home/file.txt", + "result": { + "content": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + } + } + }, + { + "userId": "user-9", + "type": "READ", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "content": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + } + } + }, + { + "userId": "user-7", + "type": "READ", + "storageType": "PRIVATE", + "location": "document.pdf", + "result": { + "content": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + } + } + }, + { + "userId": "user-3", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/home/presentation.ppt", + "result": { + "content": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + } + } + }, + { + "userId": "user-5", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + }, + "location": "file.txt" + }, + { + "userId": "user-6", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + }, + "location": "important/important/file.txt" + }, + { + "userId": "user-6", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "documents/document.pdf" + }, + { + "userId": "user-2", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-9", + "type": "READ", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "content": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + } + } + }, + { + "userId": "user-8", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/home/" + }, + { + "userId": "user-2", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/important/" + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + }, + "location": "documents/home/file.txt" + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/document.pdf", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "documents/document.pdf" + ] + } + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/documents/balance.xlsx", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "dirContent": [ + "balance.xlsx" + ] + } + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/presentation.ppt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-0", + "type": "READ", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "content": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + } + } + }, + { + "userId": "user-2", + "type": "READ", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "content": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + } + } + }, + { + "userId": "user-8", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/home/file.txt", + "result": { + "content": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + } + } + }, + { + "userId": "user-9", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-0", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/" + }, + { + "userId": "user-2", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-8", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/home/" + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + }, + "location": "home/documents/file.txt" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + }, + "location": "home/important/document.pdf" + }, + { + "userId": "user-6", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + }, + "location": "home/document.pdf" + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "document.pdf", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-7", + "type": "READ", + "storageType": "PRIVATE", + "location": "document.pdf", + "result": { + "content": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + } + } + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + }, + "location": "home/home/balance.xlsx" + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/documents/file.txt", + "result": { + "dirContent": [ + "home/documents/file.txt" + ] + } + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "file.txt", + "result": { + "dirContent": [ + "file.txt" + ] + } + }, + { + "userId": "user-7", + "type": "READ", + "storageType": "PRIVATE", + "location": "document.pdf", + "result": { + "content": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + } + } + }, + { + "userId": "user-5", + "type": "READ", + "storageType": "PRIVATE", + "location": "file.txt", + "result": { + "content": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + } + } + }, + { + "userId": "user-1", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/documents/file.txt", + "result": { + "content": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + } + } + }, + { + "userId": "user-3", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-0", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + }, + "location": "documents/important/file.txt" + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + }, + "location": "important/balance.xlsx" + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + }, + "location": "file.txt" + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + }, + "location": "documents/important/file.txt" + }, + { + "userId": "user-6", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + }, + "location": "documents/document.pdf" + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "documents/important/file.txt" + ] + } + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "document.pdf", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + }, + "location": "important/file.txt" + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/home/balance.xlsx", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/home/balance.xlsx", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-9", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/important/file.txt", + "result": { + "content": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + } + } + }, + { + "userId": "user-5", + "type": "READ", + "storageType": "PRIVATE", + "location": "file.txt", + "result": { + "content": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + } + } + }, + { + "userId": "user-0", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/important/file.txt", + "result": { + "content": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + } + } + }, + { + "userId": "user-1", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/file.txt", + "result": { + "content": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + } + } + }, + { + "userId": "user-7", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/" + }, + { + "userId": "user-7", + "type": "READ", + "storageType": "PRIVATE", + "location": "document.pdf", + "result": { + "content": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + } + } + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "documents/important/file.txt" + ] + } + }, + { + "userId": "user-9", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/important/file.txt", + "result": { + "content": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + } + } + }, + { + "userId": "user-5", + "type": "READ", + "storageType": "PRIVATE", + "location": "file.txt", + "result": { + "content": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + } + } + }, + { + "userId": "user-0", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/important/file.txt", + "result": { + "content": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + } + } + }, + { + "userId": "user-0", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/important/" + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/file.txt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + }, + "location": "important/presentation.ppt" + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + }, + "location": "home/documents/balance.xlsx" + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "document.pdf" + ] + } + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/documents/balance.xlsx", + "result": { + "dirContent": [ + "home/documents/balance.xlsx" + ] + } + }, + { + "userId": "user-4", + "type": "READ", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "content": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + } + } + }, + { + "userId": "user-5", + "type": "READ", + "storageType": "PRIVATE", + "location": "file.txt", + "result": { + "content": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + } + } + }, + { + "userId": "user-6", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/document.pdf", + "result": { + "content": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + } + } + }, + { + "userId": "user-9", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/" + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/", + "result": { + "dirContent": [ + "documents/important/file.txt" + ] + } + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + }, + "location": "documents/home/document.pdf" + }, + { + "userId": "user-6", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/home/balance.xlsx", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "home/documents/file.txt", + "presentation.ppt", + "important/file.txt", + "home/home/balance.xlsx" + ] + } + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/", + "result": { + "dirContent": [ + "home/document.pdf" + ] + } + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "document.pdf", + "result": { + "dirContent": [ + "document.pdf" + ] + } + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "dirContent": [ + "presentation.ppt" + ] + } + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "home/document.pdf", + "documents/document.pdf", + "balance.xlsx" + ] + } + }, + { + "userId": "user-3", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/home/" + }, + { + "userId": "user-1", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/documents/presentation.ppt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "balance.xlsx" + ] + } + }, + { + "userId": "user-8", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + }, + "location": "documents/important/balance.xlsx" + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "documents/important/balance.xlsx" + ] + } + }, + { + "userId": "user-5", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-6", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/" + }, + { + "userId": "user-8", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/important/" + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + }, + "location": "documents/home/presentation.ppt" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + }, + "location": "home/documents/presentation.ppt" + }, + { + "userId": "user-6", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + }, + "location": "home/balance.xlsx" + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "document.pdf" + ] + } + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/documents/", + "result": { + "dirContent": [ + "home/documents/balance.xlsx" + ] + } + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/home/presentation.ppt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "balance.xlsx" + ] + } + }, + { + "userId": "user-9", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/important/file.txt", + "result": { + "content": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + } + } + }, + { + "userId": "user-8", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/home/" + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-6", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "home/presentation.ppt" + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + }, + "location": "file.txt" + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "file.txt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/important/document.pdf", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-4", + "type": "READ", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "content": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + } + } + }, + { + "userId": "user-0", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-2", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "file.txt" + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/documents/presentation.ppt", + "result": { + "dirContent": [ + "home/documents/presentation.ppt" + ] + } + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/documents/file.txt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-9", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/important/" + }, + { + "userId": "user-2", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-2", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "important/balance.xlsx" + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/", + "result": { + "dirContent": [ + "important/balance.xlsx" + ] + } + }, + { + "userId": "user-2", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/" + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + }, + "location": "documents/documents/balance.xlsx" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + }, + "location": "documents/balance.xlsx" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + }, + "location": "important/file.txt" + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "document.pdf", + "presentation.ppt" + ] + } + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "dirContent": [ + "balance.xlsx" + ] + } + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "home/presentation.ppt", + "home/document.pdf", + "home/balance.xlsx", + "balance.xlsx" + ] + } + }, + { + "userId": "user-9", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/documents/balance.xlsx", + "result": { + "content": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + } + } + }, + { + "userId": "user-9", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-5", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/" + }, + { + "userId": "user-5", + "type": "READ", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "content": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + } + } + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + }, + "location": "home/document.pdf" + }, + { + "userId": "user-6", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + }, + "location": "home/home/presentation.ppt" + }, + { + "userId": "user-2", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + }, + "location": "home/file.txt" + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "dirContent": [ + "presentation.ppt" + ] + } + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/presentation.ppt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "home/document.pdf" + ] + } + }, + { + "userId": "user-3", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/documents/balance.xlsx", + "result": { + "content": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + } + } + }, + { + "userId": "user-5", + "type": "READ", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "content": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + } + } + }, + { + "userId": "user-1", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/file.txt", + "result": { + "content": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + } + } + }, + { + "userId": "user-3", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/documents/" + }, + { + "userId": "user-4", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-6", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/" + }, + { + "userId": "user-6", + "type": "READ", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "content": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + } + } + }, + { + "userId": "user-8", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/" + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + }, + "location": "important/important/balance.xlsx" + }, + { + "userId": "user-6", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + }, + "location": "home/presentation.ppt" + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "important/important/balance.xlsx" + ] + } + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-1", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/file.txt", + "result": { + "content": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + } + } + }, + { + "userId": "user-6", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/presentation.ppt", + "result": { + "content": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + } + } + }, + { + "userId": "user-7", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + }, + "location": "home/documents/balance.xlsx" + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/documents/presentation.ppt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "file.txt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-5", + "type": "READ", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "content": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + } + } + }, + { + "userId": "user-1", + "type": "READ", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "content": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + } + } + }, + { + "userId": "user-1", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/", + "result": { + "dirContent": [ + "home/documents/balance.xlsx" + ] + } + }, + { + "userId": "user-2", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/file.txt", + "result": { + "content": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + } + } + }, + { + "userId": "user-6", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/" + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + }, + "location": "important/presentation.ppt" + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-2", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "home/file.txt" + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "document.pdf", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "presentation.ppt" + ] + } + }, + { + "userId": "user-4", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/documents/balance.xlsx", + "result": { + "content": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + } + } + }, + { + "userId": "user-6", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-3", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/" + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + }, + "location": "home/home/balance.xlsx" + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/important/presentation.ppt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-0", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-2", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/" + }, + { + "userId": "user-3", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/home/" + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-6", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "home/documents/file.txt" + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/file.txt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-5", + "type": "READ", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "content": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + } + } + }, + { + "userId": "user-3", + "type": "READ", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "content": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + } + } + }, + { + "userId": "user-6", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/documents/file.txt", + "result": { + "content": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + } + } + }, + { + "userId": "user-5", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-2", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + }, + "location": "documents/document.pdf" + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "file.txt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-9", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/important/balance.xlsx", + "result": { + "content": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + } + } + }, + { + "userId": "user-4", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/documents/balance.xlsx", + "result": { + "content": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + } + } + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "home/home/balance.xlsx" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + }, + "location": "document.pdf" + }, + { + "userId": "user-2", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "home/home/balance.xlsx", + "home/documents/balance.xlsx" + ] + } + }, + { + "userId": "user-3", + "type": "READ", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "content": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + } + } + }, + { + "userId": "user-9", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/important/" + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + }, + "location": "documents/balance.xlsx" + }, + { + "userId": "user-3", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-6", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/documents/" + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + }, + "location": "documents/presentation.ppt" + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + }, + "location": "important/home/file.txt" + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/important/presentation.ppt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-0", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/home/file.txt", + "result": { + "content": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + } + } + }, + { + "userId": "user-9", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/" + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + }, + "location": "important/documents/presentation.ppt" + }, + { + "userId": "user-2", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + }, + "location": "documents/home/file.txt" + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "dirContent": [ + "balance.xlsx" + ] + } + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/home/balance.xlsx", + "result": { + "dirContent": [ + "home/home/balance.xlsx" + ] + } + }, + { + "userId": "user-3", + "type": "READ", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "content": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + } + } + }, + { + "userId": "user-0", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/home/file.txt", + "result": { + "content": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + } + } + }, + { + "userId": "user-1", + "type": "READ", + "storageType": "PRIVATE", + "location": "document.pdf", + "result": { + "content": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + } + } + }, + { + "userId": "user-2", + "type": "READ", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "content": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + } + } + }, + { + "userId": "user-1", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + }, + "location": "documents/document.pdf" + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "balance.xlsx" + ] + } + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/documents/presentation.ppt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/home/", + "result": { + "dirContent": [ + "important/home/file.txt" + ] + } + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/home/file.txt", + "result": { + "dirContent": [ + "documents/home/file.txt" + ] + } + }, + { + "userId": "user-0", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/home/file.txt", + "result": { + "content": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + } + } + }, + { + "userId": "user-2", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/" + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "important/balance.xlsx" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + }, + "location": "home/presentation.ppt" + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/balance.xlsx", + "result": { + "dirContent": [ + "important/balance.xlsx" + ] + } + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "important/home/file.txt" + ] + } + }, + { + "userId": "user-9", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/documents/" + }, + { + "userId": "user-2", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + }, + "location": "home/home/presentation.ppt" + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "file.txt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "dirContent": [ + "balance.xlsx" + ] + } + }, + { + "userId": "user-0", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/home/file.txt", + "result": { + "content": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + } + } + }, + { + "userId": "user-5", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/home/presentation.ppt", + "result": { + "content": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + } + } + }, + { + "userId": "user-3", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + }, + "location": "documents/document.pdf" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + }, + "location": "documents/documents/document.pdf" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-2", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/home/document.pdf", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "presentation.ppt" + ] + } + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/documents/balance.xlsx", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "document.pdf" + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/documents/file.txt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/presentation.ppt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-7", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/document.pdf", + "result": { + "content": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + } + } + }, + { + "userId": "user-5", + "type": "READ", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "content": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + } + } + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + }, + "location": "home/file.txt" + }, + { + "userId": "user-6", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + }, + "location": "document.pdf" + }, + { + "userId": "user-2", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + }, + "location": "home/file.txt" + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "file.txt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/home/", + "result": { + "dirContent": [ + "important/home/file.txt" + ] + } + }, + { + "userId": "user-8", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/file.txt", + "result": { + "content": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + } + } + }, + { + "userId": "user-0", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/home/" + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-8", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/" + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + }, + "location": "documents/documents/file.txt" + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + }, + "location": "documents/document.pdf" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + }, + "location": "home/home/presentation.ppt" + }, + { + "userId": "user-2", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + }, + "location": "home/documents/document.pdf" + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "file.txt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/balance.xlsx", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-7", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/" + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + }, + "location": "file.txt" + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/home/document.pdf", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "document.pdf" + ] + } + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/", + "result": { + "dirContent": [ + "home/documents/document.pdf", + "home/file.txt" + ] + } + }, + { + "userId": "user-3", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/" + }, + { + "userId": "user-6", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-6", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + }, + "location": "important/important/document.pdf" + }, + { + "userId": "user-0", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + }, + "location": "documents/documents/balance.xlsx" + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + }, + "location": "important/file.txt" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + }, + "location": "file.txt" + }, + { + "userId": "user-6", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-2", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + }, + "location": "important/balance.xlsx" + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/document.pdf", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "important/balance.xlsx", + "home/documents/document.pdf", + "presentation.ppt", + "home/file.txt" + ] + } + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "dirContent": [ + "balance.xlsx" + ] + } + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "file.txt", + "result": { + "dirContent": [ + "file.txt" + ] + } + }, + { + "userId": "user-6", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/important/document.pdf", + "result": { + "content": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + } + } + }, + { + "userId": "user-2", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/balance.xlsx", + "result": { + "content": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + } + } + }, + { + "userId": "user-5", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/home/" + }, + { + "userId": "user-2", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-2", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + }, + "location": "documents/presentation.ppt" + }, + { + "userId": "user-2", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/presentation.ppt", + "result": { + "content": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + } + } + }, + { + "userId": "user-4", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + }, + "location": "home/document.pdf" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + }, + "location": "important/document.pdf" + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/important/presentation.ppt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "document.pdf", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/file.txt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/home/presentation.ppt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-1", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/home/presentation.ppt", + "result": { + "content": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + } + } + }, + { + "userId": "user-2", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/presentation.ppt", + "result": { + "content": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + } + } + }, + { + "userId": "user-9", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/file.txt", + "result": { + "content": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + } + } + }, + { + "userId": "user-6", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-1", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/home/" + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/presentation.ppt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "documents/document.pdf" + }, + { + "userId": "user-6", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + }, + "location": "important/presentation.ppt" + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/document.pdf", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-9", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/document.pdf", + "result": { + "content": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + } + } + }, + { + "userId": "user-0", + "type": "READ", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "content": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + } + } + }, + { + "userId": "user-2", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/" + }, + { + "userId": "user-6", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + }, + "location": "documents/presentation.ppt" + }, + { + "userId": "user-6", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + }, + "location": "home/important/balance.xlsx" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + }, + "location": "documents/home/balance.xlsx" + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/", + "result": { + "dirContent": [ + "documents/presentation.ppt" + ] + } + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/important/balance.xlsx", + "result": { + "dirContent": [ + "home/important/balance.xlsx" + ] + } + }, + { + "userId": "user-8", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/" + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + }, + "location": "documents/presentation.ppt" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + }, + "location": "important/file.txt" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + }, + "location": "important/documents/balance.xlsx" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + }, + "location": "document.pdf" + }, + { + "userId": "user-2", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + }, + "location": "important/file.txt" + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/documents/", + "result": { + "dirContent": [ + "documents/documents/file.txt", + "documents/documents/balance.xlsx" + ] + } + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/presentation.ppt", + "result": { + "dirContent": [ + "documents/presentation.ppt" + ] + } + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "presentation.ppt" + ] + } + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "important/documents/balance.xlsx", + "balance.xlsx" + ] + } + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/", + "result": { + "dirContent": [ + "documents/home/balance.xlsx" + ] + } + }, + { + "userId": "user-4", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/file.txt", + "result": { + "content": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + } + } + }, + { + "userId": "user-2", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/file.txt", + "result": { + "content": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + } + } + }, + { + "userId": "user-8", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/documents/" + }, + { + "userId": "user-4", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/" + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + }, + "location": "home/documents/presentation.ppt" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + }, + "location": "home/important/document.pdf" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + }, + "location": "home/presentation.ppt" + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/file.txt", + "result": { + "dirContent": [ + "important/file.txt" + ] + } + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "document.pdf" + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/home/file.txt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/", + "result": { + "dirContent": [ + "home/important/balance.xlsx" + ] + } + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/home/balance.xlsx", + "result": { + "dirContent": [ + "documents/home/balance.xlsx" + ] + } + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "document.pdf" + ] + } + }, + { + "userId": "user-7", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/documents/presentation.ppt", + "result": { + "content": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + } + } + }, + { + "userId": "user-6", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/important/balance.xlsx", + "result": { + "content": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + } + } + }, + { + "userId": "user-8", + "type": "READ", + "storageType": "PRIVATE", + "location": "document.pdf", + "result": { + "content": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + } + } + }, + { + "userId": "user-9", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/" + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/presentation.ppt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-1", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/home/" + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/balance.xlsx", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + }, + "location": "documents/important/balance.xlsx" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-2", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "home/documents/balance.xlsx" + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "document.pdf", + "home/presentation.ppt", + "balance.xlsx" + ] + } + }, + { + "userId": "user-8", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-9", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/" + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + }, + "location": "important/balance.xlsx" + }, + { + "userId": "user-4", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/important/" + }, + { + "userId": "user-5", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/home/file.txt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-0", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + }, + "location": "important/important/balance.xlsx" + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + }, + "location": "document.pdf" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + }, + "location": "important/balance.xlsx" + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/", + "result": { + "dirContent": [ + "important/balance.xlsx" + ] + } + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/important/", + "result": { + "dirContent": [ + "home/important/balance.xlsx" + ] + } + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "document.pdf", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/document.pdf", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-4", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/presentation.ppt", + "result": { + "content": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + } + } + }, + { + "userId": "user-2", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/documents/balance.xlsx", + "result": { + "content": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + } + } + }, + { + "userId": "user-3", + "type": "READ", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "content": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + } + } + }, + { + "userId": "user-6", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/important/" + }, + { + "userId": "user-0", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + }, + "location": "documents/documents/presentation.ppt" + }, + { + "userId": "user-2", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + }, + "location": "file.txt" + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "documents/presentation.ppt", + "balance.xlsx" + ] + } + }, + { + "userId": "user-1", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/balance.xlsx", + "result": { + "content": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + } + } + }, + { + "userId": "user-2", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/documents/balance.xlsx", + "result": { + "content": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + } + } + }, + { + "userId": "user-3", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + }, + "location": "important/home/balance.xlsx" + }, + { + "userId": "user-3", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/home/balance.xlsx", + "result": { + "content": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + } + } + }, + { + "userId": "user-2", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/documents/" + }, + { + "userId": "user-2", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + }, + "location": "important/documents/file.txt" + }, + { + "userId": "user-2", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/" + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + }, + "location": "home/important/balance.xlsx" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "important/file.txt" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "documents/balance.xlsx" + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + }, + "location": "important/important/balance.xlsx" + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/presentation.ppt", + "result": { + "dirContent": [ + "documents/presentation.ppt" + ] + } + }, + { + "userId": "user-8", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/important/balance.xlsx", + "result": { + "content": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + } + } + }, + { + "userId": "user-3", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/home/balance.xlsx", + "result": { + "content": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + } + } + }, + { + "userId": "user-2", + "type": "READ", + "storageType": "PRIVATE", + "location": "file.txt", + "result": { + "content": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + } + } + }, + { + "userId": "user-5", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/balance.xlsx", + "result": { + "content": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + } + } + }, + { + "userId": "user-0", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/important/balance.xlsx", + "result": { + "content": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + } + } + }, + { + "userId": "user-2", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + }, + "location": "documents/important/file.txt" + }, + { + "userId": "user-6", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "important/document.pdf" + }, + { + "userId": "user-7", + "type": "READ", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "content": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + } + } + }, + { + "userId": "user-6", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/document.pdf", + "result": { + "content": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + } + } + }, + { + "userId": "user-9", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/" + }, + { + "userId": "user-1", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-6", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/" + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "important/documents/presentation.ppt" + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-2", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + }, + "location": "important/home/document.pdf" + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "home/documents/presentation.ppt", + "documents/important/balance.xlsx", + "documents/document.pdf", + "balance.xlsx" + ] + } + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/home/balance.xlsx", + "result": { + "dirContent": [ + "important/home/balance.xlsx" + ] + } + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "documents/presentation.ppt", + "important/file.txt", + "important/important/balance.xlsx" + ] + } + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "important/documents/presentation.ppt" + ] + } + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "dirContent": [ + "balance.xlsx" + ] + } + }, + { + "userId": "user-8", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/important/balance.xlsx", + "result": { + "content": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + } + } + }, + { + "userId": "user-5", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/important/file.txt", + "result": { + "content": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + } + } + }, + { + "userId": "user-7", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/" + }, + { + "userId": "user-7", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/documents/presentation.ppt", + "result": { + "content": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + } + } + }, + { + "userId": "user-4", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/" + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + }, + "location": "documents/balance.xlsx" + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/home/balance.xlsx", + "result": { + "dirContent": [ + "important/home/balance.xlsx" + ] + } + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/", + "result": { + "dirContent": [ + "documents/balance.xlsx", + "documents/important/file.txt", + "documents/documents/presentation.ppt" + ] + } + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "home/important/balance.xlsx", + "presentation.ppt" + ] + } + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/", + "result": { + "dirContent": [ + "documents/balance.xlsx" + ] + } + }, + { + "userId": "user-5", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/balance.xlsx", + "result": { + "content": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + } + } + }, + { + "userId": "user-0", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + }, + "location": "documents/documents/file.txt" + }, + { + "userId": "user-0", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/documents/file.txt", + "result": { + "content": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + } + } + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-6", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + }, + "location": "document.pdf" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + }, + "location": "important/balance.xlsx" + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "home/important/balance.xlsx", + "presentation.ppt" + ] + } + }, + { + "userId": "user-3", + "type": "READ", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "content": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + } + } + }, + { + "userId": "user-0", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/documents/file.txt", + "result": { + "content": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + } + } + }, + { + "userId": "user-1", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/balance.xlsx", + "result": { + "content": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + } + } + }, + { + "userId": "user-1", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "documents/important/file.txt" + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + }, + "location": "documents/file.txt" + }, + { + "userId": "user-6", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "home/presentation.ppt" + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/", + "result": { + "dirContent": [ + "documents/balance.xlsx", + "documents/important/file.txt", + "documents/documents/presentation.ppt" + ] + } + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "presentation.ppt", + "important/home/balance.xlsx" + ] + } + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/presentation.ppt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-8", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/important/balance.xlsx", + "result": { + "content": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + } + } + }, + { + "userId": "user-2", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/home/document.pdf", + "result": { + "content": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + } + } + }, + { + "userId": "user-4", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/presentation.ppt", + "result": { + "content": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + } + } + }, + { + "userId": "user-2", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/home/" + }, + { + "userId": "user-3", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/home/" + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + }, + "location": "important/important/file.txt" + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "presentation.ppt", + "important/important/file.txt" + ] + } + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + }, + "location": "document.pdf" + }, + { + "userId": "user-6", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + }, + "location": "important/presentation.ppt" + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + }, + "location": "documents/balance.xlsx" + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/important/file.txt", + "result": { + "dirContent": [ + "documents/important/file.txt" + ] + } + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/home/file.txt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-0", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/documents/file.txt", + "result": { + "content": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + } + } + }, + { + "userId": "user-9", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/documents/" + }, + { + "userId": "user-5", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/important/" + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/documents/", + "result": { + "dirContent": [ + "documents/documents/presentation.ppt" + ] + } + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + }, + "location": "important/document.pdf" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-2", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + }, + "location": "document.pdf" + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "dirContent": [ + "balance.xlsx" + ] + } + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/balance.xlsx", + "result": { + "dirContent": [ + "documents/balance.xlsx" + ] + } + }, + { + "userId": "user-7", + "type": "READ", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "content": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + } + } + }, + { + "userId": "user-8", + "type": "READ", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "content": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + } + } + }, + { + "userId": "user-1", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/important/file.txt", + "result": { + "content": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + } + } + }, + { + "userId": "user-5", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/documents/presentation.ppt", + "result": { + "content": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + } + } + }, + { + "userId": "user-9", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-1", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/" + }, + { + "userId": "user-5", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/documents/" + }, + { + "userId": "user-5", + "type": "READ", + "storageType": "PRIVATE", + "location": "document.pdf", + "result": { + "content": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + } + } + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + }, + "location": "documents/documents/file.txt" + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/balance.xlsx", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "home/important/balance.xlsx", + "presentation.ppt" + ] + } + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "documents/presentation.ppt", + "documents/file.txt" + ] + } + }, + { + "userId": "user-8", + "type": "READ", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "content": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + } + } + }, + { + "userId": "user-3", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/document.pdf", + "result": { + "content": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + } + } + }, + { + "userId": "user-5", + "type": "READ", + "storageType": "PRIVATE", + "location": "document.pdf", + "result": { + "content": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + } + } + }, + { + "userId": "user-6", + "type": "READ", + "storageType": "PRIVATE", + "location": "document.pdf", + "result": { + "content": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + } + } + }, + { + "userId": "user-1", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/documents/file.txt", + "result": { + "content": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + } + } + }, + { + "userId": "user-7", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/documents/" + }, + { + "userId": "user-8", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/important/" + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + }, + "location": "document.pdf" + }, + { + "userId": "user-2", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-1", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/documents/" + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-8", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "documents/important/presentation.ppt" + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "documents/important/presentation.ppt" + ] + } + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "documents/documents/balance.xlsx" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + }, + "location": "documents/home/file.txt" + }, + { + "userId": "user-6", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + }, + "location": "home/document.pdf" + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/", + "result": { + "dirContent": [ + "important/document.pdf", + "important/important/file.txt" + ] + } + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "document.pdf", + "documents/home/file.txt", + "documents/balance.xlsx", + "balance.xlsx" + ] + } + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/home/balance.xlsx", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-0", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/balance.xlsx", + "result": { + "content": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + } + } + }, + { + "userId": "user-3", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/" + }, + { + "userId": "user-3", + "type": "READ", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "content": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + } + } + }, + { + "userId": "user-0", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-7", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + }, + "location": "home/home/file.txt" + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/", + "result": { + "dirContent": [ + "home/home/file.txt" + ] + } + }, + { + "userId": "user-7", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/home/file.txt", + "result": { + "content": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + } + } + }, + { + "userId": "user-8", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/documents/" + }, + { + "userId": "user-5", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + }, + "location": "home/balance.xlsx" + }, + { + "userId": "user-7", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/home/" + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-5", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "balance.xlsx" + ] + } + }, + { + "userId": "user-8", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/important/presentation.ppt", + "result": { + "content": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + } + } + }, + { + "userId": "user-3", + "type": "READ", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "content": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + } + } + }, + { + "userId": "user-5", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-9", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "documents/presentation.ppt" + }, + { + "userId": "user-6", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + }, + "location": "document.pdf" + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + }, + "location": "important/important/presentation.ppt" + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "document.pdf", + "home/presentation.ppt", + "home/document.pdf", + "important/presentation.ppt" + ] + } + }, + { + "userId": "user-8", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/important/presentation.ppt", + "result": { + "content": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + } + } + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + }, + "location": "home/document.pdf" + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/file.txt", + "result": { + "dirContent": [ + "documents/file.txt" + ] + } + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/file.txt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-3", + "type": "READ", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "content": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + } + } + }, + { + "userId": "user-8", + "type": "READ", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "content": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + } + } + }, + { + "userId": "user-8", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/important/" + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + }, + "location": "documents/balance.xlsx" + }, + { + "userId": "user-4", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + }, + "location": "home/home/presentation.ppt" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/home/", + "result": { + "dirContent": [ + "home/home/presentation.ppt" + ] + } + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + }, + "location": "file.txt" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + }, + "location": "important/home/balance.xlsx" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + }, + "location": "home/file.txt" + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/presentation.ppt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "document.pdf", + "home/presentation.ppt", + "home/document.pdf", + "important/presentation.ppt" + ] + } + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/important/", + "result": { + "dirContent": [ + "important/important/presentation.ppt" + ] + } + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/document.pdf", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "documents/balance.xlsx", + "balance.xlsx" + ] + } + }, + { + "userId": "user-7", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/presentation.ppt", + "result": { + "content": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + } + } + }, + { + "userId": "user-1", + "type": "READ", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "content": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + } + } + }, + { + "userId": "user-1", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "documents/home/presentation.ppt" + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + }, + "location": "home/home/presentation.ppt" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "document.pdf" + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-2", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "documents/home/balance.xlsx" + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/documents/balance.xlsx", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-4", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/home/balance.xlsx", + "result": { + "content": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + } + } + }, + { + "userId": "user-5", + "type": "READ", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "content": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + } + } + }, + { + "userId": "user-4", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/home/" + }, + { + "userId": "user-6", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/" + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/presentation.ppt", + "result": { + "dirContent": [ + "important/presentation.ppt" + ] + } + }, + { + "userId": "user-2", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/home/" + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + }, + "location": "home/presentation.ppt" + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + }, + "location": "important/documents/document.pdf" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + }, + "location": "home/file.txt" + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "home/home/presentation.ppt" + ] + } + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-0", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/important/presentation.ppt", + "result": { + "content": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + } + } + }, + { + "userId": "user-5", + "type": "READ", + "storageType": "PRIVATE", + "location": "document.pdf", + "result": { + "content": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + } + } + }, + { + "userId": "user-5", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + }, + "location": "documents/presentation.ppt" + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + }, + "location": "home/documents/balance.xlsx" + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "home/presentation.ppt" + ] + } + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/home/document.pdf", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-5", + "type": "READ", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "content": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + } + } + }, + { + "userId": "user-8", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/presentation.ppt", + "result": { + "content": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + } + } + }, + { + "userId": "user-3", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/documents/balance.xlsx", + "result": { + "content": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + } + } + }, + { + "userId": "user-7", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/" + }, + { + "userId": "user-5", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-5", + "type": "READ", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "content": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + } + } + }, + { + "userId": "user-0", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/" + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "important/presentation.ppt" + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + }, + "location": "file.txt" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "home/documents/presentation.ppt" + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/documents/balance.xlsx", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/documents/presentation.ppt", + "result": { + "dirContent": [ + "home/documents/presentation.ppt" + ] + } + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-7", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/document.pdf", + "result": { + "content": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + } + } + }, + { + "userId": "user-4", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/home/presentation.ppt", + "result": { + "content": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + } + } + }, + { + "userId": "user-7", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/" + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-6", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-0", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + }, + "location": "important/presentation.ppt" + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + }, + "location": "home/important/document.pdf" + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/home/balance.xlsx", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "important/presentation.ppt" + ] + } + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/document.pdf", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/documents/document.pdf", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-7", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/presentation.ppt", + "result": { + "content": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + } + } + }, + { + "userId": "user-9", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-8", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/important/" + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/documents/balance.xlsx", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + }, + "location": "file.txt" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "important/document.pdf" + }, + { + "userId": "user-2", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "file.txt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/documents/file.txt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-3", + "type": "READ", + "storageType": "PRIVATE", + "location": "file.txt", + "result": { + "content": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + } + } + }, + { + "userId": "user-4", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/home/presentation.ppt", + "result": { + "content": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + } + } + }, + { + "userId": "user-7", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/" + }, + { + "userId": "user-8", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/home/" + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "file.txt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-8", + "type": "READ", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "content": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + } + } + }, + { + "userId": "user-1", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/documents/" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + }, + "location": "documents/file.txt" + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "documents/file.txt", + "important/document.pdf" + ] + } + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-9", + "type": "READ", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "content": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + } + } + }, + { + "userId": "user-5", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + }, + "location": "documents/documents/presentation.ppt" + }, + { + "userId": "user-5", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/documents/presentation.ppt", + "result": { + "content": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + } + } + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + }, + "location": "important/presentation.ppt" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + }, + "location": "documents/important/file.txt" + }, + { + "userId": "user-6", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "important/home/balance.xlsx" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + }, + "location": "home/balance.xlsx" + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "presentation.ppt", + "file.txt", + "home/documents/balance.xlsx", + "important/documents/document.pdf" + ] + } + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/", + "result": { + "dirContent": [ + "home/home/presentation.ppt" + ] + } + }, + { + "userId": "user-4", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/presentation.ppt", + "result": { + "content": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + } + } + }, + { + "userId": "user-3", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/documents/" + }, + { + "userId": "user-6", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/home/" + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/presentation.ppt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + }, + "location": "important/balance.xlsx" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "documents/home/file.txt" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + }, + "location": "file.txt" + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "home/home/presentation.ppt", + "important/presentation.ppt" + ] + } + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "important/balance.xlsx", + "documents/presentation.ppt", + "important/presentation.ppt", + "documents/balance.xlsx", + "presentation.ppt", + "balance.xlsx" + ] + } + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/documents/presentation.ppt", + "result": { + "dirContent": [ + "documents/documents/presentation.ppt" + ] + } + }, + { + "userId": "user-4", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/home/presentation.ppt", + "result": { + "content": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + } + } + }, + { + "userId": "user-5", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/important/" + }, + { + "userId": "user-5", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/documents/presentation.ppt", + "result": { + "content": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + } + } + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + }, + "location": "home/file.txt" + }, + { + "userId": "user-6", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "home/presentation.ppt" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "important/balance.xlsx" + }, + { + "userId": "user-2", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "home/file.txt", + "balance.xlsx" + ] + } + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/documents/file.txt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-2", + "type": "READ", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "content": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + } + } + }, + { + "userId": "user-1", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-9", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/" + }, + { + "userId": "user-9", + "type": "READ", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "content": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + } + } + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + }, + "location": "file.txt" + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/presentation.ppt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "file.txt", + "result": { + "dirContent": [ + "file.txt" + ] + } + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/important/balance.xlsx", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-9", + "type": "READ", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "content": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + } + } + }, + { + "userId": "user-2", + "type": "READ", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "content": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + } + } + }, + { + "userId": "user-4", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + }, + "location": "file.txt" + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + }, + "location": "important/important/file.txt" + }, + { + "userId": "user-6", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + }, + "location": "documents/balance.xlsx" + }, + { + "userId": "user-2", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-1", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/balance.xlsx", + "result": { + "content": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + } + } + }, + { + "userId": "user-2", + "type": "READ", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "content": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + } + } + }, + { + "userId": "user-9", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-6", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "document.pdf", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-1", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/balance.xlsx", + "result": { + "content": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + } + } + }, + { + "userId": "user-3", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-5", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/home/" + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "file.txt", + "documents/documents/presentation.ppt" + ] + } + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + }, + "location": "documents/documents/document.pdf" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + }, + "location": "home/document.pdf" + }, + { + "userId": "user-6", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/documents/balance.xlsx", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "home/presentation.ppt", + "documents/balance.xlsx", + "presentation.ppt" + ] + } + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/home/presentation.ppt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/document.pdf", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-5", + "type": "READ", + "storageType": "PRIVATE", + "location": "file.txt", + "result": { + "content": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + } + } + }, + { + "userId": "user-5", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/documents/" + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "file.txt" + ] + } + }, + { + "userId": "user-5", + "type": "READ", + "storageType": "PRIVATE", + "location": "file.txt", + "result": { + "content": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + } + } + }, + { + "userId": "user-2", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-2", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + }, + "location": "file.txt" + }, + { + "userId": "user-6", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + }, + "location": "home/presentation.ppt" + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "file.txt" + ] + } + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/presentation.ppt", + "result": { + "dirContent": [ + "home/presentation.ppt" + ] + } + }, + { + "userId": "user-1", + "type": "READ", + "storageType": "PRIVATE", + "location": "file.txt", + "result": { + "content": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + } + } + }, + { + "userId": "user-5", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/presentation.ppt", + "result": { + "content": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + } + } + }, + { + "userId": "user-4", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/" + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "file.txt" + ] + } + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + }, + "location": "home/documents/file.txt" + }, + { + "userId": "user-2", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + }, + "location": "important/home/document.pdf" + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "file.txt" + ] + } + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "important/balance.xlsx", + "home/balance.xlsx", + "file.txt", + "important/document.pdf", + "balance.xlsx" + ] + } + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/home/document.pdf", + "result": { + "dirContent": [ + "important/home/document.pdf" + ] + } + }, + { + "userId": "user-8", + "type": "READ", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "content": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + } + } + }, + { + "userId": "user-5", + "type": "READ", + "storageType": "PRIVATE", + "location": "file.txt", + "result": { + "content": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + } + } + }, + { + "userId": "user-5", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + }, + "location": "documents/file.txt" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + }, + "location": "home/documents/file.txt" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + }, + "location": "documents/file.txt" + }, + { + "userId": "user-2", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "documents/documents/document.pdf" + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/", + "result": { + "dirContent": [ + "important/balance.xlsx", + "important/presentation.ppt", + "important/important/file.txt" + ] + } + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/file.txt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-2", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/home/" + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "documents/documents/document.pdf", + "file.txt" + ] + } + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/presentation.ppt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/file.txt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "dirContent": [ + "balance.xlsx" + ] + } + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/important/", + "result": { + "dirContent": [ + "important/important/file.txt" + ] + } + }, + { + "userId": "user-1", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/file.txt", + "result": { + "content": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + } + } + }, + { + "userId": "user-5", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/documents/" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + }, + "location": "home/important/file.txt" + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/important/balance.xlsx", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + }, + "location": "file.txt" + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/file.txt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "documents/file.txt", + "file.txt" + ] + } + }, + { + "userId": "user-5", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/important/file.txt", + "result": { + "content": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + } + } + }, + { + "userId": "user-2", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-2", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + }, + "location": "file.txt" + }, + { + "userId": "user-2", + "type": "READ", + "storageType": "PRIVATE", + "location": "file.txt", + "result": { + "content": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + } + } + }, + { + "userId": "user-2", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + }, + "location": "document.pdf" + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/", + "result": { + "dirContent": [ + "documents/documents/document.pdf", + "documents/presentation.ppt", + "documents/balance.xlsx" + ] + } + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "home/important/file.txt", + "balance.xlsx" + ] + } + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "document.pdf", + "documents/file.txt", + "file.txt" + ] + } + }, + { + "userId": "user-5", + "type": "READ", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "content": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + } + } + }, + { + "userId": "user-1", + "type": "READ", + "storageType": "PRIVATE", + "location": "file.txt", + "result": { + "content": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + } + } + }, + { + "userId": "user-3", + "type": "READ", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "content": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + } + } + }, + { + "userId": "user-0", + "type": "READ", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "content": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + } + } + }, + { + "userId": "user-1", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/" + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + }, + "location": "important/documents/file.txt" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + }, + "location": "important/balance.xlsx" + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "presentation.ppt" + ] + } + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/presentation.ppt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-4", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/file.txt", + "result": { + "content": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + } + } + }, + { + "userId": "user-0", + "type": "READ", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "content": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + } + } + }, + { + "userId": "user-0", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + }, + "location": "home/file.txt" + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-4", + "type": "READ", + "storageType": "PRIVATE", + "location": "file.txt", + "result": { + "content": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + } + } + }, + { + "userId": "user-5", + "type": "READ", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "content": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + } + } + }, + { + "userId": "user-9", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/" + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + }, + "location": "important/file.txt" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + }, + "location": "important/document.pdf" + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "important/balance.xlsx", + "home/important/file.txt", + "balance.xlsx" + ] + } + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "important/file.txt" + ] + } + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "document.pdf", + "documents/file.txt", + "file.txt", + "important/document.pdf" + ] + } + }, + { + "userId": "user-3", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/documents/file.txt", + "result": { + "content": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + } + } + }, + { + "userId": "user-4", + "type": "READ", + "storageType": "PRIVATE", + "location": "file.txt", + "result": { + "content": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + } + } + }, + { + "userId": "user-5", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "documents/document.pdf" + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + }, + "location": "documents/important/file.txt" + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/home/file.txt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/document.pdf", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/balance.xlsx", + "result": { + "dirContent": [ + "home/balance.xlsx" + ] + } + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/important/file.txt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/important/", + "result": { + "dirContent": [ + "documents/important/file.txt" + ] + } + }, + { + "userId": "user-8", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/important/file.txt", + "result": { + "content": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + } + } + }, + { + "userId": "user-0", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/important/file.txt", + "result": { + "content": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + } + } + }, + { + "userId": "user-1", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/" + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + }, + "location": "documents/documents/balance.xlsx" + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "documents/file.txt" + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "documents/file.txt", + "documents/important/file.txt" + ] + } + }, + { + "userId": "user-1", + "type": "READ", + "storageType": "PRIVATE", + "location": "file.txt", + "result": { + "content": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + } + } + }, + { + "userId": "user-7", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/" + }, + { + "userId": "user-8", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + }, + "location": "home/file.txt" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-2", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + }, + "location": "important/file.txt" + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "documents/file.txt", + "file.txt", + "balance.xlsx" + ] + } + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "documents/document.pdf", + "home/important/file.txt", + "balance.xlsx" + ] + } + }, + { + "userId": "user-1", + "type": "READ", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "content": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + } + } + }, + { + "userId": "user-1", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/" + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "file.txt", + "result": { + "dirContent": [ + "file.txt" + ] + } + }, + { + "userId": "user-1", + "type": "READ", + "storageType": "PRIVATE", + "location": "file.txt", + "result": { + "content": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + } + } + }, + { + "userId": "user-2", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/" + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + }, + "location": "documents/balance.xlsx" + }, + { + "userId": "user-2", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "important/document.pdf" + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/", + "result": { + "dirContent": [ + "home/file.txt" + ] + } + }, + { + "userId": "user-2", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/document.pdf", + "result": { + "content": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + } + } + }, + { + "userId": "user-9", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/" + }, + { + "userId": "user-3", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/documents/" + }, + { + "userId": "user-0", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/important/" + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/", + "result": { + "dirContent": [ + "documents/file.txt" + ] + } + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "file.txt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-3", + "type": "READ", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "content": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + } + } + }, + { + "userId": "user-0", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/file.txt", + "result": { + "content": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + } + } + }, + { + "userId": "user-1", + "type": "READ", + "storageType": "PRIVATE", + "location": "file.txt", + "result": { + "content": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + } + } + }, + { + "userId": "user-2", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/document.pdf", + "result": { + "content": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + } + } + }, + { + "userId": "user-7", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/" + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + }, + "location": "home/document.pdf" + }, + { + "userId": "user-2", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/" + }, + { + "userId": "user-2", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + }, + "location": "important/important/balance.xlsx" + }, + { + "userId": "user-7", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/" + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + }, + "location": "documents/balance.xlsx" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + }, + "location": "documents/important/presentation.ppt" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + }, + "location": "home/home/presentation.ppt" + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "file.txt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/file.txt", + "result": { + "dirContent": [ + "documents/file.txt" + ] + } + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "important/important/balance.xlsx" + ] + } + }, + { + "userId": "user-5", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/important/file.txt", + "result": { + "content": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + } + } + }, + { + "userId": "user-2", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/important/balance.xlsx", + "result": { + "content": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + } + } + }, + { + "userId": "user-7", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/balance.xlsx", + "result": { + "content": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + } + } + }, + { + "userId": "user-3", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-4", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + }, + "location": "documents/home/file.txt" + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-6", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + }, + "location": "home/home/presentation.ppt" + }, + { + "userId": "user-2", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + }, + "location": "documents/documents/document.pdf" + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/important/presentation.ppt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/file.txt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/important/balance.xlsx", + "result": { + "dirContent": [ + "important/important/balance.xlsx" + ] + } + }, + { + "userId": "user-4", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/home/file.txt", + "result": { + "content": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + } + } + }, + { + "userId": "user-5", + "type": "READ", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "content": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + } + } + }, + { + "userId": "user-8", + "type": "READ", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "content": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + } + } + }, + { + "userId": "user-4", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/home/" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "balance.xlsx" + ] + } + }, + { + "userId": "user-4", + "type": "READ", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "content": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + } + } + }, + { + "userId": "user-1", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + }, + "location": "important/presentation.ppt" + }, + { + "userId": "user-8", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + }, + "location": "important/file.txt" + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/presentation.ppt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-7", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/balance.xlsx", + "result": { + "content": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + } + } + }, + { + "userId": "user-5", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/document.pdf", + "result": { + "content": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + } + } + }, + { + "userId": "user-2", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/important/balance.xlsx", + "result": { + "content": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + } + } + }, + { + "userId": "user-5", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-3", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "important/home/balance.xlsx" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-2", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + }, + "location": "home/presentation.ppt" + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/", + "result": { + "dirContent": [ + "documents/file.txt" + ] + } + }, + { + "userId": "user-1", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/presentation.ppt", + "result": { + "content": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + } + } + }, + { + "userId": "user-5", + "type": "READ", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "content": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + } + } + }, + { + "userId": "user-4", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/home/" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-5", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-4", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + }, + "location": "home/important/document.pdf" + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/important/document.pdf", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/presentation.ppt", + "result": { + "dirContent": [ + "important/presentation.ppt" + ] + } + }, + { + "userId": "user-0", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/file.txt", + "result": { + "content": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + } + } + }, + { + "userId": "user-2", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/important/balance.xlsx", + "result": { + "content": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + } + } + }, + { + "userId": "user-6", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/home/" + }, + { + "userId": "user-1", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/" + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + }, + "location": "important/balance.xlsx" + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/important/balance.xlsx", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/file.txt", + "result": { + "dirContent": [ + "documents/file.txt" + ] + } + }, + { + "userId": "user-2", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/important/balance.xlsx", + "result": { + "content": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + } + } + }, + { + "userId": "user-9", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/balance.xlsx", + "result": { + "content": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + } + } + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "home/important/balance.xlsx" + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/important/document.pdf", + "result": { + "dirContent": [ + "home/important/document.pdf" + ] + } + }, + { + "userId": "user-8", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/important/balance.xlsx", + "result": { + "content": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + } + } + }, + { + "userId": "user-7", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/" + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "important/balance.xlsx" + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + }, + "location": "home/documents/document.pdf" + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-8", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/important/balance.xlsx", + "result": { + "content": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + } + } + }, + { + "userId": "user-9", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/balance.xlsx", + "result": { + "content": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + } + } + }, + { + "userId": "user-4", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/important/document.pdf", + "result": { + "content": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + } + } + }, + { + "userId": "user-5", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/documents/document.pdf", + "result": { + "content": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + } + } + }, + { + "userId": "user-2", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/important/" + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + }, + "location": "documents/documents/presentation.ppt" + }, + { + "userId": "user-6", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + }, + "location": "important/presentation.ppt" + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/", + "result": { + "dirContent": [ + "documents/file.txt" + ] + } + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-5", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/documents/document.pdf", + "result": { + "content": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + } + } + }, + { + "userId": "user-2", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/presentation.ppt", + "result": { + "content": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + } + } + }, + { + "userId": "user-6", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/presentation.ppt", + "result": { + "content": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + } + } + }, + { + "userId": "user-5", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/documents/" + }, + { + "userId": "user-7", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/" + }, + { + "userId": "user-7", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/documents/presentation.ppt", + "result": { + "content": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + } + } + }, + { + "userId": "user-6", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/" + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + }, + "location": "file.txt" + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "home/documents/document.pdf" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + }, + "location": "file.txt" + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/important/", + "result": { + "dirContent": [ + "home/important/balance.xlsx" + ] + } + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/important/", + "result": { + "dirContent": [ + "home/important/document.pdf" + ] + } + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/file.txt", + "result": { + "dirContent": [ + "documents/file.txt" + ] + } + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/balance.xlsx", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-8", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/important/balance.xlsx", + "result": { + "content": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + } + } + }, + { + "userId": "user-7", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/documents/" + }, + { + "userId": "user-4", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/important/" + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-5", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + }, + "location": "important/file.txt" + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/file.txt", + "result": { + "dirContent": [ + "important/file.txt" + ] + } + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + }, + "location": "home/important/presentation.ppt" + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + }, + "location": "file.txt" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + }, + "location": "home/home/presentation.ppt" + }, + { + "userId": "user-6", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + }, + "location": "document.pdf" + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + }, + "location": "important/file.txt" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + }, + "location": "home/balance.xlsx" + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "document.pdf", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "file.txt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/documents/balance.xlsx", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/file.txt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/balance.xlsx", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-9", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/balance.xlsx", + "result": { + "content": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + } + } + }, + { + "userId": "user-6", + "type": "READ", + "storageType": "PRIVATE", + "location": "document.pdf", + "result": { + "content": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + } + } + }, + { + "userId": "user-0", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/" + }, + { + "userId": "user-0", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/file.txt", + "result": { + "content": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + } + } + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/", + "result": { + "dirContent": [ + "home/important/presentation.ppt" + ] + } + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "documents/file.txt" + ] + } + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/documents/document.pdf", + "result": { + "dirContent": [ + "documents/documents/document.pdf" + ] + } + }, + { + "userId": "user-9", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/balance.xlsx", + "result": { + "content": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + } + } + }, + { + "userId": "user-4", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/home/presentation.ppt", + "result": { + "content": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + } + } + }, + { + "userId": "user-9", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/" + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + }, + "location": "document.pdf" + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + }, + "location": "documents/home/balance.xlsx" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + }, + "location": "documents/presentation.ppt" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + }, + "location": "documents/home/document.pdf" + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/important/balance.xlsx", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/", + "result": { + "dirContent": [ + "home/important/balance.xlsx" + ] + } + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/", + "result": { + "dirContent": [ + "documents/home/balance.xlsx" + ] + } + }, + { + "userId": "user-7", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/important/presentation.ppt", + "result": { + "content": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + } + } + }, + { + "userId": "user-5", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/file.txt", + "result": { + "content": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + } + } + }, + { + "userId": "user-0", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/file.txt", + "result": { + "content": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + } + } + }, + { + "userId": "user-3", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/home/" + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + }, + "location": "documents/home/document.pdf" + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/", + "result": { + "dirContent": [ + "home/documents/document.pdf" + ] + } + }, + { + "userId": "user-3", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/home/document.pdf", + "result": { + "content": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + } + } + }, + { + "userId": "user-1", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/home/" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + }, + "location": "file.txt" + }, + { + "userId": "user-1", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/balance.xlsx", + "result": { + "content": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + } + } + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + }, + "location": "home/important/document.pdf" + }, + { + "userId": "user-2", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/", + "result": { + "dirContent": [ + "documents/presentation.ppt" + ] + } + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/home/presentation.ppt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-4", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/presentation.ppt", + "result": { + "content": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + } + } + }, + { + "userId": "user-2", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/documents/document.pdf", + "result": { + "content": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + } + } + }, + { + "userId": "user-4", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/home/" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + }, + "location": "important/home/presentation.ppt" + }, + { + "userId": "user-1", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-2", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/documents/" + }, + { + "userId": "user-4", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/" + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/home/", + "result": { + "dirContent": [ + "important/home/presentation.ppt" + ] + } + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "document.pdf" + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "home/balance.xlsx" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + }, + "location": "documents/file.txt" + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "document.pdf" + ] + } + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/", + "result": { + "dirContent": [ + "important/file.txt" + ] + } + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "document.pdf" + ] + } + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "home/presentation.ppt", + "presentation.ppt" + ] + } + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/documents/document.pdf", + "result": { + "dirContent": [ + "home/documents/document.pdf" + ] + } + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "document.pdf", + "important/home/presentation.ppt" + ] + } + }, + { + "userId": "user-1", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/file.txt", + "result": { + "content": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + } + } + }, + { + "userId": "user-8", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-5", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/important/" + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + }, + "location": "home/presentation.ppt" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + }, + "location": "important/presentation.ppt" + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/documents/document.pdf", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/", + "result": { + "dirContent": [ + "documents/file.txt" + ] + } + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/", + "result": { + "dirContent": [ + "documents/file.txt" + ] + } + }, + { + "userId": "user-3", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/documents/document.pdf", + "result": { + "content": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + } + } + }, + { + "userId": "user-6", + "type": "READ", + "storageType": "PRIVATE", + "location": "document.pdf", + "result": { + "content": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + } + } + }, + { + "userId": "user-2", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/presentation.ppt", + "result": { + "content": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + } + } + }, + { + "userId": "user-8", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/presentation.ppt", + "result": { + "content": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + } + } + }, + { + "userId": "user-5", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/" + }, + { + "userId": "user-2", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-2", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + }, + "location": "home/file.txt" + }, + { + "userId": "user-4", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/" + }, + { + "userId": "user-2", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/" + }, + { + "userId": "user-2", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "presentation.ppt" + ] + } + }, + { + "userId": "user-2", + "type": "READ", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "content": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + } + } + }, + { + "userId": "user-2", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/important/document.pdf", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + }, + "location": "home/home/balance.xlsx" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + }, + "location": "important/file.txt" + }, + { + "userId": "user-6", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + }, + "location": "home/documents/presentation.ppt" + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/document.pdf", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "document.pdf" + ] + } + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-9", + "type": "READ", + "storageType": "PRIVATE", + "location": "document.pdf", + "result": { + "content": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + } + } + }, + { + "userId": "user-6", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/documents/presentation.ppt", + "result": { + "content": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + } + } + }, + { + "userId": "user-8", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/" + }, + { + "userId": "user-3", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-4", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-7", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/important/" + }, + { + "userId": "user-7", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/home/balance.xlsx", + "result": { + "content": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + } + } + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + }, + "location": "home/file.txt" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + }, + "location": "important/documents/presentation.ppt" + }, + { + "userId": "user-2", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + }, + "location": "documents/file.txt" + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "document.pdf" + ] + } + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/", + "result": { + "dirContent": [ + "home/documents/presentation.ppt" + ] + } + }, + { + "userId": "user-9", + "type": "READ", + "storageType": "PRIVATE", + "location": "document.pdf", + "result": { + "content": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + } + } + }, + { + "userId": "user-6", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/documents/presentation.ppt", + "result": { + "content": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + } + } + }, + { + "userId": "user-0", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/file.txt", + "result": { + "content": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + } + } + }, + { + "userId": "user-2", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/file.txt", + "result": { + "content": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + } + } + }, + { + "userId": "user-5", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/" + }, + { + "userId": "user-8", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-3", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "file.txt" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + }, + "location": "important/home/balance.xlsx" + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/", + "result": { + "dirContent": [ + "important/documents/presentation.ppt", + "important/home/balance.xlsx" + ] + } + }, + { + "userId": "user-6", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/documents/presentation.ppt", + "result": { + "content": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + } + } + }, + { + "userId": "user-1", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/documents/presentation.ppt", + "result": { + "content": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + } + } + }, + { + "userId": "user-2", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/file.txt", + "result": { + "content": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + } + } + }, + { + "userId": "user-5", + "type": "READ", + "storageType": "PRIVATE", + "location": "file.txt", + "result": { + "content": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + } + } + }, + { + "userId": "user-1", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/home/" + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/", + "result": { + "dirContent": [ + "important/documents/presentation.ppt" + ] + } + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + }, + "location": "home/home/presentation.ppt" + }, + { + "userId": "user-2", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/", + "result": { + "dirContent": [ + "documents/file.txt" + ] + } + }, + { + "userId": "user-7", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/home/balance.xlsx", + "result": { + "content": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + } + } + }, + { + "userId": "user-6", + "type": "READ", + "storageType": "PRIVATE", + "location": "document.pdf", + "result": { + "content": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + } + } + }, + { + "userId": "user-0", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/file.txt", + "result": { + "content": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + } + } + }, + { + "userId": "user-2", + "type": "READ", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "content": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + } + } + }, + { + "userId": "user-7", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + }, + "location": "documents/home/balance.xlsx" + }, + { + "userId": "user-7", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/home/balance.xlsx", + "result": { + "content": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + } + } + }, + { + "userId": "user-2", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + }, + "location": "file.txt" + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/home/", + "result": { + "dirContent": [ + "documents/home/balance.xlsx" + ] + } + }, + { + "userId": "user-7", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/home/" + }, + { + "userId": "user-9", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-5", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + }, + "location": "home/document.pdf" + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/", + "result": { + "dirContent": [ + "home/balance.xlsx" + ] + } + }, + { + "userId": "user-6", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/documents/presentation.ppt", + "result": { + "content": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + } + } + }, + { + "userId": "user-1", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/documents/presentation.ppt", + "result": { + "content": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + } + } + }, + { + "userId": "user-0", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/" + }, + { + "userId": "user-6", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + }, + "location": "documents/balance.xlsx" + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "file.txt", + "result": { + "dirContent": [ + "file.txt" + ] + } + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "documents/file.txt", + "home/home/presentation.ppt", + "important/documents/presentation.ppt" + ] + } + }, + { + "userId": "user-6", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/balance.xlsx", + "result": { + "content": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + } + } + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + }, + "location": "documents/home/balance.xlsx" + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-6", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "home/balance.xlsx" + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "home/file.txt" + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/documents/balance.xlsx", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/file.txt", + "result": { + "dirContent": [ + "documents/file.txt" + ] + } + }, + { + "userId": "user-7", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/" + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/documents/presentation.ppt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-6", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/documents/" + }, + { + "userId": "user-6", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + }, + "location": "important/file.txt" + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/documents/presentation.ppt", + "result": { + "dirContent": [ + "important/documents/presentation.ppt" + ] + } + }, + { + "userId": "user-8", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/home/balance.xlsx", + "result": { + "content": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + } + } + }, + { + "userId": "user-0", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/file.txt", + "result": { + "content": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + } + } + }, + { + "userId": "user-0", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/" + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "file.txt" + ] + } + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + }, + "location": "documents/file.txt" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "file.txt" + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "important/documents/balance.xlsx" + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "document.pdf", + "documents/balance.xlsx", + "home/balance.xlsx", + "important/file.txt" + ] + } + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/documents/", + "result": { + "dirContent": [ + "important/documents/presentation.ppt" + ] + } + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/home/presentation.ppt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-3", + "type": "READ", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "content": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + } + } + }, + { + "userId": "user-8", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/home/" + }, + { + "userId": "user-8", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/file.txt", + "result": { + "content": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + } + } + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "important/document.pdf" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + }, + "location": "important/balance.xlsx" + }, + { + "userId": "user-6", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + }, + "location": "important/important/file.txt" + }, + { + "userId": "user-2", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + }, + "location": "document.pdf" + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "file.txt" + ] + } + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "documents/file.txt", + "home/home/presentation.ppt", + "important/documents/presentation.ppt" + ] + } + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/balance.xlsx", + "result": { + "dirContent": [ + "important/balance.xlsx" + ] + } + }, + { + "userId": "user-0", + "type": "READ", + "storageType": "PRIVATE", + "location": "file.txt", + "result": { + "content": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + } + } + }, + { + "userId": "user-6", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/balance.xlsx", + "result": { + "content": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + } + } + }, + { + "userId": "user-0", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-4", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/" + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + }, + "location": "home/balance.xlsx" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + }, + "location": "home/document.pdf" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + }, + "location": "home/balance.xlsx" + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "presentation.ppt", + "balance.xlsx" + ] + } + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-9", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/balance.xlsx", + "result": { + "content": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + } + } + }, + { + "userId": "user-8", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/" + }, + { + "userId": "user-3", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "file.txt" + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "file.txt" + ] + } + }, + { + "userId": "user-3", + "type": "READ", + "storageType": "PRIVATE", + "location": "file.txt", + "result": { + "content": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + } + } + }, + { + "userId": "user-3", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + }, + "location": "home/presentation.ppt" + }, + { + "userId": "user-6", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + }, + "location": "home/home/document.pdf" + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + }, + "location": "important/important/document.pdf" + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/", + "result": { + "dirContent": [ + "home/balance.xlsx" + ] + } + }, + { + "userId": "user-8", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/document.pdf", + "result": { + "content": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + } + } + }, + { + "userId": "user-3", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/presentation.ppt", + "result": { + "content": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + } + } + }, + { + "userId": "user-0", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/important/document.pdf", + "result": { + "content": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + } + } + }, + { + "userId": "user-1", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + }, + "location": "important/important/file.txt" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + }, + "location": "documents/important/presentation.ppt" + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/", + "result": { + "dirContent": [ + "home/presentation.ppt" + ] + } + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "home/document.pdf", + "important/important/file.txt" + ] + } + }, + { + "userId": "user-8", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/document.pdf", + "result": { + "content": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + } + } + }, + { + "userId": "user-4", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/important/file.txt", + "result": { + "content": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + } + } + }, + { + "userId": "user-0", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/important/document.pdf", + "result": { + "content": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + } + } + }, + { + "userId": "user-1", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/documents/presentation.ppt", + "result": { + "content": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + } + } + }, + { + "userId": "user-8", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/" + }, + { + "userId": "user-9", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/" + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "home/documents/balance.xlsx" + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/", + "result": { + "dirContent": [ + "home/documents/balance.xlsx" + ] + } + }, + { + "userId": "user-9", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/documents/balance.xlsx", + "result": { + "content": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + } + } + }, + { + "userId": "user-3", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/" + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-6", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/" + }, + { + "userId": "user-0", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/important/" + }, + { + "userId": "user-2", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-4", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/" + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + }, + "location": "important/presentation.ppt" + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + }, + "location": "documents/documents/file.txt" + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "home/balance.xlsx", + "file.txt" + ] + } + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "presentation.ppt" + ] + } + }, + { + "userId": "user-5", + "type": "READ", + "storageType": "PRIVATE", + "location": "file.txt", + "result": { + "content": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + } + } + }, + { + "userId": "user-7", + "type": "READ", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "content": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + } + } + }, + { + "userId": "user-0", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/documents/file.txt", + "result": { + "content": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + } + } + }, + { + "userId": "user-4", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/important/" + }, + { + "userId": "user-6", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/" + }, + { + "userId": "user-0", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/documents/" + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/presentation.ppt", + "result": { + "dirContent": [ + "important/presentation.ppt" + ] + } + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "document.pdf", + "result": { + "dirContent": [ + "document.pdf" + ] + } + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/home/presentation.ppt", + "result": { + "dirContent": [ + "home/home/presentation.ppt" + ] + } + }, + { + "userId": "user-9", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/presentation.ppt", + "result": { + "content": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + } + } + }, + { + "userId": "user-6", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/balance.xlsx", + "result": { + "content": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + } + } + }, + { + "userId": "user-1", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/home/presentation.ppt", + "result": { + "content": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + } + } + }, + { + "userId": "user-5", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + }, + "location": "home/document.pdf" + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/document.pdf", + "result": { + "dirContent": [ + "home/document.pdf" + ] + } + }, + { + "userId": "user-5", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/document.pdf", + "result": { + "content": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + } + } + }, + { + "userId": "user-1", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/documents/" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + }, + "location": "home/home/document.pdf" + }, + { + "userId": "user-1", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/home/" + }, + { + "userId": "user-1", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/important/presentation.ppt", + "result": { + "content": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + } + } + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + }, + "location": "important/file.txt" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + }, + "location": "home/documents/presentation.ppt" + }, + { + "userId": "user-6", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + }, + "location": "important/important/file.txt" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + }, + "location": "documents/document.pdf" + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "presentation.ppt" + ] + } + }, + { + "userId": "user-4", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/documents/" + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + }, + "location": "home/balance.xlsx" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + }, + "location": "important/documents/document.pdf" + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/balance.xlsx", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/document.pdf", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/important/presentation.ppt", + "result": { + "dirContent": [ + "documents/important/presentation.ppt" + ] + } + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/documents/balance.xlsx", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-6", + "type": "READ", + "storageType": "PRIVATE", + "location": "document.pdf", + "result": { + "content": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + } + } + }, + { + "userId": "user-8", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/balance.xlsx", + "result": { + "content": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + } + } + }, + { + "userId": "user-6", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/" + }, + { + "userId": "user-6", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + }, + "location": "file.txt" + }, + { + "userId": "user-1", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/" + }, + { + "userId": "user-5", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "dirContent": [ + "presentation.ppt" + ] + } + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "dirContent": [ + "balance.xlsx" + ] + } + }, + { + "userId": "user-9", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/file.txt", + "result": { + "content": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + } + } + }, + { + "userId": "user-5", + "type": "READ", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "content": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + } + } + }, + { + "userId": "user-8", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/" + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-9", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/" + }, + { + "userId": "user-7", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-8", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "document.pdf" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + }, + "location": "documents/balance.xlsx" + }, + { + "userId": "user-6", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/documents/file.txt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-1", + "type": "READ", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "content": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + } + } + }, + { + "userId": "user-0", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-1", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + }, + "location": "document.pdf" + }, + { + "userId": "user-8", + "type": "READ", + "storageType": "PRIVATE", + "location": "document.pdf", + "result": { + "content": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + } + } + }, + { + "userId": "user-9", + "type": "READ", + "storageType": "PRIVATE", + "location": "document.pdf", + "result": { + "content": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + } + } + }, + { + "userId": "user-4", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/balance.xlsx", + "result": { + "content": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + } + } + }, + { + "userId": "user-5", + "type": "READ", + "storageType": "PRIVATE", + "location": "file.txt", + "result": { + "content": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + } + } + }, + { + "userId": "user-8", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "home/documents/presentation.ppt" + }, + { + "userId": "user-2", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + }, + "location": "home/presentation.ppt" + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/presentation.ppt", + "result": { + "dirContent": [ + "home/presentation.ppt" + ] + } + }, + { + "userId": "user-4", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/balance.xlsx", + "result": { + "content": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + } + } + }, + { + "userId": "user-5", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/documents/document.pdf", + "result": { + "content": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + } + } + }, + { + "userId": "user-3", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/documents/presentation.ppt", + "result": { + "content": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + } + } + }, + { + "userId": "user-9", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/documents/" + }, + { + "userId": "user-6", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + }, + "location": "important/file.txt" + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-9", + "type": "READ", + "storageType": "PRIVATE", + "location": "document.pdf", + "result": { + "content": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + } + } + }, + { + "userId": "user-9", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-4", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/" + }, + { + "userId": "user-6", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "important/file.txt" + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + }, + "location": "important/document.pdf" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "document.pdf" + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-5", + "type": "READ", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "content": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + } + } + }, + { + "userId": "user-0", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/document.pdf", + "result": { + "content": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + } + } + }, + { + "userId": "user-1", + "type": "READ", + "storageType": "PRIVATE", + "location": "document.pdf", + "result": { + "content": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + } + } + }, + { + "userId": "user-0", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/" + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + }, + "location": "important/presentation.ppt" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "documents/home/presentation.ppt" + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "documents/home/presentation.ppt", + "presentation.ppt", + "file.txt", + "important/documents/document.pdf" + ] + } + }, + { + "userId": "user-6", + "type": "READ", + "storageType": "PRIVATE", + "location": "document.pdf", + "result": { + "content": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + } + } + }, + { + "userId": "user-1", + "type": "READ", + "storageType": "PRIVATE", + "location": "document.pdf", + "result": { + "content": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + } + } + }, + { + "userId": "user-5", + "type": "READ", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "content": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + } + } + }, + { + "userId": "user-2", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/" + }, + { + "userId": "user-2", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + }, + "location": "documents/document.pdf" + }, + { + "userId": "user-4", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-6", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-5", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/home/presentation.ppt", + "result": { + "content": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + } + } + }, + { + "userId": "user-6", + "type": "READ", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "content": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + } + } + }, + { + "userId": "user-1", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-2", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/" + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + }, + "location": "file.txt" + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/important/", + "result": { + "dirContent": [ + "important/important/file.txt" + ] + } + }, + { + "userId": "user-6", + "type": "READ", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "content": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + } + } + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + }, + "location": "important/home/balance.xlsx" + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "documents/important/document.pdf" + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + }, + "location": "documents/documents/balance.xlsx" + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/documents/", + "result": { + "dirContent": [ + "home/documents/presentation.ppt" + ] + } + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/document.pdf", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-0", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/documents/balance.xlsx", + "result": { + "content": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + } + } + }, + { + "userId": "user-7", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/home/" + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + }, + "location": "file.txt" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + }, + "location": "home/presentation.ppt" + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/", + "result": { + "dirContent": [ + "important/presentation.ppt" + ] + } + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/home/balance.xlsx", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-6", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/file.txt", + "result": { + "content": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + } + } + }, + { + "userId": "user-3", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/" + }, + { + "userId": "user-5", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/documents/" + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "file.txt", + "result": { + "dirContent": [ + "file.txt" + ] + } + }, + { + "userId": "user-1", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + }, + "location": "home/home/balance.xlsx" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + }, + "location": "home/documents/file.txt" + }, + { + "userId": "user-6", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + }, + "location": "file.txt" + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + }, + "location": "home/document.pdf" + }, + { + "userId": "user-2", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + }, + "location": "documents/balance.xlsx" + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/document.pdf", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/documents/presentation.ppt", + "result": { + "dirContent": [ + "home/documents/presentation.ppt" + ] + } + }, + { + "userId": "user-3", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/documents/presentation.ppt", + "result": { + "content": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + } + } + }, + { + "userId": "user-4", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/documents/file.txt", + "result": { + "content": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + } + } + }, + { + "userId": "user-2", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/balance.xlsx", + "result": { + "content": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + } + } + }, + { + "userId": "user-4", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/documents/" + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-0", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/" + }, + { + "userId": "user-0", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/documents/balance.xlsx", + "result": { + "content": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + } + } + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + }, + "location": "home/document.pdf" + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/important/", + "result": { + "dirContent": [ + "documents/important/document.pdf" + ] + } + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "documents/documents/balance.xlsx" + ] + } + }, + { + "userId": "user-7", + "type": "READ", + "storageType": "PRIVATE", + "location": "file.txt", + "result": { + "content": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + } + } + }, + { + "userId": "user-0", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/documents/balance.xlsx", + "result": { + "content": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + } + } + }, + { + "userId": "user-1", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/document.pdf", + "result": { + "content": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + } + } + }, + { + "userId": "user-2", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/balance.xlsx", + "result": { + "content": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + } + } + }, + { + "userId": "user-7", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-6", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/important/" + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/balance.xlsx", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-1", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/home/" + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "home/home/presentation.ppt" + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + }, + "location": "home/documents/document.pdf" + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "document.pdf", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/file.txt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/documents/document.pdf", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-9", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/important/document.pdf", + "result": { + "content": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + } + } + }, + { + "userId": "user-3", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/documents/presentation.ppt", + "result": { + "content": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + } + } + }, + { + "userId": "user-6", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/file.txt", + "result": { + "content": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + } + } + }, + { + "userId": "user-1", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/document.pdf", + "result": { + "content": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + } + } + }, + { + "userId": "user-2", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/balance.xlsx", + "result": { + "content": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + } + } + }, + { + "userId": "user-7", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/home/presentation.ppt", + "result": { + "content": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + } + } + }, + { + "userId": "user-1", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/" + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-2", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/" + }, + { + "userId": "user-2", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + }, + "location": "home/important/file.txt" + }, + { + "userId": "user-7", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/home/" + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "documents/file.txt" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/important/file.txt", + "result": { + "dirContent": [ + "home/important/file.txt" + ] + } + }, + { + "userId": "user-4", + "type": "READ", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "content": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + } + } + }, + { + "userId": "user-2", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/important/file.txt", + "result": { + "content": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + } + } + }, + { + "userId": "user-8", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/documents/" + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + }, + "location": "home/important/presentation.ppt" + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/", + "result": { + "dirContent": [ + "home/important/presentation.ppt" + ] + } + }, + { + "userId": "user-9", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/important/" + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + }, + "location": "important/documents/file.txt" + }, + { + "userId": "user-6", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-1", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-9", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/documents/" + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + }, + "location": "documents/balance.xlsx" + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + }, + "location": "important/document.pdf" + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + }, + "location": "important/file.txt" + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "dirContent": [ + "presentation.ppt" + ] + } + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "home/important/file.txt" + ] + } + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/", + "result": { + "dirContent": [ + "important/file.txt" + ] + } + }, + { + "userId": "user-0", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/" + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + }, + "location": "important/presentation.ppt" + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + }, + "location": "important/balance.xlsx" + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "home/balance.xlsx" + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/important/file.txt", + "result": { + "dirContent": [ + "home/important/file.txt" + ] + } + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "important/presentation.ppt", + "balance.xlsx" + ] + } + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/", + "result": { + "dirContent": [ + "important/balance.xlsx", + "important/document.pdf" + ] + } + }, + { + "userId": "user-4", + "type": "READ", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "content": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + } + } + }, + { + "userId": "user-9", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/presentation.ppt", + "result": { + "content": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + } + } + }, + { + "userId": "user-3", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/documents/" + }, + { + "userId": "user-2", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-4", + "type": "READ", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "content": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + } + } + }, + { + "userId": "user-4", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-0", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/" + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "home/home/balance.xlsx" + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/", + "result": { + "dirContent": [ + "documents/balance.xlsx" + ] + } + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "home/important/file.txt", + "balance.xlsx" + ] + } + }, + { + "userId": "user-0", + "type": "READ", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "content": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + } + } + }, + { + "userId": "user-2", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/important/file.txt", + "result": { + "content": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + } + } + }, + { + "userId": "user-2", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/important/" + }, + { + "userId": "user-2", + "type": "READ", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "content": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + } + } + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + }, + "location": "important/document.pdf" + }, + { + "userId": "user-6", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + }, + "location": "important/document.pdf" + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/important/presentation.ppt", + "result": { + "dirContent": [ + "home/important/presentation.ppt" + ] + } + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/file.txt", + "result": { + "dirContent": [ + "important/file.txt" + ] + } + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "document.pdf", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-8", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/important/presentation.ppt", + "result": { + "content": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + } + } + }, + { + "userId": "user-2", + "type": "READ", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "content": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + } + } + }, + { + "userId": "user-3", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/" + }, + { + "userId": "user-0", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/" + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + }, + "location": "home/presentation.ppt" + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + }, + "location": "documents/balance.xlsx" + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/balance.xlsx", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/presentation.ppt", + "result": { + "dirContent": [ + "home/presentation.ppt" + ] + } + }, + { + "userId": "user-9", + "type": "READ", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "content": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + } + } + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + }, + "location": "documents/document.pdf" + }, + { + "userId": "user-2", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/", + "result": { + "dirContent": [ + "home/presentation.ppt" + ] + } + }, + { + "userId": "user-5", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/home/presentation.ppt", + "result": { + "content": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + } + } + }, + { + "userId": "user-6", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/document.pdf", + "result": { + "content": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + } + } + }, + { + "userId": "user-6", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/" + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + }, + "location": "important/home/file.txt" + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/", + "result": { + "dirContent": [ + "home/presentation.ppt" + ] + } + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/documents/document.pdf", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + }, + "location": "document.pdf" + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + }, + "location": "important/important/balance.xlsx" + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/presentation.ppt", + "result": { + "dirContent": [ + "home/presentation.ppt" + ] + } + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "dirContent": [ + "balance.xlsx" + ] + } + }, + { + "userId": "user-3", + "type": "READ", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "content": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + } + } + }, + { + "userId": "user-3", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + }, + "location": "important/file.txt" + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + }, + "location": "important/documents/presentation.ppt" + }, + { + "userId": "user-2", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + }, + "location": "home/document.pdf" + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/presentation.ppt", + "result": { + "dirContent": [ + "home/presentation.ppt" + ] + } + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "file.txt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-8", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/document.pdf", + "result": { + "content": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + } + } + }, + { + "userId": "user-5", + "type": "READ", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "content": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + } + } + }, + { + "userId": "user-2", + "type": "READ", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "content": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + } + } + }, + { + "userId": "user-9", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + }, + "location": "file.txt" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "home/balance.xlsx" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "home/important/file.txt" + }, + { + "userId": "user-6", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + }, + "location": "file.txt" + }, + { + "userId": "user-7", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/presentation.ppt", + "result": { + "content": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + } + } + }, + { + "userId": "user-2", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/document.pdf", + "result": { + "content": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + } + } + }, + { + "userId": "user-4", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/balance.xlsx", + "result": { + "content": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + } + } + }, + { + "userId": "user-6", + "type": "READ", + "storageType": "PRIVATE", + "location": "file.txt", + "result": { + "content": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + } + } + }, + { + "userId": "user-7", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-3", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-6", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + }, + "location": "important/document.pdf" + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/presentation.ppt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/balance.xlsx", + "result": { + "dirContent": [ + "home/balance.xlsx" + ] + } + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/documents/balance.xlsx", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/", + "result": { + "dirContent": [ + "important/documents/presentation.ppt", + "important/home/file.txt" + ] + } + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "home/document.pdf", + "presentation.ppt", + "balance.xlsx" + ] + } + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/documents/document.pdf", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-4", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + }, + "location": "documents/balance.xlsx" + }, + { + "userId": "user-9", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/" + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + }, + "location": "document.pdf" + }, + { + "userId": "user-6", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-2", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/important/", + "result": { + "dirContent": [ + "important/important/balance.xlsx" + ] + } + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "documents/home/presentation.ppt", + "presentation.ppt", + "important/file.txt", + "file.txt", + "home/important/file.txt", + "important/document.pdf" + ] + } + }, + { + "userId": "user-4", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/important/" + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + }, + "location": "documents/file.txt" + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + }, + "location": "home/file.txt" + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + }, + "location": "documents/home/balance.xlsx" + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/documents/presentation.ppt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "dirContent": [ + "balance.xlsx" + ] + } + }, + { + "userId": "user-5", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/document.pdf", + "result": { + "content": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + } + } + }, + { + "userId": "user-6", + "type": "READ", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "content": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + } + } + }, + { + "userId": "user-0", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/home/file.txt", + "result": { + "content": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + } + } + }, + { + "userId": "user-0", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/documents/" + }, + { + "userId": "user-0", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/home/file.txt", + "result": { + "content": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + } + } + }, + { + "userId": "user-2", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/" + }, + { + "userId": "user-2", + "type": "READ", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "content": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + } + } + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/home/presentation.ppt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/", + "result": { + "dirContent": [ + "documents/balance.xlsx", + "documents/document.pdf" + ] + } + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "dirContent": [ + "balance.xlsx" + ] + } + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "presentation.ppt", + "balance.xlsx" + ] + } + }, + { + "userId": "user-9", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/" + }, + { + "userId": "user-3", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/home/" + }, + { + "userId": "user-6", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + }, + "location": "important/document.pdf" + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/home/file.txt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "documents/home/presentation.ppt", + "presentation.ppt", + "important/file.txt", + "file.txt", + "home/important/file.txt", + "important/document.pdf" + ] + } + }, + { + "userId": "user-7", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/file.txt", + "result": { + "content": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + } + } + }, + { + "userId": "user-9", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/document.pdf", + "result": { + "content": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + } + } + }, + { + "userId": "user-4", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + }, + "location": "home/presentation.ppt" + }, + { + "userId": "user-4", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/presentation.ppt", + "result": { + "content": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + } + } + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + }, + "location": "important/file.txt" + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/", + "result": { + "dirContent": [ + "documents/file.txt" + ] + } + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/file.txt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/file.txt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-2", + "type": "READ", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "content": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + } + } + }, + { + "userId": "user-7", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/" + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + }, + "location": "home/balance.xlsx" + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "document.pdf", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/presentation.ppt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-0", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/home/file.txt", + "result": { + "content": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + } + } + }, + { + "userId": "user-2", + "type": "READ", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "content": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + } + } + }, + { + "userId": "user-5", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + }, + "location": "file.txt" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + }, + "location": "home/home/balance.xlsx" + }, + { + "userId": "user-6", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + }, + "location": "home/balance.xlsx" + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/home/file.txt", + "result": { + "dirContent": [ + "important/home/file.txt" + ] + } + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-9", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/balance.xlsx", + "result": { + "content": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + } + } + }, + { + "userId": "user-4", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/home/" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/", + "result": { + "dirContent": [ + "home/presentation.ppt" + ] + } + }, + { + "userId": "user-4", + "type": "READ", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "content": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + } + } + }, + { + "userId": "user-6", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/" + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "home/important/document.pdf" + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "document.pdf", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-9", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/" + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + }, + "location": "home/balance.xlsx" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "documents/balance.xlsx" + }, + { + "userId": "user-2", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/important/presentation.ppt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "home/presentation.ppt", + "presentation.ppt" + ] + } + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "file.txt", + "result": { + "dirContent": [ + "file.txt" + ] + } + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "presentation.ppt", + "balance.xlsx" + ] + } + }, + { + "userId": "user-4", + "type": "READ", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "content": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + } + } + }, + { + "userId": "user-9", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/" + }, + { + "userId": "user-9", + "type": "READ", + "storageType": "PRIVATE", + "location": "file.txt", + "result": { + "content": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + } + } + }, + { + "userId": "user-4", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-2", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "home/home/presentation.ppt" + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + }, + "location": "documents/important/presentation.ppt" + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + }, + "location": "documents/document.pdf" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "document.pdf" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "important/home/document.pdf" + }, + { + "userId": "user-6", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + }, + "location": "document.pdf" + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "home/presentation.ppt" + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/important/presentation.ppt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/home/presentation.ppt", + "result": { + "dirContent": [ + "home/home/presentation.ppt" + ] + } + }, + { + "userId": "user-5", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/home/document.pdf", + "result": { + "content": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + } + } + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + }, + "location": "important/important/balance.xlsx" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + }, + "location": "document.pdf" + }, + { + "userId": "user-6", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + }, + "location": "home/home/file.txt" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + }, + "location": "documents/home/balance.xlsx" + }, + { + "userId": "user-2", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + }, + "location": "important/important/balance.xlsx" + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/important/", + "result": { + "dirContent": [ + "important/important/balance.xlsx" + ] + } + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "document.pdf" + ] + } + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/home/", + "result": { + "dirContent": [ + "documents/home/balance.xlsx" + ] + } + }, + { + "userId": "user-6", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/home/file.txt", + "result": { + "content": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + } + } + }, + { + "userId": "user-2", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/important/balance.xlsx", + "result": { + "content": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + } + } + }, + { + "userId": "user-4", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-1", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/home/" + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + }, + "location": "home/documents/presentation.ppt" + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "important/presentation.ppt" + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + }, + "location": "documents/documents/document.pdf" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "important/important/balance.xlsx" + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + }, + "location": "file.txt" + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "document.pdf", + "result": { + "dirContent": [ + "document.pdf" + ] + } + }, + { + "userId": "user-5", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/home/document.pdf", + "result": { + "content": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + } + } + }, + { + "userId": "user-7", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/documents/presentation.ppt", + "result": { + "content": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + } + } + }, + { + "userId": "user-0", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/" + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "dirContent": [ + "presentation.ppt" + ] + } + }, + { + "userId": "user-0", + "type": "READ", + "storageType": "PRIVATE", + "location": "file.txt", + "result": { + "content": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + } + } + }, + { + "userId": "user-6", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + }, + "location": "important/presentation.ppt" + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + }, + "location": "home/presentation.ppt" + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/home/presentation.ppt", + "result": { + "dirContent": [ + "home/home/presentation.ppt" + ] + } + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "document.pdf", + "result": { + "dirContent": [ + "document.pdf" + ] + } + }, + { + "userId": "user-6", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/home/file.txt", + "result": { + "content": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + } + } + }, + { + "userId": "user-7", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/home/" + }, + { + "userId": "user-9", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-6", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + }, + "location": "file.txt" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/file.txt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-1", + "type": "READ", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "content": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + } + } + }, + { + "userId": "user-8", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-2", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/important/" + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-4", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/important/balance.xlsx", + "result": { + "content": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + } + } + }, + { + "userId": "user-5", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/home/document.pdf", + "result": { + "content": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + } + } + }, + { + "userId": "user-6", + "type": "READ", + "storageType": "PRIVATE", + "location": "document.pdf", + "result": { + "content": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + } + } + }, + { + "userId": "user-0", + "type": "READ", + "storageType": "PRIVATE", + "location": "file.txt", + "result": { + "content": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + } + } + }, + { + "userId": "user-1", + "type": "READ", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "content": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + } + } + }, + { + "userId": "user-5", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/home/" + }, + { + "userId": "user-6", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + }, + "location": "file.txt" + }, + { + "userId": "user-6", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + }, + "location": "important/document.pdf" + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + }, + "location": "document.pdf" + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/important/balance.xlsx", + "result": { + "dirContent": [ + "important/important/balance.xlsx" + ] + } + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/important/balance.xlsx", + "result": { + "dirContent": [ + "important/important/balance.xlsx" + ] + } + }, + { + "userId": "user-0", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/presentation.ppt", + "result": { + "content": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + } + } + }, + { + "userId": "user-8", + "type": "READ", + "storageType": "PRIVATE", + "location": "file.txt", + "result": { + "content": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + } + } + }, + { + "userId": "user-1", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + }, + "location": "important/documents/document.pdf" + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + }, + "location": "documents/document.pdf" + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/file.txt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-8", + "type": "READ", + "storageType": "PRIVATE", + "location": "file.txt", + "result": { + "content": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + } + } + }, + { + "userId": "user-9", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/documents/document.pdf", + "result": { + "content": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + } + } + }, + { + "userId": "user-1", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/document.pdf", + "result": { + "content": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + } + } + }, + { + "userId": "user-8", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-6", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/" + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-0", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-1", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/" + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + }, + "location": "documents/file.txt" + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "home/presentation.ppt" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + }, + "location": "documents/presentation.ppt" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + }, + "location": "documents/documents/document.pdf" + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "presentation.ppt" + ] + } + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/home/balance.xlsx", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/documents/presentation.ppt", + "result": { + "dirContent": [ + "home/documents/presentation.ppt" + ] + } + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "document.pdf" + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "documents/important/file.txt" + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + }, + "location": "document.pdf" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + }, + "location": "home/documents/file.txt" + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "document.pdf" + ] + } + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "documents/documents/document.pdf" + ] + } + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-5", + "type": "READ", + "storageType": "PRIVATE", + "location": "document.pdf", + "result": { + "content": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + } + } + }, + { + "userId": "user-9", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/documents/document.pdf", + "result": { + "content": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + } + } + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + }, + "location": "important/balance.xlsx" + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "home/home/balance.xlsx" + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "document.pdf" + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/document.pdf", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/home/balance.xlsx", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "presentation.ppt", + "documents/important/file.txt", + "important/documents/document.pdf" + ] + } + }, + { + "userId": "user-7", + "type": "READ", + "storageType": "PRIVATE", + "location": "document.pdf", + "result": { + "content": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + } + } + }, + { + "userId": "user-5", + "type": "READ", + "storageType": "PRIVATE", + "location": "document.pdf", + "result": { + "content": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + } + } + }, + { + "userId": "user-0", + "type": "READ", + "storageType": "PRIVATE", + "location": "document.pdf", + "result": { + "content": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + } + } + }, + { + "userId": "user-7", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/" + }, + { + "userId": "user-9", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/important/" + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + }, + "location": "document.pdf" + }, + { + "userId": "user-4", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/home/" + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + }, + "location": "important/balance.xlsx" + }, + { + "userId": "user-6", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + }, + "location": "home/presentation.ppt" + }, + { + "userId": "user-2", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + }, + "location": "home/presentation.ppt" + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "important/balance.xlsx", + "home/presentation.ppt" + ] + } + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/documents/", + "result": { + "dirContent": [ + "documents/documents/document.pdf" + ] + } + }, + { + "userId": "user-7", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/documents/presentation.ppt", + "result": { + "content": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + } + } + }, + { + "userId": "user-5", + "type": "READ", + "storageType": "PRIVATE", + "location": "document.pdf", + "result": { + "content": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + } + } + }, + { + "userId": "user-3", + "type": "READ", + "storageType": "PRIVATE", + "location": "document.pdf", + "result": { + "content": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + } + } + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "home/documents/balance.xlsx" + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "document.pdf", + "result": { + "dirContent": [ + "document.pdf" + ] + } + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-1", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/documents/document.pdf", + "result": { + "content": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + } + } + }, + { + "userId": "user-9", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "documents/documents/document.pdf" + }, + { + "userId": "user-4", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/" + }, + { + "userId": "user-5", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-2", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/" + }, + { + "userId": "user-2", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + }, + "location": "home/balance.xlsx" + }, + { + "userId": "user-2", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/" + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + }, + "location": "home/document.pdf" + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "important/balance.xlsx" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + }, + "location": "file.txt" + }, + { + "userId": "user-2", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "document.pdf" + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "file.txt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/documents/file.txt", + "result": { + "dirContent": [ + "home/documents/file.txt" + ] + } + }, + { + "userId": "user-9", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/document.pdf", + "result": { + "content": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + } + } + }, + { + "userId": "user-3", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/documents/" + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + }, + "location": "home/home/file.txt" + }, + { + "userId": "user-4", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/documents/" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-4", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + }, + "location": "documents/balance.xlsx" + }, + { + "userId": "user-4", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/balance.xlsx", + "result": { + "content": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + } + } + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + }, + "location": "home/document.pdf" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "important/balance.xlsx" + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "document.pdf", + "presentation.ppt", + "home/home/file.txt", + "balance.xlsx" + ] + } + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "document.pdf", + "important/balance.xlsx" + ] + } + }, + { + "userId": "user-9", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/document.pdf", + "result": { + "content": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + } + } + }, + { + "userId": "user-2", + "type": "READ", + "storageType": "PRIVATE", + "location": "document.pdf", + "result": { + "content": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + } + } + }, + { + "userId": "user-7", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/important/" + }, + { + "userId": "user-4", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + }, + "location": "documents/presentation.ppt" + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/presentation.ppt", + "result": { + "dirContent": [ + "home/presentation.ppt" + ] + } + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/", + "result": { + "dirContent": [ + "home/document.pdf" + ] + } + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "important/balance.xlsx", + "documents/documents/document.pdf", + "file.txt" + ] + } + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "file.txt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-2", + "type": "READ", + "storageType": "PRIVATE", + "location": "document.pdf", + "result": { + "content": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + } + } + }, + { + "userId": "user-7", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-8", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/" + }, + { + "userId": "user-1", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/documents/" + }, + { + "userId": "user-2", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-4", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + }, + "location": "important/presentation.ppt" + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/", + "result": { + "dirContent": [ + "important/presentation.ppt" + ] + } + }, + { + "userId": "user-9", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/documents/document.pdf", + "result": { + "content": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + } + } + }, + { + "userId": "user-3", + "type": "READ", + "storageType": "PRIVATE", + "location": "document.pdf", + "result": { + "content": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + } + } + }, + { + "userId": "user-1", + "type": "READ", + "storageType": "PRIVATE", + "location": "file.txt", + "result": { + "content": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + } + } + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "home/important/balance.xlsx" + }, + { + "userId": "user-6", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "home/balance.xlsx" + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-1", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/balance.xlsx", + "result": { + "content": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + } + } + }, + { + "userId": "user-1", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "documents/important/document.pdf" + }, + { + "userId": "user-1", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-2", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "documents/file.txt" + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "important/presentation.ppt" + ] + } + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "home/presentation.ppt", + "home/balance.xlsx" + ] + } + }, + { + "userId": "user-4", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/presentation.ppt", + "result": { + "content": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + } + } + }, + { + "userId": "user-3", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-4", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/" + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-2", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-8", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/" + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-9", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/" + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-6", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/" + }, + { + "userId": "user-6", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + }, + "location": "important/document.pdf" + }, + { + "userId": "user-6", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/document.pdf", + "result": { + "content": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + } + } + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + }, + "location": "documents/document.pdf" + }, + { + "userId": "user-2", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + }, + "location": "home/home/file.txt" + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "documents/documents/document.pdf", + "balance.xlsx" + ] + } + }, + { + "userId": "user-0", + "type": "READ", + "storageType": "PRIVATE", + "location": "document.pdf", + "result": { + "content": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + } + } + }, + { + "userId": "user-2", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/file.txt", + "result": { + "content": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + } + } + }, + { + "userId": "user-6", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/" + }, + { + "userId": "user-6", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + }, + "location": "important/file.txt" + }, + { + "userId": "user-2", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "documents/document.pdf" + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "document.pdf", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "file.txt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-6", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/file.txt", + "result": { + "content": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + } + } + }, + { + "userId": "user-0", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/" + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + }, + "location": "important/documents/presentation.ppt" + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + }, + "location": "documents/document.pdf" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + }, + "location": "documents/important/file.txt" + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "documents/document.pdf" + ] + } + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/", + "result": { + "dirContent": [ + "documents/file.txt", + "documents/document.pdf" + ] + } + }, + { + "userId": "user-0", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/documents/" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-2", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/important/document.pdf", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-6", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/file.txt", + "result": { + "content": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + } + } + }, + { + "userId": "user-0", + "type": "READ", + "storageType": "PRIVATE", + "location": "document.pdf", + "result": { + "content": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + } + } + }, + { + "userId": "user-4", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/important/" + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/", + "result": { + "dirContent": [ + "documents/document.pdf" + ] + } + }, + { + "userId": "user-4", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/document.pdf", + "result": { + "content": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + } + } + }, + { + "userId": "user-6", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/" + }, + { + "userId": "user-0", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + }, + "location": "home/presentation.ppt" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + }, + "location": "documents/presentation.ppt" + }, + { + "userId": "user-2", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + }, + "location": "home/home/presentation.ppt" + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/document.pdf", + "result": { + "dirContent": [ + "documents/document.pdf" + ] + } + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "documents/file.txt", + "home/home/presentation.ppt", + "documents/document.pdf", + "home/home/file.txt", + "balance.xlsx" + ] + } + }, + { + "userId": "user-3", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/presentation.ppt", + "result": { + "content": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + } + } + }, + { + "userId": "user-1", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/presentation.ppt", + "result": { + "content": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + } + } + }, + { + "userId": "user-2", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/file.txt", + "result": { + "content": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + } + } + }, + { + "userId": "user-9", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-3", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/" + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + }, + "location": "documents/file.txt" + }, + { + "userId": "user-3", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/presentation.ppt", + "result": { + "content": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + } + } + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + }, + "location": "document.pdf" + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + }, + "location": "home/file.txt" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + }, + "location": "document.pdf" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + }, + "location": "documents/file.txt" + }, + { + "userId": "user-2", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + }, + "location": "documents/important/file.txt" + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/file.txt", + "result": { + "dirContent": [ + "documents/file.txt" + ] + } + }, + { + "userId": "user-8", + "type": "READ", + "storageType": "PRIVATE", + "location": "document.pdf", + "result": { + "content": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + } + } + }, + { + "userId": "user-4", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/" + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + }, + "location": "documents/documents/presentation.ppt" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "home/important/balance.xlsx" + }, + { + "userId": "user-2", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + }, + "location": "important/file.txt" + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/important/balance.xlsx", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "documents/presentation.ppt", + "documents/file.txt", + "presentation.ppt" + ] + } + }, + { + "userId": "user-7", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/documents/" + }, + { + "userId": "user-2", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/" + }, + { + "userId": "user-2", + "type": "READ", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "content": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + } + } + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + }, + "location": "file.txt" + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + }, + "location": "documents/home/document.pdf" + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/document.pdf", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-8", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/home/document.pdf", + "result": { + "content": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + } + } + }, + { + "userId": "user-5", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/important/" + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/balance.xlsx", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-2", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/" + }, + { + "userId": "user-2", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/home/file.txt", + "result": { + "content": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + } + } + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "documents/presentation.ppt" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + }, + "location": "documents/file.txt" + }, + { + "userId": "user-6", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + }, + "location": "important/important/document.pdf" + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "file.txt" + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "home/presentation.ppt", + "documents/file.txt", + "home/file.txt" + ] + } + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/home/", + "result": { + "dirContent": [ + "home/home/presentation.ppt", + "home/home/file.txt" + ] + } + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/", + "result": { + "dirContent": [ + "documents/presentation.ppt" + ] + } + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/important/document.pdf", + "result": { + "dirContent": [ + "important/important/document.pdf" + ] + } + }, + { + "userId": "user-9", + "type": "READ", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "content": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + } + } + }, + { + "userId": "user-7", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-1", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + }, + "location": "file.txt" + }, + { + "userId": "user-1", + "type": "READ", + "storageType": "PRIVATE", + "location": "file.txt", + "result": { + "content": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + } + } + }, + { + "userId": "user-2", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/home/" + }, + { + "userId": "user-8", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/home/" + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "document.pdf" + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "document.pdf", + "presentation.ppt" + ] + } + }, + { + "userId": "user-8", + "type": "READ", + "storageType": "PRIVATE", + "location": "document.pdf", + "result": { + "content": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + } + } + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "important/presentation.ppt" + }, + { + "userId": "user-5", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/file.txt", + "result": { + "content": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + } + } + }, + { + "userId": "user-0", + "type": "READ", + "storageType": "PRIVATE", + "location": "file.txt", + "result": { + "content": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + } + } + }, + { + "userId": "user-0", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + }, + "location": "file.txt" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/important/", + "result": { + "dirContent": [ + "important/important/document.pdf" + ] + } + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "presentation.ppt", + "file.txt" + ] + } + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "balance.xlsx" + ] + } + }, + { + "userId": "user-2", + "type": "READ", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "content": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + } + } + }, + { + "userId": "user-3", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/" + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/file.txt", + "result": { + "dirContent": [ + "home/file.txt" + ] + } + }, + { + "userId": "user-3", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/presentation.ppt", + "result": { + "content": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + } + } + }, + { + "userId": "user-2", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + }, + "location": "documents/file.txt" + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + }, + "location": "home/balance.xlsx" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + }, + "location": "documents/important/file.txt" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + }, + "location": "file.txt" + }, + { + "userId": "user-2", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "document.pdf", + "presentation.ppt", + "file.txt" + ] + } + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "home/presentation.ppt", + "presentation.ppt", + "home/file.txt" + ] + } + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/important/document.pdf", + "result": { + "dirContent": [ + "important/important/document.pdf" + ] + } + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "dirContent": [ + "presentation.ppt" + ] + } + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/important/file.txt", + "result": { + "dirContent": [ + "documents/important/file.txt" + ] + } + }, + { + "userId": "user-7", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/file.txt", + "result": { + "content": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + } + } + }, + { + "userId": "user-9", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/presentation.ppt", + "result": { + "content": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + } + } + }, + { + "userId": "user-2", + "type": "READ", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "content": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + } + } + }, + { + "userId": "user-3", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/" + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + }, + "location": "important/document.pdf" + }, + { + "userId": "user-7", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/" + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-6", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + }, + "location": "home/documents/file.txt" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + }, + "location": "documents/home/presentation.ppt" + }, + { + "userId": "user-2", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "dirContent": [ + "presentation.ppt" + ] + } + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "documents/presentation.ppt", + "important/presentation.ppt", + "home/balance.xlsx", + "balance.xlsx" + ] + } + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "document.pdf", + "result": { + "dirContent": [ + "document.pdf" + ] + } + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "document.pdf", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-3", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/document.pdf", + "result": { + "content": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + } + } + }, + { + "userId": "user-1", + "type": "READ", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "content": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + } + } + }, + { + "userId": "user-2", + "type": "READ", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "content": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + } + } + }, + { + "userId": "user-2", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-2", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + }, + "location": "home/home/file.txt" + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + }, + "location": "document.pdf" + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + }, + "location": "important/important/presentation.ppt" + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/important/presentation.ppt", + "result": { + "dirContent": [ + "important/important/presentation.ppt" + ] + } + }, + { + "userId": "user-5", + "type": "READ", + "storageType": "PRIVATE", + "location": "document.pdf", + "result": { + "content": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + } + } + }, + { + "userId": "user-2", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/home/file.txt", + "result": { + "content": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + } + } + }, + { + "userId": "user-6", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/documents/" + }, + { + "userId": "user-6", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "home/home/presentation.ppt" + }, + { + "userId": "user-6", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/important/document.pdf", + "result": { + "content": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + } + } + }, + { + "userId": "user-2", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + }, + "location": "documents/home/file.txt" + }, + { + "userId": "user-6", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/important/document.pdf", + "result": { + "content": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + } + } + }, + { + "userId": "user-1", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/home/" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + }, + "location": "important/document.pdf" + }, + { + "userId": "user-1", + "type": "READ", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "content": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + } + } + }, + { + "userId": "user-2", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/home/" + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "important/balance.xlsx" + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + }, + "location": "home/documents/balance.xlsx" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-6", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "important/file.txt" + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "document.pdf", + "presentation.ppt", + "file.txt" + ] + } + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-8", + "type": "READ", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "content": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + } + } + }, + { + "userId": "user-5", + "type": "READ", + "storageType": "PRIVATE", + "location": "document.pdf", + "result": { + "content": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + } + } + }, + { + "userId": "user-9", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/" + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "dirContent": [ + "balance.xlsx" + ] + } + }, + { + "userId": "user-6", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/" + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + }, + "location": "document.pdf" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-2", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "document.pdf" + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "file.txt", + "result": { + "dirContent": [ + "file.txt" + ] + } + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "dirContent": [ + "presentation.ppt" + ] + } + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/file.txt", + "result": { + "dirContent": [ + "documents/file.txt" + ] + } + }, + { + "userId": "user-3", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/document.pdf", + "result": { + "content": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + } + } + }, + { + "userId": "user-6", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/home/presentation.ppt", + "result": { + "content": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + } + } + }, + { + "userId": "user-2", + "type": "READ", + "storageType": "PRIVATE", + "location": "document.pdf", + "result": { + "content": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + } + } + }, + { + "userId": "user-7", + "type": "READ", + "storageType": "PRIVATE", + "location": "document.pdf", + "result": { + "content": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + } + } + }, + { + "userId": "user-5", + "type": "READ", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "content": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + } + } + }, + { + "userId": "user-5", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "document.pdf" + }, + { + "userId": "user-5", + "type": "READ", + "storageType": "PRIVATE", + "location": "document.pdf", + "result": { + "content": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + } + } + }, + { + "userId": "user-5", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "presentation.ppt", + "home/documents/balance.xlsx", + "important/document.pdf" + ] + } + }, + { + "userId": "user-1", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-2", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + }, + "location": "documents/file.txt" + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/important/balance.xlsx", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-9", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/presentation.ppt", + "result": { + "content": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + } + } + }, + { + "userId": "user-2", + "type": "READ", + "storageType": "PRIVATE", + "location": "document.pdf", + "result": { + "content": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + } + } + }, + { + "userId": "user-6", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/home/" + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + }, + "location": "document.pdf" + }, + { + "userId": "user-6", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + }, + "location": "documents/home/presentation.ppt" + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/documents/", + "result": { + "dirContent": [ + "home/documents/balance.xlsx" + ] + } + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "dirContent": [ + "presentation.ppt" + ] + } + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/document.pdf", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "document.pdf", + "presentation.ppt", + "file.txt", + "balance.xlsx" + ] + } + }, + { + "userId": "user-3", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/documents/balance.xlsx", + "result": { + "content": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + } + } + }, + { + "userId": "user-4", + "type": "READ", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "content": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + } + } + }, + { + "userId": "user-8", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-9", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + }, + "location": "home/presentation.ppt" + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/documents/document.pdf", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-7", + "type": "READ", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "content": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + } + } + }, + { + "userId": "user-3", + "type": "READ", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "content": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + } + } + }, + { + "userId": "user-6", + "type": "READ", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "content": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + } + } + }, + { + "userId": "user-8", + "type": "READ", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "content": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + } + } + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/important/document.pdf", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/file.txt", + "result": { + "dirContent": [ + "documents/file.txt" + ] + } + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "presentation.ppt", + "home/documents/balance.xlsx", + "important/document.pdf", + "balance.xlsx" + ] + } + }, + { + "userId": "user-6", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-6", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + }, + "location": "home/home/file.txt" + }, + { + "userId": "user-3", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/documents/" + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "presentation.ppt", + "important/document.pdf", + "balance.xlsx" + ] + } + }, + { + "userId": "user-3", + "type": "READ", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "content": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + } + } + }, + { + "userId": "user-6", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/home/" + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + }, + "location": "home/documents/file.txt" + }, + { + "userId": "user-2", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + }, + "location": "documents/presentation.ppt" + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "document.pdf", + "presentation.ppt" + ] + } + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/presentation.ppt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-8", + "type": "READ", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "content": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + } + } + }, + { + "userId": "user-3", + "type": "READ", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "content": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + } + } + }, + { + "userId": "user-3", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + }, + "location": "home/document.pdf" + }, + { + "userId": "user-1", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/home/" + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + }, + "location": "documents/important/balance.xlsx" + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/important/balance.xlsx", + "result": { + "dirContent": [ + "documents/important/balance.xlsx" + ] + } + }, + { + "userId": "user-7", + "type": "READ", + "storageType": "PRIVATE", + "location": "document.pdf", + "result": { + "content": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + } + } + }, + { + "userId": "user-2", + "type": "READ", + "storageType": "PRIVATE", + "location": "document.pdf", + "result": { + "content": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + } + } + }, + { + "userId": "user-8", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/important/balance.xlsx", + "result": { + "content": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + } + } + }, + { + "userId": "user-5", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/documents/" + }, + { + "userId": "user-8", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/important/" + }, + { + "userId": "user-8", + "type": "READ", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "content": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + } + } + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "document.pdf" + }, + { + "userId": "user-6", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + }, + "location": "documents/documents/presentation.ppt" + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "document.pdf", + "presentation.ppt" + ] + } + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "document.pdf", + "home/presentation.ppt", + "presentation.ppt", + "balance.xlsx" + ] + } + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/balance.xlsx", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-3", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/document.pdf", + "result": { + "content": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + } + } + }, + { + "userId": "user-2", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/home/file.txt", + "result": { + "content": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + } + } + }, + { + "userId": "user-4", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-6", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/documents/" + }, + { + "userId": "user-6", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + }, + "location": "documents/presentation.ppt" + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + }, + "location": "documents/balance.xlsx" + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "presentation.ppt" + ] + } + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-3", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/document.pdf", + "result": { + "content": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + } + } + }, + { + "userId": "user-7", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + }, + "location": "document.pdf" + }, + { + "userId": "user-8", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-7", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + }, + "location": "document.pdf" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "home/document.pdf" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + }, + "location": "important/documents/presentation.ppt" + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/presentation.ppt", + "result": { + "dirContent": [ + "documents/presentation.ppt" + ] + } + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "document.pdf" + ] + } + }, + { + "userId": "user-5", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/document.pdf", + "result": { + "content": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + } + } + }, + { + "userId": "user-0", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/" + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-0", + "type": "READ", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "content": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + } + } + }, + { + "userId": "user-1", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/documents/" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + }, + "location": "home/document.pdf" + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + }, + "location": "file.txt" + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "document.pdf" + ] + } + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/", + "result": { + "dirContent": [ + "home/document.pdf" + ] + } + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "file.txt", + "result": { + "dirContent": [ + "file.txt" + ] + } + }, + { + "userId": "user-1", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/document.pdf", + "result": { + "content": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + } + } + }, + { + "userId": "user-2", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/home/file.txt", + "result": { + "content": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + } + } + }, + { + "userId": "user-9", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + }, + "location": "home/file.txt" + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + }, + "location": "documents/document.pdf" + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "document.pdf" + ] + } + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/document.pdf", + "result": { + "dirContent": [ + "home/document.pdf" + ] + } + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/", + "result": { + "dirContent": [ + "documents/home/file.txt", + "documents/presentation.ppt", + "documents/file.txt" + ] + } + }, + { + "userId": "user-7", + "type": "READ", + "storageType": "PRIVATE", + "location": "document.pdf", + "result": { + "content": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + } + } + }, + { + "userId": "user-0", + "type": "READ", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "content": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + } + } + }, + { + "userId": "user-2", + "type": "READ", + "storageType": "PRIVATE", + "location": "document.pdf", + "result": { + "content": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + } + } + }, + { + "userId": "user-3", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/" + }, + { + "userId": "user-2", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/home/" + }, + { + "userId": "user-6", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + }, + "location": "home/important/presentation.ppt" + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-9", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/file.txt", + "result": { + "content": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + } + } + }, + { + "userId": "user-5", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/document.pdf", + "result": { + "content": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + } + } + }, + { + "userId": "user-9", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/" + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-7", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "balance.xlsx" + ] + } + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-2", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/file.txt", + "result": { + "content": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + } + } + }, + { + "userId": "user-0", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/" + }, + { + "userId": "user-2", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + }, + "location": "document.pdf" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + }, + "location": "home/presentation.ppt" + }, + { + "userId": "user-6", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + }, + "location": "documents/presentation.ppt" + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "document.pdf", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/documents/balance.xlsx", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-5", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/document.pdf", + "result": { + "content": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + } + } + }, + { + "userId": "user-9", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-0", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + }, + "location": "documents/presentation.ppt" + }, + { + "userId": "user-0", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/presentation.ppt", + "result": { + "content": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + } + } + }, + { + "userId": "user-6", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/" + }, + { + "userId": "user-6", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/important/presentation.ppt", + "result": { + "content": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + } + } + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + }, + "location": "documents/important/document.pdf" + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + }, + "location": "document.pdf" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + }, + "location": "document.pdf" + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/home/presentation.ppt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/presentation.ppt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/", + "result": { + "dirContent": [ + "home/important/presentation.ppt" + ] + } + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-5", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/presentation.ppt", + "result": { + "content": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + } + } + }, + { + "userId": "user-8", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/important/document.pdf", + "result": { + "content": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + } + } + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + }, + "location": "home/document.pdf" + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "documents/balance.xlsx" + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + }, + "location": "file.txt" + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/presentation.ppt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "document.pdf", + "home/document.pdf" + ] + } + }, + { + "userId": "user-9", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/balance.xlsx", + "result": { + "content": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + } + } + }, + { + "userId": "user-1", + "type": "READ", + "storageType": "PRIVATE", + "location": "document.pdf", + "result": { + "content": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + } + } + }, + { + "userId": "user-8", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/important/" + }, + { + "userId": "user-5", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/" + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + }, + "location": "important/important/document.pdf" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "home/documents/document.pdf" + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "document.pdf", + "home/document.pdf" + ] + } + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/documents/file.txt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "dirContent": [ + "balance.xlsx" + ] + } + }, + { + "userId": "user-3", + "type": "READ", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "content": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + } + } + }, + { + "userId": "user-1", + "type": "READ", + "storageType": "PRIVATE", + "location": "document.pdf", + "result": { + "content": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + } + } + }, + { + "userId": "user-9", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/" + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + }, + "location": "document.pdf" + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + }, + "location": "document.pdf" + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/important/", + "result": { + "dirContent": [ + "important/important/document.pdf" + ] + } + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "home/documents/document.pdf" + ] + } + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "document.pdf" + ] + } + }, + { + "userId": "user-5", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/documents/document.pdf", + "result": { + "content": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + } + } + }, + { + "userId": "user-1", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/document.pdf", + "result": { + "content": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + } + } + }, + { + "userId": "user-4", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/important/" + }, + { + "userId": "user-6", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/important/" + }, + { + "userId": "user-6", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "home/file.txt" + }, + { + "userId": "user-6", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/file.txt", + "result": { + "content": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + } + } + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "important/presentation.ppt" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + }, + "location": "home/document.pdf" + }, + { + "userId": "user-6", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + }, + "location": "documents/home/document.pdf" + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/document.pdf", + "result": { + "dirContent": [ + "home/document.pdf" + ] + } + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/", + "result": { + "dirContent": [ + "home/document.pdf" + ] + } + }, + { + "userId": "user-3", + "type": "READ", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "content": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + } + } + }, + { + "userId": "user-6", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/home/document.pdf", + "result": { + "content": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + } + } + }, + { + "userId": "user-0", + "type": "READ", + "storageType": "PRIVATE", + "location": "document.pdf", + "result": { + "content": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + } + } + }, + { + "userId": "user-6", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/" + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "documents/home/document.pdf" + ] + } + }, + { + "userId": "user-6", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/home/document.pdf", + "result": { + "content": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + } + } + }, + { + "userId": "user-0", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/" + }, + { + "userId": "user-9", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/" + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + }, + "location": "important/file.txt" + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "document.pdf", + "important/file.txt" + ] + } + }, + { + "userId": "user-9", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/balance.xlsx", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "home/presentation.ppt" + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "home/presentation.ppt" + ] + } + }, + { + "userId": "user-4", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/document.pdf", + "result": { + "content": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + } + } + }, + { + "userId": "user-0", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-1", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-8", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + }, + "location": "important/file.txt" + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "document.pdf", + "home/document.pdf" + ] + } + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/", + "result": { + "dirContent": [ + "home/documents/document.pdf" + ] + } + }, + { + "userId": "user-1", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/file.txt", + "result": { + "content": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + } + } + }, + { + "userId": "user-5", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/documents/" + }, + { + "userId": "user-1", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/" + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + }, + "location": "documents/balance.xlsx" + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-6", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/home/document.pdf", + "result": { + "content": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + } + } + }, + { + "userId": "user-1", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/balance.xlsx", + "result": { + "content": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + } + } + }, + { + "userId": "user-7", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/" + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + }, + "location": "home/balance.xlsx" + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "document.pdf", + "home/balance.xlsx" + ] + } + }, + { + "userId": "user-7", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + }, + "location": "important/important/balance.xlsx" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "home/documents/balance.xlsx" + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/", + "result": { + "dirContent": [ + "home/documents/balance.xlsx" + ] + } + }, + { + "userId": "user-9", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/important/balance.xlsx", + "result": { + "content": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + } + } + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "document.pdf" + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + }, + "location": "home/home/presentation.ppt" + }, + { + "userId": "user-4", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/document.pdf", + "result": { + "content": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + } + } + }, + { + "userId": "user-8", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/home/presentation.ppt", + "result": { + "content": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + } + } + }, + { + "userId": "user-6", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/home/" + }, + { + "userId": "user-6", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "home/important/file.txt" + }, + { + "userId": "user-7", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/home/document.pdf", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "presentation.ppt", + "balance.xlsx" + ] + } + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-8", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/home/" + }, + { + "userId": "user-5", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/documents/" + }, + { + "userId": "user-6", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/important/" + }, + { + "userId": "user-6", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "file.txt" + }, + { + "userId": "user-4", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + }, + "location": "important/important/balance.xlsx" + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/document.pdf", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "presentation.ppt", + "balance.xlsx" + ] + } + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "documents/balance.xlsx" + ] + } + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-0", + "type": "READ", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "content": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + } + } + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "documents/important/balance.xlsx" + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "file.txt" + ] + } + }, + { + "userId": "user-4", + "type": "READ", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "content": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + } + } + }, + { + "userId": "user-3", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-2", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "dirContent": [ + "balance.xlsx" + ] + } + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/important/balance.xlsx", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-9", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/important/balance.xlsx", + "result": { + "content": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + } + } + }, + { + "userId": "user-2", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "important/home/presentation.ppt" + }, + { + "userId": "user-6", + "type": "READ", + "storageType": "PRIVATE", + "location": "file.txt", + "result": { + "content": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + } + } + }, + { + "userId": "user-6", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + }, + "location": "important/home/balance.xlsx" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + }, + "location": "important/important/file.txt" + }, + { + "userId": "user-0", + "type": "READ", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "content": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + } + } + }, + { + "userId": "user-9", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/important/" + }, + { + "userId": "user-0", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + }, + "location": "documents/important/presentation.ppt" + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-4", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/important/" + }, + { + "userId": "user-4", + "type": "READ", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "content": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + } + } + }, + { + "userId": "user-1", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/" + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-7", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/important/" + }, + { + "userId": "user-2", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "important/home/presentation.ppt" + ] + } + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-4", + "type": "READ", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "content": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + } + } + }, + { + "userId": "user-5", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/important/file.txt", + "result": { + "content": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + } + } + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/", + "result": { + "dirContent": [ + "important/home/presentation.ppt" + ] + } + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/", + "result": { + "dirContent": [ + "important/important/file.txt" + ] + } + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/file.txt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-2", + "type": "READ", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "content": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + } + } + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + }, + "location": "important/balance.xlsx" + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "balance.xlsx" + ] + } + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-3", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/home/balance.xlsx", + "result": { + "content": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + } + } + }, + { + "userId": "user-5", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/important/file.txt", + "result": { + "content": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + } + } + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + }, + "location": "document.pdf" + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/home/balance.xlsx", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-9", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/balance.xlsx", + "result": { + "content": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + } + } + }, + { + "userId": "user-7", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/home/" + }, + { + "userId": "user-2", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-2", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + }, + "location": "document.pdf" + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + }, + "location": "file.txt" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "important/presentation.ppt" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/important/file.txt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-3", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/home/balance.xlsx", + "result": { + "content": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + } + } + }, + { + "userId": "user-4", + "type": "READ", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "content": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + } + } + }, + { + "userId": "user-5", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/important/" + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/important/presentation.ppt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-5", + "type": "READ", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "content": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + } + } + }, + { + "userId": "user-9", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-5", + "type": "READ", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "content": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + } + } + }, + { + "userId": "user-2", + "type": "READ", + "storageType": "PRIVATE", + "location": "document.pdf", + "result": { + "content": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + } + } + }, + { + "userId": "user-5", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-2", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + }, + "location": "home/important/document.pdf" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + }, + "location": "home/documents/presentation.ppt" + }, + { + "userId": "user-6", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "important/home/document.pdf" + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-7", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/important/document.pdf", + "result": { + "content": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + } + } + }, + { + "userId": "user-4", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/" + }, + { + "userId": "user-7", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/important/" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "documents/document.pdf" + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "home/balance.xlsx" + }, + { + "userId": "user-2", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + }, + "location": "home/file.txt" + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/", + "result": { + "dirContent": [ + "home/file.txt" + ] + } + }, + { + "userId": "user-4", + "type": "READ", + "storageType": "PRIVATE", + "location": "document.pdf", + "result": { + "content": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + } + } + }, + { + "userId": "user-6", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/home/document.pdf", + "result": { + "content": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + } + } + }, + { + "userId": "user-4", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-2", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/" + }, + { + "userId": "user-2", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + }, + "location": "documents/document.pdf" + }, + { + "userId": "user-2", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/" + }, + { + "userId": "user-2", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + }, + "location": "important/document.pdf" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + }, + "location": "important/important/presentation.ppt" + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "file.txt" + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "important/home/balance.xlsx" + ] + } + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "important/document.pdf" + ] + } + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/documents/presentation.ppt", + "result": { + "dirContent": [ + "home/documents/presentation.ppt" + ] + } + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "home/balance.xlsx", + "file.txt" + ] + } + }, + { + "userId": "user-5", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/important/presentation.ppt", + "result": { + "content": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + } + } + }, + { + "userId": "user-6", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/home/" + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "file.txt" + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/document.pdf", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-8", + "type": "READ", + "storageType": "PRIVATE", + "location": "file.txt", + "result": { + "content": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + } + } + }, + { + "userId": "user-8", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-6", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + }, + "location": "important/documents/balance.xlsx" + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "file.txt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/", + "result": { + "dirContent": [ + "important/home/balance.xlsx" + ] + } + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "home/documents/presentation.ppt", + "important/important/presentation.ppt" + ] + } + }, + { + "userId": "user-6", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/documents/balance.xlsx", + "result": { + "content": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + } + } + }, + { + "userId": "user-3", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/home/" + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-0", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/" + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + }, + "location": "important/document.pdf" + }, + { + "userId": "user-6", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/documents/" + }, + { + "userId": "user-0", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/" + }, + { + "userId": "user-0", + "type": "READ", + "storageType": "PRIVATE", + "location": "file.txt", + "result": { + "content": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + } + } + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + }, + "location": "documents/home/presentation.ppt" + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + }, + "location": "document.pdf" + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/home/presentation.ppt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "document.pdf" + ] + } + }, + { + "userId": "user-0", + "type": "READ", + "storageType": "PRIVATE", + "location": "file.txt", + "result": { + "content": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + } + } + }, + { + "userId": "user-2", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/" + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-7", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/home/" + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/important/document.pdf", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + }, + "location": "home/home/file.txt" + }, + { + "userId": "user-6", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "file.txt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-4", + "type": "READ", + "storageType": "PRIVATE", + "location": "document.pdf", + "result": { + "content": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + } + } + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "important/documents/document.pdf" + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + }, + "location": "important/file.txt" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "file.txt" + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "document.pdf" + ] + } + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/home/file.txt", + "result": { + "dirContent": [ + "home/home/file.txt" + ] + } + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "presentation.ppt" + ] + } + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/documents/document.pdf", + "result": { + "dirContent": [ + "important/documents/document.pdf" + ] + } + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "file.txt" + ] + } + }, + { + "userId": "user-5", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/documents/" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + }, + "location": "documents/home/document.pdf" + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/", + "result": { + "dirContent": [ + "documents/home/document.pdf" + ] + } + }, + { + "userId": "user-1", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "important/important/file.txt" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + }, + "location": "important/documents/file.txt" + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "document.pdf" + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/documents/document.pdf", + "result": { + "dirContent": [ + "important/documents/document.pdf" + ] + } + }, + { + "userId": "user-8", + "type": "READ", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "content": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + } + } + }, + { + "userId": "user-6", + "type": "READ", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "content": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + } + } + }, + { + "userId": "user-3", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/file.txt", + "result": { + "content": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + } + } + }, + { + "userId": "user-8", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-6", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-3", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/important/" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + }, + "location": "documents/document.pdf" + }, + { + "userId": "user-6", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + }, + "location": "file.txt" + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-3", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/file.txt", + "result": { + "content": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + } + } + }, + { + "userId": "user-4", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/document.pdf", + "result": { + "content": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + } + } + }, + { + "userId": "user-3", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/" + }, + { + "userId": "user-4", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + }, + "location": "important/documents/document.pdf" + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "file.txt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-4", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/documents/" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "file.txt" + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + }, + "location": "home/presentation.ppt" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + }, + "location": "documents/file.txt" + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/documents/presentation.ppt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "document.pdf", + "result": { + "dirContent": [ + "document.pdf" + ] + } + }, + { + "userId": "user-6", + "type": "READ", + "storageType": "PRIVATE", + "location": "file.txt", + "result": { + "content": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + } + } + }, + { + "userId": "user-0", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + }, + "location": "documents/presentation.ppt" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + }, + "location": "file.txt" + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "documents/file.txt", + "file.txt" + ] + } + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-5", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/home/file.txt", + "result": { + "content": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + } + } + }, + { + "userId": "user-6", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-6", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + }, + "location": "important/balance.xlsx" + }, + { + "userId": "user-6", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/balance.xlsx", + "result": { + "content": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + } + } + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "important/presentation.ppt" + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/documents/", + "result": { + "dirContent": [ + "important/documents/file.txt" + ] + } + }, + { + "userId": "user-5", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/home/document.pdf", + "result": { + "content": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + } + } + }, + { + "userId": "user-6", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/balance.xlsx", + "result": { + "content": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + } + } + }, + { + "userId": "user-0", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/presentation.ppt", + "result": { + "content": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + } + } + }, + { + "userId": "user-0", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/" + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + }, + "location": "important/home/file.txt" + }, + { + "userId": "user-0", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/home/file.txt", + "result": { + "content": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + } + } + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "home/presentation.ppt" + }, + { + "userId": "user-6", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + }, + "location": "important/home/document.pdf" + }, + { + "userId": "user-2", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "home/document.pdf" + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/documents/balance.xlsx", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-2", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/document.pdf", + "result": { + "content": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + } + } + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "file.txt" + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + }, + "location": "file.txt" + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + }, + "location": "home/home/file.txt" + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "home/important/document.pdf" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + }, + "location": "document.pdf" + }, + { + "userId": "user-6", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "document.pdf" + }, + { + "userId": "user-2", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/important/balance.xlsx", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-7", + "type": "READ", + "storageType": "PRIVATE", + "location": "file.txt", + "result": { + "content": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + } + } + }, + { + "userId": "user-5", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/home/" + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "important/documents/file.txt", + "file.txt", + "home/home/file.txt", + "important/important/presentation.ppt" + ] + } + }, + { + "userId": "user-2", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-9", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/" + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/document.pdf", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "home/important/balance.xlsx" + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/home/balance.xlsx", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-8", + "type": "READ", + "storageType": "PRIVATE", + "location": "file.txt", + "result": { + "content": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + } + } + }, + { + "userId": "user-9", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/presentation.ppt", + "result": { + "content": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + } + } + }, + { + "userId": "user-3", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/important/document.pdf", + "result": { + "content": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + } + } + }, + { + "userId": "user-5", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/home/file.txt", + "result": { + "content": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + } + } + }, + { + "userId": "user-3", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/important/" + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-3", + "type": "READ", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "content": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + } + } + }, + { + "userId": "user-4", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/" + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "document.pdf", + "home/presentation.ppt", + "file.txt" + ] + } + }, + { + "userId": "user-4", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/presentation.ppt", + "result": { + "content": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + } + } + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + }, + "location": "file.txt" + }, + { + "userId": "user-7", + "type": "READ", + "storageType": "PRIVATE", + "location": "file.txt", + "result": { + "content": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + } + } + }, + { + "userId": "user-3", + "type": "READ", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "content": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + } + } + }, + { + "userId": "user-0", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/home/file.txt", + "result": { + "content": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + } + } + }, + { + "userId": "user-8", + "type": "READ", + "storageType": "PRIVATE", + "location": "file.txt", + "result": { + "content": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + } + } + }, + { + "userId": "user-6", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/home/" + }, + { + "userId": "user-6", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + }, + "location": "important/presentation.ppt" + }, + { + "userId": "user-0", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/important/" + }, + { + "userId": "user-0", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/home/file.txt", + "result": { + "content": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + } + } + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + }, + "location": "home/home/file.txt" + }, + { + "userId": "user-2", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "important/important/presentation.ppt" + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/document.pdf", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-8", + "type": "READ", + "storageType": "PRIVATE", + "location": "file.txt", + "result": { + "content": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + } + } + }, + { + "userId": "user-5", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/home/file.txt", + "result": { + "content": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + } + } + }, + { + "userId": "user-0", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/home/file.txt", + "result": { + "content": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + } + } + }, + { + "userId": "user-3", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-6", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/" + }, + { + "userId": "user-6", + "type": "READ", + "storageType": "PRIVATE", + "location": "document.pdf", + "result": { + "content": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + } + } + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/presentation.ppt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-6", + "type": "READ", + "storageType": "PRIVATE", + "location": "document.pdf", + "result": { + "content": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + } + } + }, + { + "userId": "user-5", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/important/" + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "document.pdf", + "home/presentation.ppt", + "file.txt" + ] + } + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "document.pdf" + ] + } + }, + { + "userId": "user-1", + "type": "READ", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "content": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + } + } + }, + { + "userId": "user-8", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-0", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/home/" + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "home/important/document.pdf" + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/important/", + "result": { + "dirContent": [ + "home/important/document.pdf" + ] + } + }, + { + "userId": "user-0", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/important/document.pdf", + "result": { + "content": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + } + } + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + }, + "location": "important/balance.xlsx" + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + }, + "location": "important/important/file.txt" + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + }, + "location": "home/document.pdf" + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/", + "result": { + "dirContent": [ + "home/presentation.ppt" + ] + } + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/important/document.pdf", + "result": { + "dirContent": [ + "home/important/document.pdf" + ] + } + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "presentation.ppt" + ] + } + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/important/", + "result": { + "dirContent": [ + "important/important/file.txt" + ] + } + }, + { + "userId": "user-9", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/home/file.txt", + "result": { + "content": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + } + } + }, + { + "userId": "user-8", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/important/file.txt", + "result": { + "content": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + } + } + }, + { + "userId": "user-9", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/home/" + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-3", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + }, + "location": "documents/home/balance.xlsx" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + }, + "location": "important/document.pdf" + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "important/balance.xlsx", + "file.txt" + ] + } + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/important/", + "result": { + "dirContent": [ + "important/important/file.txt" + ] + } + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/important/balance.xlsx", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/file.txt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/document.pdf", + "result": { + "dirContent": [ + "important/document.pdf" + ] + } + }, + { + "userId": "user-7", + "type": "READ", + "storageType": "PRIVATE", + "location": "file.txt", + "result": { + "content": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + } + } + }, + { + "userId": "user-1", + "type": "READ", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "content": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + } + } + }, + { + "userId": "user-4", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-0", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/home/" + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/", + "result": { + "dirContent": [ + "important/document.pdf" + ] + } + }, + { + "userId": "user-7", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/balance.xlsx", + "result": { + "content": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + } + } + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + }, + "location": "home/balance.xlsx" + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "dirContent": [ + "balance.xlsx" + ] + } + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/", + "result": { + "dirContent": [ + "documents/home/balance.xlsx" + ] + } + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/important/document.pdf", + "result": { + "dirContent": [ + "home/important/document.pdf" + ] + } + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "presentation.ppt", + "important/document.pdf" + ] + } + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/home/file.txt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-1", + "type": "READ", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "content": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + } + } + }, + { + "userId": "user-8", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/important/" + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + }, + "location": "documents/home/document.pdf" + }, + { + "userId": "user-8", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/" + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + }, + "location": "document.pdf" + }, + { + "userId": "user-8", + "type": "READ", + "storageType": "PRIVATE", + "location": "document.pdf", + "result": { + "content": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + } + } + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + }, + "location": "important/balance.xlsx" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/documents/", + "result": { + "dirContent": [ + "important/documents/document.pdf" + ] + } + }, + { + "userId": "user-7", + "type": "READ", + "storageType": "PRIVATE", + "location": "file.txt", + "result": { + "content": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + } + } + }, + { + "userId": "user-7", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + }, + "location": "important/home/document.pdf" + }, + { + "userId": "user-8", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/home/" + }, + { + "userId": "user-6", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-1", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-5", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/home/" + }, + { + "userId": "user-1", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + }, + "location": "important/documents/balance.xlsx" + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/", + "result": { + "dirContent": [ + "important/balance.xlsx" + ] + } + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-8", + "type": "READ", + "storageType": "PRIVATE", + "location": "document.pdf", + "result": { + "content": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + } + } + }, + { + "userId": "user-9", + "type": "READ", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "content": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + } + } + }, + { + "userId": "user-3", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/balance.xlsx", + "result": { + "content": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + } + } + }, + { + "userId": "user-2", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/important/presentation.ppt", + "result": { + "content": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + } + } + }, + { + "userId": "user-7", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/documents/" + }, + { + "userId": "user-5", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + }, + "location": "documents/documents/balance.xlsx" + }, + { + "userId": "user-2", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/home/document.pdf", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-7", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/home/" + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + }, + "location": "home/presentation.ppt" + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + }, + "location": "file.txt" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + }, + "location": "home/file.txt" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + }, + "location": "important/file.txt" + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "document.pdf", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-0", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/important/document.pdf", + "result": { + "content": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + } + } + }, + { + "userId": "user-8", + "type": "READ", + "storageType": "PRIVATE", + "location": "document.pdf", + "result": { + "content": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + } + } + }, + { + "userId": "user-2", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/important/" + }, + { + "userId": "user-7", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + }, + "location": "documents/documents/presentation.ppt" + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + }, + "location": "documents/presentation.ppt" + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-3", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/balance.xlsx", + "result": { + "content": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + } + } + }, + { + "userId": "user-8", + "type": "READ", + "storageType": "PRIVATE", + "location": "document.pdf", + "result": { + "content": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + } + } + }, + { + "userId": "user-3", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/" + }, + { + "userId": "user-0", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/important/" + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + }, + "location": "document.pdf" + }, + { + "userId": "user-0", + "type": "READ", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "content": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + } + } + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + }, + "location": "home/document.pdf" + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/home/balance.xlsx", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-7", + "type": "READ", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "content": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + } + } + }, + { + "userId": "user-4", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/file.txt", + "result": { + "content": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + } + } + }, + { + "userId": "user-5", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/file.txt", + "result": { + "content": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + } + } + }, + { + "userId": "user-2", + "type": "READ", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "content": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + } + } + }, + { + "userId": "user-2", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-9", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + }, + "location": "document.pdf" + }, + { + "userId": "user-6", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-2", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + }, + "location": "documents/home/document.pdf" + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "document.pdf", + "home/presentation.ppt", + "documents/documents/presentation.ppt" + ] + } + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "file.txt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-2", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/home/document.pdf", + "result": { + "content": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + } + } + }, + { + "userId": "user-8", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/" + }, + { + "userId": "user-4", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-0", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/documents/" + }, + { + "userId": "user-0", + "type": "READ", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "content": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + } + } + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + }, + "location": "documents/home/document.pdf" + }, + { + "userId": "user-2", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + }, + "location": "file.txt" + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "balance.xlsx" + ] + } + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-7", + "type": "READ", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "content": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + } + } + }, + { + "userId": "user-8", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/documents/presentation.ppt", + "result": { + "content": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + } + } + }, + { + "userId": "user-6", + "type": "READ", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "content": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + } + } + }, + { + "userId": "user-2", + "type": "READ", + "storageType": "PRIVATE", + "location": "file.txt", + "result": { + "content": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + } + } + }, + { + "userId": "user-6", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-2", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + }, + "location": "documents/important/file.txt" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + }, + "location": "important/documents/file.txt" + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/important/file.txt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/home/document.pdf", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + }, + "location": "documents/document.pdf" + }, + { + "userId": "user-2", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + }, + "location": "documents/important/document.pdf" + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/home/", + "result": { + "dirContent": [ + "documents/home/document.pdf" + ] + } + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/presentation.ppt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/balance.xlsx", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/document.pdf", + "result": { + "dirContent": [ + "documents/document.pdf" + ] + } + }, + { + "userId": "user-8", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/documents/presentation.ppt", + "result": { + "content": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + } + } + }, + { + "userId": "user-3", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/document.pdf", + "result": { + "content": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + } + } + }, + { + "userId": "user-2", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/important/document.pdf", + "result": { + "content": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + } + } + }, + { + "userId": "user-8", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/documents/" + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + }, + "location": "home/balance.xlsx" + }, + { + "userId": "user-0", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-3", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/" + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-3", + "type": "READ", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "content": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + } + } + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + }, + "location": "documents/important/file.txt" + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + }, + "location": "important/file.txt" + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/home/presentation.ppt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-2", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/important/document.pdf", + "result": { + "content": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + } + } + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + }, + "location": "documents/home/balance.xlsx" + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/file.txt", + "result": { + "dirContent": [ + "important/file.txt" + ] + } + }, + { + "userId": "user-5", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/file.txt", + "result": { + "content": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + } + } + }, + { + "userId": "user-8", + "type": "READ", + "storageType": "PRIVATE", + "location": "document.pdf", + "result": { + "content": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + } + } + }, + { + "userId": "user-9", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/home/" + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + }, + "location": "important/document.pdf" + }, + { + "userId": "user-4", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/documents/" + }, + { + "userId": "user-3", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + }, + "location": "document.pdf" + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + }, + "location": "home/important/balance.xlsx" + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "document.pdf", + "home/balance.xlsx", + "presentation.ppt" + ] + } + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "important/document.pdf" + ] + } + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/documents/presentation.ppt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/important/", + "result": { + "dirContent": [ + "documents/important/document.pdf" + ] + } + }, + { + "userId": "user-3", + "type": "READ", + "storageType": "PRIVATE", + "location": "document.pdf", + "result": { + "content": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + } + } + }, + { + "userId": "user-3", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-0", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-1", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/important/" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + }, + "location": "important/presentation.ppt" + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/", + "result": { + "dirContent": [ + "important/presentation.ppt" + ] + } + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + }, + "location": "home/home/presentation.ppt" + }, + { + "userId": "user-6", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + }, + "location": "home/documents/document.pdf" + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "document.pdf", + "home/balance.xlsx", + "presentation.ppt" + ] + } + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/", + "result": { + "dirContent": [ + "important/presentation.ppt" + ] + } + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "important/document.pdf", + "balance.xlsx" + ] + } + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "home/home/presentation.ppt" + ] + } + }, + { + "userId": "user-5", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/file.txt", + "result": { + "content": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + } + } + }, + { + "userId": "user-7", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/important/" + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/balance.xlsx", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-2", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/important/" + }, + { + "userId": "user-0", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + }, + "location": "important/document.pdf" + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + }, + "location": "documents/home/file.txt" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "home/presentation.ppt" + }, + { + "userId": "user-2", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + }, + "location": "home/document.pdf" + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/presentation.ppt", + "result": { + "dirContent": [ + "home/presentation.ppt" + ] + } + }, + { + "userId": "user-4", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/home/presentation.ppt", + "result": { + "content": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + } + } + }, + { + "userId": "user-6", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/documents/document.pdf", + "result": { + "content": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + } + } + }, + { + "userId": "user-7", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-6", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/documents/" + }, + { + "userId": "user-1", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + }, + "location": "document.pdf" + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + }, + "location": "documents/balance.xlsx" + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "home/important/document.pdf" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + }, + "location": "documents/presentation.ppt" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/home/file.txt", + "result": { + "dirContent": [ + "documents/home/file.txt" + ] + } + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/important/document.pdf", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-8", + "type": "READ", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "content": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + } + } + }, + { + "userId": "user-2", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/document.pdf", + "result": { + "content": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + } + } + }, + { + "userId": "user-5", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/file.txt", + "result": { + "content": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + } + } + }, + { + "userId": "user-3", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-2", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + }, + "location": "document.pdf" + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "document.pdf", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-8", + "type": "READ", + "storageType": "PRIVATE", + "location": "document.pdf", + "result": { + "content": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + } + } + }, + { + "userId": "user-1", + "type": "READ", + "storageType": "PRIVATE", + "location": "document.pdf", + "result": { + "content": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + } + } + }, + { + "userId": "user-2", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/document.pdf", + "result": { + "content": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + } + } + }, + { + "userId": "user-8", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/home/" + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + }, + "location": "important/document.pdf" + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/balance.xlsx", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-4", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/important/" + }, + { + "userId": "user-5", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + }, + "location": "file.txt" + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "file.txt", + "result": { + "dirContent": [ + "file.txt" + ] + } + }, + { + "userId": "user-5", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + }, + "location": "documents/important/presentation.ppt" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "important/document.pdf" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "document.pdf", + "home/document.pdf" + ] + } + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/document.pdf", + "result": { + "dirContent": [ + "important/document.pdf" + ] + } + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "home/home/presentation.ppt", + "important/document.pdf" + ] + } + }, + { + "userId": "user-8", + "type": "READ", + "storageType": "PRIVATE", + "location": "document.pdf", + "result": { + "content": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + } + } + }, + { + "userId": "user-8", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/" + }, + { + "userId": "user-4", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/home/" + }, + { + "userId": "user-4", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/document.pdf", + "result": { + "content": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + } + } + }, + { + "userId": "user-5", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + }, + "location": "documents/document.pdf" + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + }, + "location": "documents/balance.xlsx" + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "document.pdf", + "important/presentation.ppt", + "documents/balance.xlsx", + "presentation.ppt" + ] + } + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "file.txt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-8", + "type": "READ", + "storageType": "PRIVATE", + "location": "document.pdf", + "result": { + "content": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + } + } + }, + { + "userId": "user-3", + "type": "READ", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "content": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + } + } + }, + { + "userId": "user-1", + "type": "READ", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "content": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + } + } + }, + { + "userId": "user-9", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/" + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "important/important/presentation.ppt" + }, + { + "userId": "user-2", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + }, + "location": "file.txt" + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "document.pdf", + "home/balance.xlsx", + "presentation.ppt", + "documents/document.pdf" + ] + } + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/document.pdf", + "result": { + "dirContent": [ + "important/document.pdf" + ] + } + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-9", + "type": "READ", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "content": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + } + } + }, + { + "userId": "user-1", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/presentation.ppt", + "result": { + "content": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + } + } + }, + { + "userId": "user-2", + "type": "READ", + "storageType": "PRIVATE", + "location": "document.pdf", + "result": { + "content": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + } + } + }, + { + "userId": "user-8", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/" + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "home/documents/presentation.ppt" + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "dirContent": [ + "presentation.ppt" + ] + } + }, + { + "userId": "user-3", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-8", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/" + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + }, + "location": "document.pdf" + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + }, + "location": "important/document.pdf" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + }, + "location": "file.txt" + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + }, + "location": "important/presentation.ppt" + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "file.txt" + ] + } + }, + { + "userId": "user-9", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/document.pdf", + "result": { + "content": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + } + } + }, + { + "userId": "user-8", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-4", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/" + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-5", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + }, + "location": "important/documents/presentation.ppt" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "documents/balance.xlsx" + }, + { + "userId": "user-6", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + }, + "location": "home/file.txt" + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "presentation.ppt" + ] + } + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "important/documents/presentation.ppt" + ] + } + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "file.txt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-2", + "type": "READ", + "storageType": "PRIVATE", + "location": "document.pdf", + "result": { + "content": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + } + } + }, + { + "userId": "user-3", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/" + }, + { + "userId": "user-2", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/" + }, + { + "userId": "user-8", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + }, + "location": "documents/documents/document.pdf" + }, + { + "userId": "user-8", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/documents/" + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + }, + "location": "documents/documents/file.txt" + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-6", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "home/important/document.pdf" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + }, + "location": "home/presentation.ppt" + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "important/presentation.ppt", + "presentation.ppt" + ] + } + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/important/", + "result": { + "dirContent": [ + "home/important/document.pdf" + ] + } + }, + { + "userId": "user-4", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/documents/presentation.ppt", + "result": { + "content": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + } + } + }, + { + "userId": "user-9", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/document.pdf", + "result": { + "content": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + } + } + }, + { + "userId": "user-4", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/documents/" + }, + { + "userId": "user-2", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "document.pdf" + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + }, + "location": "important/document.pdf" + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + }, + "location": "important/important/document.pdf" + }, + { + "userId": "user-6", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + }, + "location": "important/balance.xlsx" + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + }, + "location": "file.txt" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + }, + "location": "home/important/presentation.ppt" + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/presentation.ppt", + "result": { + "dirContent": [ + "important/presentation.ppt" + ] + } + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "dirContent": [ + "balance.xlsx" + ] + } + }, + { + "userId": "user-7", + "type": "READ", + "storageType": "PRIVATE", + "location": "document.pdf", + "result": { + "content": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + } + } + }, + { + "userId": "user-5", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/" + }, + { + "userId": "user-8", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/" + }, + { + "userId": "user-1", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-1", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-6", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "document.pdf" + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-6", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/important/document.pdf", + "result": { + "content": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + } + } + }, + { + "userId": "user-0", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + }, + "location": "file.txt" + }, + { + "userId": "user-2", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + }, + "location": "file.txt" + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "balance.xlsx" + ] + } + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/document.pdf", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "file.txt" + ] + } + }, + { + "userId": "user-6", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/important/document.pdf", + "result": { + "content": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + } + } + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + }, + "location": "important/file.txt" + }, + { + "userId": "user-6", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + }, + "location": "documents/presentation.ppt" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + }, + "location": "important/important/balance.xlsx" + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/home/presentation.ppt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-9", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/file.txt", + "result": { + "content": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + } + } + }, + { + "userId": "user-7", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + }, + "location": "important/documents/balance.xlsx" + }, + { + "userId": "user-3", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + }, + "location": "home/documents/presentation.ppt" + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + }, + "location": "file.txt" + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/important/balance.xlsx", + "result": { + "dirContent": [ + "important/important/balance.xlsx" + ] + } + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "file.txt" + ] + } + }, + { + "userId": "user-7", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/documents/balance.xlsx", + "result": { + "content": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + } + } + }, + { + "userId": "user-0", + "type": "READ", + "storageType": "PRIVATE", + "location": "file.txt", + "result": { + "content": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + } + } + }, + { + "userId": "user-1", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/important/" + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + }, + "location": "home/file.txt" + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + }, + "location": "home/documents/balance.xlsx" + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/", + "result": { + "dirContent": [ + "home/file.txt" + ] + } + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "presentation.ppt" + ] + } + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/important/file.txt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/documents/file.txt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-9", + "type": "READ", + "storageType": "PRIVATE", + "location": "document.pdf", + "result": { + "content": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + } + } + }, + { + "userId": "user-3", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/documents/" + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + }, + "location": "file.txt" + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "file.txt" + ] + } + }, + { + "userId": "user-2", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "important/balance.xlsx" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + }, + "location": "home/documents/presentation.ppt" + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-1", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/documents/presentation.ppt", + "result": { + "content": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + } + } + }, + { + "userId": "user-7", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/" + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "home/documents/presentation.ppt" + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/file.txt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-9", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + }, + "location": "documents/presentation.ppt" + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/", + "result": { + "dirContent": [ + "documents/presentation.ppt" + ] + } + }, + { + "userId": "user-3", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-9", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/" + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + }, + "location": "important/documents/presentation.ppt" + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + }, + "location": "home/documents/presentation.ppt" + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/presentation.ppt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/", + "result": { + "dirContent": [ + "home/documents/balance.xlsx" + ] + } + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/", + "result": { + "dirContent": [ + "important/documents/presentation.ppt" + ] + } + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-8", + "type": "READ", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "content": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + } + } + }, + { + "userId": "user-6", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/file.txt", + "result": { + "content": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + } + } + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "home/home/balance.xlsx" + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/", + "result": { + "dirContent": [ + "important/documents/balance.xlsx" + ] + } + }, + { + "userId": "user-8", + "type": "READ", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "content": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + } + } + }, + { + "userId": "user-3", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/documents/presentation.ppt", + "result": { + "content": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + } + } + }, + { + "userId": "user-3", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/documents/" + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "important/documents/document.pdf" + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/balance.xlsx", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/", + "result": { + "dirContent": [ + "home/documents/balance.xlsx" + ] + } + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-1", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/home/balance.xlsx", + "result": { + "content": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + } + } + }, + { + "userId": "user-8", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-6", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-3", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-3", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + }, + "location": "documents/document.pdf" + }, + { + "userId": "user-3", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/document.pdf", + "result": { + "content": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + } + } + }, + { + "userId": "user-3", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/" + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + }, + "location": "important/document.pdf" + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/home/presentation.ppt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + }, + "location": "home/presentation.ppt" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/home/presentation.ppt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-7", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/documents/presentation.ppt", + "result": { + "content": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + } + } + }, + { + "userId": "user-3", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/document.pdf", + "result": { + "content": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + } + } + }, + { + "userId": "user-0", + "type": "READ", + "storageType": "PRIVATE", + "location": "file.txt", + "result": { + "content": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + } + } + }, + { + "userId": "user-1", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/home/balance.xlsx", + "result": { + "content": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + } + } + }, + { + "userId": "user-3", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/" + }, + { + "userId": "user-1", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/documents/" + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + }, + "location": "home/documents/presentation.ppt" + }, + { + "userId": "user-6", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + }, + "location": "home/home/document.pdf" + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "document.pdf", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "balance.xlsx" + ] + } + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/home/", + "result": { + "dirContent": [ + "home/home/document.pdf" + ] + } + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "important/balance.xlsx", + "home/documents/presentation.ppt", + "file.txt" + ] + } + }, + { + "userId": "user-5", + "type": "READ", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "content": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + } + } + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + }, + "location": "important/documents/document.pdf" + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "important/documents/presentation.ppt" + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "document.pdf" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + }, + "location": "important/documents/balance.xlsx" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + }, + "location": "document.pdf" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + }, + "location": "documents/balance.xlsx" + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/documents/balance.xlsx", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "file.txt", + "result": { + "dirContent": [ + "file.txt" + ] + } + }, + { + "userId": "user-5", + "type": "READ", + "storageType": "PRIVATE", + "location": "document.pdf", + "result": { + "content": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + } + } + }, + { + "userId": "user-1", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/balance.xlsx", + "result": { + "content": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + } + } + }, + { + "userId": "user-6", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/home/" + }, + { + "userId": "user-7", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/documents/" + }, + { + "userId": "user-1", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/" + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + }, + "location": "file.txt" + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + }, + "location": "documents/presentation.ppt" + }, + { + "userId": "user-2", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + }, + "location": "documents/document.pdf" + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "file.txt", + "result": { + "dirContent": [ + "file.txt" + ] + } + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/", + "result": { + "dirContent": [ + "documents/presentation.ppt" + ] + } + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/documents/presentation.ppt", + "result": { + "dirContent": [ + "home/documents/presentation.ppt" + ] + } + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/balance.xlsx", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/document.pdf", + "result": { + "dirContent": [ + "documents/document.pdf" + ] + } + }, + { + "userId": "user-2", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/document.pdf", + "result": { + "content": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + } + } + }, + { + "userId": "user-9", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/" + }, + { + "userId": "user-4", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/documents/" + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + }, + "location": "file.txt" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + }, + "location": "home/presentation.ppt" + }, + { + "userId": "user-2", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + }, + "location": "documents/file.txt" + }, + { + "userId": "user-9", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/documents/presentation.ppt", + "result": { + "content": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + } + } + }, + { + "userId": "user-7", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/documents/presentation.ppt", + "result": { + "content": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + } + } + }, + { + "userId": "user-9", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/documents/" + }, + { + "userId": "user-5", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + }, + "location": "important/document.pdf" + }, + { + "userId": "user-0", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/documents/" + }, + { + "userId": "user-0", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/balance.xlsx", + "result": { + "content": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + } + } + }, + { + "userId": "user-7", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/documents/" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "file.txt" + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "home/file.txt" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "file.txt" + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "presentation.ppt", + "file.txt" + ] + } + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/documents/document.pdf", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/balance.xlsx", + "result": { + "dirContent": [ + "important/balance.xlsx" + ] + } + }, + { + "userId": "user-7", + "type": "READ", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "content": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + } + } + }, + { + "userId": "user-8", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/presentation.ppt", + "result": { + "content": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + } + } + }, + { + "userId": "user-3", + "type": "READ", + "storageType": "PRIVATE", + "location": "document.pdf", + "result": { + "content": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + } + } + }, + { + "userId": "user-2", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/file.txt", + "result": { + "content": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + } + } + }, + { + "userId": "user-3", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-5", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/" + }, + { + "userId": "user-1", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/home/" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + }, + "location": "file.txt" + }, + { + "userId": "user-1", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/balance.xlsx", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + }, + "location": "document.pdf" + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "document.pdf", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/file.txt", + "result": { + "dirContent": [ + "documents/file.txt" + ] + } + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "document.pdf" + ] + } + }, + { + "userId": "user-7", + "type": "READ", + "storageType": "PRIVATE", + "location": "file.txt", + "result": { + "content": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + } + } + }, + { + "userId": "user-8", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/" + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + }, + "location": "important/balance.xlsx" + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + }, + "location": "documents/presentation.ppt" + }, + { + "userId": "user-6", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "home/important/presentation.ppt" + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/", + "result": { + "dirContent": [ + "important/balance.xlsx" + ] + } + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "file.txt", + "result": { + "dirContent": [ + "file.txt" + ] + } + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "document.pdf" + ] + } + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "documents/file.txt", + "documents/document.pdf" + ] + } + }, + { + "userId": "user-1", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "home/file.txt" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + }, + "location": "documents/home/file.txt" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + }, + "location": "important/document.pdf" + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/home/document.pdf", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/", + "result": { + "dirContent": [ + "home/file.txt" + ] + } + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/", + "result": { + "dirContent": [ + "home/presentation.ppt" + ] + } + }, + { + "userId": "user-2", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/" + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + }, + "location": "important/document.pdf" + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/", + "result": { + "dirContent": [ + "home/file.txt" + ] + } + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "home/important/presentation.ppt" + ] + } + }, + { + "userId": "user-7", + "type": "READ", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "content": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + } + } + }, + { + "userId": "user-8", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/balance.xlsx", + "result": { + "content": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + } + } + }, + { + "userId": "user-6", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/important/presentation.ppt", + "result": { + "content": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + } + } + }, + { + "userId": "user-0", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/file.txt", + "result": { + "content": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + } + } + }, + { + "userId": "user-3", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/file.txt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "presentation.ppt" + ] + } + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-7", + "type": "READ", + "storageType": "PRIVATE", + "location": "file.txt", + "result": { + "content": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + } + } + }, + { + "userId": "user-4", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/home/file.txt", + "result": { + "content": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + } + } + }, + { + "userId": "user-0", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/balance.xlsx", + "result": { + "content": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + } + } + }, + { + "userId": "user-1", + "type": "READ", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "content": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + } + } + }, + { + "userId": "user-7", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "important/balance.xlsx" + ] + } + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-8", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/balance.xlsx", + "result": { + "content": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + } + } + }, + { + "userId": "user-6", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/important/presentation.ppt", + "result": { + "content": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + } + } + }, + { + "userId": "user-6", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/important/" + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/balance.xlsx", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + }, + "location": "documents/presentation.ppt" + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/", + "result": { + "dirContent": [ + "important/balance.xlsx" + ] + } + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/balance.xlsx", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "home/presentation.ppt", + "documents/home/file.txt", + "important/documents/balance.xlsx", + "file.txt" + ] + } + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/presentation.ppt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-4", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/home/file.txt", + "result": { + "content": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + } + } + }, + { + "userId": "user-0", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/balance.xlsx", + "result": { + "content": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + } + } + }, + { + "userId": "user-1", + "type": "READ", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "content": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + } + } + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + }, + "location": "documents/document.pdf" + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "important/balance.xlsx" + ] + } + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "important/balance.xlsx", + "file.txt", + "home/file.txt" + ] + } + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + }, + "location": "home/important/presentation.ppt" + }, + { + "userId": "user-2", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + }, + "location": "important/documents/presentation.ppt" + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/", + "result": { + "dirContent": [ + "documents/presentation.ppt" + ] + } + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "presentation.ppt", + "documents/document.pdf" + ] + } + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/home/document.pdf", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-2", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/documents/presentation.ppt", + "result": { + "content": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + } + } + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + }, + "location": "important/documents/balance.xlsx" + }, + { + "userId": "user-2", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + }, + "location": "documents/home/balance.xlsx" + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "important/balance.xlsx", + "file.txt", + "home/file.txt" + ] + } + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/documents/", + "result": { + "dirContent": [ + "important/documents/balance.xlsx" + ] + } + }, + { + "userId": "user-4", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/documents/balance.xlsx", + "result": { + "content": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + } + } + }, + { + "userId": "user-1", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/document.pdf", + "result": { + "content": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + } + } + }, + { + "userId": "user-8", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/" + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + }, + "location": "important/presentation.ppt" + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + }, + "location": "home/file.txt" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + }, + "location": "important/file.txt" + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/document.pdf", + "result": { + "dirContent": [ + "important/document.pdf" + ] + } + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/home/", + "result": { + "dirContent": [ + "documents/home/balance.xlsx" + ] + } + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "home/file.txt" + ] + } + }, + { + "userId": "user-1", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/document.pdf", + "result": { + "content": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + } + } + }, + { + "userId": "user-8", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/" + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/file.txt", + "result": { + "dirContent": [ + "home/file.txt" + ] + } + }, + { + "userId": "user-4", + "type": "READ", + "storageType": "PRIVATE", + "location": "file.txt", + "result": { + "content": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + } + } + }, + { + "userId": "user-0", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/balance.xlsx", + "result": { + "content": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + } + } + }, + { + "userId": "user-1", + "type": "READ", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "content": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + } + } + }, + { + "userId": "user-5", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + }, + "location": "important/home/balance.xlsx" + }, + { + "userId": "user-2", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "important/balance.xlsx" + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/documents/", + "result": { + "dirContent": [ + "important/documents/balance.xlsx" + ] + } + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "important/balance.xlsx", + "file.txt", + "home/file.txt" + ] + } + }, + { + "userId": "user-2", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/balance.xlsx", + "result": { + "content": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + } + } + }, + { + "userId": "user-8", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-1", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-4", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/important/" + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + }, + "location": "important/balance.xlsx" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "document.pdf" + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "important/balance.xlsx", + "important/documents/presentation.ppt", + "documents/home/balance.xlsx" + ] + } + }, + { + "userId": "user-3", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/file.txt", + "result": { + "content": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + } + } + }, + { + "userId": "user-5", + "type": "READ", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "content": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + } + } + }, + { + "userId": "user-9", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/documents/" + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "important/documents/file.txt" + }, + { + "userId": "user-3", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/" + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-4", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/home/" + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + }, + "location": "home/documents/file.txt" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + }, + "location": "important/documents/document.pdf" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + }, + "location": "document.pdf" + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "document.pdf", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-9", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/documents/file.txt", + "result": { + "content": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + } + } + }, + { + "userId": "user-4", + "type": "READ", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "content": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + } + } + }, + { + "userId": "user-5", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/document.pdf", + "result": { + "content": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + } + } + }, + { + "userId": "user-1", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/file.txt", + "result": { + "content": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + } + } + }, + { + "userId": "user-7", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/documents/file.txt", + "result": { + "content": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + } + } + }, + { + "userId": "user-9", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/documents/" + }, + { + "userId": "user-5", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-4", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/documents/" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-4", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/presentation.ppt", + "result": { + "content": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + } + } + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "documents/home/document.pdf" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + }, + "location": "home/file.txt" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-2", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + }, + "location": "important/balance.xlsx" + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "balance.xlsx" + ] + } + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "important/balance.xlsx", + "document.pdf", + "file.txt", + "home/file.txt" + ] + } + }, + { + "userId": "user-5", + "type": "READ", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "content": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + } + } + }, + { + "userId": "user-2", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/balance.xlsx", + "result": { + "content": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + } + } + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + }, + "location": "document.pdf" + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + }, + "location": "important/presentation.ppt" + }, + { + "userId": "user-2", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + }, + "location": "document.pdf" + }, + { + "userId": "user-4", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/file.txt", + "result": { + "content": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + } + } + }, + { + "userId": "user-5", + "type": "READ", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "content": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + } + } + }, + { + "userId": "user-0", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/file.txt", + "result": { + "content": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + } + } + }, + { + "userId": "user-2", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/documents/presentation.ppt", + "result": { + "content": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + } + } + }, + { + "userId": "user-7", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/" + }, + { + "userId": "user-7", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/documents/file.txt", + "result": { + "content": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + } + } + }, + { + "userId": "user-2", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/" + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + }, + "location": "home/presentation.ppt" + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-5", + "type": "READ", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "content": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + } + } + }, + { + "userId": "user-0", + "type": "READ", + "storageType": "PRIVATE", + "location": "document.pdf", + "result": { + "content": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + } + } + }, + { + "userId": "user-1", + "type": "READ", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "content": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + } + } + }, + { + "userId": "user-2", + "type": "READ", + "storageType": "PRIVATE", + "location": "document.pdf", + "result": { + "content": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + } + } + }, + { + "userId": "user-5", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-0", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/" + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/presentation.ppt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-8", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/" + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/home/balance.xlsx", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-8", + "type": "READ", + "storageType": "PRIVATE", + "location": "document.pdf", + "result": { + "content": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + } + } + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "documents/presentation.ppt" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + }, + "location": "documents/balance.xlsx" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + }, + "location": "important/presentation.ppt" + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/document.pdf", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "file.txt", + "result": { + "dirContent": [ + "file.txt" + ] + } + }, + { + "userId": "user-7", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/presentation.ppt", + "result": { + "content": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + } + } + }, + { + "userId": "user-2", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/home/balance.xlsx", + "result": { + "content": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + } + } + }, + { + "userId": "user-4", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/presentation.ppt", + "result": { + "content": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + } + } + }, + { + "userId": "user-9", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/home/" + }, + { + "userId": "user-1", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-0", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/" + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + }, + "location": "home/documents/balance.xlsx" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "document.pdf", + "result": { + "dirContent": [ + "document.pdf" + ] + } + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "dirContent": [ + "balance.xlsx" + ] + } + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "file.txt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-9", + "type": "READ", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "content": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + } + } + }, + { + "userId": "user-5", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/presentation.ppt", + "result": { + "content": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + } + } + }, + { + "userId": "user-0", + "type": "READ", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "content": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + } + } + }, + { + "userId": "user-7", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/" + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + }, + "location": "documents/home/file.txt" + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "important/document.pdf" + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + }, + "location": "document.pdf" + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "important/important/document.pdf" + }, + { + "userId": "user-2", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + }, + "location": "home/file.txt" + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "dirContent": [ + "balance.xlsx" + ] + } + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/file.txt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "document.pdf", + "documents/home/balance.xlsx", + "home/file.txt" + ] + } + }, + { + "userId": "user-9", + "type": "READ", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "content": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + } + } + }, + { + "userId": "user-4", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/file.txt", + "result": { + "content": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + } + } + }, + { + "userId": "user-5", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/presentation.ppt", + "result": { + "content": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + } + } + }, + { + "userId": "user-2", + "type": "READ", + "storageType": "PRIVATE", + "location": "document.pdf", + "result": { + "content": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + } + } + }, + { + "userId": "user-7", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/documents/" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + }, + "location": "important/home/document.pdf" + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + }, + "location": "home/documents/presentation.ppt" + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "dirContent": [ + "presentation.ppt" + ] + } + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-4", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/file.txt", + "result": { + "content": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + } + } + }, + { + "userId": "user-9", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + }, + "location": "document.pdf" + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "file.txt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-9", + "type": "READ", + "storageType": "PRIVATE", + "location": "document.pdf", + "result": { + "content": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + } + } + }, + { + "userId": "user-5", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + }, + "location": "home/home/file.txt" + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "file.txt" + }, + { + "userId": "user-2", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/home/", + "result": { + "dirContent": [ + "documents/home/file.txt" + ] + } + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/home/", + "result": { + "dirContent": [ + "home/home/file.txt" + ] + } + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/", + "result": { + "dirContent": [ + "home/documents/presentation.ppt" + ] + } + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/", + "result": { + "dirContent": [ + "documents/balance.xlsx" + ] + } + }, + { + "userId": "user-8", + "type": "READ", + "storageType": "PRIVATE", + "location": "document.pdf", + "result": { + "content": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + } + } + }, + { + "userId": "user-1", + "type": "READ", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "content": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + } + } + }, + { + "userId": "user-2", + "type": "READ", + "storageType": "PRIVATE", + "location": "document.pdf", + "result": { + "content": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + } + } + }, + { + "userId": "user-4", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/file.txt", + "result": { + "content": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + } + } + }, + { + "userId": "user-1", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-2", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/" + }, + { + "userId": "user-2", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + }, + "location": "document.pdf" + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + }, + "location": "important/home/balance.xlsx" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/home/", + "result": { + "dirContent": [ + "home/home/file.txt" + ] + } + }, + { + "userId": "user-4", + "type": "READ", + "storageType": "PRIVATE", + "location": "file.txt", + "result": { + "content": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + } + } + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + }, + "location": "home/presentation.ppt" + }, + { + "userId": "user-6", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + }, + "location": "important/presentation.ppt" + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + }, + "location": "documents/documents/presentation.ppt" + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "dirContent": [ + "balance.xlsx" + ] + } + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/important/balance.xlsx", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/presentation.ppt", + "result": { + "dirContent": [ + "important/presentation.ppt" + ] + } + }, + { + "userId": "user-4", + "type": "READ", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "content": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + } + } + }, + { + "userId": "user-1", + "type": "READ", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "content": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + } + } + }, + { + "userId": "user-2", + "type": "READ", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "content": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + } + } + }, + { + "userId": "user-6", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/presentation.ppt", + "result": { + "content": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + } + } + }, + { + "userId": "user-5", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + }, + "location": "document.pdf" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + }, + "location": "document.pdf" + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/documents/file.txt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "dirContent": [ + "presentation.ppt" + ] + } + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "document.pdf", + "presentation.ppt", + "documents/home/balance.xlsx" + ] + } + }, + { + "userId": "user-6", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/presentation.ppt", + "result": { + "content": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + } + } + }, + { + "userId": "user-2", + "type": "READ", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "content": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + } + } + }, + { + "userId": "user-7", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-4", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/home/" + }, + { + "userId": "user-4", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/file.txt", + "result": { + "content": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + } + } + }, + { + "userId": "user-6", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/" + }, + { + "userId": "user-6", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + }, + "location": "home/file.txt" + }, + { + "userId": "user-6", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/file.txt", + "result": { + "content": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + } + } + }, + { + "userId": "user-1", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-2", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/home/" + }, + { + "userId": "user-6", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/" + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + }, + "location": "important/important/balance.xlsx" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + }, + "location": "documents/important/presentation.ppt" + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "document.pdf" + ] + } + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "dirContent": [ + "balance.xlsx" + ] + } + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/important/balance.xlsx", + "result": { + "dirContent": [ + "important/important/balance.xlsx" + ] + } + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/", + "result": { + "dirContent": [ + "documents/important/presentation.ppt" + ] + } + }, + { + "userId": "user-5", + "type": "READ", + "storageType": "PRIVATE", + "location": "document.pdf", + "result": { + "content": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + } + } + }, + { + "userId": "user-4", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "documents/documents/document.pdf" + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + }, + "location": "documents/document.pdf" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + }, + "location": "home/document.pdf" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + }, + "location": "home/document.pdf" + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "document.pdf" + ] + } + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/balance.xlsx", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "dirContent": [ + "presentation.ppt" + ] + } + }, + { + "userId": "user-8", + "type": "READ", + "storageType": "PRIVATE", + "location": "document.pdf", + "result": { + "content": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + } + } + }, + { + "userId": "user-3", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/presentation.ppt", + "result": { + "content": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + } + } + }, + { + "userId": "user-2", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + }, + "location": "documents/document.pdf" + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/", + "result": { + "dirContent": [ + "home/presentation.ppt" + ] + } + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "documents/documents/document.pdf" + ] + } + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/", + "result": { + "dirContent": [ + "documents/important/presentation.ppt" + ] + } + }, + { + "userId": "user-0", + "type": "READ", + "storageType": "PRIVATE", + "location": "document.pdf", + "result": { + "content": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + } + } + }, + { + "userId": "user-5", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + }, + "location": "home/home/presentation.ppt" + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "document.pdf" + ] + } + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/", + "result": { + "dirContent": [ + "important/important/balance.xlsx" + ] + } + }, + { + "userId": "user-3", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/presentation.ppt", + "result": { + "content": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + } + } + }, + { + "userId": "user-9", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/" + }, + { + "userId": "user-3", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/important/" + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + }, + "location": "documents/important/presentation.ppt" + }, + { + "userId": "user-3", + "type": "READ", + "storageType": "PRIVATE", + "location": "document.pdf", + "result": { + "content": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + } + } + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/home/presentation.ppt", + "result": { + "dirContent": [ + "home/home/presentation.ppt" + ] + } + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/balance.xlsx", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-9", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/home/balance.xlsx", + "result": { + "content": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + } + } + }, + { + "userId": "user-3", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/presentation.ppt", + "result": { + "content": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + } + } + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + }, + "location": "documents/balance.xlsx" + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/important/", + "result": { + "dirContent": [ + "documents/important/presentation.ppt" + ] + } + }, + { + "userId": "user-9", + "type": "READ", + "storageType": "PRIVATE", + "location": "document.pdf", + "result": { + "content": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + } + } + }, + { + "userId": "user-1", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/document.pdf", + "result": { + "content": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + } + } + }, + { + "userId": "user-5", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/balance.xlsx", + "result": { + "content": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + } + } + }, + { + "userId": "user-9", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "documents/file.txt" + }, + { + "userId": "user-3", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + }, + "location": "document.pdf" + }, + { + "userId": "user-3", + "type": "READ", + "storageType": "PRIVATE", + "location": "document.pdf", + "result": { + "content": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + } + } + }, + { + "userId": "user-9", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/" + }, + { + "userId": "user-3", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + }, + "location": "home/document.pdf" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + }, + "location": "documents/balance.xlsx" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + }, + "location": "home/file.txt" + }, + { + "userId": "user-2", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + }, + "location": "important/home/file.txt" + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/home/", + "result": { + "dirContent": [ + "important/home/file.txt" + ] + } + }, + { + "userId": "user-2", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/home/file.txt", + "result": { + "content": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + } + } + }, + { + "userId": "user-8", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + }, + "location": "important/documents/balance.xlsx" + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + }, + "location": "home/document.pdf" + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + }, + "location": "document.pdf" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + }, + "location": "home/important/presentation.ppt" + }, + { + "userId": "user-6", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + }, + "location": "document.pdf" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + }, + "location": "documents/balance.xlsx" + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "document.pdf" + ] + } + }, + { + "userId": "user-0", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/important/document.pdf", + "result": { + "content": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + } + } + }, + { + "userId": "user-2", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/home/file.txt", + "result": { + "content": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + } + } + }, + { + "userId": "user-2", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/home/" + }, + { + "userId": "user-2", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + }, + "location": "documents/document.pdf" + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/document.pdf", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-4", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/" + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + }, + "location": "home/home/document.pdf" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "documents/home/balance.xlsx" + }, + { + "userId": "user-6", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + }, + "location": "document.pdf" + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "document.pdf" + ] + } + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/important/presentation.ppt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-4", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/documents/document.pdf", + "result": { + "content": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + } + } + }, + { + "userId": "user-0", + "type": "READ", + "storageType": "PRIVATE", + "location": "file.txt", + "result": { + "content": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + } + } + }, + { + "userId": "user-2", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/document.pdf", + "result": { + "content": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + } + } + }, + { + "userId": "user-5", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/home/balance.xlsx", + "result": { + "content": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + } + } + }, + { + "userId": "user-8", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/documents/" + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "documents/home/presentation.ppt" + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/important/file.txt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-6", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-0", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/documents/" + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "document.pdf", + "presentation.ppt", + "file.txt", + "important/important/document.pdf", + "documents/documents/presentation.ppt" + ] + } + }, + { + "userId": "user-7", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/" + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + }, + "location": "documents/balance.xlsx" + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "document.pdf" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "documents/important/presentation.ppt" + }, + { + "userId": "user-2", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + }, + "location": "documents/important/presentation.ppt" + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "document.pdf", + "result": { + "dirContent": [ + "document.pdf" + ] + } + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/balance.xlsx", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "home/document.pdf", + "documents/balance.xlsx", + "presentation.ppt", + "home/file.txt", + "documents/important/presentation.ppt" + ] + } + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "file.txt", + "result": { + "dirContent": [ + "file.txt" + ] + } + }, + { + "userId": "user-0", + "type": "READ", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "content": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + } + } + }, + { + "userId": "user-4", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/documents/" + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "important/document.pdf" + }, + { + "userId": "user-6", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/", + "result": { + "dirContent": [ + "documents/home/presentation.ppt", + "documents/balance.xlsx" + ] + } + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/", + "result": { + "dirContent": [ + "documents/balance.xlsx", + "documents/home/balance.xlsx" + ] + } + }, + { + "userId": "user-8", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/balance.xlsx", + "result": { + "content": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + } + } + }, + { + "userId": "user-5", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/balance.xlsx", + "result": { + "content": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + } + } + }, + { + "userId": "user-1", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/important/" + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "documents/document.pdf" + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + }, + "location": "important/balance.xlsx" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + }, + "location": "home/balance.xlsx" + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/balance.xlsx", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-9", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/document.pdf", + "result": { + "content": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + } + } + }, + { + "userId": "user-9", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/" + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "document.pdf" + }, + { + "userId": "user-1", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/" + }, + { + "userId": "user-5", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + }, + "location": "documents/balance.xlsx" + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + }, + "location": "documents/documents/file.txt" + }, + { + "userId": "user-6", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + }, + "location": "file.txt" + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/", + "result": { + "dirContent": [ + "documents/home/presentation.ppt", + "documents/balance.xlsx", + "documents/document.pdf" + ] + } + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "dirContent": [ + "presentation.ppt" + ] + } + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/document.pdf", + "result": { + "dirContent": [ + "documents/document.pdf" + ] + } + }, + { + "userId": "user-1", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/balance.xlsx", + "result": { + "content": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + } + } + }, + { + "userId": "user-6", + "type": "READ", + "storageType": "PRIVATE", + "location": "file.txt", + "result": { + "content": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + } + } + }, + { + "userId": "user-9", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-3", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/documents/" + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "documents/home/balance.xlsx" + }, + { + "userId": "user-2", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + }, + "location": "important/home/document.pdf" + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/document.pdf", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "dirContent": [ + "presentation.ppt" + ] + } + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "documents/document.pdf", + "documents/important/presentation.ppt", + "important/home/document.pdf" + ] + } + }, + { + "userId": "user-7", + "type": "READ", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "content": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + } + } + }, + { + "userId": "user-1", + "type": "READ", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "content": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + } + } + }, + { + "userId": "user-2", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/important/presentation.ppt", + "result": { + "content": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + } + } + }, + { + "userId": "user-7", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + }, + "location": "documents/documents/presentation.ppt" + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/documents/", + "result": { + "dirContent": [ + "documents/documents/presentation.ppt" + ] + } + }, + { + "userId": "user-3", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/home/" + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + }, + "location": "important/balance.xlsx" + }, + { + "userId": "user-6", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + }, + "location": "home/balance.xlsx" + }, + { + "userId": "user-2", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "document.pdf" + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/presentation.ppt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "presentation.ppt", + "file.txt" + ] + } + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/home/presentation.ppt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "file.txt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-7", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/documents/presentation.ppt", + "result": { + "content": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + } + } + }, + { + "userId": "user-5", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/balance.xlsx", + "result": { + "content": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + } + } + }, + { + "userId": "user-2", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/home/document.pdf", + "result": { + "content": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + } + } + }, + { + "userId": "user-9", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/" + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "documents/home/balance.xlsx" + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "important/home/file.txt" + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + }, + "location": "documents/documents/balance.xlsx" + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/", + "result": { + "dirContent": [ + "home/balance.xlsx" + ] + } + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/presentation.ppt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/", + "result": { + "dirContent": [ + "documents/document.pdf", + "documents/important/presentation.ppt" + ] + } + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/", + "result": { + "dirContent": [ + "important/home/file.txt" + ] + } + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "presentation.ppt" + ] + } + }, + { + "userId": "user-7", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/documents/presentation.ppt", + "result": { + "content": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + } + } + }, + { + "userId": "user-4", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/documents/balance.xlsx", + "result": { + "content": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + } + } + }, + { + "userId": "user-8", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/" + }, + { + "userId": "user-7", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/documents/" + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + }, + "location": "home/important/balance.xlsx" + }, + { + "userId": "user-3", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/important/file.txt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-7", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/important/" + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + }, + "location": "home/important/document.pdf" + }, + { + "userId": "user-6", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + }, + "location": "home/home/document.pdf" + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "file.txt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "document.pdf", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-7", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/important/document.pdf", + "result": { + "content": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + } + } + }, + { + "userId": "user-8", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/home/file.txt", + "result": { + "content": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + } + } + }, + { + "userId": "user-4", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/documents/" + }, + { + "userId": "user-2", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + }, + "location": "important/file.txt" + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + }, + "location": "home/important/presentation.ppt" + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-8", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/home/file.txt", + "result": { + "content": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + } + } + }, + { + "userId": "user-0", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/documents/presentation.ppt", + "result": { + "content": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + } + } + }, + { + "userId": "user-9", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/important/presentation.ppt", + "result": { + "content": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + } + } + }, + { + "userId": "user-0", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/document.pdf", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-1", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/" + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + }, + "location": "home/documents/document.pdf" + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + }, + "location": "documents/balance.xlsx" + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/home/", + "result": { + "dirContent": [ + "documents/home/balance.xlsx" + ] + } + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/home/", + "result": { + "dirContent": [ + "important/home/file.txt" + ] + } + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/", + "result": { + "dirContent": [ + "home/important/presentation.ppt", + "home/documents/document.pdf" + ] + } + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-5", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/balance.xlsx", + "result": { + "content": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + } + } + }, + { + "userId": "user-8", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/home/" + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + }, + "location": "important/presentation.ppt" + }, + { + "userId": "user-6", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "important/balance.xlsx" + }, + { + "userId": "user-8", + "type": "READ", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "content": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + } + } + }, + { + "userId": "user-7", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/" + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + }, + "location": "important/documents/file.txt" + }, + { + "userId": "user-7", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/documents/file.txt", + "result": { + "content": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + } + } + }, + { + "userId": "user-6", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-1", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/" + }, + { + "userId": "user-8", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + }, + "location": "home/important/document.pdf" + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/important/document.pdf", + "result": { + "dirContent": [ + "home/important/document.pdf" + ] + } + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/presentation.ppt", + "result": { + "dirContent": [ + "important/presentation.ppt" + ] + } + }, + { + "userId": "user-9", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/documents/document.pdf", + "result": { + "content": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + } + } + }, + { + "userId": "user-0", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/balance.xlsx", + "result": { + "content": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + } + } + }, + { + "userId": "user-1", + "type": "READ", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "content": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + } + } + }, + { + "userId": "user-8", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/important/" + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + }, + "location": "home/presentation.ppt" + }, + { + "userId": "user-6", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "document.pdf" + }, + { + "userId": "user-2", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + }, + "location": "home/home/balance.xlsx" + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/", + "result": { + "dirContent": [ + "home/home/balance.xlsx" + ] + } + }, + { + "userId": "user-7", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/home/balance.xlsx", + "result": { + "content": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + } + } + }, + { + "userId": "user-1", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/important/file.txt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-6", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-6", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "document.pdf", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-6", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "documents/presentation.ppt" + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "documents/presentation.ppt", + "balance.xlsx" + ] + } + }, + { + "userId": "user-4", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/presentation.ppt", + "result": { + "content": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + } + } + }, + { + "userId": "user-0", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/" + }, + { + "userId": "user-2", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "home/home/balance.xlsx", + "balance.xlsx" + ] + } + }, + { + "userId": "user-7", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/important/document.pdf", + "result": { + "content": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + } + } + }, + { + "userId": "user-5", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/" + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/important/balance.xlsx", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-5", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/balance.xlsx", + "result": { + "content": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + } + } + }, + { + "userId": "user-6", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-7", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/home/balance.xlsx", + "result": { + "content": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + } + } + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + }, + "location": "file.txt" + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + }, + "location": "documents/home/file.txt" + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "file.txt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/presentation.ppt", + "result": { + "dirContent": [ + "important/presentation.ppt" + ] + } + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "document.pdf", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/document.pdf", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-8", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/home/file.txt", + "result": { + "content": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + } + } + }, + { + "userId": "user-5", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + }, + "location": "home/important/presentation.ppt" + }, + { + "userId": "user-2", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-2", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "documents/balance.xlsx" + }, + { + "userId": "user-5", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/important/" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + }, + "location": "documents/document.pdf" + }, + { + "userId": "user-5", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/document.pdf", + "result": { + "content": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + } + } + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "file.txt" + }, + { + "userId": "user-6", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "documents/documents/file.txt" + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + }, + "location": "document.pdf" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + }, + "location": "important/presentation.ppt" + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/home/", + "result": { + "dirContent": [ + "documents/home/file.txt" + ] + } + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/", + "result": { + "dirContent": [ + "home/presentation.ppt", + "home/important/presentation.ppt", + "home/documents/document.pdf" + ] + } + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/documents/", + "result": { + "dirContent": [ + "documents/documents/file.txt" + ] + } + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/documents/document.pdf", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-2", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/balance.xlsx", + "result": { + "content": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + } + } + }, + { + "userId": "user-4", + "type": "READ", + "storageType": "PRIVATE", + "location": "file.txt", + "result": { + "content": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + } + } + }, + { + "userId": "user-9", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/" + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + }, + "location": "home/important/presentation.ppt" + }, + { + "userId": "user-2", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/" + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-6", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/documents/" + }, + { + "userId": "user-6", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + }, + "location": "important/documents/file.txt" + }, + { + "userId": "user-1", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "documents/document.pdf" + }, + { + "userId": "user-1", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/document.pdf", + "result": { + "content": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + } + } + }, + { + "userId": "user-9", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/important/" + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/home/presentation.ppt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "home/important/file.txt" + }, + { + "userId": "user-6", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/documents/file.txt", + "result": { + "content": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + } + } + }, + { + "userId": "user-4", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-6", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/documents/" + }, + { + "userId": "user-0", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/important/" + }, + { + "userId": "user-0", + "type": "READ", + "storageType": "PRIVATE", + "location": "document.pdf", + "result": { + "content": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + } + } + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + }, + "location": "documents/presentation.ppt" + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/important/balance.xlsx", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/documents/file.txt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-5", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/document.pdf", + "result": { + "content": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + } + } + }, + { + "userId": "user-1", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/document.pdf", + "result": { + "content": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + } + } + }, + { + "userId": "user-4", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/presentation.ppt", + "result": { + "content": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + } + } + }, + { + "userId": "user-8", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/home/" + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "documents/home/presentation.ppt" + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/home/", + "result": { + "dirContent": [ + "documents/home/presentation.ppt" + ] + } + }, + { + "userId": "user-8", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/home/presentation.ppt", + "result": { + "content": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + } + } + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "file.txt" + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + }, + "location": "file.txt" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "important/presentation.ppt" + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/presentation.ppt", + "result": { + "dirContent": [ + "important/presentation.ppt" + ] + } + }, + { + "userId": "user-7", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/documents/file.txt", + "result": { + "content": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + } + } + }, + { + "userId": "user-1", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/document.pdf", + "result": { + "content": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + } + } + }, + { + "userId": "user-0", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/presentation.ppt", + "result": { + "content": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + } + } + }, + { + "userId": "user-1", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + }, + "location": "home/document.pdf" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + }, + "location": "document.pdf" + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "document.pdf", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/file.txt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-8", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/home/" + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "document.pdf" + }, + { + "userId": "user-8", + "type": "READ", + "storageType": "PRIVATE", + "location": "document.pdf", + "result": { + "content": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + } + } + }, + { + "userId": "user-0", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-8", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + }, + "location": "documents/presentation.ppt" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + }, + "location": "important/document.pdf" + }, + { + "userId": "user-2", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + }, + "location": "home/balance.xlsx" + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/important/balance.xlsx", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/document.pdf", + "result": { + "dirContent": [ + "important/document.pdf" + ] + } + }, + { + "userId": "user-5", + "type": "READ", + "storageType": "PRIVATE", + "location": "document.pdf", + "result": { + "content": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + } + } + }, + { + "userId": "user-1", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + }, + "location": "documents/document.pdf" + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + }, + "location": "documents/file.txt" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + }, + "location": "important/home/file.txt" + }, + { + "userId": "user-6", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/important/balance.xlsx", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "document.pdf", + "documents/presentation.ppt", + "documents/document.pdf" + ] + } + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "home/document.pdf", + "presentation.ppt" + ] + } + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/", + "result": { + "dirContent": [ + "home/balance.xlsx" + ] + } + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/important/balance.xlsx", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-2", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/balance.xlsx", + "result": { + "content": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + } + } + }, + { + "userId": "user-8", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/document.pdf", + "result": { + "content": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + } + } + }, + { + "userId": "user-9", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/file.txt", + "result": { + "content": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + } + } + }, + { + "userId": "user-4", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/home/file.txt", + "result": { + "content": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + } + } + }, + { + "userId": "user-9", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/" + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + }, + "location": "home/important/document.pdf" + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "documents/documents/balance.xlsx" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "home/home/balance.xlsx" + }, + { + "userId": "user-6", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + }, + "location": "home/documents/file.txt" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-9", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/important/" + }, + { + "userId": "user-5", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-1", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-8", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/documents/" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "home/important/file.txt" + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "home/presentation.ppt" + }, + { + "userId": "user-2", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "home/documents/file.txt", + "balance.xlsx" + ] + } + }, + { + "userId": "user-8", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/document.pdf", + "result": { + "content": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + } + } + }, + { + "userId": "user-8", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/" + }, + { + "userId": "user-6", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/documents/" + }, + { + "userId": "user-6", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + }, + "location": "home/document.pdf" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + }, + "location": "important/file.txt" + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + }, + "location": "home/important/file.txt" + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "important/documents/file.txt", + "home/important/document.pdf", + "file.txt", + "documents/home/balance.xlsx" + ] + } + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/document.pdf", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-2", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + }, + "location": "documents/documents/presentation.ppt" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + }, + "location": "important/important/document.pdf" + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/", + "result": { + "dirContent": [ + "home/important/document.pdf" + ] + } + }, + { + "userId": "user-4", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/presentation.ppt", + "result": { + "content": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + } + } + }, + { + "userId": "user-4", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "home/home/presentation.ppt" + }, + { + "userId": "user-6", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + }, + "location": "file.txt" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + }, + "location": "important/home/document.pdf" + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "document.pdf", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "dirContent": [ + "balance.xlsx" + ] + } + }, + { + "userId": "user-7", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/documents/file.txt", + "result": { + "content": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + } + } + }, + { + "userId": "user-0", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/" + }, + { + "userId": "user-0", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/documents/presentation.ppt", + "result": { + "content": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + } + } + }, + { + "userId": "user-1", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/home/" + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/important/document.pdf", + "result": { + "dirContent": [ + "important/important/document.pdf" + ] + } + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + }, + "location": "home/important/balance.xlsx" + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/important/file.txt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/balance.xlsx", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "file.txt", + "result": { + "dirContent": [ + "file.txt" + ] + } + }, + { + "userId": "user-0", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/documents/" + }, + { + "userId": "user-1", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/important/" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + }, + "location": "documents/important/presentation.ppt" + }, + { + "userId": "user-7", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-8", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + }, + "location": "important/important/document.pdf" + }, + { + "userId": "user-8", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/important/" + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + }, + "location": "file.txt" + }, + { + "userId": "user-8", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + }, + "location": "documents/file.txt" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + }, + "location": "document.pdf" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "important/file.txt" + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "home/document.pdf", + "file.txt", + "balance.xlsx" + ] + } + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/presentation.ppt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/home/file.txt", + "result": { + "dirContent": [ + "important/home/file.txt" + ] + } + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/file.txt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-7", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/file.txt", + "result": { + "content": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + } + } + }, + { + "userId": "user-6", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/document.pdf", + "result": { + "content": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + } + } + }, + { + "userId": "user-5", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/" + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "home/document.pdf" + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "file.txt" + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/file.txt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/file.txt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "important/file.txt", + "documents/important/presentation.ppt" + ] + } + }, + { + "userId": "user-7", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/file.txt", + "result": { + "content": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + } + } + }, + { + "userId": "user-4", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/important/file.txt", + "result": { + "content": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + } + } + }, + { + "userId": "user-4", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-1", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/" + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/important/file.txt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-3", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + }, + "location": "documents/documents/document.pdf" + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + }, + "location": "documents/home/presentation.ppt" + }, + { + "userId": "user-9", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/document.pdf", + "result": { + "content": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + } + } + }, + { + "userId": "user-1", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/important/presentation.ppt", + "result": { + "content": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + } + } + }, + { + "userId": "user-9", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/" + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + }, + "location": "documents/documents/balance.xlsx" + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "documents/documents/balance.xlsx" + ] + } + }, + { + "userId": "user-9", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/documents/" + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + }, + "location": "important/document.pdf" + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + }, + "location": "documents/documents/document.pdf" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + }, + "location": "documents/important/balance.xlsx" + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + }, + "location": "documents/file.txt" + }, + { + "userId": "user-2", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + }, + "location": "important/documents/file.txt" + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "documents/documents/document.pdf" + ] + } + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/", + "result": { + "dirContent": [ + "home/document.pdf" + ] + } + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/file.txt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/documents/document.pdf", + "result": { + "dirContent": [ + "documents/documents/document.pdf" + ] + } + }, + { + "userId": "user-6", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/document.pdf", + "result": { + "content": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + } + } + }, + { + "userId": "user-7", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/file.txt", + "result": { + "content": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + } + } + }, + { + "userId": "user-2", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/documents/file.txt", + "result": { + "content": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + } + } + }, + { + "userId": "user-6", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/" + }, + { + "userId": "user-6", + "type": "READ", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "content": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + } + } + }, + { + "userId": "user-9", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/documents/" + }, + { + "userId": "user-5", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/important/" + }, + { + "userId": "user-5", + "type": "READ", + "storageType": "PRIVATE", + "location": "document.pdf", + "result": { + "content": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + } + } + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "document.pdf" + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + }, + "location": "important/important/file.txt" + }, + { + "userId": "user-6", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-0", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + }, + "location": "documents/important/presentation.ppt" + }, + { + "userId": "user-2", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + }, + "location": "document.pdf" + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "document.pdf" + ] + } + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-3", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/important/" + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-2", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + }, + "location": "home/home/balance.xlsx" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + }, + "location": "home/file.txt" + }, + { + "userId": "user-6", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + }, + "location": "document.pdf" + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + }, + "location": "documents/important/balance.xlsx" + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "documents/documents/document.pdf", + "home/file.txt", + "documents/important/presentation.ppt" + ] + } + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-0", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/important/balance.xlsx", + "result": { + "content": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + } + } + }, + { + "userId": "user-5", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-1", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + }, + "location": "documents/documents/file.txt" + }, + { + "userId": "user-9", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/home/" + }, + { + "userId": "user-1", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/documents/" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "presentation.ppt" + ] + } + }, + { + "userId": "user-1", + "type": "READ", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "content": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + } + } + }, + { + "userId": "user-1", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + }, + "location": "important/important/presentation.ppt" + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + }, + "location": "home/document.pdf" + }, + { + "userId": "user-6", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + }, + "location": "documents/documents/file.txt" + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "document.pdf", + "documents/file.txt", + "balance.xlsx", + "important/document.pdf" + ] + } + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-0", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/documents/file.txt", + "result": { + "content": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + } + } + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "document.pdf" + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + }, + "location": "home/documents/file.txt" + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "important/important/balance.xlsx" + }, + { + "userId": "user-6", + "type": "READ", + "storageType": "PRIVATE", + "location": "document.pdf", + "result": { + "content": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + } + } + }, + { + "userId": "user-0", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/important/balance.xlsx", + "result": { + "content": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + } + } + }, + { + "userId": "user-6", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-6", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + }, + "location": "documents/documents/document.pdf" + }, + { + "userId": "user-6", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/documents/" + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "documents/balance.xlsx" + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + }, + "location": "important/documents/balance.xlsx" + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + }, + "location": "important/documents/presentation.ppt" + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/documents/balance.xlsx", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/", + "result": { + "dirContent": [ + "important/document.pdf" + ] + } + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/", + "result": { + "dirContent": [ + "important/documents/balance.xlsx", + "important/important/presentation.ppt" + ] + } + }, + { + "userId": "user-8", + "type": "READ", + "storageType": "PRIVATE", + "location": "document.pdf", + "result": { + "content": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + } + } + }, + { + "userId": "user-4", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/documents/file.txt", + "result": { + "content": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + } + } + }, + { + "userId": "user-4", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/" + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/documents/document.pdf", + "result": { + "dirContent": [ + "documents/documents/document.pdf" + ] + } + }, + { + "userId": "user-0", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/important/" + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-0", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/documents/file.txt", + "result": { + "content": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + } + } + }, + { + "userId": "user-9", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/" + }, + { + "userId": "user-0", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/documents/" + }, + { + "userId": "user-0", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/important/balance.xlsx", + "result": { + "content": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + } + } + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + }, + "location": "important/home/document.pdf" + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/", + "result": { + "dirContent": [ + "important/documents/presentation.ppt" + ] + } + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/important/file.txt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-0", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/important/balance.xlsx", + "result": { + "content": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + } + } + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + }, + "location": "home/presentation.ppt" + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + }, + "location": "home/home/file.txt" + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "important/home/balance.xlsx" + }, + { + "userId": "user-6", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + }, + "location": "documents/document.pdf" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + }, + "location": "important/home/document.pdf" + }, + { + "userId": "user-2", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "document.pdf", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/presentation.ppt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "presentation.ppt" + ] + } + }, + { + "userId": "user-3", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/home/balance.xlsx", + "result": { + "content": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + } + } + }, + { + "userId": "user-7", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-6", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/" + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/documents/presentation.ppt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "document.pdf", + "important/documents/balance.xlsx", + "balance.xlsx", + "important/important/presentation.ppt", + "important/home/document.pdf" + ] + } + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/", + "result": { + "dirContent": [ + "important/documents/presentation.ppt" + ] + } + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/home/", + "result": { + "dirContent": [ + "important/home/balance.xlsx" + ] + } + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-0", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/important/balance.xlsx", + "result": { + "content": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + } + } + }, + { + "userId": "user-3", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/home/" + }, + { + "userId": "user-6", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + }, + "location": "home/file.txt" + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/documents/balance.xlsx", + "result": { + "dirContent": [ + "important/documents/balance.xlsx" + ] + } + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/file.txt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-2", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + }, + "location": "important/home/file.txt" + }, + { + "userId": "user-9", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/home/file.txt", + "result": { + "content": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + } + } + }, + { + "userId": "user-6", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/file.txt", + "result": { + "content": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + } + } + }, + { + "userId": "user-2", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/home/file.txt", + "result": { + "content": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + } + } + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + }, + "location": "home/important/file.txt" + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + }, + "location": "home/balance.xlsx" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "home/important/file.txt" + ] + } + }, + { + "userId": "user-4", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/documents/document.pdf", + "result": { + "content": { + "id": "a81ddf01-fd7f-4f36-bf69-96e269c09cbd" + } + } + }, + { + "userId": "user-1", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/home/document.pdf", + "result": { + "content": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + } + } + }, + { + "userId": "user-7", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/important/" + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "documents/presentation.ppt" + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/presentation.ppt", + "result": { + "dirContent": [ + "documents/presentation.ppt" + ] + } + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + }, + "location": "home/documents/document.pdf" + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/important/presentation.ppt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-3", + "type": "READ", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "content": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + } + } + }, + { + "userId": "user-0", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/balance.xlsx", + "result": { + "content": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + } + } + }, + { + "userId": "user-4", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/important/" + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/documents/document.pdf", + "result": { + "dirContent": [ + "documents/documents/document.pdf" + ] + } + }, + { + "userId": "user-6", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/" + }, + { + "userId": "user-0", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/" + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "documents/documents/document.pdf" + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "documents/important/document.pdf" + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + }, + "location": "home/documents/file.txt" + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/documents/balance.xlsx", + "result": { + "dirContent": [ + "important/documents/balance.xlsx" + ] + } + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "documents/documents/document.pdf", + "important/important/balance.xlsx", + "balance.xlsx" + ] + } + }, + { + "userId": "user-8", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/home/document.pdf", + "result": { + "content": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + } + } + }, + { + "userId": "user-0", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/important/balance.xlsx", + "result": { + "content": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + } + } + }, + { + "userId": "user-8", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/home/" + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-9", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/" + }, + { + "userId": "user-3", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/documents/" + }, + { + "userId": "user-3", + "type": "READ", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "content": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + } + } + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + }, + "location": "document.pdf" + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "dirContent": [ + "presentation.ppt" + ] + } + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "dirContent": [ + "presentation.ppt" + ] + } + }, + { + "userId": "user-0", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/documents/document.pdf", + "result": { + "content": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + } + } + }, + { + "userId": "user-7", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/presentation.ppt", + "result": { + "content": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + } + } + }, + { + "userId": "user-1", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + }, + "location": "important/presentation.ppt" + }, + { + "userId": "user-2", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/document.pdf", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-9", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/documents/" + }, + { + "userId": "user-9", + "type": "READ", + "storageType": "PRIVATE", + "location": "document.pdf", + "result": { + "content": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + } + } + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + }, + "location": "document.pdf" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + }, + "location": "home/documents/document.pdf" + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "document.pdf" + ] + } + }, + { + "userId": "user-3", + "type": "READ", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "content": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + } + } + }, + { + "userId": "user-4", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/documents/" + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-0", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + }, + "location": "important/documents/presentation.ppt" + }, + { + "userId": "user-6", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + }, + "location": "document.pdf" + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/", + "result": { + "dirContent": [ + "home/documents/document.pdf" + ] + } + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "document.pdf", + "result": { + "dirContent": [ + "document.pdf" + ] + } + }, + { + "userId": "user-7", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/documents/presentation.ppt", + "result": { + "content": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + } + } + }, + { + "userId": "user-3", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/", + "result": { + "dirContent": [ + "important/documents/balance.xlsx", + "important/important/presentation.ppt" + ] + } + }, + { + "userId": "user-8", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-6", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-1", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + }, + "location": "documents/file.txt" + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/", + "result": { + "dirContent": [ + "documents/file.txt" + ] + } + }, + { + "userId": "user-1", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/file.txt", + "result": { + "content": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + } + } + }, + { + "userId": "user-1", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/" + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + }, + "location": "documents/balance.xlsx" + }, + { + "userId": "user-2", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + }, + "location": "important/document.pdf" + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "documents/important/document.pdf", + "documents/presentation.ppt", + "important/documents/presentation.ppt", + "balance.xlsx" + ] + } + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/document.pdf", + "result": { + "dirContent": [ + "important/document.pdf" + ] + } + }, + { + "userId": "user-7", + "type": "READ", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "content": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + } + } + }, + { + "userId": "user-9", + "type": "READ", + "storageType": "PRIVATE", + "location": "document.pdf", + "result": { + "content": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + } + } + }, + { + "userId": "user-2", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/document.pdf", + "result": { + "content": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + } + } + }, + { + "userId": "user-6", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-2", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + }, + "location": "home/document.pdf" + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "document.pdf", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/", + "result": { + "dirContent": [ + "important/document.pdf" + ] + } + }, + { + "userId": "user-8", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/balance.xlsx", + "result": { + "content": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + } + } + }, + { + "userId": "user-5", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/documents/document.pdf", + "result": { + "content": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + } + } + }, + { + "userId": "user-6", + "type": "READ", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "content": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + } + } + }, + { + "userId": "user-8", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/" + }, + { + "userId": "user-3", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-5", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/documents/" + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "location": "documents/document.pdf" + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + }, + "location": "important/file.txt" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-6", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + }, + "location": "home/home/balance.xlsx" + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/document.pdf", + "result": { + "dirContent": [ + "important/document.pdf" + ] + } + } + ], + "userPrivateSpace": { + "user-1": {}, + "user-0": { + "balance.xlsx": { + "id": "fa56329b-a5a6-4720-9ed1-518b9ef6340d" + } + }, + "user-5": {}, + "user-4": { + "presentation.ppt": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + } + }, + "user-3": {}, + "user-2": { + "home/document.pdf": { + "id": "87e6fc3d-4586-442b-b0c3-46873fdd3cca" + }, + "important/document.pdf": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + } + }, + "user-9": { + "document.pdf": { + "id": "62f86682-a84f-4226-9794-c6faa8718090" + } + }, + "user-8": { + "important/file.txt": { + "id": "167fd37d-5051-4ae4-81a3-c1472a5b7fe2" + } + }, + "user-7": { + "documents/important/document.pdf": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "documents/presentation.ppt": { + "id": "a4c68936-40c4-47fe-bd05-d14430cad276" + }, + "documents/document.pdf": { + "id": "a95da826-3102-4782-98df-892e8007d8d6" + }, + "important/documents/presentation.ppt": { + "id": "3d36640c-56cb-4e7b-abee-b10afe31c5ab" + }, + "balance.xlsx": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + } + }, + "user-6": { + "presentation.ppt": { + "id": "7c7fb450-2767-4d7e-94b3-10823cdea7c5" + }, + "home/home/balance.xlsx": { + "id": "292056fc-1c28-471f-99c2-fe29fa040309" + } + } + }, + "userPublicSpace": { + "user-1": {}, + "user-0": {}, + "user-5": {}, + "user-4": {}, + "user-3": {}, + "user-2": {}, + "user-9": {}, + "user-8": {}, + "user-7": {}, + "user-6": {} + } +} \ No newline at end of file diff --git a/datasafe-long-run-tests/datasafe-business-tests-random-actions/src/test/resources/fixture/fixture_simple_datasafe_1000_ops.json b/datasafe-long-run-tests/datasafe-business-tests-random-actions/src/test/resources/fixture/fixture_simple_datasafe_1000_ops.json new file mode 100644 index 000000000..b8720ca81 --- /dev/null +++ b/datasafe-long-run-tests/datasafe-business-tests-random-actions/src/test/resources/fixture/fixture_simple_datasafe_1000_ops.json @@ -0,0 +1,9283 @@ +{ + "operations": [ + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "12e680c3-22ce-469f-b62a-2bc37b194134" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "d31ad19c-860e-40d7-b798-2aeecad10120" + }, + "location": "important/presentation.ppt" + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-5", + "type": "READ", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "content": { + "id": "12e680c3-22ce-469f-b62a-2bc37b194134" + } + } + }, + { + "userId": "user-0", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/presentation.ppt", + "result": { + "content": { + "id": "d31ad19c-860e-40d7-b798-2aeecad10120" + } + } + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "d649d9c4-ecc9-410a-b6f8-3510710eb368" + }, + "location": "home/home/balance.xlsx" + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7d315536-f793-45d5-a309-81c1e03545d8" + }, + "location": "important/important/presentation.ppt" + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-0", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/presentation.ppt", + "result": { + "content": { + "id": "d31ad19c-860e-40d7-b798-2aeecad10120" + } + } + }, + { + "userId": "user-7", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/home/balance.xlsx", + "result": { + "content": { + "id": "d649d9c4-ecc9-410a-b6f8-3510710eb368" + } + } + }, + { + "userId": "user-7", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/home/" + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "35083c31-6b7c-43c3-9521-b256d529fb33" + }, + "location": "documents/home/balance.xlsx" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "75cc14ad-8345-44b7-8a11-ad2cebc501c6" + }, + "location": "documents/home/file.txt" + }, + { + "userId": "user-2", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "58326dc1-27c9-4ec7-884a-045db4a3b8de" + }, + "location": "important/documents/file.txt" + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "important/presentation.ppt" + ] + } + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "documents/home/file.txt" + ] + } + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/home/balance.xlsx", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-8", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/important/presentation.ppt", + "result": { + "content": { + "id": "7d315536-f793-45d5-a309-81c1e03545d8" + } + } + }, + { + "userId": "user-1", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/home/file.txt", + "result": { + "content": { + "id": "75cc14ad-8345-44b7-8a11-ad2cebc501c6" + } + } + }, + { + "userId": "user-2", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/documents/file.txt", + "result": { + "content": { + "id": "58326dc1-27c9-4ec7-884a-045db4a3b8de" + } + } + }, + { + "userId": "user-0", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/" + }, + { + "userId": "user-1", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/home/" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "58326dc1-27c9-4ec7-884a-045db4a3b8de" + }, + "location": "important/balance.xlsx" + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/", + "result": { + "dirContent": [ + "important/balance.xlsx" + ] + } + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "d649d9c4-ecc9-410a-b6f8-3510710eb368" + }, + "location": "home/presentation.ppt" + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "77d01c9c-4631-4e07-9d9a-4cc1fdbc1a67" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7d315536-f793-45d5-a309-81c1e03545d8" + }, + "location": "documents/presentation.ppt" + }, + { + "userId": "user-6", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7d315536-f793-45d5-a309-81c1e03545d8" + }, + "location": "file.txt" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "75cc14ad-8345-44b7-8a11-ad2cebc501c6" + }, + "location": "documents/documents/presentation.ppt" + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "file.txt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-6", + "type": "READ", + "storageType": "PRIVATE", + "location": "file.txt", + "result": { + "content": { + "id": "7d315536-f793-45d5-a309-81c1e03545d8" + } + } + }, + { + "userId": "user-1", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "2beec6d8-e1f6-4480-9303-e8201399b0b8" + }, + "location": "documents/home/file.txt" + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/", + "result": { + "dirContent": [ + "documents/presentation.ppt" + ] + } + }, + { + "userId": "user-7", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/presentation.ppt", + "result": { + "content": { + "id": "d649d9c4-ecc9-410a-b6f8-3510710eb368" + } + } + }, + { + "userId": "user-6", + "type": "READ", + "storageType": "PRIVATE", + "location": "file.txt", + "result": { + "content": { + "id": "7d315536-f793-45d5-a309-81c1e03545d8" + } + } + }, + { + "userId": "user-9", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "35083c31-6b7c-43c3-9521-b256d529fb33" + }, + "location": "document.pdf" + }, + { + "userId": "user-2", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/documents/" + }, + { + "userId": "user-2", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "77d01c9c-4631-4e07-9d9a-4cc1fdbc1a67" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-2", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/balance.xlsx", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "77d01c9c-4631-4e07-9d9a-4cc1fdbc1a67" + }, + "location": "home/file.txt" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "35083c31-6b7c-43c3-9521-b256d529fb33" + }, + "location": "documents/file.txt" + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "file.txt", + "result": { + "dirContent": [ + "file.txt" + ] + } + }, + { + "userId": "user-9", + "type": "READ", + "storageType": "PRIVATE", + "location": "document.pdf", + "result": { + "content": { + "id": "35083c31-6b7c-43c3-9521-b256d529fb33" + } + } + }, + { + "userId": "user-1", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/documents/presentation.ppt", + "result": { + "content": { + "id": "75cc14ad-8345-44b7-8a11-ad2cebc501c6" + } + } + }, + { + "userId": "user-4", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "58326dc1-27c9-4ec7-884a-045db4a3b8de" + }, + "location": "document.pdf" + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "12e680c3-22ce-469f-b62a-2bc37b194134" + }, + "location": "documents/home/balance.xlsx" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "75cc14ad-8345-44b7-8a11-ad2cebc501c6" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "d31ad19c-860e-40d7-b798-2aeecad10120" + }, + "location": "home/important/document.pdf" + }, + { + "userId": "user-6", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "77d01c9c-4631-4e07-9d9a-4cc1fdbc1a67" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7d315536-f793-45d5-a309-81c1e03545d8" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-2", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "2beec6d8-e1f6-4480-9303-e8201399b0b8" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/home/balance.xlsx", + "result": { + "dirContent": [ + "documents/home/balance.xlsx" + ] + } + }, + { + "userId": "user-8", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/important/presentation.ppt", + "result": { + "content": { + "id": "7d315536-f793-45d5-a309-81c1e03545d8" + } + } + }, + { + "userId": "user-6", + "type": "READ", + "storageType": "PRIVATE", + "location": "file.txt", + "result": { + "content": { + "id": "7d315536-f793-45d5-a309-81c1e03545d8" + } + } + }, + { + "userId": "user-9", + "type": "READ", + "storageType": "PRIVATE", + "location": "document.pdf", + "result": { + "content": { + "id": "35083c31-6b7c-43c3-9521-b256d529fb33" + } + } + }, + { + "userId": "user-0", + "type": "READ", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "content": { + "id": "7d315536-f793-45d5-a309-81c1e03545d8" + } + } + }, + { + "userId": "user-7", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/" + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "12e680c3-22ce-469f-b62a-2bc37b194134" + }, + "location": "documents/document.pdf" + }, + { + "userId": "user-7", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/document.pdf", + "result": { + "content": { + "id": "12e680c3-22ce-469f-b62a-2bc37b194134" + } + } + }, + { + "userId": "user-3", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/" + }, + { + "userId": "user-4", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "75cc14ad-8345-44b7-8a11-ad2cebc501c6" + }, + "location": "document.pdf" + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "2beec6d8-e1f6-4480-9303-e8201399b0b8" + }, + "location": "file.txt" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "2beec6d8-e1f6-4480-9303-e8201399b0b8" + }, + "location": "file.txt" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "75cc14ad-8345-44b7-8a11-ad2cebc501c6" + }, + "location": "documents/documents/document.pdf" + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/important/presentation.ppt", + "result": { + "dirContent": [ + "important/important/presentation.ppt" + ] + } + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "document.pdf", + "file.txt", + "documents/home/balance.xlsx" + ] + } + }, + { + "userId": "user-2", + "type": "READ", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "content": { + "id": "2beec6d8-e1f6-4480-9303-e8201399b0b8" + } + } + }, + { + "userId": "user-4", + "type": "READ", + "storageType": "PRIVATE", + "location": "file.txt", + "result": { + "content": { + "id": "2beec6d8-e1f6-4480-9303-e8201399b0b8" + } + } + }, + { + "userId": "user-8", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/home/" + }, + { + "userId": "user-8", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/important/presentation.ppt", + "result": { + "content": { + "id": "7d315536-f793-45d5-a309-81c1e03545d8" + } + } + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "35083c31-6b7c-43c3-9521-b256d529fb33" + }, + "location": "documents/documents/balance.xlsx" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "35083c31-6b7c-43c3-9521-b256d529fb33" + }, + "location": "documents/home/document.pdf" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7d315536-f793-45d5-a309-81c1e03545d8" + }, + "location": "important/important/file.txt" + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7d315536-f793-45d5-a309-81c1e03545d8" + }, + "location": "home/file.txt" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "2beec6d8-e1f6-4480-9303-e8201399b0b8" + }, + "location": "important/documents/document.pdf" + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/home/presentation.ppt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/home/balance.xlsx", + "result": { + "dirContent": [ + "documents/home/balance.xlsx" + ] + } + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "document.pdf", + "important/important/presentation.ppt", + "documents/documents/balance.xlsx" + ] + } + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/documents/document.pdf", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-1", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/documents/presentation.ppt", + "result": { + "content": { + "id": "75cc14ad-8345-44b7-8a11-ad2cebc501c6" + } + } + }, + { + "userId": "user-7", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/" + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "2beec6d8-e1f6-4480-9303-e8201399b0b8" + }, + "location": "home/balance.xlsx" + }, + { + "userId": "user-7", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/balance.xlsx", + "result": { + "content": { + "id": "2beec6d8-e1f6-4480-9303-e8201399b0b8" + } + } + }, + { + "userId": "user-1", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/" + }, + { + "userId": "user-1", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/documents/document.pdf", + "result": { + "content": { + "id": "2beec6d8-e1f6-4480-9303-e8201399b0b8" + } + } + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "35083c31-6b7c-43c3-9521-b256d529fb33" + }, + "location": "home/documents/presentation.ppt" + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/", + "result": { + "dirContent": [ + "home/balance.xlsx" + ] + } + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/important/document.pdf", + "result": { + "dirContent": [ + "home/important/document.pdf" + ] + } + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/presentation.ppt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-7", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/balance.xlsx", + "result": { + "content": { + "id": "2beec6d8-e1f6-4480-9303-e8201399b0b8" + } + } + }, + { + "userId": "user-4", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/home/document.pdf", + "result": { + "content": { + "id": "35083c31-6b7c-43c3-9521-b256d529fb33" + } + } + }, + { + "userId": "user-0", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/file.txt", + "result": { + "content": { + "id": "7d315536-f793-45d5-a309-81c1e03545d8" + } + } + }, + { + "userId": "user-1", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/documents/document.pdf", + "result": { + "content": { + "id": "2beec6d8-e1f6-4480-9303-e8201399b0b8" + } + } + }, + { + "userId": "user-8", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/documents/" + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "75cc14ad-8345-44b7-8a11-ad2cebc501c6" + }, + "location": "important/documents/file.txt" + }, + { + "userId": "user-5", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/important/" + }, + { + "userId": "user-5", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/important/document.pdf", + "result": { + "content": { + "id": "d31ad19c-860e-40d7-b798-2aeecad10120" + } + } + }, + { + "userId": "user-1", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/documents/" + }, + { + "userId": "user-8", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/important/" + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/document.pdf", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "d31ad19c-860e-40d7-b798-2aeecad10120" + }, + "location": "important/documents/presentation.ppt" + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "35083c31-6b7c-43c3-9521-b256d529fb33" + }, + "location": "documents/document.pdf" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "12e680c3-22ce-469f-b62a-2bc37b194134" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/", + "result": { + "dirContent": [ + "home/balance.xlsx" + ] + } + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "presentation.ppt", + "home/file.txt" + ] + } + }, + { + "userId": "user-3", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/documents/presentation.ppt", + "result": { + "content": { + "id": "35083c31-6b7c-43c3-9521-b256d529fb33" + } + } + }, + { + "userId": "user-5", + "type": "READ", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "content": { + "id": "12e680c3-22ce-469f-b62a-2bc37b194134" + } + } + }, + { + "userId": "user-4", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/home/document.pdf", + "result": { + "content": { + "id": "35083c31-6b7c-43c3-9521-b256d529fb33" + } + } + }, + { + "userId": "user-7", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/" + }, + { + "userId": "user-3", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/documents/" + }, + { + "userId": "user-2", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-8", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/documents/" + }, + { + "userId": "user-8", + "type": "READ", + "storageType": "PRIVATE", + "location": "document.pdf", + "result": { + "content": { + "id": "75cc14ad-8345-44b7-8a11-ad2cebc501c6" + } + } + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "35083c31-6b7c-43c3-9521-b256d529fb33" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "35083c31-6b7c-43c3-9521-b256d529fb33" + }, + "location": "home/documents/document.pdf" + }, + { + "userId": "user-6", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "12e680c3-22ce-469f-b62a-2bc37b194134" + }, + "location": "documents/important/file.txt" + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "d31ad19c-860e-40d7-b798-2aeecad10120" + }, + "location": "important/presentation.ppt" + }, + { + "userId": "user-0", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/file.txt", + "result": { + "content": { + "id": "7d315536-f793-45d5-a309-81c1e03545d8" + } + } + }, + { + "userId": "user-8", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "58326dc1-27c9-4ec7-884a-045db4a3b8de" + }, + "location": "home/balance.xlsx" + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/home/document.pdf", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-9", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-6", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "77d01c9c-4631-4e07-9d9a-4cc1fdbc1a67" + }, + "location": "document.pdf" + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/balance.xlsx", + "result": { + "dirContent": [ + "home/balance.xlsx" + ] + } + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/presentation.ppt", + "result": { + "dirContent": [ + "important/presentation.ppt" + ] + } + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-8", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/" + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "69900fe6-5fdd-4933-826f-49190e9d4b2b" + }, + "location": "important/presentation.ppt" + }, + { + "userId": "user-4", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/home/" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "2beec6d8-e1f6-4480-9303-e8201399b0b8" + }, + "location": "documents/home/presentation.ppt" + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "file.txt", + "result": { + "dirContent": [ + "file.txt" + ] + } + }, + { + "userId": "user-0", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/" + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/balance.xlsx", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "2beec6d8-e1f6-4480-9303-e8201399b0b8" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "d649d9c4-ecc9-410a-b6f8-3510710eb368" + }, + "location": "home/balance.xlsx" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7d315536-f793-45d5-a309-81c1e03545d8" + }, + "location": "documents/document.pdf" + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "document.pdf", + "documents/documents/document.pdf", + "home/documents/document.pdf", + "home/important/document.pdf", + "balance.xlsx" + ] + } + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "presentation.ppt" + ] + } + }, + { + "userId": "user-8", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/presentation.ppt", + "result": { + "content": { + "id": "69900fe6-5fdd-4933-826f-49190e9d4b2b" + } + } + }, + { + "userId": "user-0", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/presentation.ppt", + "result": { + "content": { + "id": "d31ad19c-860e-40d7-b798-2aeecad10120" + } + } + }, + { + "userId": "user-7", + "type": "READ", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "content": { + "id": "2beec6d8-e1f6-4480-9303-e8201399b0b8" + } + } + }, + { + "userId": "user-5", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-7", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "69900fe6-5fdd-4933-826f-49190e9d4b2b" + }, + "location": "home/documents/balance.xlsx" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "69900fe6-5fdd-4933-826f-49190e9d4b2b" + }, + "location": "document.pdf" + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7d315536-f793-45d5-a309-81c1e03545d8" + }, + "location": "home/file.txt" + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/document.pdf", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-3", + "type": "READ", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "content": { + "id": "35083c31-6b7c-43c3-9521-b256d529fb33" + } + } + }, + { + "userId": "user-4", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/document.pdf", + "result": { + "content": { + "id": "7d315536-f793-45d5-a309-81c1e03545d8" + } + } + }, + { + "userId": "user-7", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/documents/balance.xlsx", + "result": { + "content": { + "id": "69900fe6-5fdd-4933-826f-49190e9d4b2b" + } + } + }, + { + "userId": "user-7", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/documents/" + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "69900fe6-5fdd-4933-826f-49190e9d4b2b" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-5", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "d31ad19c-860e-40d7-b798-2aeecad10120" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7d315536-f793-45d5-a309-81c1e03545d8" + }, + "location": "important/balance.xlsx" + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/file.txt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/documents/presentation.ppt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "file.txt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-0", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/presentation.ppt", + "result": { + "content": { + "id": "d31ad19c-860e-40d7-b798-2aeecad10120" + } + } + }, + { + "userId": "user-8", + "type": "READ", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "content": { + "id": "d31ad19c-860e-40d7-b798-2aeecad10120" + } + } + }, + { + "userId": "user-4", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/home/" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "75cc14ad-8345-44b7-8a11-ad2cebc501c6" + }, + "location": "document.pdf" + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7d315536-f793-45d5-a309-81c1e03545d8" + }, + "location": "home/important/file.txt" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7d315536-f793-45d5-a309-81c1e03545d8" + }, + "location": "home/home/presentation.ppt" + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/presentation.ppt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "dirContent": [ + "presentation.ppt" + ] + } + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/file.txt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-4", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/document.pdf", + "result": { + "content": { + "id": "7d315536-f793-45d5-a309-81c1e03545d8" + } + } + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "d31ad19c-860e-40d7-b798-2aeecad10120" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "35083c31-6b7c-43c3-9521-b256d529fb33" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "d31ad19c-860e-40d7-b798-2aeecad10120" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-2", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "d31ad19c-860e-40d7-b798-2aeecad10120" + }, + "location": "file.txt" + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/presentation.ppt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "dirContent": [ + "presentation.ppt" + ] + } + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "balance.xlsx" + ] + } + }, + { + "userId": "user-2", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7d315536-f793-45d5-a309-81c1e03545d8" + }, + "location": "document.pdf" + }, + { + "userId": "user-6", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "58326dc1-27c9-4ec7-884a-045db4a3b8de" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "important/presentation.ppt", + "home/balance.xlsx", + "balance.xlsx" + ] + } + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "home/home/presentation.ppt", + "balance.xlsx" + ] + } + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "dirContent": [ + "balance.xlsx" + ] + } + }, + { + "userId": "user-4", + "type": "READ", + "storageType": "PRIVATE", + "location": "file.txt", + "result": { + "content": { + "id": "2beec6d8-e1f6-4480-9303-e8201399b0b8" + } + } + }, + { + "userId": "user-5", + "type": "READ", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "content": { + "id": "35083c31-6b7c-43c3-9521-b256d529fb33" + } + } + }, + { + "userId": "user-0", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/important/" + }, + { + "userId": "user-0", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/file.txt", + "result": { + "content": { + "id": "7d315536-f793-45d5-a309-81c1e03545d8" + } + } + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "d31ad19c-860e-40d7-b798-2aeecad10120" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "d31ad19c-860e-40d7-b798-2aeecad10120" + }, + "location": "home/documents/document.pdf" + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "document.pdf", + "balance.xlsx" + ] + } + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/home/file.txt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "balance.xlsx" + ] + } + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/", + "result": { + "dirContent": [ + "home/home/presentation.ppt", + "home/documents/document.pdf" + ] + } + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/document.pdf", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-6", + "type": "READ", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "content": { + "id": "58326dc1-27c9-4ec7-884a-045db4a3b8de" + } + } + }, + { + "userId": "user-1", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/home/presentation.ppt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/file.txt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-3", + "type": "READ", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "content": { + "id": "35083c31-6b7c-43c3-9521-b256d529fb33" + } + } + }, + { + "userId": "user-4", + "type": "READ", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "content": { + "id": "12e680c3-22ce-469f-b62a-2bc37b194134" + } + } + }, + { + "userId": "user-8", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/" + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "d31ad19c-860e-40d7-b798-2aeecad10120" + }, + "location": "home/presentation.ppt" + }, + { + "userId": "user-0", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/" + }, + { + "userId": "user-0", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/presentation.ppt", + "result": { + "content": { + "id": "d31ad19c-860e-40d7-b798-2aeecad10120" + } + } + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "d31ad19c-860e-40d7-b798-2aeecad10120" + }, + "location": "home/home/file.txt" + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "document.pdf", + "balance.xlsx" + ] + } + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "document.pdf", + "presentation.ppt", + "documents/document.pdf", + "file.txt" + ] + } + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "dirContent": [ + "balance.xlsx" + ] + } + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "important/presentation.ppt", + "presentation.ppt" + ] + } + }, + { + "userId": "user-8", + "type": "READ", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "content": { + "id": "d31ad19c-860e-40d7-b798-2aeecad10120" + } + } + }, + { + "userId": "user-6", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-0", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-6", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "2beec6d8-e1f6-4480-9303-e8201399b0b8" + }, + "location": "document.pdf" + }, + { + "userId": "user-2", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7d315536-f793-45d5-a309-81c1e03545d8" + }, + "location": "file.txt" + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "document.pdf", + "balance.xlsx" + ] + } + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/balance.xlsx", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "document.pdf", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "file.txt" + ] + } + }, + { + "userId": "user-7", + "type": "READ", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "content": { + "id": "69900fe6-5fdd-4933-826f-49190e9d4b2b" + } + } + }, + { + "userId": "user-4", + "type": "READ", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "content": { + "id": "12e680c3-22ce-469f-b62a-2bc37b194134" + } + } + }, + { + "userId": "user-5", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "58326dc1-27c9-4ec7-884a-045db4a3b8de" + }, + "location": "home/file.txt" + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "69900fe6-5fdd-4933-826f-49190e9d4b2b" + }, + "location": "home/documents/balance.xlsx" + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/presentation.ppt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "document.pdf", + "home/file.txt", + "balance.xlsx" + ] + } + }, + { + "userId": "user-7", + "type": "READ", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "content": { + "id": "69900fe6-5fdd-4933-826f-49190e9d4b2b" + } + } + }, + { + "userId": "user-7", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-3", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/documents/" + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "12e680c3-22ce-469f-b62a-2bc37b194134" + }, + "location": "home/documents/presentation.ppt" + }, + { + "userId": "user-3", + "type": "READ", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "content": { + "id": "35083c31-6b7c-43c3-9521-b256d529fb33" + } + } + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/documents/document.pdf", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-2", + "type": "READ", + "storageType": "PRIVATE", + "location": "file.txt", + "result": { + "content": { + "id": "7d315536-f793-45d5-a309-81c1e03545d8" + } + } + }, + { + "userId": "user-2", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7d315536-f793-45d5-a309-81c1e03545d8" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-8", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/presentation.ppt", + "result": { + "content": { + "id": "d31ad19c-860e-40d7-b798-2aeecad10120" + } + } + }, + { + "userId": "user-4", + "type": "READ", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "content": { + "id": "12e680c3-22ce-469f-b62a-2bc37b194134" + } + } + }, + { + "userId": "user-6", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "2beec6d8-e1f6-4480-9303-e8201399b0b8" + }, + "location": "file.txt" + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/documents/", + "result": { + "dirContent": [ + "home/documents/presentation.ppt" + ] + } + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/important/file.txt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-6", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "35083c31-6b7c-43c3-9521-b256d529fb33" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-2", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "12e680c3-22ce-469f-b62a-2bc37b194134" + }, + "location": "home/documents/document.pdf" + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "home/presentation.ppt", + "important/presentation.ppt", + "presentation.ppt", + "home/home/file.txt", + "balance.xlsx" + ] + } + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/documents/balance.xlsx", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "dirContent": [ + "balance.xlsx" + ] + } + }, + { + "userId": "user-9", + "type": "READ", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "content": { + "id": "35083c31-6b7c-43c3-9521-b256d529fb33" + } + } + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7d315536-f793-45d5-a309-81c1e03545d8" + }, + "location": "important/home/document.pdf" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "75cc14ad-8345-44b7-8a11-ad2cebc501c6" + }, + "location": "important/important/document.pdf" + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7d315536-f793-45d5-a309-81c1e03545d8" + }, + "location": "home/document.pdf" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "d649d9c4-ecc9-410a-b6f8-3510710eb368" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "file.txt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-3", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/balance.xlsx", + "result": { + "content": { + "id": "7d315536-f793-45d5-a309-81c1e03545d8" + } + } + }, + { + "userId": "user-4", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/document.pdf", + "result": { + "content": { + "id": "7d315536-f793-45d5-a309-81c1e03545d8" + } + } + }, + { + "userId": "user-1", + "type": "READ", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "content": { + "id": "d649d9c4-ecc9-410a-b6f8-3510710eb368" + } + } + }, + { + "userId": "user-5", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/important/" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "35083c31-6b7c-43c3-9521-b256d529fb33" + }, + "location": "home/balance.xlsx" + }, + { + "userId": "user-1", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "2beec6d8-e1f6-4480-9303-e8201399b0b8" + }, + "location": "documents/presentation.ppt" + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "d649d9c4-ecc9-410a-b6f8-3510710eb368" + }, + "location": "home/file.txt" + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "75cc14ad-8345-44b7-8a11-ad2cebc501c6" + }, + "location": "home/documents/document.pdf" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "58326dc1-27c9-4ec7-884a-045db4a3b8de" + }, + "location": "home/file.txt" + }, + { + "userId": "user-2", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "58326dc1-27c9-4ec7-884a-045db4a3b8de" + }, + "location": "document.pdf" + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/balance.xlsx", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "75cc14ad-8345-44b7-8a11-ad2cebc501c6" + }, + "location": "home/document.pdf" + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "12e680c3-22ce-469f-b62a-2bc37b194134" + }, + "location": "document.pdf" + }, + { + "userId": "user-2", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "d31ad19c-860e-40d7-b798-2aeecad10120" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "document.pdf", + "presentation.ppt", + "documents/document.pdf", + "file.txt" + ] + } + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/balance.xlsx", + "result": { + "dirContent": [ + "home/balance.xlsx" + ] + } + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "document.pdf", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-3", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/home/document.pdf", + "result": { + "content": { + "id": "7d315536-f793-45d5-a309-81c1e03545d8" + } + } + }, + { + "userId": "user-4", + "type": "READ", + "storageType": "PRIVATE", + "location": "file.txt", + "result": { + "content": { + "id": "2beec6d8-e1f6-4480-9303-e8201399b0b8" + } + } + }, + { + "userId": "user-8", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/" + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "home/presentation.ppt", + "documents/presentation.ppt", + "presentation.ppt", + "home/home/file.txt", + "balance.xlsx" + ] + } + }, + { + "userId": "user-9", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/" + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "balance.xlsx" + ] + } + }, + { + "userId": "user-0", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/documents/" + }, + { + "userId": "user-0", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/document.pdf", + "result": { + "content": { + "id": "7d315536-f793-45d5-a309-81c1e03545d8" + } + } + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "dirContent": [ + "balance.xlsx" + ] + } + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/file.txt", + "result": { + "dirContent": [ + "home/file.txt" + ] + } + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/important/file.txt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "document.pdf", + "home/documents/document.pdf", + "file.txt", + "balance.xlsx" + ] + } + }, + { + "userId": "user-3", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/home/document.pdf", + "result": { + "content": { + "id": "7d315536-f793-45d5-a309-81c1e03545d8" + } + } + }, + { + "userId": "user-0", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/document.pdf", + "result": { + "content": { + "id": "7d315536-f793-45d5-a309-81c1e03545d8" + } + } + }, + { + "userId": "user-2", + "type": "READ", + "storageType": "PRIVATE", + "location": "document.pdf", + "result": { + "content": { + "id": "58326dc1-27c9-4ec7-884a-045db4a3b8de" + } + } + }, + { + "userId": "user-8", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-3", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-4", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "77d01c9c-4631-4e07-9d9a-4cc1fdbc1a67" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "69900fe6-5fdd-4933-826f-49190e9d4b2b" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/important/balance.xlsx", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "presentation.ppt", + "home/file.txt" + ] + } + }, + { + "userId": "user-9", + "type": "READ", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "content": { + "id": "35083c31-6b7c-43c3-9521-b256d529fb33" + } + } + }, + { + "userId": "user-5", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/balance.xlsx", + "result": { + "content": { + "id": "35083c31-6b7c-43c3-9521-b256d529fb33" + } + } + }, + { + "userId": "user-2", + "type": "READ", + "storageType": "PRIVATE", + "location": "file.txt", + "result": { + "content": { + "id": "7d315536-f793-45d5-a309-81c1e03545d8" + } + } + }, + { + "userId": "user-2", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-2", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "75cc14ad-8345-44b7-8a11-ad2cebc501c6" + }, + "location": "home/documents/presentation.ppt" + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/documents/", + "result": { + "dirContent": [ + "home/documents/presentation.ppt" + ] + } + }, + { + "userId": "user-0", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-2", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/documents/" + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7d315536-f793-45d5-a309-81c1e03545d8" + }, + "location": "documents/documents/document.pdf" + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/home/balance.xlsx", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/home/file.txt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/", + "result": { + "dirContent": [ + "home/file.txt" + ] + } + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/documents/", + "result": { + "dirContent": [ + "documents/documents/document.pdf" + ] + } + }, + { + "userId": "user-9", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "2beec6d8-e1f6-4480-9303-e8201399b0b8" + }, + "location": "home/document.pdf" + }, + { + "userId": "user-2", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "35083c31-6b7c-43c3-9521-b256d529fb33" + }, + "location": "documents/document.pdf" + }, + { + "userId": "user-5", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/" + }, + { + "userId": "user-2", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/" + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "58326dc1-27c9-4ec7-884a-045db4a3b8de" + }, + "location": "home/home/file.txt" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "69900fe6-5fdd-4933-826f-49190e9d4b2b" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "35083c31-6b7c-43c3-9521-b256d529fb33" + }, + "location": "important/document.pdf" + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/", + "result": { + "dirContent": [ + "home/document.pdf", + "home/home/file.txt" + ] + } + }, + { + "userId": "user-0", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/documents/document.pdf", + "result": { + "content": { + "id": "7d315536-f793-45d5-a309-81c1e03545d8" + } + } + }, + { + "userId": "user-1", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "d649d9c4-ecc9-410a-b6f8-3510710eb368" + }, + "location": "file.txt" + }, + { + "userId": "user-1", + "type": "READ", + "storageType": "PRIVATE", + "location": "file.txt", + "result": { + "content": { + "id": "d649d9c4-ecc9-410a-b6f8-3510710eb368" + } + } + }, + { + "userId": "user-1", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/" + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/balance.xlsx", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-1", + "type": "READ", + "storageType": "PRIVATE", + "location": "file.txt", + "result": { + "content": { + "id": "d649d9c4-ecc9-410a-b6f8-3510710eb368" + } + } + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "75cc14ad-8345-44b7-8a11-ad2cebc501c6" + }, + "location": "document.pdf" + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7d315536-f793-45d5-a309-81c1e03545d8" + }, + "location": "important/file.txt" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7d315536-f793-45d5-a309-81c1e03545d8" + }, + "location": "documents/documents/document.pdf" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "58326dc1-27c9-4ec7-884a-045db4a3b8de" + }, + "location": "home/balance.xlsx" + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "file.txt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-0", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/documents/document.pdf", + "result": { + "content": { + "id": "7d315536-f793-45d5-a309-81c1e03545d8" + } + } + }, + { + "userId": "user-1", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/balance.xlsx", + "result": { + "content": { + "id": "58326dc1-27c9-4ec7-884a-045db4a3b8de" + } + } + }, + { + "userId": "user-0", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/documents/" + }, + { + "userId": "user-8", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-3", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/" + }, + { + "userId": "user-1", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7d315536-f793-45d5-a309-81c1e03545d8" + }, + "location": "home/file.txt" + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "home/file.txt" + ] + } + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "d31ad19c-860e-40d7-b798-2aeecad10120" + }, + "location": "home/file.txt" + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "75cc14ad-8345-44b7-8a11-ad2cebc501c6" + }, + "location": "documents/home/document.pdf" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "12e680c3-22ce-469f-b62a-2bc37b194134" + }, + "location": "important/home/presentation.ppt" + }, + { + "userId": "user-6", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "35083c31-6b7c-43c3-9521-b256d529fb33" + }, + "location": "file.txt" + }, + { + "userId": "user-9", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/home/file.txt", + "result": { + "content": { + "id": "58326dc1-27c9-4ec7-884a-045db4a3b8de" + } + } + }, + { + "userId": "user-4", + "type": "READ", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "content": { + "id": "69900fe6-5fdd-4933-826f-49190e9d4b2b" + } + } + }, + { + "userId": "user-7", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/file.txt", + "result": { + "content": { + "id": "d31ad19c-860e-40d7-b798-2aeecad10120" + } + } + }, + { + "userId": "user-8", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/home/document.pdf", + "result": { + "content": { + "id": "75cc14ad-8345-44b7-8a11-ad2cebc501c6" + } + } + }, + { + "userId": "user-9", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/home/" + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "d31ad19c-860e-40d7-b798-2aeecad10120" + }, + "location": "document.pdf" + }, + { + "userId": "user-8", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/home/" + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "58326dc1-27c9-4ec7-884a-045db4a3b8de" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-5", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/home/" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7d315536-f793-45d5-a309-81c1e03545d8" + }, + "location": "document.pdf" + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "document.pdf" + ] + } + }, + { + "userId": "user-8", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7d315536-f793-45d5-a309-81c1e03545d8" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "69900fe6-5fdd-4933-826f-49190e9d4b2b" + }, + "location": "home/document.pdf" + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "58326dc1-27c9-4ec7-884a-045db4a3b8de" + }, + "location": "important/home/presentation.ppt" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "12e680c3-22ce-469f-b62a-2bc37b194134" + }, + "location": "documents/presentation.ppt" + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/home/file.txt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/", + "result": { + "dirContent": [ + "home/document.pdf" + ] + } + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/presentation.ppt", + "result": { + "dirContent": [ + "documents/presentation.ppt" + ] + } + }, + { + "userId": "user-9", + "type": "READ", + "storageType": "PRIVATE", + "location": "document.pdf", + "result": { + "content": { + "id": "d31ad19c-860e-40d7-b798-2aeecad10120" + } + } + }, + { + "userId": "user-1", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/file.txt", + "result": { + "content": { + "id": "7d315536-f793-45d5-a309-81c1e03545d8" + } + } + }, + { + "userId": "user-8", + "type": "READ", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "content": { + "id": "7d315536-f793-45d5-a309-81c1e03545d8" + } + } + }, + { + "userId": "user-7", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "58326dc1-27c9-4ec7-884a-045db4a3b8de" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "58326dc1-27c9-4ec7-884a-045db4a3b8de" + }, + "location": "home/important/balance.xlsx" + }, + { + "userId": "user-0", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/home/presentation.ppt", + "result": { + "content": { + "id": "58326dc1-27c9-4ec7-884a-045db4a3b8de" + } + } + }, + { + "userId": "user-1", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/file.txt", + "result": { + "content": { + "id": "7d315536-f793-45d5-a309-81c1e03545d8" + } + } + }, + { + "userId": "user-8", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-9", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-5", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-6", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "77d01c9c-4631-4e07-9d9a-4cc1fdbc1a67" + }, + "location": "file.txt" + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "12e680c3-22ce-469f-b62a-2bc37b194134" + }, + "location": "important/important/presentation.ppt" + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/home/file.txt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "file.txt" + ] + } + }, + { + "userId": "user-1", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/presentation.ppt", + "result": { + "content": { + "id": "12e680c3-22ce-469f-b62a-2bc37b194134" + } + } + }, + { + "userId": "user-5", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "35083c31-6b7c-43c3-9521-b256d529fb33" + }, + "location": "home/file.txt" + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "69900fe6-5fdd-4933-826f-49190e9d4b2b" + }, + "location": "file.txt" + }, + { + "userId": "user-6", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "77d01c9c-4631-4e07-9d9a-4cc1fdbc1a67" + }, + "location": "documents/home/presentation.ppt" + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/documents/document.pdf", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/presentation.ppt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/documents/document.pdf", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-1", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/important/balance.xlsx", + "result": { + "content": { + "id": "58326dc1-27c9-4ec7-884a-045db4a3b8de" + } + } + }, + { + "userId": "user-6", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/home/presentation.ppt", + "result": { + "content": { + "id": "77d01c9c-4631-4e07-9d9a-4cc1fdbc1a67" + } + } + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "77d01c9c-4631-4e07-9d9a-4cc1fdbc1a67" + }, + "location": "document.pdf" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "2beec6d8-e1f6-4480-9303-e8201399b0b8" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "home/file.txt" + ] + } + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/balance.xlsx", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-7", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/file.txt", + "result": { + "content": { + "id": "35083c31-6b7c-43c3-9521-b256d529fb33" + } + } + }, + { + "userId": "user-6", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/home/presentation.ppt", + "result": { + "content": { + "id": "77d01c9c-4631-4e07-9d9a-4cc1fdbc1a67" + } + } + }, + { + "userId": "user-4", + "type": "READ", + "storageType": "PRIVATE", + "location": "document.pdf", + "result": { + "content": { + "id": "77d01c9c-4631-4e07-9d9a-4cc1fdbc1a67" + } + } + }, + { + "userId": "user-5", + "type": "READ", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "content": { + "id": "2beec6d8-e1f6-4480-9303-e8201399b0b8" + } + } + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "2beec6d8-e1f6-4480-9303-e8201399b0b8" + }, + "location": "important/documents/presentation.ppt" + }, + { + "userId": "user-2", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "12e680c3-22ce-469f-b62a-2bc37b194134" + }, + "location": "home/documents/document.pdf" + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/important/presentation.ppt", + "result": { + "dirContent": [ + "important/important/presentation.ppt" + ] + } + }, + { + "userId": "user-0", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/home/presentation.ppt", + "result": { + "content": { + "id": "58326dc1-27c9-4ec7-884a-045db4a3b8de" + } + } + }, + { + "userId": "user-7", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/documents/presentation.ppt", + "result": { + "content": { + "id": "2beec6d8-e1f6-4480-9303-e8201399b0b8" + } + } + }, + { + "userId": "user-2", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/documents/document.pdf", + "result": { + "content": { + "id": "12e680c3-22ce-469f-b62a-2bc37b194134" + } + } + }, + { + "userId": "user-3", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/" + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "file.txt" + ] + } + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "d31ad19c-860e-40d7-b798-2aeecad10120" + }, + "location": "important/document.pdf" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "75cc14ad-8345-44b7-8a11-ad2cebc501c6" + }, + "location": "document.pdf" + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/balance.xlsx", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/home/presentation.ppt", + "result": { + "dirContent": [ + "important/home/presentation.ppt" + ] + } + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/documents/document.pdf", + "result": { + "dirContent": [ + "home/documents/document.pdf" + ] + } + }, + { + "userId": "user-0", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/home/presentation.ppt", + "result": { + "content": { + "id": "58326dc1-27c9-4ec7-884a-045db4a3b8de" + } + } + }, + { + "userId": "user-5", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-6", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/home/" + }, + { + "userId": "user-2", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/documents/" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "d649d9c4-ecc9-410a-b6f8-3510710eb368" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "35083c31-6b7c-43c3-9521-b256d529fb33" + }, + "location": "important/presentation.ppt" + }, + { + "userId": "user-6", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "58326dc1-27c9-4ec7-884a-045db4a3b8de" + }, + "location": "file.txt" + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "file.txt" + ] + } + }, + { + "userId": "user-5", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/presentation.ppt", + "result": { + "content": { + "id": "35083c31-6b7c-43c3-9521-b256d529fb33" + } + } + }, + { + "userId": "user-6", + "type": "READ", + "storageType": "PRIVATE", + "location": "file.txt", + "result": { + "content": { + "id": "58326dc1-27c9-4ec7-884a-045db4a3b8de" + } + } + }, + { + "userId": "user-1", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "12e680c3-22ce-469f-b62a-2bc37b194134" + }, + "location": "documents/documents/document.pdf" + }, + { + "userId": "user-5", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/" + }, + { + "userId": "user-6", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-1", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/documents/" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "35083c31-6b7c-43c3-9521-b256d529fb33" + }, + "location": "documents/documents/balance.xlsx" + }, + { + "userId": "user-2", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "2beec6d8-e1f6-4480-9303-e8201399b0b8" + }, + "location": "important/home/presentation.ppt" + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "file.txt" + ] + } + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-6", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "77d01c9c-4631-4e07-9d9a-4cc1fdbc1a67" + }, + "location": "important/document.pdf" + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "d649d9c4-ecc9-410a-b6f8-3510710eb368" + }, + "location": "home/important/presentation.ppt" + }, + { + "userId": "user-3", + "type": "READ", + "storageType": "PRIVATE", + "location": "file.txt", + "result": { + "content": { + "id": "69900fe6-5fdd-4933-826f-49190e9d4b2b" + } + } + }, + { + "userId": "user-4", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/documents/balance.xlsx", + "result": { + "content": { + "id": "35083c31-6b7c-43c3-9521-b256d529fb33" + } + } + }, + { + "userId": "user-6", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/document.pdf", + "result": { + "content": { + "id": "77d01c9c-4631-4e07-9d9a-4cc1fdbc1a67" + } + } + }, + { + "userId": "user-4", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-0", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/important/" + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/file.txt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7d315536-f793-45d5-a309-81c1e03545d8" + }, + "location": "home/important/document.pdf" + }, + { + "userId": "user-6", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "58326dc1-27c9-4ec7-884a-045db4a3b8de" + }, + "location": "file.txt" + }, + { + "userId": "user-2", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "58326dc1-27c9-4ec7-884a-045db4a3b8de" + }, + "location": "file.txt" + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/presentation.ppt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/home/presentation.ppt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-3", + "type": "READ", + "storageType": "PRIVATE", + "location": "file.txt", + "result": { + "content": { + "id": "69900fe6-5fdd-4933-826f-49190e9d4b2b" + } + } + }, + { + "userId": "user-2", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/home/presentation.ppt", + "result": { + "content": { + "id": "2beec6d8-e1f6-4480-9303-e8201399b0b8" + } + } + }, + { + "userId": "user-3", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-4", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/important/" + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/home/balance.xlsx", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "75cc14ad-8345-44b7-8a11-ad2cebc501c6" + }, + "location": "important/documents/document.pdf" + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7d315536-f793-45d5-a309-81c1e03545d8" + }, + "location": "important/file.txt" + }, + { + "userId": "user-6", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "d31ad19c-860e-40d7-b798-2aeecad10120" + }, + "location": "important/balance.xlsx" + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/documents/file.txt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "documents/presentation.ppt" + ] + } + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "file.txt", + "important/home/presentation.ppt" + ] + } + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "important/documents/document.pdf" + ] + } + }, + { + "userId": "user-0", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/home/presentation.ppt", + "result": { + "content": { + "id": "58326dc1-27c9-4ec7-884a-045db4a3b8de" + } + } + }, + { + "userId": "user-9", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/file.txt", + "result": { + "content": { + "id": "7d315536-f793-45d5-a309-81c1e03545d8" + } + } + }, + { + "userId": "user-6", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/document.pdf", + "result": { + "content": { + "id": "77d01c9c-4631-4e07-9d9a-4cc1fdbc1a67" + } + } + }, + { + "userId": "user-0", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/important/" + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "69900fe6-5fdd-4933-826f-49190e9d4b2b" + }, + "location": "home/documents/document.pdf" + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/documents/", + "result": { + "dirContent": [ + "home/documents/document.pdf" + ] + } + }, + { + "userId": "user-0", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/documents/document.pdf", + "result": { + "content": { + "id": "69900fe6-5fdd-4933-826f-49190e9d4b2b" + } + } + }, + { + "userId": "user-2", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/home/" + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "file.txt" + ] + } + }, + { + "userId": "user-8", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/documents/" + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "58326dc1-27c9-4ec7-884a-045db4a3b8de" + }, + "location": "document.pdf" + }, + { + "userId": "user-8", + "type": "READ", + "storageType": "PRIVATE", + "location": "document.pdf", + "result": { + "content": { + "id": "58326dc1-27c9-4ec7-884a-045db4a3b8de" + } + } + }, + { + "userId": "user-6", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/" + }, + { + "userId": "user-6", + "type": "READ", + "storageType": "PRIVATE", + "location": "file.txt", + "result": { + "content": { + "id": "58326dc1-27c9-4ec7-884a-045db4a3b8de" + } + } + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "35083c31-6b7c-43c3-9521-b256d529fb33" + }, + "location": "important/file.txt" + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "58326dc1-27c9-4ec7-884a-045db4a3b8de" + }, + "location": "documents/file.txt" + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "69900fe6-5fdd-4933-826f-49190e9d4b2b" + }, + "location": "home/balance.xlsx" + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "75cc14ad-8345-44b7-8a11-ad2cebc501c6" + }, + "location": "document.pdf" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "75cc14ad-8345-44b7-8a11-ad2cebc501c6" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "document.pdf", + "documents/file.txt" + ] + } + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "document.pdf" + ] + } + }, + { + "userId": "user-0", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/home/presentation.ppt", + "result": { + "content": { + "id": "58326dc1-27c9-4ec7-884a-045db4a3b8de" + } + } + }, + { + "userId": "user-1", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/presentation.ppt", + "result": { + "content": { + "id": "12e680c3-22ce-469f-b62a-2bc37b194134" + } + } + }, + { + "userId": "user-0", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/documents/" + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7d315536-f793-45d5-a309-81c1e03545d8" + }, + "location": "home/important/presentation.ppt" + }, + { + "userId": "user-2", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-8", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "d31ad19c-860e-40d7-b798-2aeecad10120" + }, + "location": "home/presentation.ppt" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "d31ad19c-860e-40d7-b798-2aeecad10120" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "document.pdf" + ] + } + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-8", + "type": "READ", + "storageType": "PRIVATE", + "location": "document.pdf", + "result": { + "content": { + "id": "58326dc1-27c9-4ec7-884a-045db4a3b8de" + } + } + }, + { + "userId": "user-9", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/balance.xlsx", + "result": { + "content": { + "id": "69900fe6-5fdd-4933-826f-49190e9d4b2b" + } + } + }, + { + "userId": "user-1", + "type": "READ", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "content": { + "id": "75cc14ad-8345-44b7-8a11-ad2cebc501c6" + } + } + }, + { + "userId": "user-9", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/" + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "69900fe6-5fdd-4933-826f-49190e9d4b2b" + }, + "location": "documents/important/document.pdf" + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/important/document.pdf", + "result": { + "dirContent": [ + "documents/important/document.pdf" + ] + } + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "d31ad19c-860e-40d7-b798-2aeecad10120" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "12e680c3-22ce-469f-b62a-2bc37b194134" + }, + "location": "documents/documents/presentation.ppt" + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "balance.xlsx" + ] + } + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/documents/file.txt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-6", + "type": "READ", + "storageType": "PRIVATE", + "location": "file.txt", + "result": { + "content": { + "id": "58326dc1-27c9-4ec7-884a-045db4a3b8de" + } + } + }, + { + "userId": "user-1", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/presentation.ppt", + "result": { + "content": { + "id": "12e680c3-22ce-469f-b62a-2bc37b194134" + } + } + }, + { + "userId": "user-7", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/documents/" + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "35083c31-6b7c-43c3-9521-b256d529fb33" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-9", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/" + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "35083c31-6b7c-43c3-9521-b256d529fb33" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-9", + "type": "READ", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "content": { + "id": "35083c31-6b7c-43c3-9521-b256d529fb33" + } + } + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "35083c31-6b7c-43c3-9521-b256d529fb33" + }, + "location": "important/file.txt" + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "d31ad19c-860e-40d7-b798-2aeecad10120" + }, + "location": "home/document.pdf" + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "d649d9c4-ecc9-410a-b6f8-3510710eb368" + }, + "location": "important/balance.xlsx" + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "dirContent": [ + "presentation.ppt" + ] + } + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/file.txt", + "result": { + "dirContent": [ + "home/file.txt" + ] + } + }, + { + "userId": "user-8", + "type": "READ", + "storageType": "PRIVATE", + "location": "document.pdf", + "result": { + "content": { + "id": "58326dc1-27c9-4ec7-884a-045db4a3b8de" + } + } + }, + { + "userId": "user-0", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/home/presentation.ppt", + "result": { + "content": { + "id": "58326dc1-27c9-4ec7-884a-045db4a3b8de" + } + } + }, + { + "userId": "user-5", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-6", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-6", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "35083c31-6b7c-43c3-9521-b256d529fb33" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "35083c31-6b7c-43c3-9521-b256d529fb33" + }, + "location": "important/file.txt" + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/", + "result": { + "dirContent": [ + "important/balance.xlsx" + ] + } + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-7", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/file.txt", + "result": { + "content": { + "id": "35083c31-6b7c-43c3-9521-b256d529fb33" + } + } + }, + { + "userId": "user-3", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/balance.xlsx", + "result": { + "content": { + "id": "d649d9c4-ecc9-410a-b6f8-3510710eb368" + } + } + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "75cc14ad-8345-44b7-8a11-ad2cebc501c6" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "documents/important/document.pdf", + "home/document.pdf", + "presentation.ppt", + "balance.xlsx" + ] + } + }, + { + "userId": "user-7", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/" + }, + { + "userId": "user-3", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-6", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-6", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "12e680c3-22ce-469f-b62a-2bc37b194134" + }, + "location": "home/document.pdf" + }, + { + "userId": "user-1", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/" + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "58326dc1-27c9-4ec7-884a-045db4a3b8de" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "69900fe6-5fdd-4933-826f-49190e9d4b2b" + }, + "location": "documents/documents/balance.xlsx" + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "dirContent": [ + "balance.xlsx" + ] + } + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/documents/file.txt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-7", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/file.txt", + "result": { + "content": { + "id": "35083c31-6b7c-43c3-9521-b256d529fb33" + } + } + }, + { + "userId": "user-4", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/presentation.ppt", + "result": { + "content": { + "id": "d31ad19c-860e-40d7-b798-2aeecad10120" + } + } + }, + { + "userId": "user-6", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/document.pdf", + "result": { + "content": { + "id": "12e680c3-22ce-469f-b62a-2bc37b194134" + } + } + }, + { + "userId": "user-0", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/home/presentation.ppt", + "result": { + "content": { + "id": "58326dc1-27c9-4ec7-884a-045db4a3b8de" + } + } + }, + { + "userId": "user-1", + "type": "READ", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "content": { + "id": "75cc14ad-8345-44b7-8a11-ad2cebc501c6" + } + } + }, + { + "userId": "user-4", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "d31ad19c-860e-40d7-b798-2aeecad10120" + }, + "location": "home/balance.xlsx" + }, + { + "userId": "user-0", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/important/" + }, + { + "userId": "user-3", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "2beec6d8-e1f6-4480-9303-e8201399b0b8" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/file.txt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "important/home/presentation.ppt" + ] + } + }, + { + "userId": "user-9", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/important/" + }, + { + "userId": "user-1", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "d31ad19c-860e-40d7-b798-2aeecad10120" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-6", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "58326dc1-27c9-4ec7-884a-045db4a3b8de" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7d315536-f793-45d5-a309-81c1e03545d8" + }, + "location": "important/presentation.ppt" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "d649d9c4-ecc9-410a-b6f8-3510710eb368" + }, + "location": "documents/file.txt" + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/documents/", + "result": { + "dirContent": [ + "documents/documents/balance.xlsx" + ] + } + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/", + "result": { + "dirContent": [ + "important/presentation.ppt", + "important/home/presentation.ppt" + ] + } + }, + { + "userId": "user-8", + "type": "READ", + "storageType": "PRIVATE", + "location": "document.pdf", + "result": { + "content": { + "id": "58326dc1-27c9-4ec7-884a-045db4a3b8de" + } + } + }, + { + "userId": "user-9", + "type": "READ", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "content": { + "id": "75cc14ad-8345-44b7-8a11-ad2cebc501c6" + } + } + }, + { + "userId": "user-8", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-4", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-5", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/documents/" + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "d649d9c4-ecc9-410a-b6f8-3510710eb368" + }, + "location": "file.txt" + }, + { + "userId": "user-2", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "58326dc1-27c9-4ec7-884a-045db4a3b8de" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "home/file.txt", + "balance.xlsx" + ] + } + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "dirContent": [ + "balance.xlsx" + ] + } + }, + { + "userId": "user-7", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/file.txt", + "result": { + "content": { + "id": "35083c31-6b7c-43c3-9521-b256d529fb33" + } + } + }, + { + "userId": "user-2", + "type": "READ", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "content": { + "id": "58326dc1-27c9-4ec7-884a-045db4a3b8de" + } + } + }, + { + "userId": "user-6", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/" + }, + { + "userId": "user-6", + "type": "READ", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "content": { + "id": "58326dc1-27c9-4ec7-884a-045db4a3b8de" + } + } + }, + { + "userId": "user-1", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "2beec6d8-e1f6-4480-9303-e8201399b0b8" + }, + "location": "important/presentation.ppt" + }, + { + "userId": "user-2", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-2", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "58326dc1-27c9-4ec7-884a-045db4a3b8de" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-2", + "type": "READ", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "content": { + "id": "58326dc1-27c9-4ec7-884a-045db4a3b8de" + } + } + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7d315536-f793-45d5-a309-81c1e03545d8" + }, + "location": "home/documents/balance.xlsx" + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "58326dc1-27c9-4ec7-884a-045db4a3b8de" + }, + "location": "file.txt" + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "d31ad19c-860e-40d7-b798-2aeecad10120" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "58326dc1-27c9-4ec7-884a-045db4a3b8de" + }, + "location": "important/balance.xlsx" + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "balance.xlsx" + ] + } + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/file.txt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/presentation.ppt", + "result": { + "dirContent": [ + "important/presentation.ppt" + ] + } + }, + { + "userId": "user-7", + "type": "READ", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "content": { + "id": "35083c31-6b7c-43c3-9521-b256d529fb33" + } + } + }, + { + "userId": "user-9", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/document.pdf", + "result": { + "content": { + "id": "d31ad19c-860e-40d7-b798-2aeecad10120" + } + } + }, + { + "userId": "user-1", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/presentation.ppt", + "result": { + "content": { + "id": "2beec6d8-e1f6-4480-9303-e8201399b0b8" + } + } + }, + { + "userId": "user-7", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/" + }, + { + "userId": "user-6", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-0", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/home/" + }, + { + "userId": "user-0", + "type": "READ", + "storageType": "PRIVATE", + "location": "file.txt", + "result": { + "content": { + "id": "d649d9c4-ecc9-410a-b6f8-3510710eb368" + } + } + }, + { + "userId": "user-9", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/documents/presentation.ppt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-3", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "77d01c9c-4631-4e07-9d9a-4cc1fdbc1a67" + }, + "location": "home/presentation.ppt" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "75cc14ad-8345-44b7-8a11-ad2cebc501c6" + }, + "location": "home/document.pdf" + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "file.txt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/document.pdf", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "important/balance.xlsx", + "home/document.pdf", + "important/presentation.ppt" + ] + } + }, + { + "userId": "user-0", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/" + }, + { + "userId": "user-2", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "file.txt" + ] + } + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/presentation.ppt", + "result": { + "dirContent": [ + "important/presentation.ppt" + ] + } + }, + { + "userId": "user-7", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/presentation.ppt", + "result": { + "content": { + "id": "77d01c9c-4631-4e07-9d9a-4cc1fdbc1a67" + } + } + }, + { + "userId": "user-8", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/documents/balance.xlsx", + "result": { + "content": { + "id": "7d315536-f793-45d5-a309-81c1e03545d8" + } + } + }, + { + "userId": "user-0", + "type": "READ", + "storageType": "PRIVATE", + "location": "file.txt", + "result": { + "content": { + "id": "d649d9c4-ecc9-410a-b6f8-3510710eb368" + } + } + }, + { + "userId": "user-1", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/presentation.ppt", + "result": { + "content": { + "id": "2beec6d8-e1f6-4480-9303-e8201399b0b8" + } + } + }, + { + "userId": "user-7", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "d649d9c4-ecc9-410a-b6f8-3510710eb368" + }, + "location": "important/balance.xlsx" + }, + { + "userId": "user-7", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/balance.xlsx", + "result": { + "content": { + "id": "d649d9c4-ecc9-410a-b6f8-3510710eb368" + } + } + }, + { + "userId": "user-8", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/documents/" + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "2beec6d8-e1f6-4480-9303-e8201399b0b8" + }, + "location": "home/presentation.ppt" + }, + { + "userId": "user-8", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/presentation.ppt", + "result": { + "content": { + "id": "2beec6d8-e1f6-4480-9303-e8201399b0b8" + } + } + }, + { + "userId": "user-8", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/" + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-2", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "12e680c3-22ce-469f-b62a-2bc37b194134" + }, + "location": "file.txt" + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/important/presentation.ppt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "file.txt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "75cc14ad-8345-44b7-8a11-ad2cebc501c6" + }, + "location": "home/file.txt" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "2beec6d8-e1f6-4480-9303-e8201399b0b8" + }, + "location": "documents/document.pdf" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "35083c31-6b7c-43c3-9521-b256d529fb33" + }, + "location": "documents/presentation.ppt" + }, + { + "userId": "user-2", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "75cc14ad-8345-44b7-8a11-ad2cebc501c6" + }, + "location": "document.pdf" + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/", + "result": { + "dirContent": [ + "important/balance.xlsx" + ] + } + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/presentation.ppt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/file.txt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-2", + "type": "READ", + "storageType": "PRIVATE", + "location": "document.pdf", + "result": { + "content": { + "id": "75cc14ad-8345-44b7-8a11-ad2cebc501c6" + } + } + }, + { + "userId": "user-1", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/document.pdf", + "result": { + "content": { + "id": "75cc14ad-8345-44b7-8a11-ad2cebc501c6" + } + } + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "58326dc1-27c9-4ec7-884a-045db4a3b8de" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "75cc14ad-8345-44b7-8a11-ad2cebc501c6" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/balance.xlsx", + "result": { + "dirContent": [ + "important/balance.xlsx" + ] + } + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "document.pdf", + "file.txt" + ] + } + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/important/presentation.ppt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-7", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/" + }, + { + "userId": "user-9", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/" + }, + { + "userId": "user-1", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "2beec6d8-e1f6-4480-9303-e8201399b0b8" + }, + "location": "document.pdf" + }, + { + "userId": "user-2", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "12e680c3-22ce-469f-b62a-2bc37b194134" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/file.txt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/", + "result": { + "dirContent": [ + "documents/document.pdf" + ] + } + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/presentation.ppt", + "result": { + "dirContent": [ + "important/presentation.ppt" + ] + } + }, + { + "userId": "user-1", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/presentation.ppt", + "result": { + "content": { + "id": "2beec6d8-e1f6-4480-9303-e8201399b0b8" + } + } + }, + { + "userId": "user-3", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "77d01c9c-4631-4e07-9d9a-4cc1fdbc1a67" + }, + "location": "document.pdf" + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "document.pdf", + "result": { + "dirContent": [ + "document.pdf" + ] + } + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "file.txt" + ] + } + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "file.txt", + "result": { + "dirContent": [ + "file.txt" + ] + } + }, + { + "userId": "user-0", + "type": "READ", + "storageType": "PRIVATE", + "location": "file.txt", + "result": { + "content": { + "id": "d649d9c4-ecc9-410a-b6f8-3510710eb368" + } + } + }, + { + "userId": "user-1", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/balance.xlsx", + "result": { + "content": { + "id": "58326dc1-27c9-4ec7-884a-045db4a3b8de" + } + } + }, + { + "userId": "user-2", + "type": "READ", + "storageType": "PRIVATE", + "location": "file.txt", + "result": { + "content": { + "id": "12e680c3-22ce-469f-b62a-2bc37b194134" + } + } + }, + { + "userId": "user-0", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "77d01c9c-4631-4e07-9d9a-4cc1fdbc1a67" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "d31ad19c-860e-40d7-b798-2aeecad10120" + }, + "location": "home/home/balance.xlsx" + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-2", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "35083c31-6b7c-43c3-9521-b256d529fb33" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "important/balance.xlsx", + "home/document.pdf", + "important/presentation.ppt" + ] + } + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "dirContent": [ + "presentation.ppt" + ] + } + }, + { + "userId": "user-8", + "type": "READ", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "content": { + "id": "77d01c9c-4631-4e07-9d9a-4cc1fdbc1a67" + } + } + }, + { + "userId": "user-3", + "type": "READ", + "storageType": "PRIVATE", + "location": "document.pdf", + "result": { + "content": { + "id": "77d01c9c-4631-4e07-9d9a-4cc1fdbc1a67" + } + } + }, + { + "userId": "user-8", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "2beec6d8-e1f6-4480-9303-e8201399b0b8" + }, + "location": "documents/presentation.ppt" + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "documents/presentation.ppt" + ] + } + }, + { + "userId": "user-8", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/presentation.ppt", + "result": { + "content": { + "id": "2beec6d8-e1f6-4480-9303-e8201399b0b8" + } + } + }, + { + "userId": "user-5", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/" + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "d649d9c4-ecc9-410a-b6f8-3510710eb368" + }, + "location": "important/important/file.txt" + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "d31ad19c-860e-40d7-b798-2aeecad10120" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "d31ad19c-860e-40d7-b798-2aeecad10120" + }, + "location": "home/home/file.txt" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "12e680c3-22ce-469f-b62a-2bc37b194134" + }, + "location": "important/important/file.txt" + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/important/file.txt", + "result": { + "dirContent": [ + "important/important/file.txt" + ] + } + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "important/balance.xlsx", + "home/document.pdf", + "important/presentation.ppt", + "important/important/file.txt" + ] + } + }, + { + "userId": "user-4", + "type": "READ", + "storageType": "PRIVATE", + "location": "document.pdf", + "result": { + "content": { + "id": "2beec6d8-e1f6-4480-9303-e8201399b0b8" + } + } + }, + { + "userId": "user-7", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/important/" + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "12e680c3-22ce-469f-b62a-2bc37b194134" + }, + "location": "home/home/balance.xlsx" + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "69900fe6-5fdd-4933-826f-49190e9d4b2b" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "75cc14ad-8345-44b7-8a11-ad2cebc501c6" + }, + "location": "document.pdf" + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/presentation.ppt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/home/presentation.ppt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/", + "result": { + "dirContent": [ + "home/home/balance.xlsx" + ] + } + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "document.pdf", + "result": { + "dirContent": [ + "document.pdf" + ] + } + }, + { + "userId": "user-0", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/home/file.txt", + "result": { + "content": { + "id": "d31ad19c-860e-40d7-b798-2aeecad10120" + } + } + }, + { + "userId": "user-7", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/home/balance.xlsx", + "result": { + "content": { + "id": "12e680c3-22ce-469f-b62a-2bc37b194134" + } + } + }, + { + "userId": "user-4", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-7", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/home/" + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-9", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "2beec6d8-e1f6-4480-9303-e8201399b0b8" + }, + "location": "important/file.txt" + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "77d01c9c-4631-4e07-9d9a-4cc1fdbc1a67" + }, + "location": "important/presentation.ppt" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "77d01c9c-4631-4e07-9d9a-4cc1fdbc1a67" + }, + "location": "home/home/document.pdf" + }, + { + "userId": "user-6", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "2beec6d8-e1f6-4480-9303-e8201399b0b8" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "important/balance.xlsx", + "home/document.pdf", + "important/presentation.ppt", + "important/important/file.txt" + ] + } + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-9", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/" + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/important/file.txt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-4", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/home/" + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "d31ad19c-860e-40d7-b798-2aeecad10120" + }, + "location": "file.txt" + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-3", + "type": "READ", + "storageType": "PRIVATE", + "location": "file.txt", + "result": { + "content": { + "id": "d31ad19c-860e-40d7-b798-2aeecad10120" + } + } + }, + { + "userId": "user-8", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-6", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-6", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "d649d9c4-ecc9-410a-b6f8-3510710eb368" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-0", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/home/" + }, + { + "userId": "user-6", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "2beec6d8-e1f6-4480-9303-e8201399b0b8" + }, + "location": "important/file.txt" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "d649d9c4-ecc9-410a-b6f8-3510710eb368" + }, + "location": "important/presentation.ppt" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "77d01c9c-4631-4e07-9d9a-4cc1fdbc1a67" + }, + "location": "documents/important/presentation.ppt" + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/important/document.pdf", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/file.txt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/presentation.ppt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-8", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/file.txt", + "result": { + "content": { + "id": "2beec6d8-e1f6-4480-9303-e8201399b0b8" + } + } + }, + { + "userId": "user-4", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/presentation.ppt", + "result": { + "content": { + "id": "d649d9c4-ecc9-410a-b6f8-3510710eb368" + } + } + }, + { + "userId": "user-5", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/important/presentation.ppt", + "result": { + "content": { + "id": "77d01c9c-4631-4e07-9d9a-4cc1fdbc1a67" + } + } + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "35083c31-6b7c-43c3-9521-b256d529fb33" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "12e680c3-22ce-469f-b62a-2bc37b194134" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "75cc14ad-8345-44b7-8a11-ad2cebc501c6" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "12e680c3-22ce-469f-b62a-2bc37b194134" + }, + "location": "important/document.pdf" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7d315536-f793-45d5-a309-81c1e03545d8" + }, + "location": "home/important/document.pdf" + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/", + "result": { + "dirContent": [ + "important/file.txt" + ] + } + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "dirContent": [ + "presentation.ppt" + ] + } + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "presentation.ppt" + ] + } + }, + { + "userId": "user-3", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/presentation.ppt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "12e680c3-22ce-469f-b62a-2bc37b194134" + }, + "location": "important/home/document.pdf" + }, + { + "userId": "user-6", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "2beec6d8-e1f6-4480-9303-e8201399b0b8" + }, + "location": "home/balance.xlsx" + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "2beec6d8-e1f6-4480-9303-e8201399b0b8" + }, + "location": "important/document.pdf" + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/balance.xlsx", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/document.pdf", + "result": { + "dirContent": [ + "important/document.pdf" + ] + } + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "home/balance.xlsx" + ] + } + }, + { + "userId": "user-9", + "type": "READ", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "content": { + "id": "75cc14ad-8345-44b7-8a11-ad2cebc501c6" + } + } + }, + { + "userId": "user-0", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/document.pdf", + "result": { + "content": { + "id": "2beec6d8-e1f6-4480-9303-e8201399b0b8" + } + } + }, + { + "userId": "user-7", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "12e680c3-22ce-469f-b62a-2bc37b194134" + }, + "location": "home/home/file.txt" + }, + { + "userId": "user-8", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-4", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/" + }, + { + "userId": "user-9", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/home/" + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "75cc14ad-8345-44b7-8a11-ad2cebc501c6" + }, + "location": "home/balance.xlsx" + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "dirContent": [ + "presentation.ppt" + ] + } + }, + { + "userId": "user-9", + "type": "READ", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "content": { + "id": "75cc14ad-8345-44b7-8a11-ad2cebc501c6" + } + } + }, + { + "userId": "user-6", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/" + }, + { + "userId": "user-7", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/home/" + }, + { + "userId": "user-9", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "77d01c9c-4631-4e07-9d9a-4cc1fdbc1a67" + }, + "location": "important/important/document.pdf" + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "2beec6d8-e1f6-4480-9303-e8201399b0b8" + }, + "location": "document.pdf" + }, + { + "userId": "user-0", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/presentation.ppt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "12e680c3-22ce-469f-b62a-2bc37b194134" + }, + "location": "important/important/document.pdf" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "69900fe6-5fdd-4933-826f-49190e9d4b2b" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-6", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "2beec6d8-e1f6-4480-9303-e8201399b0b8" + }, + "location": "important/important/balance.xlsx" + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "35083c31-6b7c-43c3-9521-b256d529fb33" + }, + "location": "documents/home/document.pdf" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "35083c31-6b7c-43c3-9521-b256d529fb33" + }, + "location": "documents/important/presentation.ppt" + }, + { + "userId": "user-2", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "75cc14ad-8345-44b7-8a11-ad2cebc501c6" + }, + "location": "home/file.txt" + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/important/document.pdf", + "result": { + "dirContent": [ + "important/important/document.pdf" + ] + } + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "balance.xlsx" + ] + } + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "important/balance.xlsx", + "home/document.pdf", + "important/presentation.ppt", + "home/important/document.pdf", + "documents/important/presentation.ppt", + "important/important/file.txt" + ] + } + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-5", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/document.pdf", + "result": { + "content": { + "id": "12e680c3-22ce-469f-b62a-2bc37b194134" + } + } + }, + { + "userId": "user-0", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/home/document.pdf", + "result": { + "content": { + "id": "35083c31-6b7c-43c3-9521-b256d529fb33" + } + } + }, + { + "userId": "user-2", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/file.txt", + "result": { + "content": { + "id": "75cc14ad-8345-44b7-8a11-ad2cebc501c6" + } + } + }, + { + "userId": "user-4", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-2", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/" + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "75cc14ad-8345-44b7-8a11-ad2cebc501c6" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "d31ad19c-860e-40d7-b798-2aeecad10120" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7d315536-f793-45d5-a309-81c1e03545d8" + }, + "location": "home/home/document.pdf" + }, + { + "userId": "user-5", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/document.pdf", + "result": { + "content": { + "id": "12e680c3-22ce-469f-b62a-2bc37b194134" + } + } + }, + { + "userId": "user-0", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/home/document.pdf", + "result": { + "content": { + "id": "35083c31-6b7c-43c3-9521-b256d529fb33" + } + } + }, + { + "userId": "user-9", + "type": "READ", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "content": { + "id": "75cc14ad-8345-44b7-8a11-ad2cebc501c6" + } + } + }, + { + "userId": "user-3", + "type": "READ", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "content": { + "id": "d31ad19c-860e-40d7-b798-2aeecad10120" + } + } + }, + { + "userId": "user-1", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/important/" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "12e680c3-22ce-469f-b62a-2bc37b194134" + }, + "location": "documents/balance.xlsx" + }, + { + "userId": "user-9", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-4", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/home/" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "69900fe6-5fdd-4933-826f-49190e9d4b2b" + }, + "location": "home/presentation.ppt" + }, + { + "userId": "user-1", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/important/" + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "2beec6d8-e1f6-4480-9303-e8201399b0b8" + }, + "location": "documents/balance.xlsx" + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "35083c31-6b7c-43c3-9521-b256d529fb33" + }, + "location": "important/home/document.pdf" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "69900fe6-5fdd-4933-826f-49190e9d4b2b" + }, + "location": "document.pdf" + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/", + "result": { + "dirContent": [ + "home/presentation.ppt" + ] + } + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/document.pdf", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-6", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/important/balance.xlsx", + "result": { + "content": { + "id": "2beec6d8-e1f6-4480-9303-e8201399b0b8" + } + } + }, + { + "userId": "user-3", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/home/document.pdf", + "result": { + "content": { + "id": "35083c31-6b7c-43c3-9521-b256d529fb33" + } + } + }, + { + "userId": "user-5", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-1", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/" + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "home/document.pdf", + "documents/balance.xlsx", + "documents/important/presentation.ppt" + ] + } + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "d649d9c4-ecc9-410a-b6f8-3510710eb368" + }, + "location": "home/presentation.ppt" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "75cc14ad-8345-44b7-8a11-ad2cebc501c6" + }, + "location": "document.pdf" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "2beec6d8-e1f6-4480-9303-e8201399b0b8" + }, + "location": "documents/home/presentation.ppt" + }, + { + "userId": "user-2", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7d315536-f793-45d5-a309-81c1e03545d8" + }, + "location": "home/file.txt" + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/presentation.ppt", + "result": { + "dirContent": [ + "home/presentation.ppt" + ] + } + }, + { + "userId": "user-2", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/file.txt", + "result": { + "content": { + "id": "7d315536-f793-45d5-a309-81c1e03545d8" + } + } + }, + { + "userId": "user-3", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-4", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/" + }, + { + "userId": "user-9", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/" + }, + { + "userId": "user-5", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "12e680c3-22ce-469f-b62a-2bc37b194134" + }, + "location": "documents/presentation.ppt" + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "35083c31-6b7c-43c3-9521-b256d529fb33" + }, + "location": "important/balance.xlsx" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "77d01c9c-4631-4e07-9d9a-4cc1fdbc1a67" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "69900fe6-5fdd-4933-826f-49190e9d4b2b" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "document.pdf", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/documents/presentation.ppt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-5", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/presentation.ppt", + "result": { + "content": { + "id": "12e680c3-22ce-469f-b62a-2bc37b194134" + } + } + }, + { + "userId": "user-6", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/important/balance.xlsx", + "result": { + "content": { + "id": "2beec6d8-e1f6-4480-9303-e8201399b0b8" + } + } + }, + { + "userId": "user-2", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/file.txt", + "result": { + "content": { + "id": "7d315536-f793-45d5-a309-81c1e03545d8" + } + } + }, + { + "userId": "user-1", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/important/" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "77d01c9c-4631-4e07-9d9a-4cc1fdbc1a67" + }, + "location": "document.pdf" + }, + { + "userId": "user-8", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/important/" + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "d31ad19c-860e-40d7-b798-2aeecad10120" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "d649d9c4-ecc9-410a-b6f8-3510710eb368" + }, + "location": "important/important/balance.xlsx" + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "d31ad19c-860e-40d7-b798-2aeecad10120" + }, + "location": "important/presentation.ppt" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "d31ad19c-860e-40d7-b798-2aeecad10120" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "35083c31-6b7c-43c3-9521-b256d529fb33" + }, + "location": "home/balance.xlsx" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "69900fe6-5fdd-4933-826f-49190e9d4b2b" + }, + "location": "home/file.txt" + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "important/important/balance.xlsx" + ] + } + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/file.txt", + "result": { + "dirContent": [ + "home/file.txt" + ] + } + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "important/balance.xlsx", + "documents/balance.xlsx", + "presentation.ppt", + "important/important/balance.xlsx" + ] + } + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/", + "result": { + "dirContent": [ + "documents/home/presentation.ppt", + "documents/balance.xlsx" + ] + } + }, + { + "userId": "user-1", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/home/presentation.ppt", + "result": { + "content": { + "id": "2beec6d8-e1f6-4480-9303-e8201399b0b8" + } + } + }, + { + "userId": "user-2", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/file.txt", + "result": { + "content": { + "id": "7d315536-f793-45d5-a309-81c1e03545d8" + } + } + }, + { + "userId": "user-5", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/" + }, + { + "userId": "user-6", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/important/" + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "document.pdf", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-8", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "69900fe6-5fdd-4933-826f-49190e9d4b2b" + }, + "location": "important/documents/balance.xlsx" + }, + { + "userId": "user-8", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/documents/balance.xlsx", + "result": { + "content": { + "id": "69900fe6-5fdd-4933-826f-49190e9d4b2b" + } + } + }, + { + "userId": "user-4", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7d315536-f793-45d5-a309-81c1e03545d8" + }, + "location": "home/file.txt" + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/file.txt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/presentation.ppt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-3", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/presentation.ppt", + "result": { + "content": { + "id": "d31ad19c-860e-40d7-b798-2aeecad10120" + } + } + }, + { + "userId": "user-4", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/file.txt", + "result": { + "content": { + "id": "7d315536-f793-45d5-a309-81c1e03545d8" + } + } + }, + { + "userId": "user-0", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/" + }, + { + "userId": "user-2", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/" + }, + { + "userId": "user-2", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "77d01c9c-4631-4e07-9d9a-4cc1fdbc1a67" + }, + "location": "home/home/presentation.ppt" + }, + { + "userId": "user-2", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/home/" + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "77d01c9c-4631-4e07-9d9a-4cc1fdbc1a67" + }, + "location": "documents/documents/file.txt" + }, + { + "userId": "user-6", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "d649d9c4-ecc9-410a-b6f8-3510710eb368" + }, + "location": "important/document.pdf" + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/home/balance.xlsx", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/document.pdf", + "result": { + "dirContent": [ + "important/document.pdf" + ] + } + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "balance.xlsx", + "documents/home/document.pdf" + ] + } + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/", + "result": { + "dirContent": [ + "home/document.pdf", + "home/file.txt" + ] + } + }, + { + "userId": "user-8", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/documents/balance.xlsx", + "result": { + "content": { + "id": "69900fe6-5fdd-4933-826f-49190e9d4b2b" + } + } + }, + { + "userId": "user-4", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/file.txt", + "result": { + "content": { + "id": "7d315536-f793-45d5-a309-81c1e03545d8" + } + } + }, + { + "userId": "user-8", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/documents/" + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "75cc14ad-8345-44b7-8a11-ad2cebc501c6" + }, + "location": "home/home/presentation.ppt" + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/", + "result": { + "dirContent": [ + "home/home/presentation.ppt" + ] + } + }, + { + "userId": "user-3", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/" + }, + { + "userId": "user-6", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/" + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "75cc14ad-8345-44b7-8a11-ad2cebc501c6" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "75cc14ad-8345-44b7-8a11-ad2cebc501c6" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-2", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "2beec6d8-e1f6-4480-9303-e8201399b0b8" + }, + "location": "home/home/balance.xlsx" + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/balance.xlsx", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-4", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/file.txt", + "result": { + "content": { + "id": "7d315536-f793-45d5-a309-81c1e03545d8" + } + } + }, + { + "userId": "user-0", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/home/document.pdf", + "result": { + "content": { + "id": "35083c31-6b7c-43c3-9521-b256d529fb33" + } + } + }, + { + "userId": "user-1", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/home/presentation.ppt", + "result": { + "content": { + "id": "2beec6d8-e1f6-4480-9303-e8201399b0b8" + } + } + }, + { + "userId": "user-8", + "type": "READ", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "content": { + "id": "75cc14ad-8345-44b7-8a11-ad2cebc501c6" + } + } + }, + { + "userId": "user-2", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/home/balance.xlsx", + "result": { + "content": { + "id": "2beec6d8-e1f6-4480-9303-e8201399b0b8" + } + } + }, + { + "userId": "user-1", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/home/" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "69900fe6-5fdd-4933-826f-49190e9d4b2b" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "77d01c9c-4631-4e07-9d9a-4cc1fdbc1a67" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "35083c31-6b7c-43c3-9521-b256d529fb33" + }, + "location": "documents/balance.xlsx" + }, + { + "userId": "user-6", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "77d01c9c-4631-4e07-9d9a-4cc1fdbc1a67" + }, + "location": "documents/home/balance.xlsx" + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/documents/file.txt", + "result": { + "dirContent": [ + "documents/documents/file.txt" + ] + } + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/", + "result": { + "dirContent": [ + "documents/balance.xlsx" + ] + } + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/important/file.txt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-1", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/file.txt", + "result": { + "content": { + "id": "69900fe6-5fdd-4933-826f-49190e9d4b2b" + } + } + }, + { + "userId": "user-4", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/balance.xlsx", + "result": { + "content": { + "id": "35083c31-6b7c-43c3-9521-b256d529fb33" + } + } + }, + { + "userId": "user-6", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/home/balance.xlsx", + "result": { + "content": { + "id": "77d01c9c-4631-4e07-9d9a-4cc1fdbc1a67" + } + } + }, + { + "userId": "user-1", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/" + }, + { + "userId": "user-7", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "35083c31-6b7c-43c3-9521-b256d529fb33" + }, + "location": "important/home/document.pdf" + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/home/document.pdf", + "result": { + "dirContent": [ + "important/home/document.pdf" + ] + } + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "69900fe6-5fdd-4933-826f-49190e9d4b2b" + }, + "location": "important/documents/document.pdf" + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "58326dc1-27c9-4ec7-884a-045db4a3b8de" + }, + "location": "home/document.pdf" + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/home/", + "result": { + "dirContent": [ + "important/home/document.pdf" + ] + } + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "documents/home/balance.xlsx" + ] + } + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "dirContent": [ + "balance.xlsx" + ] + } + }, + { + "userId": "user-6", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/home/balance.xlsx", + "result": { + "content": { + "id": "77d01c9c-4631-4e07-9d9a-4cc1fdbc1a67" + } + } + }, + { + "userId": "user-0", + "type": "READ", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "content": { + "id": "69900fe6-5fdd-4933-826f-49190e9d4b2b" + } + } + }, + { + "userId": "user-1", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/balance.xlsx", + "result": { + "content": { + "id": "12e680c3-22ce-469f-b62a-2bc37b194134" + } + } + }, + { + "userId": "user-2", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/home/balance.xlsx", + "result": { + "content": { + "id": "2beec6d8-e1f6-4480-9303-e8201399b0b8" + } + } + }, + { + "userId": "user-4", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7d315536-f793-45d5-a309-81c1e03545d8" + }, + "location": "documents/home/balance.xlsx" + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "77d01c9c-4631-4e07-9d9a-4cc1fdbc1a67" + }, + "location": "documents/presentation.ppt" + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/important/file.txt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "home/document.pdf", + "balance.xlsx", + "documents/home/document.pdf" + ] + } + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/home/", + "result": { + "dirContent": [ + "home/home/balance.xlsx" + ] + } + }, + { + "userId": "user-8", + "type": "READ", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "content": { + "id": "75cc14ad-8345-44b7-8a11-ad2cebc501c6" + } + } + }, + { + "userId": "user-6", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/home/balance.xlsx", + "result": { + "content": { + "id": "77d01c9c-4631-4e07-9d9a-4cc1fdbc1a67" + } + } + }, + { + "userId": "user-0", + "type": "READ", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "content": { + "id": "69900fe6-5fdd-4933-826f-49190e9d4b2b" + } + } + }, + { + "userId": "user-4", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/" + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7d315536-f793-45d5-a309-81c1e03545d8" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-2", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7d315536-f793-45d5-a309-81c1e03545d8" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "file.txt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/home/file.txt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "dirContent": [ + "balance.xlsx" + ] + } + }, + { + "userId": "user-8", + "type": "READ", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "content": { + "id": "75cc14ad-8345-44b7-8a11-ad2cebc501c6" + } + } + }, + { + "userId": "user-4", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/home/balance.xlsx", + "result": { + "content": { + "id": "7d315536-f793-45d5-a309-81c1e03545d8" + } + } + }, + { + "userId": "user-9", + "type": "READ", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "content": { + "id": "7d315536-f793-45d5-a309-81c1e03545d8" + } + } + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "77d01c9c-4631-4e07-9d9a-4cc1fdbc1a67" + }, + "location": "important/document.pdf" + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-9", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/" + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "d649d9c4-ecc9-410a-b6f8-3510710eb368" + }, + "location": "documents/file.txt" + }, + { + "userId": "user-0", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/" + }, + { + "userId": "user-0", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/home/document.pdf", + "result": { + "content": { + "id": "35083c31-6b7c-43c3-9521-b256d529fb33" + } + } + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "2beec6d8-e1f6-4480-9303-e8201399b0b8" + }, + "location": "documents/file.txt" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "12e680c3-22ce-469f-b62a-2bc37b194134" + }, + "location": "home/documents/balance.xlsx" + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "documents/file.txt", + "balance.xlsx" + ] + } + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "important/document.pdf" + ] + } + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/", + "result": { + "dirContent": [ + "documents/home/document.pdf" + ] + } + }, + { + "userId": "user-6", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/home/balance.xlsx", + "result": { + "content": { + "id": "77d01c9c-4631-4e07-9d9a-4cc1fdbc1a67" + } + } + }, + { + "userId": "user-0", + "type": "READ", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "content": { + "id": "69900fe6-5fdd-4933-826f-49190e9d4b2b" + } + } + }, + { + "userId": "user-9", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/" + }, + { + "userId": "user-3", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/" + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-1", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/" + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "d31ad19c-860e-40d7-b798-2aeecad10120" + }, + "location": "home/file.txt" + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "35083c31-6b7c-43c3-9521-b256d529fb33" + }, + "location": "important/documents/balance.xlsx" + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-4", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/home/balance.xlsx", + "result": { + "content": { + "id": "7d315536-f793-45d5-a309-81c1e03545d8" + } + } + }, + { + "userId": "user-5", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/documents/balance.xlsx", + "result": { + "content": { + "id": "12e680c3-22ce-469f-b62a-2bc37b194134" + } + } + }, + { + "userId": "user-6", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/home/balance.xlsx", + "result": { + "content": { + "id": "77d01c9c-4631-4e07-9d9a-4cc1fdbc1a67" + } + } + }, + { + "userId": "user-9", + "type": "READ", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "content": { + "id": "7d315536-f793-45d5-a309-81c1e03545d8" + } + } + }, + { + "userId": "user-5", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/documents/" + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/home/file.txt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-0", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/home/" + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "2beec6d8-e1f6-4480-9303-e8201399b0b8" + }, + "location": "home/documents/document.pdf" + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "58326dc1-27c9-4ec7-884a-045db4a3b8de" + }, + "location": "home/important/presentation.ppt" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "12e680c3-22ce-469f-b62a-2bc37b194134" + }, + "location": "home/important/document.pdf" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "69900fe6-5fdd-4933-826f-49190e9d4b2b" + }, + "location": "important/balance.xlsx" + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "document.pdf", + "balance.xlsx" + ] + } + }, + { + "userId": "user-7", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/home/" + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/important/balance.xlsx", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-1", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "d31ad19c-860e-40d7-b798-2aeecad10120" + }, + "location": "documents/home/file.txt" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "d649d9c4-ecc9-410a-b6f8-3510710eb368" + }, + "location": "document.pdf" + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/documents/file.txt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/", + "result": { + "dirContent": [ + "home/important/presentation.ppt" + ] + } + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/documents/balance.xlsx", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-2", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/home/balance.xlsx", + "result": { + "content": { + "id": "2beec6d8-e1f6-4480-9303-e8201399b0b8" + } + } + }, + { + "userId": "user-9", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/documents/" + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "balance.xlsx" + ] + } + }, + { + "userId": "user-9", + "type": "READ", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "content": { + "id": "7d315536-f793-45d5-a309-81c1e03545d8" + } + } + }, + { + "userId": "user-3", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/important/" + }, + { + "userId": "user-5", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "58326dc1-27c9-4ec7-884a-045db4a3b8de" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-6", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/home/" + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-5", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "69900fe6-5fdd-4933-826f-49190e9d4b2b" + }, + "location": "important/important/balance.xlsx" + }, + { + "userId": "user-2", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "2beec6d8-e1f6-4480-9303-e8201399b0b8" + }, + "location": "home/documents/balance.xlsx" + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/documents/presentation.ppt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/document.pdf", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/important/document.pdf", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "35083c31-6b7c-43c3-9521-b256d529fb33" + }, + "location": "documents/documents/file.txt" + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "77d01c9c-4631-4e07-9d9a-4cc1fdbc1a67" + }, + "location": "file.txt" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "7d315536-f793-45d5-a309-81c1e03545d8" + }, + "location": "file.txt" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "69900fe6-5fdd-4933-826f-49190e9d4b2b" + }, + "location": "home/important/document.pdf" + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/important/presentation.ppt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-9", + "type": "READ", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "content": { + "id": "7d315536-f793-45d5-a309-81c1e03545d8" + } + } + }, + { + "userId": "user-3", + "type": "READ", + "storageType": "PRIVATE", + "location": "file.txt", + "result": { + "content": { + "id": "77d01c9c-4631-4e07-9d9a-4cc1fdbc1a67" + } + } + }, + { + "userId": "user-7", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/documents/" + } + ], + "userPrivateSpace": { + "user-1": { + "home/important/document.pdf": { + "id": "69900fe6-5fdd-4933-826f-49190e9d4b2b" + } + }, + "user-0": { + "home/documents/document.pdf": { + "id": "2beec6d8-e1f6-4480-9303-e8201399b0b8" + }, + "important/important/balance.xlsx": { + "id": "69900fe6-5fdd-4933-826f-49190e9d4b2b" + }, + "balance.xlsx": { + "id": "69900fe6-5fdd-4933-826f-49190e9d4b2b" + } + }, + "user-5": {}, + "user-4": { + "documents/home/file.txt": { + "id": "d31ad19c-860e-40d7-b798-2aeecad10120" + }, + "documents/file.txt": { + "id": "2beec6d8-e1f6-4480-9303-e8201399b0b8" + }, + "home/important/document.pdf": { + "id": "12e680c3-22ce-469f-b62a-2bc37b194134" + }, + "file.txt": { + "id": "7d315536-f793-45d5-a309-81c1e03545d8" + }, + "documents/home/balance.xlsx": { + "id": "7d315536-f793-45d5-a309-81c1e03545d8" + } + }, + "user-3": { + "file.txt": { + "id": "77d01c9c-4631-4e07-9d9a-4cc1fdbc1a67" + } + }, + "user-2": { + "home/home/balance.xlsx": { + "id": "2beec6d8-e1f6-4480-9303-e8201399b0b8" + }, + "home/documents/balance.xlsx": { + "id": "2beec6d8-e1f6-4480-9303-e8201399b0b8" + }, + "balance.xlsx": { + "id": "7d315536-f793-45d5-a309-81c1e03545d8" + } + }, + "user-9": { + "balance.xlsx": { + "id": "7d315536-f793-45d5-a309-81c1e03545d8" + } + }, + "user-8": { + "home/home/presentation.ppt": { + "id": "75cc14ad-8345-44b7-8a11-ad2cebc501c6" + }, + "presentation.ppt": { + "id": "75cc14ad-8345-44b7-8a11-ad2cebc501c6" + }, + "important/documents/document.pdf": { + "id": "69900fe6-5fdd-4933-826f-49190e9d4b2b" + }, + "home/file.txt": { + "id": "d31ad19c-860e-40d7-b798-2aeecad10120" + } + }, + "user-7": {}, + "user-6": {} + }, + "userPublicSpace": { + "user-1": {}, + "user-0": {}, + "user-5": {}, + "user-4": {}, + "user-3": {}, + "user-2": {}, + "user-9": {}, + "user-8": {}, + "user-7": {}, + "user-6": {} + } +} \ No newline at end of file diff --git a/datasafe-long-run-tests/datasafe-business-tests-random-actions/src/test/resources/fixture/fixture_simple_datasafe_200_ops.json b/datasafe-long-run-tests/datasafe-business-tests-random-actions/src/test/resources/fixture/fixture_simple_datasafe_200_ops.json index 0c7115fd7..ccddef502 100644 --- a/datasafe-long-run-tests/datasafe-business-tests-random-actions/src/test/resources/fixture/fixture_simple_datasafe_200_ops.json +++ b/datasafe-long-run-tests/datasafe-business-tests-random-actions/src/test/resources/fixture/fixture_simple_datasafe_200_ops.json @@ -5,7 +5,7 @@ "type": "WRITE", "storageType": "PRIVATE", "contentId": { - "id": "6525b867-77a1-4070-870f-9ec5a2de8dec" + "id": "0da90c49-ee7d-4711-bdd9-3c27693c2739" }, "location": "balance.xlsx" }, @@ -14,7 +14,7 @@ "type": "WRITE", "storageType": "PRIVATE", "contentId": { - "id": "6612de12-3a82-4213-b3f9-2a618003c1b0" + "id": "a67411e3-1e0e-4729-869d-b99b66fde9fd" }, "location": "important/presentation.ppt" }, @@ -34,7 +34,7 @@ "location": "balance.xlsx", "result": { "content": { - "id": "6525b867-77a1-4070-870f-9ec5a2de8dec" + "id": "0da90c49-ee7d-4711-bdd9-3c27693c2739" } } }, @@ -45,7 +45,7 @@ "location": "important/presentation.ppt", "result": { "content": { - "id": "6612de12-3a82-4213-b3f9-2a618003c1b0" + "id": "a67411e3-1e0e-4729-869d-b99b66fde9fd" } } }, @@ -54,7 +54,7 @@ "type": "WRITE", "storageType": "PRIVATE", "contentId": { - "id": "e1bb97b1-085e-486e-be5e-670d5b3a777a" + "id": "90f6c20b-569f-48c3-a522-765b743e12d8" }, "location": "home/home/balance.xlsx" }, @@ -63,7 +63,7 @@ "type": "WRITE", "storageType": "PRIVATE", "contentId": { - "id": "7b486508-4e09-4dcb-b8f0-14020ab44c15" + "id": "aac4d0d0-efb1-49bb-9759-90550cef00d2" }, "location": "important/important/presentation.ppt" }, @@ -83,7 +83,7 @@ "location": "important/presentation.ppt", "result": { "content": { - "id": "6612de12-3a82-4213-b3f9-2a618003c1b0" + "id": "a67411e3-1e0e-4729-869d-b99b66fde9fd" } } }, @@ -94,7 +94,7 @@ "location": "home/home/balance.xlsx", "result": { "content": { - "id": "e1bb97b1-085e-486e-be5e-670d5b3a777a" + "id": "90f6c20b-569f-48c3-a522-765b743e12d8" } } }, @@ -109,7 +109,7 @@ "type": "WRITE", "storageType": "PRIVATE", "contentId": { - "id": "bb004a4e-b5fa-4e91-8103-a9cca394565d" + "id": "5bcdf706-bc73-4b1c-bc2d-0eaaa7b794f1" }, "location": "documents/home/balance.xlsx" }, @@ -118,7 +118,7 @@ "type": "WRITE", "storageType": "PRIVATE", "contentId": { - "id": "768f827b-2b68-4580-8fd2-9c94ef825574" + "id": "f0b369bf-5800-4413-8c8d-efeb6f01dfef" }, "location": "documents/home/file.txt" }, @@ -127,7 +127,7 @@ "type": "WRITE", "storageType": "PRIVATE", "contentId": { - "id": "cd6a2a0b-28ee-473b-a4bd-4236fb2cef71" + "id": "bc5e34c3-bb57-4343-8709-a9fc9be0ef15" }, "location": "important/documents/file.txt" }, @@ -178,7 +178,7 @@ "location": "important/important/presentation.ppt", "result": { "content": { - "id": "7b486508-4e09-4dcb-b8f0-14020ab44c15" + "id": "aac4d0d0-efb1-49bb-9759-90550cef00d2" } } }, @@ -189,7 +189,7 @@ "location": "documents/home/file.txt", "result": { "content": { - "id": "768f827b-2b68-4580-8fd2-9c94ef825574" + "id": "f0b369bf-5800-4413-8c8d-efeb6f01dfef" } } }, @@ -200,7 +200,7 @@ "location": "important/documents/file.txt", "result": { "content": { - "id": "cd6a2a0b-28ee-473b-a4bd-4236fb2cef71" + "id": "bc5e34c3-bb57-4343-8709-a9fc9be0ef15" } } }, @@ -221,7 +221,7 @@ "type": "WRITE", "storageType": "PRIVATE", "contentId": { - "id": "cd6a2a0b-28ee-473b-a4bd-4236fb2cef71" + "id": "bc5e34c3-bb57-4343-8709-a9fc9be0ef15" }, "location": "important/balance.xlsx" }, @@ -259,7 +259,7 @@ "type": "WRITE", "storageType": "PRIVATE", "contentId": { - "id": "e1bb97b1-085e-486e-be5e-670d5b3a777a" + "id": "90f6c20b-569f-48c3-a522-765b743e12d8" }, "location": "home/presentation.ppt" }, @@ -268,7 +268,7 @@ "type": "WRITE", "storageType": "PRIVATE", "contentId": { - "id": "943b276b-a073-4141-9e5e-cad489d1f65b" + "id": "bddf3814-1bc9-442b-82fa-4bed9cbf8ef2" }, "location": "balance.xlsx" }, @@ -277,7 +277,7 @@ "type": "WRITE", "storageType": "PRIVATE", "contentId": { - "id": "7b486508-4e09-4dcb-b8f0-14020ab44c15" + "id": "aac4d0d0-efb1-49bb-9759-90550cef00d2" }, "location": "documents/presentation.ppt" }, @@ -286,7 +286,7 @@ "type": "WRITE", "storageType": "PRIVATE", "contentId": { - "id": "7b486508-4e09-4dcb-b8f0-14020ab44c15" + "id": "aac4d0d0-efb1-49bb-9759-90550cef00d2" }, "location": "file.txt" }, @@ -295,7 +295,7 @@ "type": "WRITE", "storageType": "PRIVATE", "contentId": { - "id": "768f827b-2b68-4580-8fd2-9c94ef825574" + "id": "f0b369bf-5800-4413-8c8d-efeb6f01dfef" }, "location": "documents/documents/presentation.ppt" }, @@ -315,7 +315,7 @@ "location": "file.txt", "result": { "content": { - "id": "7b486508-4e09-4dcb-b8f0-14020ab44c15" + "id": "aac4d0d0-efb1-49bb-9759-90550cef00d2" } } }, @@ -330,7 +330,7 @@ "type": "WRITE", "storageType": "PRIVATE", "contentId": { - "id": "521b937b-c355-4c96-85d8-d0e8be3bf069" + "id": "65d8cada-2213-4f2b-94b3-c542f8f0cad4" }, "location": "documents/home/file.txt" }, @@ -352,7 +352,7 @@ "location": "home/presentation.ppt", "result": { "content": { - "id": "e1bb97b1-085e-486e-be5e-670d5b3a777a" + "id": "90f6c20b-569f-48c3-a522-765b743e12d8" } } }, @@ -363,7 +363,7 @@ "location": "file.txt", "result": { "content": { - "id": "7b486508-4e09-4dcb-b8f0-14020ab44c15" + "id": "aac4d0d0-efb1-49bb-9759-90550cef00d2" } } }, @@ -378,7 +378,7 @@ "type": "WRITE", "storageType": "PRIVATE", "contentId": { - "id": "bb004a4e-b5fa-4e91-8103-a9cca394565d" + "id": "5bcdf706-bc73-4b1c-bc2d-0eaaa7b794f1" }, "location": "document.pdf" }, @@ -393,7 +393,7 @@ "type": "WRITE", "storageType": "PRIVATE", "contentId": { - "id": "943b276b-a073-4141-9e5e-cad489d1f65b" + "id": "bddf3814-1bc9-442b-82fa-4bed9cbf8ef2" }, "location": "balance.xlsx" }, @@ -417,7 +417,7 @@ "type": "WRITE", "storageType": "PRIVATE", "contentId": { - "id": "943b276b-a073-4141-9e5e-cad489d1f65b" + "id": "bddf3814-1bc9-442b-82fa-4bed9cbf8ef2" }, "location": "home/file.txt" }, @@ -426,7 +426,7 @@ "type": "WRITE", "storageType": "PRIVATE", "contentId": { - "id": "bb004a4e-b5fa-4e91-8103-a9cca394565d" + "id": "5bcdf706-bc73-4b1c-bc2d-0eaaa7b794f1" }, "location": "documents/file.txt" }, @@ -448,7 +448,7 @@ "location": "document.pdf", "result": { "content": { - "id": "bb004a4e-b5fa-4e91-8103-a9cca394565d" + "id": "5bcdf706-bc73-4b1c-bc2d-0eaaa7b794f1" } } }, @@ -459,7 +459,7 @@ "location": "documents/documents/presentation.ppt", "result": { "content": { - "id": "768f827b-2b68-4580-8fd2-9c94ef825574" + "id": "f0b369bf-5800-4413-8c8d-efeb6f01dfef" } } }, @@ -474,7 +474,7 @@ "type": "WRITE", "storageType": "PRIVATE", "contentId": { - "id": "cd6a2a0b-28ee-473b-a4bd-4236fb2cef71" + "id": "bc5e34c3-bb57-4343-8709-a9fc9be0ef15" }, "location": "document.pdf" }, @@ -483,7 +483,7 @@ "type": "WRITE", "storageType": "PRIVATE", "contentId": { - "id": "6525b867-77a1-4070-870f-9ec5a2de8dec" + "id": "0da90c49-ee7d-4711-bdd9-3c27693c2739" }, "location": "documents/home/balance.xlsx" }, @@ -492,7 +492,7 @@ "type": "WRITE", "storageType": "PRIVATE", "contentId": { - "id": "768f827b-2b68-4580-8fd2-9c94ef825574" + "id": "f0b369bf-5800-4413-8c8d-efeb6f01dfef" }, "location": "presentation.ppt" }, @@ -501,7 +501,7 @@ "type": "WRITE", "storageType": "PRIVATE", "contentId": { - "id": "6612de12-3a82-4213-b3f9-2a618003c1b0" + "id": "a67411e3-1e0e-4729-869d-b99b66fde9fd" }, "location": "home/important/document.pdf" }, @@ -510,7 +510,7 @@ "type": "WRITE", "storageType": "PRIVATE", "contentId": { - "id": "943b276b-a073-4141-9e5e-cad489d1f65b" + "id": "bddf3814-1bc9-442b-82fa-4bed9cbf8ef2" }, "location": "balance.xlsx" }, @@ -519,7 +519,7 @@ "type": "WRITE", "storageType": "PRIVATE", "contentId": { - "id": "7b486508-4e09-4dcb-b8f0-14020ab44c15" + "id": "aac4d0d0-efb1-49bb-9759-90550cef00d2" }, "location": "presentation.ppt" }, @@ -528,7 +528,7 @@ "type": "WRITE", "storageType": "PRIVATE", "contentId": { - "id": "521b937b-c355-4c96-85d8-d0e8be3bf069" + "id": "65d8cada-2213-4f2b-94b3-c542f8f0cad4" }, "location": "presentation.ppt" }, @@ -550,7 +550,7 @@ "location": "important/important/presentation.ppt", "result": { "content": { - "id": "7b486508-4e09-4dcb-b8f0-14020ab44c15" + "id": "aac4d0d0-efb1-49bb-9759-90550cef00d2" } } }, @@ -561,7 +561,7 @@ "location": "file.txt", "result": { "content": { - "id": "7b486508-4e09-4dcb-b8f0-14020ab44c15" + "id": "aac4d0d0-efb1-49bb-9759-90550cef00d2" } } }, @@ -572,7 +572,7 @@ "location": "document.pdf", "result": { "content": { - "id": "bb004a4e-b5fa-4e91-8103-a9cca394565d" + "id": "5bcdf706-bc73-4b1c-bc2d-0eaaa7b794f1" } } }, @@ -583,7 +583,7 @@ "location": "presentation.ppt", "result": { "content": { - "id": "7b486508-4e09-4dcb-b8f0-14020ab44c15" + "id": "aac4d0d0-efb1-49bb-9759-90550cef00d2" } } }, @@ -598,7 +598,7 @@ "type": "WRITE", "storageType": "PRIVATE", "contentId": { - "id": "6525b867-77a1-4070-870f-9ec5a2de8dec" + "id": "0da90c49-ee7d-4711-bdd9-3c27693c2739" }, "location": "documents/document.pdf" }, @@ -609,7 +609,7 @@ "location": "documents/document.pdf", "result": { "content": { - "id": "6525b867-77a1-4070-870f-9ec5a2de8dec" + "id": "0da90c49-ee7d-4711-bdd9-3c27693c2739" } } }, @@ -630,7 +630,7 @@ "type": "WRITE", "storageType": "PRIVATE", "contentId": { - "id": "768f827b-2b68-4580-8fd2-9c94ef825574" + "id": "f0b369bf-5800-4413-8c8d-efeb6f01dfef" }, "location": "document.pdf" }, @@ -639,7 +639,7 @@ "type": "WRITE", "storageType": "PRIVATE", "contentId": { - "id": "521b937b-c355-4c96-85d8-d0e8be3bf069" + "id": "65d8cada-2213-4f2b-94b3-c542f8f0cad4" }, "location": "file.txt" }, @@ -648,7 +648,7 @@ "type": "WRITE", "storageType": "PRIVATE", "contentId": { - "id": "521b937b-c355-4c96-85d8-d0e8be3bf069" + "id": "65d8cada-2213-4f2b-94b3-c542f8f0cad4" }, "location": "file.txt" }, @@ -657,7 +657,7 @@ "type": "WRITE", "storageType": "PRIVATE", "contentId": { - "id": "768f827b-2b68-4580-8fd2-9c94ef825574" + "id": "f0b369bf-5800-4413-8c8d-efeb6f01dfef" }, "location": "documents/documents/document.pdf" }, @@ -692,7 +692,7 @@ "location": "presentation.ppt", "result": { "content": { - "id": "521b937b-c355-4c96-85d8-d0e8be3bf069" + "id": "65d8cada-2213-4f2b-94b3-c542f8f0cad4" } } }, @@ -703,7 +703,7 @@ "location": "file.txt", "result": { "content": { - "id": "521b937b-c355-4c96-85d8-d0e8be3bf069" + "id": "65d8cada-2213-4f2b-94b3-c542f8f0cad4" } } }, @@ -720,7 +720,7 @@ "location": "important/important/presentation.ppt", "result": { "content": { - "id": "7b486508-4e09-4dcb-b8f0-14020ab44c15" + "id": "aac4d0d0-efb1-49bb-9759-90550cef00d2" } } }, @@ -729,7 +729,7 @@ "type": "WRITE", "storageType": "PRIVATE", "contentId": { - "id": "bb004a4e-b5fa-4e91-8103-a9cca394565d" + "id": "5bcdf706-bc73-4b1c-bc2d-0eaaa7b794f1" }, "location": "documents/documents/balance.xlsx" }, @@ -738,7 +738,7 @@ "type": "WRITE", "storageType": "PRIVATE", "contentId": { - "id": "bb004a4e-b5fa-4e91-8103-a9cca394565d" + "id": "5bcdf706-bc73-4b1c-bc2d-0eaaa7b794f1" }, "location": "documents/home/document.pdf" }, @@ -747,7 +747,7 @@ "type": "WRITE", "storageType": "PRIVATE", "contentId": { - "id": "7b486508-4e09-4dcb-b8f0-14020ab44c15" + "id": "aac4d0d0-efb1-49bb-9759-90550cef00d2" }, "location": "important/important/file.txt" }, @@ -756,7 +756,7 @@ "type": "WRITE", "storageType": "PRIVATE", "contentId": { - "id": "7b486508-4e09-4dcb-b8f0-14020ab44c15" + "id": "aac4d0d0-efb1-49bb-9759-90550cef00d2" }, "location": "home/file.txt" }, @@ -765,7 +765,7 @@ "type": "WRITE", "storageType": "PRIVATE", "contentId": { - "id": "521b937b-c355-4c96-85d8-d0e8be3bf069" + "id": "65d8cada-2213-4f2b-94b3-c542f8f0cad4" }, "location": "important/documents/document.pdf" }, @@ -818,7 +818,7 @@ "location": "documents/documents/presentation.ppt", "result": { "content": { - "id": "768f827b-2b68-4580-8fd2-9c94ef825574" + "id": "f0b369bf-5800-4413-8c8d-efeb6f01dfef" } } }, @@ -833,7 +833,7 @@ "type": "WRITE", "storageType": "PRIVATE", "contentId": { - "id": "521b937b-c355-4c96-85d8-d0e8be3bf069" + "id": "65d8cada-2213-4f2b-94b3-c542f8f0cad4" }, "location": "home/balance.xlsx" }, @@ -844,7 +844,7 @@ "location": "home/balance.xlsx", "result": { "content": { - "id": "521b937b-c355-4c96-85d8-d0e8be3bf069" + "id": "65d8cada-2213-4f2b-94b3-c542f8f0cad4" } } }, @@ -861,7 +861,7 @@ "location": "important/documents/document.pdf", "result": { "content": { - "id": "521b937b-c355-4c96-85d8-d0e8be3bf069" + "id": "65d8cada-2213-4f2b-94b3-c542f8f0cad4" } } }, @@ -870,7 +870,7 @@ "type": "WRITE", "storageType": "PRIVATE", "contentId": { - "id": "bb004a4e-b5fa-4e91-8103-a9cca394565d" + "id": "5bcdf706-bc73-4b1c-bc2d-0eaaa7b794f1" }, "location": "home/documents/presentation.ppt" }, @@ -912,7 +912,7 @@ "location": "home/balance.xlsx", "result": { "content": { - "id": "521b937b-c355-4c96-85d8-d0e8be3bf069" + "id": "65d8cada-2213-4f2b-94b3-c542f8f0cad4" } } }, @@ -923,7 +923,7 @@ "location": "documents/home/document.pdf", "result": { "content": { - "id": "bb004a4e-b5fa-4e91-8103-a9cca394565d" + "id": "5bcdf706-bc73-4b1c-bc2d-0eaaa7b794f1" } } }, @@ -934,7 +934,7 @@ "location": "home/file.txt", "result": { "content": { - "id": "7b486508-4e09-4dcb-b8f0-14020ab44c15" + "id": "aac4d0d0-efb1-49bb-9759-90550cef00d2" } } }, @@ -945,7 +945,7 @@ "location": "important/documents/document.pdf", "result": { "content": { - "id": "521b937b-c355-4c96-85d8-d0e8be3bf069" + "id": "65d8cada-2213-4f2b-94b3-c542f8f0cad4" } } }, @@ -955,88 +955,1037 @@ "storageType": "PRIVATE", "location": "documents/documents/" }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "f0b369bf-5800-4413-8c8d-efeb6f01dfef" + }, + "location": "important/documents/file.txt" + }, + { + "userId": "user-5", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/important/" + }, + { + "userId": "user-5", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/important/document.pdf", + "result": { + "content": { + "id": "a67411e3-1e0e-4729-869d-b99b66fde9fd" + } + } + }, + { + "userId": "user-1", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/documents/" + }, + { + "userId": "user-8", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/important/" + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/document.pdf", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a67411e3-1e0e-4729-869d-b99b66fde9fd" + }, + "location": "important/documents/presentation.ppt" + }, + { + "userId": "user-9", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "5bcdf706-bc73-4b1c-bc2d-0eaaa7b794f1" + }, + "location": "documents/document.pdf" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "0da90c49-ee7d-4711-bdd9-3c27693c2739" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/", + "result": { + "dirContent": [ + "home/balance.xlsx" + ] + } + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "presentation.ppt", + "home/file.txt" + ] + } + }, + { + "userId": "user-3", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/documents/presentation.ppt", + "result": { + "content": { + "id": "5bcdf706-bc73-4b1c-bc2d-0eaaa7b794f1" + } + } + }, + { + "userId": "user-5", + "type": "READ", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "content": { + "id": "0da90c49-ee7d-4711-bdd9-3c27693c2739" + } + } + }, + { + "userId": "user-4", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/home/document.pdf", + "result": { + "content": { + "id": "5bcdf706-bc73-4b1c-bc2d-0eaaa7b794f1" + } + } + }, + { + "userId": "user-7", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/" + }, + { + "userId": "user-3", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/documents/" + }, + { + "userId": "user-2", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-8", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "important/documents/" + }, + { + "userId": "user-8", + "type": "READ", + "storageType": "PRIVATE", + "location": "document.pdf", + "result": { + "content": { + "id": "f0b369bf-5800-4413-8c8d-efeb6f01dfef" + } + } + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "5bcdf706-bc73-4b1c-bc2d-0eaaa7b794f1" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "5bcdf706-bc73-4b1c-bc2d-0eaaa7b794f1" + }, + "location": "home/documents/document.pdf" + }, + { + "userId": "user-6", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "0da90c49-ee7d-4711-bdd9-3c27693c2739" + }, + "location": "documents/important/file.txt" + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a67411e3-1e0e-4729-869d-b99b66fde9fd" + }, + "location": "important/presentation.ppt" + }, + { + "userId": "user-0", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/file.txt", + "result": { + "content": { + "id": "aac4d0d0-efb1-49bb-9759-90550cef00d2" + } + } + }, + { + "userId": "user-8", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "bc5e34c3-bb57-4343-8709-a9fc9be0ef15" + }, + "location": "home/balance.xlsx" + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/home/document.pdf", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-9", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-6", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "bddf3814-1bc9-442b-82fa-4bed9cbf8ef2" + }, + "location": "document.pdf" + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "home/balance.xlsx", + "result": { + "dirContent": [ + "home/balance.xlsx" + ] + } + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/presentation.ppt", + "result": { + "dirContent": [ + "important/presentation.ppt" + ] + } + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-8", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/" + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "5bcdb1dd-4aed-4048-bf1a-738f389ef31a" + }, + "location": "important/presentation.ppt" + }, + { + "userId": "user-4", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/home/" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "65d8cada-2213-4f2b-94b3-c542f8f0cad4" + }, + "location": "documents/home/presentation.ppt" + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "file.txt", + "result": { + "dirContent": [ + "file.txt" + ] + } + }, + { + "userId": "user-0", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/" + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/balance.xlsx", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "65d8cada-2213-4f2b-94b3-c542f8f0cad4" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "90f6c20b-569f-48c3-a522-765b743e12d8" + }, + "location": "home/balance.xlsx" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "aac4d0d0-efb1-49bb-9759-90550cef00d2" + }, + "location": "documents/document.pdf" + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "document.pdf", + "documents/documents/document.pdf", + "home/documents/document.pdf", + "home/important/document.pdf", + "balance.xlsx" + ] + } + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "presentation.ppt" + ] + } + }, + { + "userId": "user-8", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/presentation.ppt", + "result": { + "content": { + "id": "5bcdb1dd-4aed-4048-bf1a-738f389ef31a" + } + } + }, + { + "userId": "user-0", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/presentation.ppt", + "result": { + "content": { + "id": "a67411e3-1e0e-4729-869d-b99b66fde9fd" + } + } + }, + { + "userId": "user-7", + "type": "READ", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "content": { + "id": "65d8cada-2213-4f2b-94b3-c542f8f0cad4" + } + } + }, + { + "userId": "user-5", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-7", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "5bcdb1dd-4aed-4048-bf1a-738f389ef31a" + }, + "location": "home/documents/balance.xlsx" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "5bcdb1dd-4aed-4048-bf1a-738f389ef31a" + }, + "location": "document.pdf" + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "aac4d0d0-efb1-49bb-9759-90550cef00d2" + }, + "location": "home/file.txt" + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/document.pdf", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-3", + "type": "READ", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "content": { + "id": "5bcdf706-bc73-4b1c-bc2d-0eaaa7b794f1" + } + } + }, + { + "userId": "user-4", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/document.pdf", + "result": { + "content": { + "id": "aac4d0d0-efb1-49bb-9759-90550cef00d2" + } + } + }, + { + "userId": "user-7", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/documents/balance.xlsx", + "result": { + "content": { + "id": "5bcdb1dd-4aed-4048-bf1a-738f389ef31a" + } + } + }, + { + "userId": "user-7", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "home/documents/" + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "5bcdb1dd-4aed-4048-bf1a-738f389ef31a" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-5", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "" + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a67411e3-1e0e-4729-869d-b99b66fde9fd" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-3", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "aac4d0d0-efb1-49bb-9759-90550cef00d2" + }, + "location": "important/balance.xlsx" + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/file.txt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/documents/presentation.ppt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "file.txt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-0", + "type": "READ", + "storageType": "PRIVATE", + "location": "important/presentation.ppt", + "result": { + "content": { + "id": "a67411e3-1e0e-4729-869d-b99b66fde9fd" + } + } + }, + { + "userId": "user-8", + "type": "READ", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "content": { + "id": "a67411e3-1e0e-4729-869d-b99b66fde9fd" + } + } + }, + { + "userId": "user-4", + "type": "DELETE", + "storageType": "PRIVATE", + "location": "documents/home/" + }, + { + "userId": "user-4", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "f0b369bf-5800-4413-8c8d-efeb6f01dfef" + }, + "location": "document.pdf" + }, + { + "userId": "user-0", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "aac4d0d0-efb1-49bb-9759-90550cef00d2" + }, + "location": "home/important/file.txt" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "aac4d0d0-efb1-49bb-9759-90550cef00d2" + }, + "location": "home/home/presentation.ppt" + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/presentation.ppt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-0", + "type": "LIST", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "dirContent": [ + "presentation.ppt" + ] + } + }, + { + "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/file.txt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-4", + "type": "READ", + "storageType": "PRIVATE", + "location": "documents/document.pdf", + "result": { + "content": { + "id": "aac4d0d0-efb1-49bb-9759-90550cef00d2" + } + } + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a67411e3-1e0e-4729-869d-b99b66fde9fd" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-5", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "5bcdf706-bc73-4b1c-bc2d-0eaaa7b794f1" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a67411e3-1e0e-4729-869d-b99b66fde9fd" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-2", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a67411e3-1e0e-4729-869d-b99b66fde9fd" + }, + "location": "file.txt" + }, + { + "userId": "user-3", + "type": "LIST", + "storageType": "PRIVATE", + "location": "documents/presentation.ppt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-4", + "type": "LIST", + "storageType": "PRIVATE", + "location": "presentation.ppt", + "result": { + "dirContent": [ + "presentation.ppt" + ] + } + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, { "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "balance.xlsx" + ] + } + }, + { + "userId": "user-2", "type": "DELETE", "storageType": "PRIVATE", - "location": "important/important/" + "location": "" + }, + { + "userId": "user-7", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "aac4d0d0-efb1-49bb-9759-90550cef00d2" + }, + "location": "document.pdf" + }, + { + "userId": "user-6", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "bc5e34c3-bb57-4343-8709-a9fc9be0ef15" + }, + "location": "balance.xlsx" + }, + { + "userId": "user-8", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "important/presentation.ppt", + "home/balance.xlsx", + "balance.xlsx" + ] + } }, { "userId": "user-1", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "home/home/presentation.ppt", + "balance.xlsx" + ] + } + }, + { + "userId": "user-6", + "type": "LIST", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "dirContent": [ + "balance.xlsx" + ] + } + }, + { + "userId": "user-4", + "type": "READ", + "storageType": "PRIVATE", + "location": "file.txt", + "result": { + "content": { + "id": "65d8cada-2213-4f2b-94b3-c542f8f0cad4" + } + } + }, + { + "userId": "user-5", + "type": "READ", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "content": { + "id": "5bcdf706-bc73-4b1c-bc2d-0eaaa7b794f1" + } + } + }, + { + "userId": "user-0", "type": "DELETE", "storageType": "PRIVATE", - "location": "important/documents/" + "location": "home/important/" + }, + { + "userId": "user-0", + "type": "READ", + "storageType": "PRIVATE", + "location": "home/file.txt", + "result": { + "content": { + "id": "aac4d0d0-efb1-49bb-9759-90550cef00d2" + } + } + }, + { + "userId": "user-8", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a67411e3-1e0e-4729-869d-b99b66fde9fd" + }, + "location": "presentation.ppt" + }, + { + "userId": "user-1", + "type": "WRITE", + "storageType": "PRIVATE", + "contentId": { + "id": "a67411e3-1e0e-4729-869d-b99b66fde9fd" + }, + "location": "home/documents/document.pdf" + }, + { + "userId": "user-7", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "document.pdf", + "balance.xlsx" + ] + } + }, + { + "userId": "user-9", + "type": "LIST", + "storageType": "PRIVATE", + "location": "important/home/file.txt", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-5", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [ + "balance.xlsx" + ] + } + }, + { + "userId": "user-2", + "type": "LIST", + "storageType": "PRIVATE", + "location": "", + "result": { + "dirContent": [] + } + }, + { + "userId": "user-6", + "type": "READ", + "storageType": "PRIVATE", + "location": "balance.xlsx", + "result": { + "content": { + "id": "bc5e34c3-bb57-4343-8709-a9fc9be0ef15" + } + } } ], "userPrivateSpace": { - "user-1": {}, + "user-1": { + "home/home/presentation.ppt": { + "id": "aac4d0d0-efb1-49bb-9759-90550cef00d2" + }, + "home/documents/document.pdf": { + "id": "a67411e3-1e0e-4729-869d-b99b66fde9fd" + }, + "balance.xlsx": { + "id": "a67411e3-1e0e-4729-869d-b99b66fde9fd" + } + }, "user-0": { + "important/presentation.ppt": { + "id": "a67411e3-1e0e-4729-869d-b99b66fde9fd" + }, "presentation.ppt": { - "id": "7b486508-4e09-4dcb-b8f0-14020ab44c15" + "id": "aac4d0d0-efb1-49bb-9759-90550cef00d2" }, "home/file.txt": { - "id": "7b486508-4e09-4dcb-b8f0-14020ab44c15" + "id": "aac4d0d0-efb1-49bb-9759-90550cef00d2" } }, "user-5": { - "documents/documents/document.pdf": { - "id": "768f827b-2b68-4580-8fd2-9c94ef825574" - }, - "home/important/document.pdf": { - "id": "6612de12-3a82-4213-b3f9-2a618003c1b0" - }, "balance.xlsx": { - "id": "6525b867-77a1-4070-870f-9ec5a2de8dec" + "id": "5bcdf706-bc73-4b1c-bc2d-0eaaa7b794f1" } }, "user-4": { - "file.txt": { - "id": "521b937b-c355-4c96-85d8-d0e8be3bf069" + "document.pdf": { + "id": "f0b369bf-5800-4413-8c8d-efeb6f01dfef" + }, + "presentation.ppt": { + "id": "0da90c49-ee7d-4711-bdd9-3c27693c2739" + }, + "documents/document.pdf": { + "id": "aac4d0d0-efb1-49bb-9759-90550cef00d2" }, - "documents/home/document.pdf": { - "id": "bb004a4e-b5fa-4e91-8103-a9cca394565d" + "file.txt": { + "id": "65d8cada-2213-4f2b-94b3-c542f8f0cad4" } }, "user-3": { - "home/documents/presentation.ppt": { - "id": "bb004a4e-b5fa-4e91-8103-a9cca394565d" - } - }, - "user-2": { + "important/balance.xlsx": { + "id": "aac4d0d0-efb1-49bb-9759-90550cef00d2" + }, "presentation.ppt": { - "id": "521b937b-c355-4c96-85d8-d0e8be3bf069" + "id": "5bcdf706-bc73-4b1c-bc2d-0eaaa7b794f1" } }, - "user-9": { - "document.pdf": { - "id": "bb004a4e-b5fa-4e91-8103-a9cca394565d" + "user-2": {}, + "user-9": {}, + "user-8": { + "important/presentation.ppt": { + "id": "5bcdb1dd-4aed-4048-bf1a-738f389ef31a" }, - "file.txt": { - "id": "521b937b-c355-4c96-85d8-d0e8be3bf069" + "home/balance.xlsx": { + "id": "90f6c20b-569f-48c3-a522-765b743e12d8" }, - "documents/home/balance.xlsx": { - "id": "6525b867-77a1-4070-870f-9ec5a2de8dec" - } - }, - "user-8": { - "document.pdf": { - "id": "768f827b-2b68-4580-8fd2-9c94ef825574" + "presentation.ppt": { + "id": "a67411e3-1e0e-4729-869d-b99b66fde9fd" }, - "important/important/presentation.ppt": { - "id": "7b486508-4e09-4dcb-b8f0-14020ab44c15" + "balance.xlsx": { + "id": "a67411e3-1e0e-4729-869d-b99b66fde9fd" } }, "user-7": { - "home/balance.xlsx": { - "id": "521b937b-c355-4c96-85d8-d0e8be3bf069" + "document.pdf": { + "id": "aac4d0d0-efb1-49bb-9759-90550cef00d2" + }, + "balance.xlsx": { + "id": "5bcdb1dd-4aed-4048-bf1a-738f389ef31a" } }, "user-6": { - "file.txt": { - "id": "7b486508-4e09-4dcb-b8f0-14020ab44c15" - }, "balance.xlsx": { - "id": "943b276b-a073-4141-9e5e-cad489d1f65b" + "id": "bc5e34c3-bb57-4343-8709-a9fc9be0ef15" } } }, From d0a2b647a017ea4d1eb06e79e15bec6b4d09d79f Mon Sep 17 00:00:00 2001 From: Valentyn Berezin Date: Thu, 26 Sep 2019 15:10:48 +0300 Subject: [PATCH 134/255] DOC-159. Use Amazon client. Also add Dockerfile to build CLI --- .travis.yml | 4 +- ..._custom_jdk_and_add_security_providers.sh} | 7 +-- Dockerfile | 19 -------- README.md | 4 +- datasafe-cli/Dockerfile | 35 ++++++++++++++ datasafe-cli/README.md | 5 ++ .../MultiDfsWithCredentialsExampleTest.java | 7 ++- .../rest/impl/config/DatasafeConfig.java | 7 ++- .../api/UriBasedAuthStorageService.java | 12 +++-- .../api/UriBasedAuthStorageServiceTest.java | 46 +++++++++++-------- .../storage/impl/s3/S3ClientFactory.java | 6 +-- 11 files changed, 91 insertions(+), 61 deletions(-) rename .travis/{install_maven_custom_jdk_and_add_security_providers.sh => install_custom_jdk_and_add_security_providers.sh} (91%) delete mode 100644 Dockerfile create mode 100644 datasafe-cli/Dockerfile diff --git a/.travis.yml b/.travis.yml index 052232a3e..ae6744d78 100644 --- a/.travis.yml +++ b/.travis.yml @@ -101,7 +101,7 @@ matrix: language: bash before_install: - source .travis/drop_deploy_secrets.sh - - /bin/bash .travis/install_maven_custom_jdk_and_add_security_providers.sh + - /bin/bash .travis/install_custom_jdk_and_add_security_providers.sh install: - echo 'Nothing to do' # Override primary build logic <<: *build-cli @@ -114,7 +114,7 @@ matrix: language: bash before_install: - source .travis/drop_deploy_secrets.sh - - /bin/bash .travis/install_maven_custom_jdk_and_add_security_providers.sh + - /bin/bash .travis/install_custom_jdk_and_add_security_providers.sh install: - echo 'Nothing to do' # Override primary build logic <<: *build-cli diff --git a/.travis/install_maven_custom_jdk_and_add_security_providers.sh b/.travis/install_custom_jdk_and_add_security_providers.sh similarity index 91% rename from .travis/install_maven_custom_jdk_and_add_security_providers.sh rename to .travis/install_custom_jdk_and_add_security_providers.sh index fb8b4b9ad..eef9ed43e 100755 --- a/.travis/install_maven_custom_jdk_and_add_security_providers.sh +++ b/.travis/install_custom_jdk_and_add_security_providers.sh @@ -6,14 +6,11 @@ REPO_ROOT=`pwd` -# 1. Custom JDK and standard maven +# 1. Custom JDK curl "${GRAVIS}.install-jdk-travis.sh" --output ~/.install-jdk-travis.sh source ~/.install-jdk-travis.sh -echo "Installing maven" -apt-get install maven -y - -cd "$REPO_ROOT" +cd "$REPO_ROOT" || exit 1 # 2. BC libs - download # 2.1 Parse BouncyCastle version diff --git a/Dockerfile b/Dockerfile deleted file mode 100644 index 00fdd0136..000000000 --- a/Dockerfile +++ /dev/null @@ -1,19 +0,0 @@ -FROM ubuntu:xenial - -RUN apt-get update && apt-get install curl -y - -ENV GRAVIS="https://raw.githubusercontent.com/DanySK/Gravis-CI/master/" -ENV JDK="graalvm@19.2.0" - -### -ENV TRAVIS_OS_NAME=linux - -# A -RUN curl "${GRAVIS}.install-jdk-travis.sh" --output ~/.install-jdk-travis.sh -RUN chmod +x ~/.install-jdk-travis.sh -RUN ~/.install-jdk-travis.sh - -RUN apt-get install maven -y && apt-get install git -y - -RUN git clone https://github.com/adorsys/datasafe && cd datasafe && git checkout -t origin/feature/datasafe-cli-w-s3 -RUN cd datasafe diff --git a/README.md b/README.md index ebb34ce22..c65e0cd64 100644 --- a/README.md +++ b/README.md @@ -47,7 +47,7 @@ Detailed performance report is here: ### Datasafe-CLI You can try Datasafe as a CLI (command-line-interface) executable for encryption of your own sensitive files. Your encrypted files can be saved either in S3 bucket or local filesystem safely, because encryption will happen -locally - on your machine. +locally - on your machine (See [CLI-README](datasafe-cli/README.md) for details). **Download CLI executable**: @@ -56,8 +56,6 @@ locally - on your machine. 1. Windows executable (N/A yet), please use java version below 1. [Java-based jar](https://github.com/adorsys/datasafe/releases/download/v0.6.0/datasafe-cli.jar), requires JRE (1.8+), use `java -jar datasafe-cli.jar` to execute -(Files above are built from [Datasafe-CLI](datasafe-cli) currently) - #### Example actions: ##### Download application and create new user: diff --git a/datasafe-cli/Dockerfile b/datasafe-cli/Dockerfile new file mode 100644 index 000000000..d306a452f --- /dev/null +++ b/datasafe-cli/Dockerfile @@ -0,0 +1,35 @@ +# This Dockerfile allows you to build Datasafe CLI using GraalVM (for Linux) +FROM ubuntu:xenial + +RUN apt-get update && apt-get install curl -y && apt-get install libz-dev gcc -y + +ENV GRAVIS="https://raw.githubusercontent.com/DanySK/Gravis-CI/master/" +ENV JDK="graalvm@19.2.0" +# Needed for Jabba +ENV TRAVIS_OS_NAME=linux + +RUN curl "${GRAVIS}.install-jdk-travis.sh" --output ~/.install-jdk-travis.sh +RUN chmod +x ~/.install-jdk-travis.sh +RUN ~/.install-jdk-travis.sh + +RUN apt-get install git -y +RUN git clone https://github.com/adorsys/datasafe +WORKDIR datasafe +RUN git checkout -t origin/develop + +RUN .travis/install_custom_jdk_and_add_security_providers.sh + +# 1. Build classes, because there can be problems with SSL afterwards +# Make JAVA_HOME avaiable as docker executes RUN commands independently +# https://forums.docker.com/t/set-environment-variable-through-dockerfile/28421/2 +RUN . ~/.jdk_config && ./mvnw clean install -B -V -DskipTests +# 2. Change security providers of JDK, after that java may face problems with SSL +RUN . ~/.jdk_config && chmod +x .travis/enable_bouncycastle_security.sh && .travis/enable_bouncycastle_security.sh +# 3. Build native image, no settings.xml needed +RUN . ~/.jdk_config && ./mvnw -f datasafe-cli/pom.xml clean package -B -V -Pnative-image -DskipTests + +WORKDIR datasafe-cli/target + +# Use datasafe-cli +RUN echo 'echo "To use newly built DATASAFE-CLI - just run ./datasafe-cli"' >> /etc/bash.bashrc +CMD bash \ No newline at end of file diff --git a/datasafe-cli/README.md b/datasafe-cli/README.md index 9db88030d..f33a013b4 100644 --- a/datasafe-cli/README.md +++ b/datasafe-cli/README.md @@ -1,4 +1,9 @@ # Build + +## Using Dockerfile +You can build Datasafe-CLI for Linux using this [Dockerfile](Dockerfile) + +## Manual 1. You need GraalVM compiler and BouncyCastle in java-home/jre/lib/ext/ of this compiler. 1. Edit the java-home/jre/lib/security/java.security properties file in any text editor. 1. Add the JCE provider you’ve just downloaded to this file. diff --git a/datasafe-examples/datasafe-examples-multidfs/src/test/java/de/adorsys/datasafe/examples/business/s3/MultiDfsWithCredentialsExampleTest.java b/datasafe-examples/datasafe-examples-multidfs/src/test/java/de/adorsys/datasafe/examples/business/s3/MultiDfsWithCredentialsExampleTest.java index 145fb5695..89e72d161 100644 --- a/datasafe-examples/datasafe-examples-multidfs/src/test/java/de/adorsys/datasafe/examples/business/s3/MultiDfsWithCredentialsExampleTest.java +++ b/datasafe-examples/datasafe-examples-multidfs/src/test/java/de/adorsys/datasafe/examples/business/s3/MultiDfsWithCredentialsExampleTest.java @@ -58,6 +58,7 @@ @Slf4j class MultiDfsWithCredentialsExampleTest { + private static final String REGION = "eu-central-1"; private static final ExecutorService EXECUTOR = ExecutorServiceUtil.submitterExecutesOnStarvationExecutingService(4, 4); private static Map minios = new EnumMap<>(MinioContainerId.class); @@ -72,12 +73,13 @@ static void startup() { minios.put(it, minio); String endpoint = "http://127.0.0.1:" + minio.getFirstMappedPort() + "/"; - endpointsByHost.put(it, endpoint + it.getBucketName() + "/"); + endpointsByHost.put(it, endpoint + REGION + "/" + it.getBucketName() + "/"); log.info("MINIO for {} is available at: {} with access: '{}'/'{}'", it, endpoint, it.getAccessKey(), it.getSecretKey()); AmazonS3 client = S3ClientFactory.getClient( endpoint, + REGION, it.getAccessKey(), it.getSecretKey() ); @@ -127,7 +129,8 @@ void testMultiUserStorageUserSetup() { new UriBasedAuthStorageService( acc -> new S3StorageService( S3ClientFactory.getClient( - acc.getOnlyHostPart().toString(), + acc.getEndpoint(), + acc.getRegion(), acc.getAccessKey(), acc.getSecretKey() ), diff --git a/datasafe-rest-impl/src/main/java/de/adorsys/datasafe/rest/impl/config/DatasafeConfig.java b/datasafe-rest-impl/src/main/java/de/adorsys/datasafe/rest/impl/config/DatasafeConfig.java index adcb2f6c6..cd17b277e 100644 --- a/datasafe-rest-impl/src/main/java/de/adorsys/datasafe/rest/impl/config/DatasafeConfig.java +++ b/datasafe-rest-impl/src/main/java/de/adorsys/datasafe/rest/impl/config/DatasafeConfig.java @@ -148,7 +148,8 @@ StorageService clientCredentials(AmazonS3 s3, DatasafeProperties properties) { new UriBasedAuthStorageService( acc -> new S3StorageService( S3ClientFactory.getClient( - acc.getOnlyHostPart().toString(), + acc.getEndpoint(), + acc.getRegion(), acc.getAccessKey(), acc.getSecretKey() ), @@ -203,14 +204,12 @@ StorageService multiStorageService(DatasafeProperties properties) { ExecutorServiceUtil.submitterExecutesOnStarvationExecutingService() ); - StorageService multiDfs = new SchemeDelegatingStorage( + return new SchemeDelegatingStorage( ImmutableMap.of( "s3", s3StorageService, "jdbc-mysql", db ) ); - - return multiDfs; } @Bean diff --git a/datasafe-storage/datasafe-storage-api/src/main/java/de/adorsys/datasafe/storage/api/UriBasedAuthStorageService.java b/datasafe-storage/datasafe-storage-api/src/main/java/de/adorsys/datasafe/storage/api/UriBasedAuthStorageService.java index c43011cd1..e8bd1c018 100644 --- a/datasafe-storage/datasafe-storage-api/src/main/java/de/adorsys/datasafe/storage/api/UriBasedAuthStorageService.java +++ b/datasafe-storage/datasafe-storage-api/src/main/java/de/adorsys/datasafe/storage/api/UriBasedAuthStorageService.java @@ -13,13 +13,14 @@ /** * Storage connection pool that creates S3/or other clients on the fly, based on provided credentials in URI. * URI format that is expected: - * s3://access-key:secret-key@bucket/path/in/bucket + * s3://access-key:secret-key@region/bucket/path/in/bucket */ @RequiredArgsConstructor public class UriBasedAuthStorageService extends BaseDelegatingStorage { private final Map clientByItsAccessKey = new ConcurrentHashMap<>(); private final Function bucketExtractor; + private final Function regionExtractor; private final Function endpointExtractor; // Builder to create S3 or other kind of Storage service @@ -30,10 +31,11 @@ public class UriBasedAuthStorageService extends BaseDelegatingStorage { */ public UriBasedAuthStorageService(Function storageServiceBuilder) { this.storageServiceBuilder = storageServiceBuilder; - this.bucketExtractor = location -> location.getPath().replaceAll("^/", "").split("/")[0]; + Function segmentator = location -> location.getPath().replaceAll("^/", "").split("/"); + this.regionExtractor = location -> segmentator.apply(location)[0]; + this.bucketExtractor = location -> segmentator.apply(location)[1]; this.endpointExtractor = location -> - location.getScheme() + "://" + location.getHost() + portValue(location) + "/" + - this.bucketExtractor.apply(location); + location.getScheme() + "://" + location.getHost() + portValue(location) + "/"; } @Override @@ -43,6 +45,7 @@ protected StorageService service(AbsoluteLocation location) { AccessId accessId = new AccessId( authority[0], authority[1], + regionExtractor.apply(uri), bucketExtractor.apply(uri), endpointExtractor.apply(uri), uri, @@ -65,6 +68,7 @@ public static class AccessId { private final String accessKey; private final String secretKey; + private final String region; private final String bucketName; private final String endpoint; diff --git a/datasafe-storage/datasafe-storage-api/src/test/java/de/adorsys/datasafe/storage/api/UriBasedAuthStorageServiceTest.java b/datasafe-storage/datasafe-storage-api/src/test/java/de/adorsys/datasafe/storage/api/UriBasedAuthStorageServiceTest.java index a66b8bca2..a4376cca6 100644 --- a/datasafe-storage/datasafe-storage-api/src/test/java/de/adorsys/datasafe/storage/api/UriBasedAuthStorageServiceTest.java +++ b/datasafe-storage/datasafe-storage-api/src/test/java/de/adorsys/datasafe/storage/api/UriBasedAuthStorageServiceTest.java @@ -6,6 +6,7 @@ import de.adorsys.datasafe.types.api.shared.BaseMockitoTest; import lombok.Getter; import lombok.RequiredArgsConstructor; +import lombok.ToString; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.junit.jupiter.params.ParameterizedTest; @@ -87,68 +88,74 @@ void write(MappedItem item) { private static Stream fixture() { return Stream.of( new MappedItem( - "http://user:password@host:9999/bucket", + "http://user:password@host:9999/region/bucket", new UriBasedAuthStorageService.AccessId( "user", "password", + "region", "bucket", - "http://host:9999/bucket", - URI.create("http://host:9999/bucket"), + "http://host:9999/", + URI.create("http://host:9999/region/bucket"), URI.create("http://host:9999") ) ), new MappedItem( - "http://user:password@host:9999/bucket/", + "http://user:password@host:9999/region/bucket/", new UriBasedAuthStorageService.AccessId( "user", "password", + "region", "bucket", - "http://host:9999/bucket", - URI.create("http://host:9999/bucket/"), + "http://host:9999/", + URI.create("http://host:9999/region/bucket/"), URI.create("http://host:9999") ) ), new MappedItem( - "http://user:password@host:9999/bucket/path/to", + "http://user:password@host:9999/region/bucket/path/to", new UriBasedAuthStorageService.AccessId( "user", "password", + "region", "bucket", - "http://host:9999/bucket", - URI.create("http://host:9999/bucket/path/to"), + "http://host:9999/", + URI.create("http://host:9999/region/bucket/path/to"), URI.create("http://host:9999") ) ), new MappedItem( - "http://user:password@host:9999/bucket/path/to/", + "http://user:password@host:9999/region/bucket/path/to/", new UriBasedAuthStorageService.AccessId( "user", "password", + "region", "bucket", - "http://host:9999/bucket", - URI.create("http://host:9999/bucket/path/to/"), + "http://host:9999/", + URI.create("http://host:9999/region/bucket/path/to/"), URI.create("http://host:9999") ) ), new MappedItem( - "http://user:password@host.com/bucket", + "http://user:password@host.com/region/bucket", new UriBasedAuthStorageService.AccessId( "user", "password", + "region", "bucket", - "http://host.com/bucket", - URI.create("http://host.com/bucket"), + "http://host.com/", + URI.create("http://host.com/region/bucket"), URI.create("http://host.com") ) ), new MappedItem( - "http://user:password@host.com/bucket/", + "http://user:password@host.com/region/bucket/", new UriBasedAuthStorageService.AccessId( "user", "password", + "region", "bucket", - "http://host.com/bucket", - URI.create("http://host.com/bucket/"), + "http://host.com/", + URI.create("http://host.com/region/bucket/"), URI.create("http://host.com") ) ) @@ -156,6 +163,7 @@ private static Stream fixture() { } @Getter + @ToString(of = "uriAsString") @RequiredArgsConstructor private static class MappedItem { @@ -163,7 +171,7 @@ private static class MappedItem { private final AbsoluteLocation uri; private final UriBasedAuthStorageService.AccessId accessId; - public MappedItem(String uri, UriBasedAuthStorageService.AccessId accessId) { + private MappedItem(String uri, UriBasedAuthStorageService.AccessId accessId) { this.uriAsString = uri; this.uri = BasePrivateResource.forAbsolutePrivate(uri); this.accessId = accessId; diff --git a/datasafe-storage/datasafe-storage-impl-s3/src/main/java/de/adorsys/datasafe/storage/impl/s3/S3ClientFactory.java b/datasafe-storage/datasafe-storage-impl-s3/src/main/java/de/adorsys/datasafe/storage/impl/s3/S3ClientFactory.java index 1611192ca..841607ee6 100644 --- a/datasafe-storage/datasafe-storage-impl-s3/src/main/java/de/adorsys/datasafe/storage/impl/s3/S3ClientFactory.java +++ b/datasafe-storage/datasafe-storage-impl-s3/src/main/java/de/adorsys/datasafe/storage/impl/s3/S3ClientFactory.java @@ -10,10 +10,10 @@ @UtilityClass public class S3ClientFactory { - public AmazonS3 getClient(String endpointUrl, String accessKey, String secretKey) { + public AmazonS3 getClient(String endpointUrl, String region, String accessKey, String secretKey) { return AmazonS3ClientBuilder.standard() .withEndpointConfiguration( - new AwsClientBuilder.EndpointConfiguration(endpointUrl, "eu-central-1") + new AwsClientBuilder.EndpointConfiguration(endpointUrl, region) ) .withCredentials( new AWSStaticCredentialsProvider( @@ -24,7 +24,7 @@ public AmazonS3 getClient(String endpointUrl, String accessKey, String secretKey .build(); } - public AmazonS3 getClientByRegion(String region, String accessKey, String secretKey) { + public AmazonS3 getAmazonClient(String region, String accessKey, String secretKey) { return AmazonS3ClientBuilder.standard() .withRegion(region) .withCredentials( From 7607f34ed255505d5fe4f9747cb4b46f93b43bb6 Mon Sep 17 00:00:00 2001 From: Valentyn Berezin Date: Thu, 26 Sep 2019 15:14:45 +0300 Subject: [PATCH 135/255] DOC-159. Use Amazon client. Also add Dockerfile to build CLI --- .../impl/e2e/MultiDFSFunctionalityTest.java | 22 +++++++--- datasafe-cli/Dockerfile | 1 - .../datasafe/cli/commands/profile/Create.java | 5 ++- .../cli/commands/profile/InputUtil.java | 27 ++++++++++-- .../datasafe/cli/config/DatasafeFactory.java | 41 +++++++++---------- .../datasafe-cli/reflect-config.json | 16 ++++++++ 6 files changed, 77 insertions(+), 35 deletions(-) diff --git a/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/MultiDFSFunctionalityTest.java b/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/MultiDFSFunctionalityTest.java index d4c8bd12c..69704bf4f 100644 --- a/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/MultiDFSFunctionalityTest.java +++ b/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/MultiDFSFunctionalityTest.java @@ -66,6 +66,7 @@ @Slf4j class MultiDFSFunctionalityTest extends BaseMockitoTest { + private static final String REGION = "eu-central-1"; private static final String LOCALHOST = "http://127.0.0.1"; private static final String CREDENTIALS = "credentialsbucket"; @@ -101,13 +102,15 @@ static void initDistributedMinios() { log.info("Minio `{}` with endpoint `{}` and keys `{}`/`{}` has started", it, endpoint, accessKey(it), secretKey(it)); - endpointsByHost.put(it, endpoint + it + "/"); + // http://localhost:1234/eu-central-1/bucket/ + endpointsByHost.put(it, endpoint + REGION + "/" + it + "/"); endpointsByHostNoBucket.put(it, endpoint); AmazonS3 client = S3ClientFactory.getClient( - endpoint, - accessKey(it), - secretKey(it) + endpoint, + REGION, + accessKey(it), + secretKey(it) ); client.createBucket(it); @@ -124,6 +127,7 @@ void initDatasafe() { StorageService directoryStorage = new S3StorageService( S3ClientFactory.getClient( endpointsByHostNoBucket.get(CREDENTIALS), + REGION, accessKey(CREDENTIALS), secretKey(CREDENTIALS) ), @@ -143,7 +147,8 @@ void initDatasafe() { new UriBasedAuthStorageService( acc -> new S3StorageService( S3ClientFactory.getClient( - acc.getOnlyHostPart().toString(), + acc.getEndpoint(), + acc.getRegion(), acc.getAccessKey(), acc.getSecretKey() ), @@ -279,7 +284,12 @@ private void registerUser(UserIDAuth auth) { } private List listInBucket(String bucket) { - return S3ClientFactory.getClient(endpointsByHostNoBucket.get(bucket), accessKey(bucket), secretKey(bucket)) + return S3ClientFactory.getClient( + endpointsByHostNoBucket.get(bucket), + REGION, + accessKey(bucket), + secretKey(bucket) + ) .listObjects(bucket, "") .getObjectSummaries() .stream() diff --git a/datasafe-cli/Dockerfile b/datasafe-cli/Dockerfile index d306a452f..a23c6b513 100644 --- a/datasafe-cli/Dockerfile +++ b/datasafe-cli/Dockerfile @@ -15,7 +15,6 @@ RUN ~/.install-jdk-travis.sh RUN apt-get install git -y RUN git clone https://github.com/adorsys/datasafe WORKDIR datasafe -RUN git checkout -t origin/develop RUN .travis/install_custom_jdk_and_add_security_providers.sh diff --git a/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/commands/profile/Create.java b/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/commands/profile/Create.java index 5b1f0c208..4b18ca412 100644 --- a/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/commands/profile/Create.java +++ b/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/commands/profile/Create.java @@ -4,6 +4,7 @@ import de.adorsys.datasafe.directory.api.types.CreateUserPublicProfile; import de.adorsys.datasafe.types.api.resource.BasePrivateResource; import de.adorsys.datasafe.types.api.resource.BasePublicResource; +import de.adorsys.datasafe.types.api.resource.Uri; import picocli.CommandLine; import java.util.Collections; @@ -21,8 +22,8 @@ public class Create implements Runnable { @Override public void run() { - String publicKeys = inpPath("Public keys", atRoot("pubkeys")); - String inbox = inpPath("Your INBOX folder", atRoot("inbox/")); + Uri publicKeys = inpPath("Public keys", atRoot("pubkeys")); + Uri inbox = inpPath("Your INBOX folder", atRoot("inbox/")); CreateUserPublicProfile publicProfile = CreateUserPublicProfile.builder() .id(profile.getCli().auth().getUserID()) diff --git a/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/commands/profile/InputUtil.java b/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/commands/profile/InputUtil.java index 3bf6ed2ac..545f61cc2 100644 --- a/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/commands/profile/InputUtil.java +++ b/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/commands/profile/InputUtil.java @@ -1,17 +1,27 @@ package de.adorsys.datasafe.cli.commands.profile; import com.google.common.base.Strings; +import de.adorsys.datasafe.types.api.resource.Uri; import lombok.experimental.UtilityClass; import java.net.URI; import java.nio.file.Paths; import java.util.Scanner; +/** + * Allows to read users input from STDIN. + */ @UtilityClass public class InputUtil { private static final Scanner sc = new Scanner(System.in); + /** + * Asks user to input value + * @param text Message describing what value to input + * @param defaultValue Default value to return, when user clicked enter on blank line + * @return User input + */ public static String input(String text, String defaultValue) { System.out.println(text + " (" + defaultValue + "):"); String input = sc.hasNextLine() ? sc.nextLine() : null; @@ -22,17 +32,26 @@ public static String input(String text, String defaultValue) { return input; } - public static String inpPath(String text, String defaultValue) { + /** + * Asks user to input path-alike value + * @param text Print message to user describing which value to input + * @param defaultValue Value to return when user hits 'Enter' + * @return Users' input + */ + public static Uri inpPath(String text, String defaultValue) { String result = input(text, defaultValue); - if (URI.create(result).isAbsolute()) { - return result; + // Fully qualified url + URI asUri = URI.create(result); + if (asUri.isAbsolute()) { + return new Uri(asUri); } + // Some local resource url if (result.startsWith("~/")) { result = result.replaceFirst("^~", System.getProperty("user.home")); } - return Paths.get(result).toUri().toASCIIString(); + return new Uri(Paths.get(result).toUri()); } } diff --git a/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/config/DatasafeFactory.java b/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/config/DatasafeFactory.java index cf14f6bbf..d59811623 100644 --- a/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/config/DatasafeFactory.java +++ b/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/config/DatasafeFactory.java @@ -26,12 +26,14 @@ import de.adorsys.datasafe.types.api.context.overrides.OverridesRegistry; import de.adorsys.datasafe.types.api.utils.ExecutorServiceUtil; import lombok.experimental.Delegate; +import lombok.experimental.UtilityClass; import lombok.extern.slf4j.Slf4j; import java.nio.file.Path; import java.util.regex.Pattern; @Slf4j +@UtilityClass public class DatasafeFactory { public static DefaultDatasafeServices datasafe(Path fsRoot, String systemPassword) { @@ -65,33 +67,28 @@ private static StorageService localFs(Path fsRoot) { private static StorageService httpS3() { return new UriBasedAuthStorageService( - acc -> { - String url = acc.getOnlyHostPart().toString(); - String accessKey = acc.getAccessKey(); - String secretKey = acc.getSecretKey(); - String bucketName = acc.getBucketName(); - String region = "eu-central-1"; - log.debug("HTTP reading"); - return getStorageService(accessKey, secretKey, url, region, bucketName); - } + acc -> getStorageService( + acc.getAccessKey(), + acc.getSecretKey(), + acc.getEndpoint(), + acc.getRegion(), + acc.getBucketName() + ) ); } private static StorageService amazonS3() { return new UriBasedAuthStorageService( - acc -> { - log.debug("S3 reading"); - return new S3StorageService( - S3ClientFactory.getClientByRegion( - acc.getOnlyHostPart().toString().split("://")[1], - acc.getAccessKey(), - acc.getSecretKey() - ), - // Bucket name is encoded in first path segment - acc.getBucketName(), - ExecutorServiceUtil.submitterExecutesOnStarvationExecutingService() - ); - } + acc -> new S3StorageService( + S3ClientFactory.getAmazonClient( + acc.getRegion(), + acc.getAccessKey(), + acc.getSecretKey() + ), + // Bucket name is encoded in first path segment + acc.getBucketName(), + ExecutorServiceUtil.submitterExecutesOnStarvationExecutingService() + ) ); } diff --git a/datasafe-cli/src/main/resources/META-INF/native-image/de.adorsys/datasafe-cli/reflect-config.json b/datasafe-cli/src/main/resources/META-INF/native-image/de.adorsys/datasafe-cli/reflect-config.json index 11e39bada..e78025fdf 100644 --- a/datasafe-cli/src/main/resources/META-INF/native-image/de.adorsys/datasafe-cli/reflect-config.json +++ b/datasafe-cli/src/main/resources/META-INF/native-image/de.adorsys/datasafe-cli/reflect-config.json @@ -137,6 +137,14 @@ } ] }, + { + "name": "de.adorsys.datasafe.types.api.global.PathEncryptionId", + "allDeclaredFields": true + }, + { + "name": "de.adorsys.datasafe.types.api.global.Version", + "allDeclaredFields": true + }, { "name": "de.adorsys.datasafe.directory.api.types.StorageCredentials", "allDeclaredFields": true, @@ -183,6 +191,10 @@ { "name": "storageCredentialsKeystore", "allowWrite": true + }, + { + "name": "appVersion", + "allowWrite": true } ] }, @@ -198,6 +210,10 @@ { "name": "inbox", "allowWrite": true + }, + { + "name": "appVersion", + "allowWrite": true } ] }, From d20b16a7218611e9fff2a2b1ba89ece31fcbea1d Mon Sep 17 00:00:00 2001 From: Valentyn Berezin Date: Thu, 26 Sep 2019 15:38:55 +0300 Subject: [PATCH 136/255] DOC-159. Add Joda UTC --- .../de.adorsys/datasafe-cli/reflect-config.json | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/datasafe-cli/src/main/resources/META-INF/native-image/de.adorsys/datasafe-cli/reflect-config.json b/datasafe-cli/src/main/resources/META-INF/native-image/de.adorsys/datasafe-cli/reflect-config.json index e78025fdf..1e6173f0a 100644 --- a/datasafe-cli/src/main/resources/META-INF/native-image/de.adorsys/datasafe-cli/reflect-config.json +++ b/datasafe-cli/src/main/resources/META-INF/native-image/de.adorsys/datasafe-cli/reflect-config.json @@ -1140,5 +1140,14 @@ "parameterTypes": [] } ] + }, + { + "name": "org.joda.time.tz.data.Etc.UTC", + "methods": [ + { + "name": "", + "parameterTypes": [] + } + ] } ] From 7e87d832e04880ba388e4667d3679432802ced93 Mon Sep 17 00:00:00 2001 From: Valentyn Berezin Date: Thu, 26 Sep 2019 15:45:23 +0300 Subject: [PATCH 137/255] DOC-159. Add Joda UTC --- .../de.adorsys/datasafe-cli/reflect-config.json | 9 --------- .../de.adorsys/datasafe-cli/resource-config.json | 5 +---- 2 files changed, 1 insertion(+), 13 deletions(-) diff --git a/datasafe-cli/src/main/resources/META-INF/native-image/de.adorsys/datasafe-cli/reflect-config.json b/datasafe-cli/src/main/resources/META-INF/native-image/de.adorsys/datasafe-cli/reflect-config.json index 1e6173f0a..e78025fdf 100644 --- a/datasafe-cli/src/main/resources/META-INF/native-image/de.adorsys/datasafe-cli/reflect-config.json +++ b/datasafe-cli/src/main/resources/META-INF/native-image/de.adorsys/datasafe-cli/reflect-config.json @@ -1140,14 +1140,5 @@ "parameterTypes": [] } ] - }, - { - "name": "org.joda.time.tz.data.Etc.UTC", - "methods": [ - { - "name": "", - "parameterTypes": [] - } - ] } ] diff --git a/datasafe-cli/src/main/resources/META-INF/native-image/de.adorsys/datasafe-cli/resource-config.json b/datasafe-cli/src/main/resources/META-INF/native-image/de.adorsys/datasafe-cli/resource-config.json index deb3a0f1d..8db3b21ef 100644 --- a/datasafe-cli/src/main/resources/META-INF/native-image/de.adorsys/datasafe-cli/resource-config.json +++ b/datasafe-cli/src/main/resources/META-INF/native-image/de.adorsys/datasafe-cli/resource-config.json @@ -1318,10 +1318,7 @@ "pattern": "org/bouncycastle/util/io/TeeOutputStream.class" }, { - "pattern": "org/joda/time/tz/data/Europe/Kiev" - }, - { - "pattern": "org/joda/time/tz/data/ZoneInfoMap" + "pattern": "org/joda/time/tz/data/*" }, { "pattern": "org/slf4j/impl/StaticLoggerBinder.class" From 4b9837789d9d8a4854c66f90ca7c367124792322 Mon Sep 17 00:00:00 2001 From: Valentyn Berezin Date: Thu, 26 Sep 2019 15:50:24 +0300 Subject: [PATCH 138/255] DOC-159. Fixed filename --- .../native-image/de.adorsys/datasafe-cli/resource-config.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/datasafe-cli/src/main/resources/META-INF/native-image/de.adorsys/datasafe-cli/resource-config.json b/datasafe-cli/src/main/resources/META-INF/native-image/de.adorsys/datasafe-cli/resource-config.json index 8db3b21ef..59874070c 100644 --- a/datasafe-cli/src/main/resources/META-INF/native-image/de.adorsys/datasafe-cli/resource-config.json +++ b/datasafe-cli/src/main/resources/META-INF/native-image/de.adorsys/datasafe-cli/resource-config.json @@ -1318,7 +1318,7 @@ "pattern": "org/bouncycastle/util/io/TeeOutputStream.class" }, { - "pattern": "org/joda/time/tz/data/*" + "pattern": "org/joda/time/tz/data/.+" }, { "pattern": "org/slf4j/impl/StaticLoggerBinder.class" From 2596281fcb792ef84280f488840b86d68323a35c Mon Sep 17 00:00:00 2001 From: Valentyn Berezin Date: Thu, 26 Sep 2019 16:02:37 +0300 Subject: [PATCH 139/255] DOC-159. Fixed issue with FS storage - write is not appending --- .../datasafe/storage/impl/fs/FileSystemStorageService.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/datasafe-storage/datasafe-storage-impl-fs/src/main/java/de/adorsys/datasafe/storage/impl/fs/FileSystemStorageService.java b/datasafe-storage/datasafe-storage-impl-fs/src/main/java/de/adorsys/datasafe/storage/impl/fs/FileSystemStorageService.java index 3866ad102..da0e4df98 100644 --- a/datasafe-storage/datasafe-storage-impl-fs/src/main/java/de/adorsys/datasafe/storage/impl/fs/FileSystemStorageService.java +++ b/datasafe-storage/datasafe-storage-impl-fs/src/main/java/de/adorsys/datasafe/storage/impl/fs/FileSystemStorageService.java @@ -89,7 +89,7 @@ public OutputStream write(WithCallback Date: Thu, 26 Sep 2019 16:17:19 +0300 Subject: [PATCH 140/255] DOC-159. Fixed amazon S3 routing in CLI --- .../de/adorsys/datasafe/cli/config/DatasafeFactory.java | 3 ++- .../datasafe/storage/api/UriBasedAuthStorageService.java | 9 +++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/config/DatasafeFactory.java b/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/config/DatasafeFactory.java index d59811623..83180d469 100644 --- a/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/config/DatasafeFactory.java +++ b/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/config/DatasafeFactory.java @@ -88,7 +88,8 @@ private static StorageService amazonS3() { // Bucket name is encoded in first path segment acc.getBucketName(), ExecutorServiceUtil.submitterExecutesOnStarvationExecutingService() - ) + ), + uri -> (uri.getHost() + "/" + uri.getPath()).split("/") ); } diff --git a/datasafe-storage/datasafe-storage-api/src/main/java/de/adorsys/datasafe/storage/api/UriBasedAuthStorageService.java b/datasafe-storage/datasafe-storage-api/src/main/java/de/adorsys/datasafe/storage/api/UriBasedAuthStorageService.java index e8bd1c018..f3796b52b 100644 --- a/datasafe-storage/datasafe-storage-api/src/main/java/de/adorsys/datasafe/storage/api/UriBasedAuthStorageService.java +++ b/datasafe-storage/datasafe-storage-api/src/main/java/de/adorsys/datasafe/storage/api/UriBasedAuthStorageService.java @@ -38,6 +38,15 @@ public UriBasedAuthStorageService(Function storageServ location.getScheme() + "://" + location.getHost() + portValue(location) + "/"; } + public UriBasedAuthStorageService(Function storageServiceBuilder, + Function segmentator) { + this.storageServiceBuilder = storageServiceBuilder; + this.regionExtractor = location -> segmentator.apply(location)[0]; + this.bucketExtractor = location -> segmentator.apply(location)[1]; + this.endpointExtractor = location -> + location.getScheme() + "://" + location.getHost() + portValue(location) + "/"; + } + @Override protected StorageService service(AbsoluteLocation location) { String[] authority = location.location().asURI().getAuthority().split("@")[0].split(":"); From cdd98137ffb5f5784c3da26ed9e29ea75dd5eb51 Mon Sep 17 00:00:00 2001 From: Valentyn Berezin Date: Thu, 26 Sep 2019 16:27:50 +0300 Subject: [PATCH 141/255] DOC-159. Fixed issue with FS storage - write is not appending --- .../datasafe/storage/impl/fs/FileSystemStorageService.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/datasafe-storage/datasafe-storage-impl-fs/src/main/java/de/adorsys/datasafe/storage/impl/fs/FileSystemStorageService.java b/datasafe-storage/datasafe-storage-impl-fs/src/main/java/de/adorsys/datasafe/storage/impl/fs/FileSystemStorageService.java index da0e4df98..5c847c99d 100644 --- a/datasafe-storage/datasafe-storage-impl-fs/src/main/java/de/adorsys/datasafe/storage/impl/fs/FileSystemStorageService.java +++ b/datasafe-storage/datasafe-storage-impl-fs/src/main/java/de/adorsys/datasafe/storage/impl/fs/FileSystemStorageService.java @@ -89,7 +89,9 @@ public OutputStream write(WithCallback Date: Thu, 26 Sep 2019 16:29:21 +0300 Subject: [PATCH 142/255] DOC-159. Update README too --- datasafe-cli/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/datasafe-cli/README.md b/datasafe-cli/README.md index f33a013b4..a5a248381 100644 --- a/datasafe-cli/README.md +++ b/datasafe-cli/README.md @@ -23,9 +23,9 @@ And than allways start the Cli in this tmp directory. In this case, you can use ``` -u=peter -p=peter -sp=system profile create ``` -1. Add the url of minio with a new storagename. Notice that the bucket is at the end of the url. +1. Add the url of minio with a new storagename. Notice that the bucket (*affe*) is at the end of the url. ``` - -u=peter -p=peter -sp=system profile storage add -i my-minio -p http://localhost:9000/affe + -u=peter -p=peter -sp=system profile storage add -i my-minio -p http://localhost:9000/eu-central-1/affe/ ``` 1. Add the accesskey and secretkey. It assumed, they are simpleAcessKey and simpleSecretKey. From e2318f48fa78fba8a779cb6b9ec15cf14c2c1477 Mon Sep 17 00:00:00 2001 From: Valentyn Berezin Date: Thu, 26 Sep 2019 16:33:55 +0300 Subject: [PATCH 143/255] DOC-159. Update README with region --- datasafe-cli/README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/datasafe-cli/README.md b/datasafe-cli/README.md index a5a248381..3788a0a6a 100644 --- a/datasafe-cli/README.md +++ b/datasafe-cli/README.md @@ -15,6 +15,7 @@ security.provider.n=provider-class-name # SimpleTest with Minio Lets assume you have a minio running with url: http://localhost:9000. Further you have a bucket named "affe" in that minio. +Also we will assume (although minio ignores it) that you have this bucket in eu-central-1 region. Before you run the Cli (which is the main class) in the project directory, create a temporary folder <$projectDir>/tmp. And than allways start the Cli in this tmp directory. In this case, you can use the default confirms and all profiles/keys/secrets will be stored in the tmp directory. As this example is to store the data in minio, the data is not stored in the tmp directory, but in minio. @@ -24,6 +25,8 @@ And than allways start the Cli in this tmp directory. In this case, you can use -u=peter -p=peter -sp=system profile create ``` 1. Add the url of minio with a new storagename. Notice that the bucket (*affe*) is at the end of the url. +Also, notice region *eu-central-1* is at the beginning of URL path. + ``` -u=peter -p=peter -sp=system profile storage add -i my-minio -p http://localhost:9000/eu-central-1/affe/ ``` From ec802188793e10e830974757135808d3fced824b Mon Sep 17 00:00:00 2001 From: Valentyn Berezin Date: Thu, 26 Sep 2019 16:49:37 +0300 Subject: [PATCH 144/255] DOC-159. Fix issue when path starts with "/" --- .../java/de/adorsys/datasafe/cli/config/DatasafeFactory.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/config/DatasafeFactory.java b/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/config/DatasafeFactory.java index 83180d469..49aaa6ba3 100644 --- a/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/config/DatasafeFactory.java +++ b/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/config/DatasafeFactory.java @@ -89,7 +89,7 @@ private static StorageService amazonS3() { acc.getBucketName(), ExecutorServiceUtil.submitterExecutesOnStarvationExecutingService() ), - uri -> (uri.getHost() + "/" + uri.getPath()).split("/") + uri -> (uri.getHost() + "/" + uri.getPath().replaceFirst("^/", "")).split("/") ); } From 886f6bf6c6463b6bacfcaf88853855b176b34aef Mon Sep 17 00:00:00 2001 From: Valentyn Berezin Date: Thu, 26 Sep 2019 18:51:16 +0300 Subject: [PATCH 145/255] DOC-159. Added basic tests for CLI --- .travis.yml | 2 + .../datasafe/cli/commands/profile/Create.java | 22 ++++-- .../src/test/bash/basic_functionality_test.sh | 68 +++++++++++++++++++ 3 files changed, 85 insertions(+), 7 deletions(-) create mode 100755 datasafe-cli/src/test/bash/basic_functionality_test.sh diff --git a/.travis.yml b/.travis.yml index ae6744d78..7da508a6b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -66,6 +66,8 @@ build-cli: &build-cli - /bin/bash .travis/enable_bouncycastle_security.sh # Build native image, no settings.xml needed - ./mvnw -f datasafe-cli/pom.xml clean package -B -V -Pnative-image -DskipTests + # Perform basic testing + - ./datasafe-cli/basic_functionality_test.sh datasafe-cli/target/datasafe-cli # CLI artifacts publishing: deploy-cli: &deploy-cli diff --git a/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/commands/profile/Create.java b/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/commands/profile/Create.java index 4b18ca412..451916491 100644 --- a/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/commands/profile/Create.java +++ b/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/commands/profile/Create.java @@ -22,8 +22,9 @@ public class Create implements Runnable { @Override public void run() { - Uri publicKeys = inpPath("Public keys", atRoot("pubkeys")); - Uri inbox = inpPath("Your INBOX folder", atRoot("inbox/")); + String user = profile.getCli().auth().getUserID().getValue(); + Uri publicKeys = inpPath("Public keys", atRoot(user, "pubkeys")); + Uri inbox = inpPath("Your INBOX folder", atRoot(user, "inbox/")); CreateUserPublicProfile publicProfile = CreateUserPublicProfile.builder() .id(profile.getCli().auth().getUserID()) @@ -35,12 +36,12 @@ public void run() { CreateUserPrivateProfile privateProfile = CreateUserPrivateProfile.builder() .id(profile.getCli().auth()) - .keystore(BasePrivateResource.forAbsolutePrivate(inpPath("Keystore", atRoot("keystore")))) - .privateStorage(BasePrivateResource.forAbsolutePrivate(inpPath("Private files", atRoot("private/")))) + .keystore(BasePrivateResource.forAbsolutePrivate(inpPath("Keystore", atRoot(user, "keystore")))) + .privateStorage(BasePrivateResource.forAbsolutePrivate(inpPath("Private files", atRoot(user, "private/")))) .inboxWithWriteAccess(BasePrivateResource.forAbsolutePrivate(inbox)) .storageCredentialsKeystore( BasePrivateResource.forAbsolutePrivate( - inpPath("Storage credentials keystore", atRoot("storage.keystore")) + inpPath("Storage credentials keystore", atRoot(user, "storage.keystore")) ) ) .associatedResources(Collections.emptyList()) @@ -54,8 +55,15 @@ public void run() { ); } - private String atRoot(String name) { - return profile.getCli().getProfilesRoot().resolve(name).toAbsolutePath().toUri().toASCIIString() + + private String atRoot(String username, String name) { + return profile + .getCli() + .getProfilesRoot() + .resolve(username) + .resolve(name) + .toAbsolutePath() + .toUri() + .toASCIIString() + (name.endsWith("/") ? "/" : ""); } } diff --git a/datasafe-cli/src/test/bash/basic_functionality_test.sh b/datasafe-cli/src/test/bash/basic_functionality_test.sh new file mode 100755 index 000000000..c929e79b0 --- /dev/null +++ b/datasafe-cli/src/test/bash/basic_functionality_test.sh @@ -0,0 +1,68 @@ +#!/bin/bash + +if [[ -z "$1" ]] ; then + echo "Test expects datasafe-cli executable path as 1st argument" + exit 1 +fi + +CLI="$1" +PROFILE_ROOT="$(pwd)/cli-profiles/" +MINIO_ACCESS_KEY="minio-access-key" +MINIO_SECRET_KEY="minio-secret-key" +MINIO_BUCKET="testBucket" +VOLUME="$(pwd)/minio/$MINIO_BUCKET" +SECRET_TEXT="Secret text" +PRIVATE_ON_FS="folder-fs/secret_on_fs.txt" +INBOX_ON_FS="hello.txt" +PRIVATE_ON_MINIO="folder-minio/secret_on_minio.txt" + +# create minio volume bucket +mkdir -p "$VOLUME" + +# Spin up minio to imitate S3, minio will create MINIO_BUCKET based on volume +docker run -d \ + -p 9000:9000 \ + -e MINIO_ACCESS_KEY="$MINIO_ACCESS_KEY" \ + -e MINIO_SECRET_KEY="$MINIO_SECRET_KEY" \ + --mount type=bind,source="$VOLUME,target=/data" \ + minio/minio \ + server /data \ + || exit 1 + +echo 'Creating profile' +yes '' | $CLI -u=user -p=password -sp=system_password -rd="$PROFILE_ROOT" profile create || exit 1 + +echo 'Register MINIO storage' +$CLI -u=user -p=password -sp=system_password -rd="$PROFILE_ROOT" profile storage add -i=MINIO -p="https://127.0.0.1:9000/eu-central-1/$MINIO_BUCKET/" || exit 1 +$CLI -u=user -p=password -sp=system_password -rd="$PROFILE_ROOT" profile storage credentials add -m="https://.+" -u="$MINIO_ACCESS_KEY" -p="$MINIO_SECRET_KEY" || exit 1 + +echo "$SECRET_TEXT" > my_secret.txt + +echo 'Store secret in FS' +$CLI -u=user -p=password -sp=system_password -rd="$PROFILE_ROOT" private cp my_secret.txt "$PRIVATE_ON_FS" || exit 1 + +echo 'Verify FS file content' +FS_TEXT=$($CLI -u=user -p=password -sp=system_password -rd="$PROFILE_ROOT" private cat "$PRIVATE_ON_FS") +[[ "$FS_TEXT" != "$SECRET_TEXT" ]] && echo "Filesystem has wrong file content" && exit 1 +echo 'Verify FS file list' +FS_LIST=$($CLI -u=user -p=password -sp=system_password -rd="$PROFILE_ROOT" private ls) +[[ "$FS_LIST" != "$PRIVATE_ON_FS" ]] && echo "Filesystem has wrong file list" && exit 1 + +echo 'Creating profile to share with' +yes '' | $CLI -u=friend -p=password-friend -sp=system_password -rd="$PROFILE_ROOT" profile create || exit 1 +echo 'Sharing file with friend' +$CLI -u=user -p=password -sp=system_password -rd="$PROFILE_ROOT" inbox share -s=my_secret.txt -r=friend -f="$INBOX_ON_FS" || exit 1 +echo 'Verify FS inbox file content' +FS_INBOX_TEXT=$($CLI -u=friend -p=password-friend -sp=system_password -rd="$PROFILE_ROOT" inbox cat "$INBOX_ON_FS") +[[ "$FS_INBOX_TEXT" != "$SECRET_TEXT" ]] && echo "Filesystem has wrong shared file content" && exit 1 +echo 'Verify FS inbox file list' +FS_INBOX_LIST=$($CLI -u=friend -p=password-friend -sp=system_password -rd="$PROFILE_ROOT" inbox ls) +[[ "$FS_INBOX_LIST" != "$INBOX_ON_FS" ]] && echo "Filesystem has wrong shared file list" && exit 1 + +# Checking how private files work on MINIO: +echo 'Store secret in MINIO' +$CLI -u=user -p=password -sp=system_password -rd="$PROFILE_ROOT" private cp -s=MINIO my_secret.txt "$PRIVATE_ON_MINIO" || exit 1 + +echo 'Verify MINIO' +MINIO_TEXT=$($CLI -u=user -p=password -sp=system_password -rd="$PROFILE_ROOT" private cat -s=MINIO "$PRIVATE_ON_MINIO") +[[ "$MINIO_TEXT" != "$SECRET_TEXT" ]] && echo "Minio has wrong file content" && exit 1 \ No newline at end of file From ece58c481f9e02946a07c8498dc600e81fc4acbe Mon Sep 17 00:00:00 2001 From: Valentyn Berezin Date: Thu, 26 Sep 2019 19:05:30 +0300 Subject: [PATCH 146/255] DOC-159. Fixed test script path --- .travis.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 7da508a6b..e592b9a86 100644 --- a/.travis.yml +++ b/.travis.yml @@ -67,7 +67,8 @@ build-cli: &build-cli # Build native image, no settings.xml needed - ./mvnw -f datasafe-cli/pom.xml clean package -B -V -Pnative-image -DskipTests # Perform basic testing - - ./datasafe-cli/basic_functionality_test.sh datasafe-cli/target/datasafe-cli + - echo 'Testing built CLI' + - ./datasafe-cli/src/test/bash/basic_functionality_test.sh datasafe-cli/target/datasafe-cli # CLI artifacts publishing: deploy-cli: &deploy-cli From 900ff552f6b2f0faa00686e0606cf30f4e8b4235 Mon Sep 17 00:00:00 2001 From: Valentyn Berezin Date: Thu, 26 Sep 2019 19:20:25 +0300 Subject: [PATCH 147/255] DOC-159. Remove https from minio --- datasafe-cli/src/test/bash/basic_functionality_test.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/datasafe-cli/src/test/bash/basic_functionality_test.sh b/datasafe-cli/src/test/bash/basic_functionality_test.sh index c929e79b0..84c1b40a0 100755 --- a/datasafe-cli/src/test/bash/basic_functionality_test.sh +++ b/datasafe-cli/src/test/bash/basic_functionality_test.sh @@ -33,8 +33,8 @@ echo 'Creating profile' yes '' | $CLI -u=user -p=password -sp=system_password -rd="$PROFILE_ROOT" profile create || exit 1 echo 'Register MINIO storage' -$CLI -u=user -p=password -sp=system_password -rd="$PROFILE_ROOT" profile storage add -i=MINIO -p="https://127.0.0.1:9000/eu-central-1/$MINIO_BUCKET/" || exit 1 -$CLI -u=user -p=password -sp=system_password -rd="$PROFILE_ROOT" profile storage credentials add -m="https://.+" -u="$MINIO_ACCESS_KEY" -p="$MINIO_SECRET_KEY" || exit 1 +$CLI -u=user -p=password -sp=system_password -rd="$PROFILE_ROOT" profile storage add -i=MINIO -p="http://127.0.0.1:9000/eu-central-1/$MINIO_BUCKET/" || exit 1 +$CLI -u=user -p=password -sp=system_password -rd="$PROFILE_ROOT" profile storage credentials add -m="http://.+" -u="$MINIO_ACCESS_KEY" -p="$MINIO_SECRET_KEY" || exit 1 echo "$SECRET_TEXT" > my_secret.txt From 8d84c88c113d03116e8e09ed6350be341d121dc0 Mon Sep 17 00:00:00 2001 From: Valentyn Berezin Date: Fri, 27 Sep 2019 12:31:11 +0300 Subject: [PATCH 148/255] DOC-159. Fix minio bucket not created --- datasafe-cli/src/test/bash/basic_functionality_test.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/datasafe-cli/src/test/bash/basic_functionality_test.sh b/datasafe-cli/src/test/bash/basic_functionality_test.sh index 84c1b40a0..b1beb3626 100755 --- a/datasafe-cli/src/test/bash/basic_functionality_test.sh +++ b/datasafe-cli/src/test/bash/basic_functionality_test.sh @@ -10,14 +10,14 @@ PROFILE_ROOT="$(pwd)/cli-profiles/" MINIO_ACCESS_KEY="minio-access-key" MINIO_SECRET_KEY="minio-secret-key" MINIO_BUCKET="testBucket" -VOLUME="$(pwd)/minio/$MINIO_BUCKET" +VOLUME="$(pwd)/minio" SECRET_TEXT="Secret text" PRIVATE_ON_FS="folder-fs/secret_on_fs.txt" INBOX_ON_FS="hello.txt" PRIVATE_ON_MINIO="folder-minio/secret_on_minio.txt" # create minio volume bucket -mkdir -p "$VOLUME" +mkdir -p "$VOLUME/$MINIO_BUCKET" # Spin up minio to imitate S3, minio will create MINIO_BUCKET based on volume docker run -d \ From 4023dc60e8e9ee0a4d4560f7eee91907c7532ec0 Mon Sep 17 00:00:00 2001 From: Valentyn Berezin Date: Fri, 27 Sep 2019 12:56:53 +0300 Subject: [PATCH 149/255] DOC-159. Added notice for SSL certificates --- datasafe-cli/Dockerfile | 3 +- datasafe-cli/README.md | 10 +++++ .../src/test/bash/basic_functionality_test.sh | 38 ++++++++++++------- 3 files changed, 36 insertions(+), 15 deletions(-) diff --git a/datasafe-cli/Dockerfile b/datasafe-cli/Dockerfile index a23c6b513..d4dab438f 100644 --- a/datasafe-cli/Dockerfile +++ b/datasafe-cli/Dockerfile @@ -13,8 +13,9 @@ RUN chmod +x ~/.install-jdk-travis.sh RUN ~/.install-jdk-travis.sh RUN apt-get install git -y -RUN git clone https://github.com/adorsys/datasafe +RUN git clone https://github.com/adorsys/datasafe && echo "OK" > tsss1 WORKDIR datasafe +RUN git checkout -t origin/feature/datasafe-cli-w-s3 && echo "OK" > ~/.tsss1 RUN .travis/install_custom_jdk_and_add_security_providers.sh diff --git a/datasafe-cli/README.md b/datasafe-cli/README.md index 3788a0a6a..e23ff8ad6 100644 --- a/datasafe-cli/README.md +++ b/datasafe-cli/README.md @@ -1,3 +1,13 @@ +# Issues with certificates + +If you observe error +`InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty` when running +cli executable, then launch it with Java CA certificates path provided, i.e.: +``` +./cli -Djavax.net.ssl.trustStore=/etc/ssl/certs/java/cacerts -c ~/credentials profile create +``` +where `/etc/ssl/certs/java/cacerts` is the location of Java certificates keystore. + # Build ## Using Dockerfile diff --git a/datasafe-cli/src/test/bash/basic_functionality_test.sh b/datasafe-cli/src/test/bash/basic_functionality_test.sh index b1beb3626..381252603 100755 --- a/datasafe-cli/src/test/bash/basic_functionality_test.sh +++ b/datasafe-cli/src/test/bash/basic_functionality_test.sh @@ -16,53 +16,63 @@ PRIVATE_ON_FS="folder-fs/secret_on_fs.txt" INBOX_ON_FS="hello.txt" PRIVATE_ON_MINIO="folder-minio/secret_on_minio.txt" + # create minio volume bucket mkdir -p "$VOLUME/$MINIO_BUCKET" # Spin up minio to imitate S3, minio will create MINIO_BUCKET based on volume -docker run -d \ +MINIO_ID=$(docker run -d \ -p 9000:9000 \ -e MINIO_ACCESS_KEY="$MINIO_ACCESS_KEY" \ -e MINIO_SECRET_KEY="$MINIO_SECRET_KEY" \ --mount type=bind,source="$VOLUME,target=/data" \ minio/minio \ - server /data \ - || exit 1 + server /data) +[[ -z "$MINIO_ID" ]] && echo "Minio ID missing, maybe minio failed to start, aborting" && exit 1 + +do_exit() { + # Stop minio + echo "Stopping minio" + docker rm -f "$MINIO_ID" + exit "$1" +} echo 'Creating profile' -yes '' | $CLI -u=user -p=password -sp=system_password -rd="$PROFILE_ROOT" profile create || exit 1 +yes '' | $CLI -u=user -p=password -sp=system_password -rd="$PROFILE_ROOT" profile create || do_exit 1 echo 'Register MINIO storage' -$CLI -u=user -p=password -sp=system_password -rd="$PROFILE_ROOT" profile storage add -i=MINIO -p="http://127.0.0.1:9000/eu-central-1/$MINIO_BUCKET/" || exit 1 -$CLI -u=user -p=password -sp=system_password -rd="$PROFILE_ROOT" profile storage credentials add -m="http://.+" -u="$MINIO_ACCESS_KEY" -p="$MINIO_SECRET_KEY" || exit 1 +$CLI -u=user -p=password -sp=system_password -rd="$PROFILE_ROOT" profile storage add -i=MINIO -p="http://127.0.0.1:9000/eu-central-1/$MINIO_BUCKET/" || do_exit 1 +$CLI -u=user -p=password -sp=system_password -rd="$PROFILE_ROOT" profile storage credentials add -m="http://.+" -u="$MINIO_ACCESS_KEY" -p="$MINIO_SECRET_KEY" || do_exit 1 echo "$SECRET_TEXT" > my_secret.txt echo 'Store secret in FS' -$CLI -u=user -p=password -sp=system_password -rd="$PROFILE_ROOT" private cp my_secret.txt "$PRIVATE_ON_FS" || exit 1 +$CLI -u=user -p=password -sp=system_password -rd="$PROFILE_ROOT" private cp my_secret.txt "$PRIVATE_ON_FS" || do_exit 1 echo 'Verify FS file content' FS_TEXT=$($CLI -u=user -p=password -sp=system_password -rd="$PROFILE_ROOT" private cat "$PRIVATE_ON_FS") -[[ "$FS_TEXT" != "$SECRET_TEXT" ]] && echo "Filesystem has wrong file content" && exit 1 +[[ "$FS_TEXT" != "$SECRET_TEXT" ]] && echo "Filesystem has wrong file content" && do_exit 1 echo 'Verify FS file list' FS_LIST=$($CLI -u=user -p=password -sp=system_password -rd="$PROFILE_ROOT" private ls) -[[ "$FS_LIST" != "$PRIVATE_ON_FS" ]] && echo "Filesystem has wrong file list" && exit 1 +[[ "$FS_LIST" != "$PRIVATE_ON_FS" ]] && echo "Filesystem has wrong file list" && do_exit 1 echo 'Creating profile to share with' -yes '' | $CLI -u=friend -p=password-friend -sp=system_password -rd="$PROFILE_ROOT" profile create || exit 1 +yes '' | $CLI -u=friend -p=password-friend -sp=system_password -rd="$PROFILE_ROOT" profile create || do_exit 1 echo 'Sharing file with friend' -$CLI -u=user -p=password -sp=system_password -rd="$PROFILE_ROOT" inbox share -s=my_secret.txt -r=friend -f="$INBOX_ON_FS" || exit 1 +$CLI -u=user -p=password -sp=system_password -rd="$PROFILE_ROOT" inbox share -s=my_secret.txt -r=friend -f="$INBOX_ON_FS" || do_exit 1 echo 'Verify FS inbox file content' FS_INBOX_TEXT=$($CLI -u=friend -p=password-friend -sp=system_password -rd="$PROFILE_ROOT" inbox cat "$INBOX_ON_FS") -[[ "$FS_INBOX_TEXT" != "$SECRET_TEXT" ]] && echo "Filesystem has wrong shared file content" && exit 1 +[[ "$FS_INBOX_TEXT" != "$SECRET_TEXT" ]] && echo "Filesystem has wrong shared file content" && do_exit 1 echo 'Verify FS inbox file list' FS_INBOX_LIST=$($CLI -u=friend -p=password-friend -sp=system_password -rd="$PROFILE_ROOT" inbox ls) [[ "$FS_INBOX_LIST" != "$INBOX_ON_FS" ]] && echo "Filesystem has wrong shared file list" && exit 1 # Checking how private files work on MINIO: echo 'Store secret in MINIO' -$CLI -u=user -p=password -sp=system_password -rd="$PROFILE_ROOT" private cp -s=MINIO my_secret.txt "$PRIVATE_ON_MINIO" || exit 1 +$CLI -u=user -p=password -sp=system_password -rd="$PROFILE_ROOT" private cp -s=MINIO my_secret.txt "$PRIVATE_ON_MINIO" || do_exit 1 echo 'Verify MINIO' MINIO_TEXT=$($CLI -u=user -p=password -sp=system_password -rd="$PROFILE_ROOT" private cat -s=MINIO "$PRIVATE_ON_MINIO") -[[ "$MINIO_TEXT" != "$SECRET_TEXT" ]] && echo "Minio has wrong file content" && exit 1 \ No newline at end of file +[[ "$MINIO_TEXT" != "$SECRET_TEXT" ]] && echo "Minio has wrong file content" && do_exit 1 + +do_exit 0 \ No newline at end of file From ff544c66c3d40c56d6a18a12f8c90b8542583c41 Mon Sep 17 00:00:00 2001 From: Valentyn Berezin Date: Fri, 27 Sep 2019 13:01:34 +0300 Subject: [PATCH 150/255] DOC-159. Stopping minio by name --- datasafe-cli/src/test/bash/basic_functionality_test.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/datasafe-cli/src/test/bash/basic_functionality_test.sh b/datasafe-cli/src/test/bash/basic_functionality_test.sh index 381252603..7c3706d71 100755 --- a/datasafe-cli/src/test/bash/basic_functionality_test.sh +++ b/datasafe-cli/src/test/bash/basic_functionality_test.sh @@ -21,19 +21,19 @@ PRIVATE_ON_MINIO="folder-minio/secret_on_minio.txt" mkdir -p "$VOLUME/$MINIO_BUCKET" # Spin up minio to imitate S3, minio will create MINIO_BUCKET based on volume -MINIO_ID=$(docker run -d \ +docker run -d \ + --name MINIO \ -p 9000:9000 \ -e MINIO_ACCESS_KEY="$MINIO_ACCESS_KEY" \ -e MINIO_SECRET_KEY="$MINIO_SECRET_KEY" \ --mount type=bind,source="$VOLUME,target=/data" \ minio/minio \ - server /data) -[[ -z "$MINIO_ID" ]] && echo "Minio ID missing, maybe minio failed to start, aborting" && exit 1 + server /data do_exit() { # Stop minio echo "Stopping minio" - docker rm -f "$MINIO_ID" + docker rm -f MINIO exit "$1" } From 8acf62958e504642ec79c2a788ae92fc81bade88 Mon Sep 17 00:00:00 2001 From: Valentyn Berezin Date: Fri, 27 Sep 2019 13:05:16 +0300 Subject: [PATCH 151/255] DOC-159. Tidy up dockerfile --- datasafe-cli/Dockerfile | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/datasafe-cli/Dockerfile b/datasafe-cli/Dockerfile index d4dab438f..a23c6b513 100644 --- a/datasafe-cli/Dockerfile +++ b/datasafe-cli/Dockerfile @@ -13,9 +13,8 @@ RUN chmod +x ~/.install-jdk-travis.sh RUN ~/.install-jdk-travis.sh RUN apt-get install git -y -RUN git clone https://github.com/adorsys/datasafe && echo "OK" > tsss1 +RUN git clone https://github.com/adorsys/datasafe WORKDIR datasafe -RUN git checkout -t origin/feature/datasafe-cli-w-s3 && echo "OK" > ~/.tsss1 RUN .travis/install_custom_jdk_and_add_security_providers.sh From 3ae2be9f35653b1cf1df2083c66282ef3d1225a5 Mon Sep 17 00:00:00 2001 From: Valentyn Berezin Date: Fri, 27 Sep 2019 13:53:13 +0300 Subject: [PATCH 152/255] DOC-159. Test minio only on linux --- .travis.yml | 5 +- ...test.sh => basic_functionality_test_fs.sh} | 34 ----------- .../bash/basic_functionality_test_minio.sh | 58 +++++++++++++++++++ 3 files changed, 62 insertions(+), 35 deletions(-) rename datasafe-cli/src/test/bash/{basic_functionality_test.sh => basic_functionality_test_fs.sh} (56%) create mode 100755 datasafe-cli/src/test/bash/basic_functionality_test_minio.sh diff --git a/.travis.yml b/.travis.yml index e592b9a86..2928b5245 100644 --- a/.travis.yml +++ b/.travis.yml @@ -56,6 +56,7 @@ after_success: ################ Custom build stages: # Special test-skipping stage to build CLI, using maven-wrapper + build-cli: &build-cli script: # re-export JAVA_HOME @@ -68,7 +69,9 @@ build-cli: &build-cli - ./mvnw -f datasafe-cli/pom.xml clean package -B -V -Pnative-image -DskipTests # Perform basic testing - echo 'Testing built CLI' - - ./datasafe-cli/src/test/bash/basic_functionality_test.sh datasafe-cli/target/datasafe-cli + - ./datasafe-cli/src/test/bash/basic_functionality_test_fs.sh datasafe-cli/target/datasafe-cli + # Docker not available on MacOS + - [[ "linux" == "$TRAVIS_OS_NAME"]] \&& ./datasafe-cli/src/test/bash/basic_functionality_test_minio.sh datasafe-cli/target/datasafe-cli # CLI artifacts publishing: deploy-cli: &deploy-cli diff --git a/datasafe-cli/src/test/bash/basic_functionality_test.sh b/datasafe-cli/src/test/bash/basic_functionality_test_fs.sh similarity index 56% rename from datasafe-cli/src/test/bash/basic_functionality_test.sh rename to datasafe-cli/src/test/bash/basic_functionality_test_fs.sh index 7c3706d71..72a15603f 100755 --- a/datasafe-cli/src/test/bash/basic_functionality_test.sh +++ b/datasafe-cli/src/test/bash/basic_functionality_test_fs.sh @@ -7,43 +7,17 @@ fi CLI="$1" PROFILE_ROOT="$(pwd)/cli-profiles/" -MINIO_ACCESS_KEY="minio-access-key" -MINIO_SECRET_KEY="minio-secret-key" -MINIO_BUCKET="testBucket" -VOLUME="$(pwd)/minio" SECRET_TEXT="Secret text" PRIVATE_ON_FS="folder-fs/secret_on_fs.txt" INBOX_ON_FS="hello.txt" -PRIVATE_ON_MINIO="folder-minio/secret_on_minio.txt" - - -# create minio volume bucket -mkdir -p "$VOLUME/$MINIO_BUCKET" - -# Spin up minio to imitate S3, minio will create MINIO_BUCKET based on volume -docker run -d \ - --name MINIO \ - -p 9000:9000 \ - -e MINIO_ACCESS_KEY="$MINIO_ACCESS_KEY" \ - -e MINIO_SECRET_KEY="$MINIO_SECRET_KEY" \ - --mount type=bind,source="$VOLUME,target=/data" \ - minio/minio \ - server /data do_exit() { - # Stop minio - echo "Stopping minio" - docker rm -f MINIO exit "$1" } echo 'Creating profile' yes '' | $CLI -u=user -p=password -sp=system_password -rd="$PROFILE_ROOT" profile create || do_exit 1 -echo 'Register MINIO storage' -$CLI -u=user -p=password -sp=system_password -rd="$PROFILE_ROOT" profile storage add -i=MINIO -p="http://127.0.0.1:9000/eu-central-1/$MINIO_BUCKET/" || do_exit 1 -$CLI -u=user -p=password -sp=system_password -rd="$PROFILE_ROOT" profile storage credentials add -m="http://.+" -u="$MINIO_ACCESS_KEY" -p="$MINIO_SECRET_KEY" || do_exit 1 - echo "$SECRET_TEXT" > my_secret.txt echo 'Store secret in FS' @@ -67,12 +41,4 @@ echo 'Verify FS inbox file list' FS_INBOX_LIST=$($CLI -u=friend -p=password-friend -sp=system_password -rd="$PROFILE_ROOT" inbox ls) [[ "$FS_INBOX_LIST" != "$INBOX_ON_FS" ]] && echo "Filesystem has wrong shared file list" && exit 1 -# Checking how private files work on MINIO: -echo 'Store secret in MINIO' -$CLI -u=user -p=password -sp=system_password -rd="$PROFILE_ROOT" private cp -s=MINIO my_secret.txt "$PRIVATE_ON_MINIO" || do_exit 1 - -echo 'Verify MINIO' -MINIO_TEXT=$($CLI -u=user -p=password -sp=system_password -rd="$PROFILE_ROOT" private cat -s=MINIO "$PRIVATE_ON_MINIO") -[[ "$MINIO_TEXT" != "$SECRET_TEXT" ]] && echo "Minio has wrong file content" && do_exit 1 - do_exit 0 \ No newline at end of file diff --git a/datasafe-cli/src/test/bash/basic_functionality_test_minio.sh b/datasafe-cli/src/test/bash/basic_functionality_test_minio.sh new file mode 100755 index 000000000..779564287 --- /dev/null +++ b/datasafe-cli/src/test/bash/basic_functionality_test_minio.sh @@ -0,0 +1,58 @@ +#!/bin/bash + +if [[ -z "$1" ]] ; then + echo "Test expects datasafe-cli executable path as 1st argument" + exit 1 +fi + +CLI="$1" +PROFILE_ROOT="$(pwd)/cli-profiles/" +MINIO_ACCESS_KEY="minio-access-key" +MINIO_SECRET_KEY="minio-secret-key" +MINIO_BUCKET="testBucket" +VOLUME="$(pwd)/minio" +SECRET_TEXT="Secret text" +PRIVATE_ON_MINIO="folder-minio/secret_on_minio.txt" + + +# create minio volume bucket +mkdir -p "$VOLUME/$MINIO_BUCKET" + +# Spin up minio to imitate S3, minio will create MINIO_BUCKET based on volume +docker run -d \ + --name MINIO \ + -p 9000:9000 \ + -e MINIO_ACCESS_KEY="$MINIO_ACCESS_KEY" \ + -e MINIO_SECRET_KEY="$MINIO_SECRET_KEY" \ + --mount type=bind,source="$VOLUME,target=/data" \ + minio/minio \ + server /data || exit 1 + +# Wait some time for minio to spin up +sleep 5 + +do_exit() { + # Stop minio + echo "Stopping minio" + docker rm -f MINIO + exit "$1" +} + +echo 'Creating profile' +yes '' | $CLI -u=user -p=password -sp=system_password -rd="$PROFILE_ROOT" profile create || do_exit 1 + +echo 'Register MINIO storage' +$CLI -u=user -p=password -sp=system_password -rd="$PROFILE_ROOT" profile storage add -i=MINIO -p="http://127.0.0.1:9000/eu-central-1/$MINIO_BUCKET/" || do_exit 1 +$CLI -u=user -p=password -sp=system_password -rd="$PROFILE_ROOT" profile storage credentials add -m="http://.+" -u="$MINIO_ACCESS_KEY" -p="$MINIO_SECRET_KEY" || do_exit 1 + +echo "$SECRET_TEXT" > my_secret.txt + +# Checking how private files work on MINIO: +echo 'Store secret in MINIO' +$CLI -u=user -p=password -sp=system_password -rd="$PROFILE_ROOT" private cp -s=MINIO my_secret.txt "$PRIVATE_ON_MINIO" || do_exit 1 + +echo 'Verify MINIO' +MINIO_TEXT=$($CLI -u=user -p=password -sp=system_password -rd="$PROFILE_ROOT" private cat -s=MINIO "$PRIVATE_ON_MINIO") +[[ "$MINIO_TEXT" != "$SECRET_TEXT" ]] && echo "Minio has wrong file content" && do_exit 1 + +do_exit 0 \ No newline at end of file From 9a57d88fbc8e8eafcfaf35067b0f126c5d6491b2 Mon Sep 17 00:00:00 2001 From: Valentyn Berezin Date: Fri, 27 Sep 2019 14:00:23 +0300 Subject: [PATCH 153/255] DOC-159. Test minio only on linux - fix escape --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 2928b5245..95b7d7d7a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -71,7 +71,7 @@ build-cli: &build-cli - echo 'Testing built CLI' - ./datasafe-cli/src/test/bash/basic_functionality_test_fs.sh datasafe-cli/target/datasafe-cli # Docker not available on MacOS - - [[ "linux" == "$TRAVIS_OS_NAME"]] \&& ./datasafe-cli/src/test/bash/basic_functionality_test_minio.sh datasafe-cli/target/datasafe-cli + - [[ "linux" == "$TRAVIS_OS_NAME"]] \&\& ./datasafe-cli/src/test/bash/basic_functionality_test_minio.sh datasafe-cli/target/datasafe-cli # CLI artifacts publishing: deploy-cli: &deploy-cli From 3b9311f754621a7737fc1c5caab8a01df24c2ce4 Mon Sep 17 00:00:00 2001 From: Valentyn Berezin Date: Fri, 27 Sep 2019 14:03:45 +0300 Subject: [PATCH 154/255] DOC-159. Test minio only on linux - fix escape --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 95b7d7d7a..609adaa6f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -71,7 +71,7 @@ build-cli: &build-cli - echo 'Testing built CLI' - ./datasafe-cli/src/test/bash/basic_functionality_test_fs.sh datasafe-cli/target/datasafe-cli # Docker not available on MacOS - - [[ "linux" == "$TRAVIS_OS_NAME"]] \&\& ./datasafe-cli/src/test/bash/basic_functionality_test_minio.sh datasafe-cli/target/datasafe-cli + - '[[ "linux" == "$TRAVIS_OS_NAME"]] && ./datasafe-cli/src/test/bash/basic_functionality_test_minio.sh datasafe-cli/target/datasafe-cli' # CLI artifacts publishing: deploy-cli: &deploy-cli From 9c0ab39ad8a10d015bb5fb424e1dd16f97d3b0e4 Mon Sep 17 00:00:00 2001 From: Valentyn Berezin Date: Fri, 27 Sep 2019 14:24:25 +0300 Subject: [PATCH 155/255] DOC-159. Another travis tweaks --- .travis.yml | 4 ++-- .../de/adorsys/datasafe/cli/commands/profile/Create.java | 7 ++++--- .../adorsys/datasafe/cli/commands/profile/InputUtil.java | 6 +++--- .../src/test/bash/basic_functionality_test_minio.sh | 6 ++++++ 4 files changed, 15 insertions(+), 8 deletions(-) diff --git a/.travis.yml b/.travis.yml index 609adaa6f..ae1f166a0 100644 --- a/.travis.yml +++ b/.travis.yml @@ -70,8 +70,8 @@ build-cli: &build-cli # Perform basic testing - echo 'Testing built CLI' - ./datasafe-cli/src/test/bash/basic_functionality_test_fs.sh datasafe-cli/target/datasafe-cli - # Docker not available on MacOS - - '[[ "linux" == "$TRAVIS_OS_NAME"]] && ./datasafe-cli/src/test/bash/basic_functionality_test_minio.sh datasafe-cli/target/datasafe-cli' + # Docker not available on MacOS, allow to pass + - ./datasafe-cli/src/test/bash/basic_functionality_test_minio.sh datasafe-cli/target/datasafe-cli # CLI artifacts publishing: deploy-cli: &deploy-cli diff --git a/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/commands/profile/Create.java b/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/commands/profile/Create.java index 451916491..8db93b940 100644 --- a/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/commands/profile/Create.java +++ b/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/commands/profile/Create.java @@ -56,14 +56,15 @@ public void run() { } private String atRoot(String username, String name) { - return profile + String resolved = profile .getCli() .getProfilesRoot() .resolve(username) .resolve(name) .toAbsolutePath() .toUri() - .toASCIIString() + - (name.endsWith("/") ? "/" : ""); + .toASCIIString(); + + return (name.endsWith("/") && !resolved.endsWith("/") ? resolved + "/" : resolved); } } diff --git a/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/commands/profile/InputUtil.java b/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/commands/profile/InputUtil.java index 545f61cc2..638435ee1 100644 --- a/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/commands/profile/InputUtil.java +++ b/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/commands/profile/InputUtil.java @@ -14,7 +14,7 @@ @UtilityClass public class InputUtil { - private static final Scanner sc = new Scanner(System.in); + private static final Scanner SCANNER = new Scanner(System.in); /** * Asks user to input value @@ -23,8 +23,8 @@ public class InputUtil { * @return User input */ public static String input(String text, String defaultValue) { - System.out.println(text + " (" + defaultValue + "):"); - String input = sc.hasNextLine() ? sc.nextLine() : null; + System.out.printf("%s (%s):%n", text, defaultValue); + String input = SCANNER.hasNextLine() ? SCANNER.nextLine() : null; if (Strings.isNullOrEmpty(input)) { return defaultValue; diff --git a/datasafe-cli/src/test/bash/basic_functionality_test_minio.sh b/datasafe-cli/src/test/bash/basic_functionality_test_minio.sh index 779564287..ec369104a 100755 --- a/datasafe-cli/src/test/bash/basic_functionality_test_minio.sh +++ b/datasafe-cli/src/test/bash/basic_functionality_test_minio.sh @@ -5,6 +5,12 @@ if [[ -z "$1" ]] ; then exit 1 fi +# Docker not available on MacOS, allow to pass +if ! [ -x "$(command -v docker)" ]; then + echo 'Error: docker is not installed. Will exit with code 0 not to fail pipeline' + exit 0 +fi + CLI="$1" PROFILE_ROOT="$(pwd)/cli-profiles/" MINIO_ACCESS_KEY="minio-access-key" From 5cdb2dc9503c0e8eeb530a3ff96071ae86c9ca9c Mon Sep 17 00:00:00 2001 From: Valentyn Berezin Date: Fri, 27 Sep 2019 16:41:42 +0300 Subject: [PATCH 156/255] DOC-159. Added test to increase coverage --- .../rest/impl/config/BasicS3Factory.java | 17 ++++ .../rest/impl/config/DatasafeConfig.java | 9 ++- .../datasafe/rest/impl/config/S3Factory.java | 9 +++ .../rest/impl/config/DatasafeConfigTest.java | 77 +++++++++++++++++++ .../application-client-credentials-test.yaml | 8 ++ 5 files changed, 118 insertions(+), 2 deletions(-) create mode 100644 datasafe-rest-impl/src/main/java/de/adorsys/datasafe/rest/impl/config/BasicS3Factory.java create mode 100644 datasafe-rest-impl/src/main/java/de/adorsys/datasafe/rest/impl/config/S3Factory.java create mode 100644 datasafe-rest-impl/src/test/java/de/adorsys/datasafe/rest/impl/config/DatasafeConfigTest.java create mode 100644 datasafe-rest-impl/src/test/resources/application-client-credentials-test.yaml diff --git a/datasafe-rest-impl/src/main/java/de/adorsys/datasafe/rest/impl/config/BasicS3Factory.java b/datasafe-rest-impl/src/main/java/de/adorsys/datasafe/rest/impl/config/BasicS3Factory.java new file mode 100644 index 000000000..f3d53b438 --- /dev/null +++ b/datasafe-rest-impl/src/main/java/de/adorsys/datasafe/rest/impl/config/BasicS3Factory.java @@ -0,0 +1,17 @@ +package de.adorsys.datasafe.rest.impl.config; + +import com.amazonaws.services.s3.AmazonS3; +import de.adorsys.datasafe.storage.impl.s3.S3ClientFactory; + +public class BasicS3Factory implements S3Factory { + + @Override + public AmazonS3 getClient(String endpointUrl, String region, String accessKey, String secretKey) { + return S3ClientFactory.getClient(endpointUrl, region, accessKey, secretKey); + } + + @Override + public AmazonS3 getAmazonClient(String region, String accessKey, String secretKey) { + return S3ClientFactory.getAmazonClient(region, accessKey, secretKey); + } +} diff --git a/datasafe-rest-impl/src/main/java/de/adorsys/datasafe/rest/impl/config/DatasafeConfig.java b/datasafe-rest-impl/src/main/java/de/adorsys/datasafe/rest/impl/config/DatasafeConfig.java index cd17b277e..954f10d3d 100644 --- a/datasafe-rest-impl/src/main/java/de/adorsys/datasafe/rest/impl/config/DatasafeConfig.java +++ b/datasafe-rest-impl/src/main/java/de/adorsys/datasafe/rest/impl/config/DatasafeConfig.java @@ -130,7 +130,7 @@ VersionedDatasafeServices versionedDatasafeServices(StorageService storageServic @Bean @ConditionalOnProperty(value = CLIENT_CREDENTIALS, havingValue = "true") - StorageService clientCredentials(AmazonS3 s3, DatasafeProperties properties) { + StorageService clientCredentials(AmazonS3 s3, S3Factory factory, DatasafeProperties properties) { ExecutorService executorService = ExecutorServiceUtil.submitterExecutesOnStarvationExecutingService(); S3StorageService basicStorage = new S3StorageService( s3, @@ -147,7 +147,7 @@ StorageService clientCredentials(AmazonS3 s3, DatasafeProperties properties) { Pattern.compile(".+"), new UriBasedAuthStorageService( acc -> new S3StorageService( - S3ClientFactory.getClient( + factory.getClient( acc.getEndpoint(), acc.getRegion(), acc.getAccessKey(), @@ -161,6 +161,11 @@ StorageService clientCredentials(AmazonS3 s3, DatasafeProperties properties) { ); } + @Bean + S3Factory factory() { + return new BasicS3Factory(); + } + /** * @return Filesystem based storage service */ diff --git a/datasafe-rest-impl/src/main/java/de/adorsys/datasafe/rest/impl/config/S3Factory.java b/datasafe-rest-impl/src/main/java/de/adorsys/datasafe/rest/impl/config/S3Factory.java new file mode 100644 index 000000000..7297baec4 --- /dev/null +++ b/datasafe-rest-impl/src/main/java/de/adorsys/datasafe/rest/impl/config/S3Factory.java @@ -0,0 +1,9 @@ +package de.adorsys.datasafe.rest.impl.config; + +import com.amazonaws.services.s3.AmazonS3; + +public interface S3Factory { + + AmazonS3 getClient(String endpointUrl, String region, String accessKey, String secretKey); + AmazonS3 getAmazonClient(String region, String accessKey, String secretKey); +} diff --git a/datasafe-rest-impl/src/test/java/de/adorsys/datasafe/rest/impl/config/DatasafeConfigTest.java b/datasafe-rest-impl/src/test/java/de/adorsys/datasafe/rest/impl/config/DatasafeConfigTest.java new file mode 100644 index 000000000..d45607c1d --- /dev/null +++ b/datasafe-rest-impl/src/test/java/de/adorsys/datasafe/rest/impl/config/DatasafeConfigTest.java @@ -0,0 +1,77 @@ +package de.adorsys.datasafe.rest.impl.config; + +import com.amazonaws.services.s3.AmazonS3; +import com.amazonaws.services.s3.model.S3Object; +import de.adorsys.datasafe.storage.api.StorageService; +import de.adorsys.datasafe.types.api.resource.BasePrivateResource; +import de.adorsys.datasafe.types.api.shared.BaseMockitoTest; +import lombok.extern.slf4j.Slf4j; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.mockito.Mock; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.boot.test.context.SpringBootTest; +import org.springframework.boot.test.mock.mockito.MockBean; +import org.springframework.test.context.ActiveProfiles; +import org.springframework.test.context.junit.jupiter.SpringExtension; + +import java.io.ByteArrayInputStream; + +import static java.nio.charset.StandardCharsets.UTF_8; +import static org.assertj.core.api.Assertions.assertThat; +import static org.mockito.Mockito.when; + +@ExtendWith(SpringExtension.class) +@SpringBootTest +@Slf4j +@ActiveProfiles("client-credentials-test") +class DatasafeConfigTest extends BaseMockitoTest { + + private static final String BASIC_STORAGE_ANSWER = "Hello"; + private static final String BASIC_STORAGE_BUCKET = "fooBar"; + private static final String BASIC_FILE_STORAGE_PATH = "tmp/profile"; + private static final String BASIC_STORAGE_PATH = "file:///tmp/profile"; + + + private static final String DATA_BUCKET = "databucket"; + private static final String DATA_STORAGE_ANSWER = "Hello storage"; + private static final String DATA_FILE_STORAGE_PATH = "path-to/file"; + private static final String DATA_STORAGE_PATH = "http://user:passwd@0.0.0.0:9000/eu-central-1/databucket/path-to/file"; + + @Autowired + private StorageService storageService; + + @MockBean + private AmazonS3 amazonS3; + + @Mock + private AmazonS3 amazonS3FromFactory; + + @MockBean + private S3Factory s3Factory; + + @BeforeEach + void prepare() { + S3Object object = new S3Object(); + object.setObjectContent(new ByteArrayInputStream(BASIC_STORAGE_ANSWER.getBytes(UTF_8))); + when(amazonS3.getObject(BASIC_STORAGE_BUCKET, BASIC_FILE_STORAGE_PATH)).thenReturn(object); + + when(s3Factory.getClient("http://0.0.0.0:9000/", "eu-central-1", "user", "passwd")) + .thenReturn(amazonS3FromFactory); + S3Object another = new S3Object(); + another.setObjectContent(new ByteArrayInputStream(DATA_STORAGE_ANSWER.getBytes(UTF_8))); + when(amazonS3FromFactory.getObject(DATA_BUCKET, DATA_FILE_STORAGE_PATH)).thenReturn(another); + } + + @Test + void testProperRouting() { + assertThat( + storageService.read(BasePrivateResource.forAbsolutePrivate(BASIC_STORAGE_PATH)) + ).hasContent(BASIC_STORAGE_ANSWER); + + assertThat( + storageService.read(BasePrivateResource.forAbsolutePrivate(DATA_STORAGE_PATH)) + ).hasContent(DATA_STORAGE_ANSWER); + } +} \ No newline at end of file diff --git a/datasafe-rest-impl/src/test/resources/application-client-credentials-test.yaml b/datasafe-rest-impl/src/test/resources/application-client-credentials-test.yaml new file mode 100644 index 000000000..ef56ec568 --- /dev/null +++ b/datasafe-rest-impl/src/test/resources/application-client-credentials-test.yaml @@ -0,0 +1,8 @@ +ALLOW_CLIENT_S3_CREDENTIALS: true +AWS_BUCKET: fooBar + +datasafe: + systemRoot: file:///tmp/ + amazonAccessKeyID: access + amazonSecretAccessKey: secret + amazonRegion: eu-central-1 From b25c85b983bee4cefaaefe012dfcb7699c2b7fd1 Mon Sep 17 00:00:00 2001 From: Valentyn Berezin Date: Fri, 27 Sep 2019 17:09:37 +0300 Subject: [PATCH 157/255] DOC-159. Fix NPE on travis --- .../adorsys/datasafe/rest/impl/config/DatasafeConfig.java | 3 +-- .../datasafe/rest/impl/config/DatasafeConfigTest.java | 6 ++++-- .../test/resources/application-client-credentials-test.yaml | 2 +- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/datasafe-rest-impl/src/main/java/de/adorsys/datasafe/rest/impl/config/DatasafeConfig.java b/datasafe-rest-impl/src/main/java/de/adorsys/datasafe/rest/impl/config/DatasafeConfig.java index 954f10d3d..d30a654ee 100644 --- a/datasafe-rest-impl/src/main/java/de/adorsys/datasafe/rest/impl/config/DatasafeConfig.java +++ b/datasafe-rest-impl/src/main/java/de/adorsys/datasafe/rest/impl/config/DatasafeConfig.java @@ -29,11 +29,10 @@ import de.adorsys.datasafe.storage.impl.db.DatabaseStorageService; import de.adorsys.datasafe.storage.impl.fs.FileSystemStorageService; import de.adorsys.datasafe.storage.impl.s3.BucketNameRemovingRouter; -import de.adorsys.datasafe.types.api.utils.ExecutorServiceUtil; -import de.adorsys.datasafe.storage.impl.s3.S3ClientFactory; import de.adorsys.datasafe.storage.impl.s3.S3StorageService; import de.adorsys.datasafe.types.api.context.BaseOverridesRegistry; import de.adorsys.datasafe.types.api.context.overrides.OverridesRegistry; +import de.adorsys.datasafe.types.api.utils.ExecutorServiceUtil; import lombok.experimental.Delegate; import lombok.extern.slf4j.Slf4j; import org.bouncycastle.jce.provider.BouncyCastleProvider; diff --git a/datasafe-rest-impl/src/test/java/de/adorsys/datasafe/rest/impl/config/DatasafeConfigTest.java b/datasafe-rest-impl/src/test/java/de/adorsys/datasafe/rest/impl/config/DatasafeConfigTest.java index d45607c1d..743f15c24 100644 --- a/datasafe-rest-impl/src/test/java/de/adorsys/datasafe/rest/impl/config/DatasafeConfigTest.java +++ b/datasafe-rest-impl/src/test/java/de/adorsys/datasafe/rest/impl/config/DatasafeConfigTest.java @@ -20,6 +20,8 @@ import static java.nio.charset.StandardCharsets.UTF_8; import static org.assertj.core.api.Assertions.assertThat; +import static org.mockito.ArgumentMatchers.anyString; +import static org.mockito.ArgumentMatchers.eq; import static org.mockito.Mockito.when; @ExtendWith(SpringExtension.class) @@ -29,7 +31,6 @@ class DatasafeConfigTest extends BaseMockitoTest { private static final String BASIC_STORAGE_ANSWER = "Hello"; - private static final String BASIC_STORAGE_BUCKET = "fooBar"; private static final String BASIC_FILE_STORAGE_PATH = "tmp/profile"; private static final String BASIC_STORAGE_PATH = "file:///tmp/profile"; @@ -55,7 +56,8 @@ class DatasafeConfigTest extends BaseMockitoTest { void prepare() { S3Object object = new S3Object(); object.setObjectContent(new ByteArrayInputStream(BASIC_STORAGE_ANSWER.getBytes(UTF_8))); - when(amazonS3.getObject(BASIC_STORAGE_BUCKET, BASIC_FILE_STORAGE_PATH)).thenReturn(object); + // bucket name is overridden by dev build environment variable - using anyString(): + when(amazonS3.getObject(anyString(), eq(BASIC_FILE_STORAGE_PATH))).thenReturn(object); when(s3Factory.getClient("http://0.0.0.0:9000/", "eu-central-1", "user", "passwd")) .thenReturn(amazonS3FromFactory); diff --git a/datasafe-rest-impl/src/test/resources/application-client-credentials-test.yaml b/datasafe-rest-impl/src/test/resources/application-client-credentials-test.yaml index ef56ec568..41ad788c1 100644 --- a/datasafe-rest-impl/src/test/resources/application-client-credentials-test.yaml +++ b/datasafe-rest-impl/src/test/resources/application-client-credentials-test.yaml @@ -1,5 +1,5 @@ ALLOW_CLIENT_S3_CREDENTIALS: true -AWS_BUCKET: fooBar +AWS_BUCKET: fooBar # this can be overridden on our dev branch, don't expect it in build datasafe: systemRoot: file:///tmp/ From 84783bc036abfa87f2c9a48c38b7435754953294 Mon Sep 17 00:00:00 2001 From: Valentyn Berezin Date: Fri, 27 Sep 2019 17:12:04 +0300 Subject: [PATCH 158/255] DOC-159. Fix NPE on travis --- .../datasafe/rest/impl/config/DatasafeConfigTest.java | 10 ++++++---- .../resources/application-client-credentials-test.yaml | 2 +- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/datasafe-rest-impl/src/test/java/de/adorsys/datasafe/rest/impl/config/DatasafeConfigTest.java b/datasafe-rest-impl/src/test/java/de/adorsys/datasafe/rest/impl/config/DatasafeConfigTest.java index 743f15c24..0fa08a3cd 100644 --- a/datasafe-rest-impl/src/test/java/de/adorsys/datasafe/rest/impl/config/DatasafeConfigTest.java +++ b/datasafe-rest-impl/src/test/java/de/adorsys/datasafe/rest/impl/config/DatasafeConfigTest.java @@ -11,6 +11,7 @@ import org.junit.jupiter.api.extension.ExtendWith; import org.mockito.Mock; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Value; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.boot.test.mock.mockito.MockBean; import org.springframework.test.context.ActiveProfiles; @@ -20,8 +21,6 @@ import static java.nio.charset.StandardCharsets.UTF_8; import static org.assertj.core.api.Assertions.assertThat; -import static org.mockito.ArgumentMatchers.anyString; -import static org.mockito.ArgumentMatchers.eq; import static org.mockito.Mockito.when; @ExtendWith(SpringExtension.class) @@ -40,6 +39,10 @@ class DatasafeConfigTest extends BaseMockitoTest { private static final String DATA_FILE_STORAGE_PATH = "path-to/file"; private static final String DATA_STORAGE_PATH = "http://user:passwd@0.0.0.0:9000/eu-central-1/databucket/path-to/file"; + @Value("${AWS_BUCKET}") + private String basicBucket; + + // bucket name is overridden by dev build environment variable @Autowired private StorageService storageService; @@ -56,8 +59,7 @@ class DatasafeConfigTest extends BaseMockitoTest { void prepare() { S3Object object = new S3Object(); object.setObjectContent(new ByteArrayInputStream(BASIC_STORAGE_ANSWER.getBytes(UTF_8))); - // bucket name is overridden by dev build environment variable - using anyString(): - when(amazonS3.getObject(anyString(), eq(BASIC_FILE_STORAGE_PATH))).thenReturn(object); + when(amazonS3.getObject(basicBucket, BASIC_FILE_STORAGE_PATH)).thenReturn(object); when(s3Factory.getClient("http://0.0.0.0:9000/", "eu-central-1", "user", "passwd")) .thenReturn(amazonS3FromFactory); diff --git a/datasafe-rest-impl/src/test/resources/application-client-credentials-test.yaml b/datasafe-rest-impl/src/test/resources/application-client-credentials-test.yaml index 41ad788c1..6c29de85d 100644 --- a/datasafe-rest-impl/src/test/resources/application-client-credentials-test.yaml +++ b/datasafe-rest-impl/src/test/resources/application-client-credentials-test.yaml @@ -1,5 +1,5 @@ ALLOW_CLIENT_S3_CREDENTIALS: true -AWS_BUCKET: fooBar # this can be overridden on our dev branch, don't expect it in build +AWS_BUCKET: fooBar # this can be overridden on our dev branch, don't expect it in build, rely on injected value datasafe: systemRoot: file:///tmp/ From 48d9a07e41078b8d38029a60031f3a7a32358ba6 Mon Sep 17 00:00:00 2001 From: Maxim Grischenko Date: Tue, 1 Oct 2019 09:49:48 +0200 Subject: [PATCH 159/255] groovy script with pseudo graphic tables --- .../parse_script_table.groovy | 68 +++++++++++++++++++ 1 file changed, 68 insertions(+) create mode 100644 datasafe-long-run-tests/datasafe-business-tests-random-actions/parse_script_table.groovy diff --git a/datasafe-long-run-tests/datasafe-business-tests-random-actions/parse_script_table.groovy b/datasafe-long-run-tests/datasafe-business-tests-random-actions/parse_script_table.groovy new file mode 100644 index 000000000..3cd396788 --- /dev/null +++ b/datasafe-long-run-tests/datasafe-business-tests-random-actions/parse_script_table.groovy @@ -0,0 +1,68 @@ +import java.nio.file.Paths + +// script expects file name as argument +rawData = [:] +currHead = [] +Paths.get(this.args[0]).readLines().forEach { line -> + def heading = line =~ /.+with (\d+) threads and (\d+) Kb .+/ + if (heading.matches()) { + currHead = [heading.group(1), heading.group(2)] + } + + def dataEntry = line =~ /.+ - ([A-Z]{2,}) .+50=([0-9.]+), 99=([0-9.]+), 90=([0-9.]+), 75=([0-9.]+), 95=([0-9.]+).+throughputPerThread=([0-9.]+).+/ + if (dataEntry.matches()) { + def op = dataEntry.group(1) + if (!(op in rawData)) { + rawData[op] = [:] + } + + def sz = currHead[1] + if (!(sz in rawData[op])) { + rawData[op][sz] = [:] + } + + def nThreads = currHead[0] + if (!(nThreads in rawData[op][sz][nThreads])) { + rawData[op][sz][nThreads] = [:] + } + + def itnum = rawData[op][sz][nThreads].size() + rawData[op][sz][nThreads][itnum] = [dataEntry.group(2), dataEntry.group(3), dataEntry.group(4), dataEntry.group(5), dataEntry.group(6), dataEntry.group(7)] + } +} + +final String ANSI_RESET = "\u001B[0m"; +final String ANSI_RED = "\u001B[31m"; +final String ANSI_YELLOW = "\u001B[33m"; + +rawData.forEach { op, byOpValues -> + byOpValues.forEach { sz, bySizeValues -> + println(ANSI_YELLOW + "${op}" + ANSI_RESET + " operation performance with " + ANSI_YELLOW + "${sz}" + ANSI_RESET +" kb objects") + printSeparator() + curStr = ["Threads", "Throughput", "p50", "p99", "p90", "p75", "p95"] + printString(curStr); + printSeparator() + bySizeValues.forEach { nThreads, byThreadValues -> + byThreadValues.forEach { itnum, val -> + for (int i=0; i < val.size(); i++) { + if (val[i].isDouble() && !val[i].isInteger()) { + val[i] = Double.parseDouble(val[i]).round(2).toString() + } + } + curStr = [nThreads, val[5], val[0], val[1], val[2], val[3], val[4]] + printString(curStr) + printSeparator() + } + } + println() + } +} + +def printSeparator() { + println(("+"+"-".multiply(10)).multiply(7)+"+") +} + +def printString(List params) { + params.each { print '|' + it.center(10) } + println("|") +} \ No newline at end of file From a71070c0e08b59ff69ed666a302e41f212fe2de2 Mon Sep 17 00:00:00 2001 From: Valentyn Berezin Date: Mon, 7 Oct 2019 14:00:08 +0300 Subject: [PATCH 160/255] Windows build related stuff --- .travis.yml | 4 +- datasafe-business/pom.xml | 5 - .../business/impl/e2e/BaseE2ETest.java | 113 +++++++++++------- .../impl/e2e/BasicFunctionalityTest.java | 20 +++- .../impl/e2e/BasicFunctionalityUtf8Test.java | 2 - ...BasicFunctionalityWithConcurrencyTest.java | 63 +++++++--- .../impl/e2e/DataTamperingResistanceTest.java | 10 +- .../impl/e2e/MultiDFSFunctionalityTest.java | 16 ++- .../impl/e2e/SchemeDelegationTest.java | 22 +++- .../impl/e2e/SchemeDelegationWithDbTest.java | 9 +- .../impl/e2e/UserProfileWithUtf8Test.java | 23 +++- .../business/impl/e2e/VersionedDataTest.java | 18 ++- .../MultiDfsWithCredentialsExampleTest.java | 19 ++- .../simple/adapter/impl/CleanupDbTest.java | 27 +++-- .../impl/DFSRelativeToRootProfileTest.java | 12 +- .../impl/SimpleAdapterFeatureTest.java | 45 ++++--- .../impl/SimpleDatasafeAdapterTest.java | 47 ++++++-- .../impl/db/DatabaseStorageServiceTest.java | 34 ++++-- .../impl/fs/FileSystemStorageServiceTest.java | 46 ++++--- .../teststorage/WithStorageProvider.java | 21 +++- .../datasafe/types/api/shared/Position.java | 22 ---- .../types/api/utils/ObfuscateTest.java | 4 +- 22 files changed, 395 insertions(+), 187 deletions(-) delete mode 100644 datasafe-types-api/src/test/java/de/adorsys/datasafe/types/api/shared/Position.java diff --git a/.travis.yml b/.travis.yml index ae1f166a0..ba47eae9a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -126,4 +126,6 @@ matrix: <<: *build-cli <<: *deploy-cli after_success: - - echo 'Nothing to do' # Override primary build logic \ No newline at end of file + - echo 'Nothing to do' # Override primary build logic + + # No WINDOWS here because it is in beta status yet. \ No newline at end of file diff --git a/datasafe-business/pom.xml b/datasafe-business/pom.xml index 97f1ebb25..b2325358e 100644 --- a/datasafe-business/pom.xml +++ b/datasafe-business/pom.xml @@ -146,11 +146,6 @@ assertj-core test - - org.apache.commons - commons-compress - test - org.junit.jupiter junit-jupiter-params diff --git a/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/BaseE2ETest.java b/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/BaseE2ETest.java index c02526974..b4179a483 100644 --- a/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/BaseE2ETest.java +++ b/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/BaseE2ETest.java @@ -47,7 +47,9 @@ import java.util.Collections; import java.util.List; import java.util.stream.Collectors; +import java.util.stream.Stream; +import static java.nio.charset.StandardCharsets.UTF_8; import static org.assertj.core.api.Assertions.assertThat; @Slf4j @@ -115,20 +117,20 @@ protected void initialize(DFSConfig dfsConfig, VersionedDatasafeServices datasaf @SneakyThrows protected void writeDataToPrivate(UserIDAuth auth, String path, String data) { - OutputStream stream = writeToPrivate.write(WriteRequest.forDefaultPrivate(auth, path)); - stream.write(data.getBytes()); - stream.close(); + try (OutputStream stream = writeToPrivate.write(WriteRequest.forDefaultPrivate(auth, path))) { + stream.write(data.getBytes(UTF_8)); + } log.info("File {} of user {} saved to {}", Obfuscate.secure(data), auth, Obfuscate.secure(path, "/")); } @SneakyThrows protected void writeDataToInbox(UserIDAuth auth, String path, String data) { - OutputStream stream = writeToInbox.write( - WriteRequest.forDefaultPublic(Collections.singleton(auth.getUserID()), path) - ); + try (OutputStream stream = writeToInbox.write( + WriteRequest.forDefaultPublic(Collections.singleton(auth.getUserID()), path) + )) { - stream.write(data.getBytes()); - stream.close(); + stream.write(data.getBytes(UTF_8)); + } log.info("File {} of user {} saved to {}", Obfuscate.secure(data), auth, Obfuscate.secure(path, "/")); } @@ -137,23 +139,25 @@ protected AbsoluteLocation getFirstFileInPrivate(UserIDAuth ow } protected List> getAllFilesInPrivate(UserIDAuth owner) { - List> files = listPrivate.list( - ListRequest.forDefaultPrivate(owner, "./") - ).collect(Collectors.toList()); - - log.info("{} has {} in PRIVATE", owner.getUserID(), files); - return files; + try (Stream> ls = listPrivate.list( + ListRequest.forDefaultPrivate(owner, "./") + )) { + List> files = ls.collect(Collectors.toList()); + log.info("{} has {} in PRIVATE", owner.getUserID(), files); + return files; + } } @SneakyThrows protected String readPrivateUsingPrivateKey(UserIDAuth user, PrivateResource location) { ByteArrayOutputStream outputStream = new ByteArrayOutputStream(); - InputStream dataStream = readFromPrivate.read(ReadRequest.forPrivate(user, location)); - ByteStreams.copy(dataStream, outputStream); - String data = new String(outputStream.toByteArray()); - log.info("{} has {} in PRIVATE", user, Obfuscate.secure(data)); + try (InputStream dataStream = readFromPrivate.read(ReadRequest.forPrivate(user, location))) { + ByteStreams.copy(dataStream, outputStream); + } + String data = new String(outputStream.toByteArray(), UTF_8); + log.info("{} has {} in PRIVATE", user, Obfuscate.secure(data)); return data; } @@ -164,12 +168,13 @@ protected void removeFromPrivate(UserIDAuth user, PrivateResource location) { @SneakyThrows protected String readInboxUsingPrivateKey(UserIDAuth user, PrivateResource location) { ByteArrayOutputStream outputStream = new ByteArrayOutputStream(); - InputStream dataStream = readFromInbox.read(ReadRequest.forPrivate(user, location)); - ByteStreams.copy(dataStream, outputStream); - String data = new String(outputStream.toByteArray()); - log.info("{} has {} in INBOX", user, Obfuscate.secure(data)); + try (InputStream dataStream = readFromInbox.read(ReadRequest.forPrivate(user, location))) { + ByteStreams.copy(dataStream, outputStream); + } + String data = new String(outputStream.toByteArray(), UTF_8); + log.info("{} has {} in INBOX", user, Obfuscate.secure(data)); return data; } @@ -178,12 +183,13 @@ protected AbsoluteLocation getFirstFileInInbox(UserIDAuth inbo } protected List> getAllFilesInInbox(UserIDAuth inboxOwner) { - List> files = listInbox.list( - ListRequest.forDefaultPrivate(inboxOwner, "./") - ).collect(Collectors.toList()); - - log.info("{} has {} in INBOX", inboxOwner, files); - return files; + try (Stream> ls = listInbox.list( + ListRequest.forDefaultPrivate(inboxOwner, "./") + )) { + List> files = ls.collect(Collectors.toList()); + log.info("{} has {} in INBOX", inboxOwner, files); + return files; + } } protected void registerJohnAndJane() { @@ -193,11 +199,12 @@ protected void registerJohnAndJane() { @SneakyThrows protected void sendToInbox(UserID to, String filename, String data) { - OutputStream stream = writeToInbox.write( - WriteRequest.forDefaultPublic(Collections.singleton(to), "./" + filename) - ); - stream.write(data.getBytes()); - stream.close(); + try (OutputStream stream = writeToInbox.write( + WriteRequest.forDefaultPublic(Collections.singleton(to), "./" + filename) + )) { + stream.write(data.getBytes()); + } + log.info("File {} sent to INBOX of user {}", Obfuscate.secure(filename), to); } @@ -222,44 +229,58 @@ protected UserIDAuth createJohnTestUser(int i) { } protected void assertPrivateSpaceList(UserIDAuth user, String root, String... expected) { - List paths = listPrivate.list(ListRequest.forDefaultPrivate(user, root)) + List paths; + try (Stream> ls = + listPrivate.list(ListRequest.forDefaultPrivate(user, root)) + ) { + paths = ls .map(it -> it.getResource().asPrivate().decryptedPath().asString()) .collect(Collectors.toList()); + } assertThat(paths).containsExactlyInAnyOrder(expected); } protected void assertInboxSpaceList(UserIDAuth user, String root, String... expected) { - List paths = listInbox.list(ListRequest.forDefaultPrivate(user, root)) + List paths; + try (Stream> ls = + listInbox.list(ListRequest.forDefaultPrivate(user, root)) + ) { + paths = ls .map(it -> it.getResource().asPrivate().decryptedPath().asString()) .collect(Collectors.toList()); + } assertThat(paths).containsExactlyInAnyOrder(expected); } @SneakyThrows protected void assertRootDirIsEmpty(WithStorageProvider.StorageDescriptor descriptor) { - assertThat(descriptor.getStorageService().get() - .list( - new AbsoluteLocation<>(BasePrivateResource.forPrivate(descriptor.getLocation())) - ) - ).isEmpty(); + try (Stream> ls = descriptor.getStorageService().get() + .list( + new AbsoluteLocation<>(BasePrivateResource.forPrivate(descriptor.getLocation()))) + ) { + assertThat(ls).isEmpty(); + } + if (descriptor.getStorageService().get() instanceof FileSystemStorageService) { // additional check that directory contains only folders that were created recursively // we do not have permission to delete these - because we removed files linked to profile // however we can't remove anything above - assertThat(Files.walk(Paths.get(descriptor.getLocation().asURI()))) + try (Stream files = Files.walk(Paths.get(descriptor.getLocation().asURI()))) { + assertThat(files) .allMatch(it -> it.toFile().isDirectory()) .extracting(Path::toUri) .extracting(it -> descriptor.getLocation().asURI().relativize(it)) .extracting(URI::toString) .containsExactlyInAnyOrder( - "", - "users/", - "profiles/", - "profiles/public/", - "profiles/private/" + "", + "users/", + "profiles/", + "profiles/public/", + "profiles/private/" ); + } } } } diff --git a/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/BasicFunctionalityTest.java b/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/BasicFunctionalityTest.java index ebd4e6036..13c3dc92f 100644 --- a/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/BasicFunctionalityTest.java +++ b/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/BasicFunctionalityTest.java @@ -19,11 +19,13 @@ import org.testcontainers.shaded.com.google.common.collect.ImmutableSet; import java.io.ByteArrayInputStream; +import java.io.InputStream; import java.io.OutputStream; import java.util.List; import java.util.concurrent.ThreadLocalRandom; import java.util.function.Predicate; import java.util.stream.Collectors; +import java.util.stream.Stream; import static de.adorsys.datasafe.business.impl.e2e.Const.*; import static org.assertj.core.api.Assertions.assertThat; @@ -225,7 +227,9 @@ private void validateInboxStructAndEncryption(AbsoluteLocation // no path encryption for inbox: assertThat(foundResource.location().getPath()).asString().contains(SHARED_FILE); // validate encryption on high-level: - assertThat(storage.read(foundResource)).asString().doesNotContain(MESSAGE_ONE); + try (InputStream read = storage.read(foundResource)) { + assertThat(read).asString().doesNotContain(MESSAGE_ONE); + } } @SneakyThrows @@ -240,15 +244,19 @@ private void validatePrivateStructAndEncryption(AbsoluteLocation> listFiles(Predicate pattern) { - return storage.list(new AbsoluteLocation<>(BasePrivateResource.forPrivate(location))) - .filter(it -> !it.location().toASCIIString().startsWith(".")) - .filter(it -> pattern.test(it.location().toASCIIString())) - .collect(Collectors.toList()); + try (Stream> ls = storage.list(new AbsoluteLocation<>(BasePrivateResource.forPrivate(location)))) { + return ls + .filter(it -> !it.location().toASCIIString().startsWith(".")) + .filter(it -> pattern.test(it.location().toASCIIString())) + .collect(Collectors.toList()); + } } private void init(WithStorageProvider.StorageDescriptor descriptor) { diff --git a/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/BasicFunctionalityUtf8Test.java b/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/BasicFunctionalityUtf8Test.java index d599ed507..7d9c233c1 100644 --- a/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/BasicFunctionalityUtf8Test.java +++ b/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/BasicFunctionalityUtf8Test.java @@ -29,7 +29,6 @@ void readPrivateContentWithUnicode(WithStorageProvider.StorageDescriptor descrip jane = registerUser("jane"); - String unicodeMessage = "привет мир!"; writeDataToPrivate(jane, PRIVATE_FILE_PATH, unicodeMessage); @@ -47,7 +46,6 @@ void readPrivateContentWithUnicodeUsingUnicodePath(WithStorageProvider.StorageDe jane = registerUser("jane"); - String unicodeMessage = "привет мир!"; writeDataToPrivate(jane, " привет/prüfungsdokument=/файл:&? с пробелом.док", unicodeMessage); diff --git a/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/BasicFunctionalityWithConcurrencyTest.java b/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/BasicFunctionalityWithConcurrencyTest.java index 0af9cc143..a717555e1 100644 --- a/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/BasicFunctionalityWithConcurrencyTest.java +++ b/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/BasicFunctionalityWithConcurrencyTest.java @@ -43,7 +43,6 @@ import static de.adorsys.datasafe.types.api.actions.ListRequest.forDefaultPrivate; import static java.util.concurrent.TimeUnit.SECONDS; -import static org.apache.commons.compress.utils.IOUtils.closeQuietly; import static org.assertj.core.api.Assertions.assertThat; import static org.awaitility.Awaitility.await; import static org.junit.jupiter.api.Assertions.assertEquals; @@ -61,7 +60,7 @@ class BasicFunctionalityWithConcurrencyTest extends BaseE2ETest { private static int NUMBER_OF_TEST_FILES = 5; private static int EXPECTED_NUMBER_OF_FILES_PER_USER = NUMBER_OF_TEST_FILES; - private static final String TEST_FILENAME = "/test.txt"; + private static final String TEST_FILENAME = "test.txt"; @TempDir protected Path tempTestFileFolder; @@ -100,7 +99,7 @@ class BasicFunctionalityWithConcurrencyTest extends BaseE2ETest { void writeToPrivateListPrivateInDifferentThreads(WithStorageProvider.StorageDescriptor descriptor, int size, int poolSize) { init(descriptor); - String testFile = tempTestFileFolder.toString() + TEST_FILENAME; + String testFile = tempTestFileFolder.resolve(TEST_FILENAME).toString(); generateTestFile(testFile, size); ThreadPoolExecutor executor = (ThreadPoolExecutor) Executors.newFixedThreadPool(poolSize); @@ -109,6 +108,7 @@ void writeToPrivateListPrivateInDifferentThreads(WithStorageProvider.StorageDesc CountDownLatch finishHoldingLatch = new CountDownLatch(NUMBER_OF_TEST_USERS * NUMBER_OF_TEST_FILES); String checksumOfOriginTestFile; + log.trace("*** get checksum of {} ***", testFile); try(FileInputStream input = new FileInputStream(new File(testFile))) { checksumOfOriginTestFile = checksum(input); } @@ -153,11 +153,14 @@ void writeToPrivateListPrivateInDifferentThreads(WithStorageProvider.StorageDesc metricCollector.setStorageType(storage.getClass().getSimpleName()); metricCollector.setNumberOfThreads(poolSize); metricCollector.writeToJSON();//json files in target folder + + deleteTestFile(testFile); } private List> listAllPrivateFiles(UserIDAuth user) { - return listPrivate.list( - forDefaultPrivate(user, "./")).collect(Collectors.toList()); + try (Stream> lsPrivate = listPrivate.list(forDefaultPrivate(user, "./"))) { + return lsPrivate.collect(Collectors.toList()); + } } private void createFileForUserParallelly(ThreadPoolExecutor executor, CountDownLatch holdingLatch, @@ -197,11 +200,11 @@ private void createFileForUserParallelly(ThreadPoolExecutor executor, CountDownL private String calculateDecryptedContentChecksum(UserIDAuth user, AbsoluteLocation item) { try { - InputStream decryptedFileStream = readFromPrivate.read( - ReadRequest.forPrivate(user, item.getResource().asPrivate())); - String checksumOfDecryptedTestFile = checksum(decryptedFileStream); - decryptedFileStream.close(); - return checksumOfDecryptedTestFile; + try (InputStream decryptedFileStream = readFromPrivate.read( + ReadRequest.forPrivate(user, item.getResource().asPrivate()))) { + String checksumOfDecryptedTestFile = checksum(decryptedFileStream); + return checksumOfDecryptedTestFile; + } } catch (IOException e) { fail(e); } @@ -221,6 +224,16 @@ private String checksum(InputStream input) { } private static void generateTestFile(String testFile, int testFileSizeInBytes) { + log.trace("*** generate {} ***", testFile); + + File directory = new File(testFile).getParentFile(); + // in previous version file handles were not closed directories were not removed + // and following tests were able to reuse directory. Now file handles are closed + // and all files including directory are deleted. + if (!directory.exists()) { + log.trace(directory + " does not exist. will be created now"); + directory.mkdir(); + } try (RandomAccessFile originTestFile = new RandomAccessFile(testFile, "rw")) { MappedByteBuffer out = originTestFile.getChannel() .map(FileChannel.MapMode.READ_WRITE, 0, testFileSizeInBytes); @@ -229,9 +242,23 @@ private static void generateTestFile(String testFile, int testFileSizeInBytes) { out.put((byte) 'x'); } } catch (IOException e) { - log.error(e.getMessage()); + log.error("generateTestFile: {}", e.getMessage()); } + } + private static void deleteTestFile(String testFile) { + log.trace("*** delete {} ***", testFile); + File file = new File(testFile); + if (file.exists()) { + boolean ok = file.delete(); + if (!ok) { + log.error("can not delete " + testFile); + } else { + log.debug("deleted testfile " + testFile); + } + } else { + log.error("testfile did not exist:" + testFile); + } } @ValueSource @@ -272,15 +299,13 @@ private void init(WithStorageProvider.StorageDescriptor descriptor) { protected void writeDataToFileForUser(UserIDAuth john, String filePathForWriting, String filePathForReading, CountDownLatch latch) { try { - OutputStream write = writeToPrivate.write(WriteRequest.forDefaultPrivate(john, filePathForWriting)); - - FileInputStream fis = new FileInputStream(filePathForReading); - ByteStreams.copy(fis, write); - - closeQuietly(fis); - closeQuietly(write); + try (OutputStream write = writeToPrivate.write(WriteRequest.forDefaultPrivate(john, filePathForWriting))) { + try (FileInputStream fis = new FileInputStream(filePathForReading)) { + ByteStreams.copy(fis, write); + } + } } catch (IOException e) { - log.error(e.getMessage(), e); + log.error("writeDataToFileForUser: {}", e.getMessage(), e); } latch.countDown(); diff --git a/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/DataTamperingResistanceTest.java b/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/DataTamperingResistanceTest.java index 6d61def99..9fcedfe97 100644 --- a/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/DataTamperingResistanceTest.java +++ b/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/DataTamperingResistanceTest.java @@ -28,6 +28,7 @@ import java.util.Collections; import java.util.Set; import java.util.concurrent.ThreadLocalRandom; +import java.util.stream.Stream; import static org.assertj.core.api.Java6Assertions.assertThatThrownBy; import static org.junit.jupiter.api.Assertions.assertThrows; @@ -109,8 +110,13 @@ void testPrivateDocumentPathTamperResistance(String path) { assertThrows( UnauthenticCiphertextException.class, - () -> listPrivate.list(ListRequest.forDefaultPrivate(jane, "")) - .forEach(it -> log.info("{}", it.location())) // consume stream + () -> { + try (Stream> lsPrivate = listPrivate + .list(ListRequest.forDefaultPrivate(jane, "")) + ) { + lsPrivate.forEach(it -> log.info("{}", it.location())); // consume ls + } + } ); } diff --git a/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/MultiDFSFunctionalityTest.java b/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/MultiDFSFunctionalityTest.java index 69704bf4f..0b4d4d8e1 100644 --- a/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/MultiDFSFunctionalityTest.java +++ b/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/MultiDFSFunctionalityTest.java @@ -19,7 +19,6 @@ import de.adorsys.datasafe.storage.api.RegexDelegatingStorage; import de.adorsys.datasafe.storage.api.StorageService; import de.adorsys.datasafe.storage.api.UriBasedAuthStorageService; -import de.adorsys.datasafe.types.api.utils.ExecutorServiceUtil; import de.adorsys.datasafe.storage.impl.s3.S3ClientFactory; import de.adorsys.datasafe.storage.impl.s3.S3StorageService; import de.adorsys.datasafe.types.api.actions.ListRequest; @@ -29,6 +28,7 @@ import de.adorsys.datasafe.types.api.context.overrides.OverridesRegistry; import de.adorsys.datasafe.types.api.resource.*; import de.adorsys.datasafe.types.api.shared.BaseMockitoTest; +import de.adorsys.datasafe.types.api.utils.ExecutorServiceUtil; import lombok.SneakyThrows; import lombok.experimental.Delegate; import lombok.extern.slf4j.Slf4j; @@ -44,6 +44,7 @@ import java.io.InputStream; import java.io.OutputStream; +import java.net.URI; import java.security.Security; import java.security.UnrecoverableKeyException; import java.util.Collections; @@ -67,7 +68,7 @@ class MultiDFSFunctionalityTest extends BaseMockitoTest { private static final String REGION = "eu-central-1"; - private static final String LOCALHOST = "http://127.0.0.1"; + private static final String LOCALHOST = getDockerUri("http://127.0.0.1"); private static final String CREDENTIALS = "credentialsbucket"; private static final String KEYSTORE = "keystorebucket"; @@ -351,4 +352,15 @@ private WithCredentialProvider(Lazy storageKeyStoreOp this.delegate = new RegexAccessServiceWithStorageCredentialsImpl(storageKeyStoreOperations); } } + + @SneakyThrows + private static String getDockerUri(String defaultUri) { + String dockerhost = System.getenv("DOCKER_HOST"); + if (dockerhost == null) { + return defaultUri; + } + + URI dockerUri = new URI(dockerhost); + return "http://" + dockerUri.getHost(); + } } diff --git a/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/SchemeDelegationTest.java b/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/SchemeDelegationTest.java index 9d36efbca..79d56c456 100644 --- a/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/SchemeDelegationTest.java +++ b/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/SchemeDelegationTest.java @@ -12,6 +12,7 @@ import de.adorsys.datasafe.types.api.actions.WriteRequest; import de.adorsys.datasafe.types.api.resource.AbsoluteLocation; import de.adorsys.datasafe.types.api.resource.BasePrivateResource; +import de.adorsys.datasafe.types.api.resource.ResolvedResource; import de.adorsys.datasafe.types.api.resource.Uri; import lombok.SneakyThrows; import org.junit.jupiter.api.BeforeEach; @@ -19,9 +20,13 @@ import org.junit.jupiter.api.io.TempDir; import org.testcontainers.shaded.com.google.common.collect.ImmutableMap; +import java.io.IOException; import java.io.OutputStream; import java.nio.file.Files; import java.nio.file.Path; +import java.util.List; +import java.util.stream.Collectors; +import java.util.stream.Stream; import static org.assertj.core.api.Assertions.assertThat; @@ -69,12 +74,12 @@ void testProfileOnFsDataOnMinioWorks() { } // Profiles are on FS - assertThat(Files.walk(fsPath)) + assertThat(listFs()) .extracting(it -> fsPath.relativize(it)) .extracting(Path::toString) .containsExactlyInAnyOrder("", "public-john", "private-john"); // File and keystore/pub keys are on minio - assertThat(minio.list(new AbsoluteLocation<>(BasePrivateResource.forPrivate(minioPath.resolve(""))))) + assertThat(listMinio()) .extracting(it -> minioPath.relativize(it.location())) .extracting(it -> it.asURI().toString()) .contains("users/john/private/keystore", "users/john/public/pubkeys") @@ -82,6 +87,19 @@ void testProfileOnFsDataOnMinioWorks() { .hasSize(3); } + private List> listMinio() { + try (Stream> ls = + minio.list(new AbsoluteLocation<>(BasePrivateResource.forPrivate(minioPath.resolve(""))))) { + return ls.collect(Collectors.toList()); + } + } + + private List listFs() throws IOException { + try (Stream ls = Files.walk(fsPath)) { + return ls.collect(Collectors.toList()); + } + } + static class ProfilesOnFsDataOnMinio extends DefaultDFSConfig { private final Path profilesPath; diff --git a/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/SchemeDelegationWithDbTest.java b/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/SchemeDelegationWithDbTest.java index 517150428..06e118a26 100644 --- a/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/SchemeDelegationWithDbTest.java +++ b/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/SchemeDelegationWithDbTest.java @@ -17,6 +17,7 @@ import de.adorsys.datasafe.types.api.actions.WriteRequest; import de.adorsys.datasafe.types.api.resource.AbsoluteLocation; import de.adorsys.datasafe.types.api.resource.BasePrivateResource; +import de.adorsys.datasafe.types.api.resource.ResolvedResource; import de.adorsys.datasafe.types.api.resource.Uri; import lombok.SneakyThrows; import org.junit.jupiter.api.BeforeEach; @@ -27,6 +28,7 @@ import java.net.URI; import java.nio.file.Files; import java.nio.file.Path; +import java.util.List; import java.util.Set; import java.util.stream.Collectors; import java.util.stream.Stream; @@ -105,9 +107,10 @@ void testProfileOnDbDataOnFsWorks() { ); } - private Stream listDb(String path) { - return db.list(BasePrivateResource.forAbsolutePrivate(URI.create(path))) - .map(it -> it.location().asURI().toString()); + private List listDb(String path) { + try (Stream> stream = db.list(BasePrivateResource.forAbsolutePrivate(URI.create(path)))){ + return stream.map(it -> it.location().asURI().toString()).collect(Collectors.toList()); + } } static class ProfilesOnDbDataOnFs extends DefaultDFSConfig { diff --git a/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/UserProfileWithUtf8Test.java b/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/UserProfileWithUtf8Test.java index 6426b081e..815e21ff4 100644 --- a/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/UserProfileWithUtf8Test.java +++ b/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/UserProfileWithUtf8Test.java @@ -12,6 +12,7 @@ import de.adorsys.datasafe.types.api.actions.WriteRequest; import de.adorsys.datasafe.types.api.resource.AbsoluteLocation; import de.adorsys.datasafe.types.api.resource.BasePrivateResource; +import de.adorsys.datasafe.types.api.resource.ResolvedResource; import de.adorsys.datasafe.types.api.resource.Uri; import lombok.SneakyThrows; import org.junit.jupiter.api.BeforeEach; @@ -19,10 +20,14 @@ import org.junit.jupiter.api.io.TempDir; import org.testcontainers.shaded.com.google.common.collect.ImmutableMap; +import java.io.IOException; import java.io.OutputStream; import java.net.URI; import java.nio.file.Files; import java.nio.file.Path; +import java.util.List; +import java.util.stream.Collectors; +import java.util.stream.Stream; import static org.assertj.core.api.Assertions.assertThat; @@ -69,7 +74,7 @@ void testProfileOnFsDataOnMinioWorks() { } // Profiles are on FS - note that raw file path has `+` instead of space - assertThat(Files.walk(fsPath)) + assertThat(listFs()) .extracting(it -> fsPath.relativize(it)) .extracting(it -> URI.create(it.toString()).getPath()) .containsExactlyInAnyOrder( @@ -78,7 +83,7 @@ void testProfileOnFsDataOnMinioWorks() { "prüfungs/мой профиль+:приватный-$&=john", "prüfungs/мой профиль+:публичный-$&=john"); // File and keystore/pub keys are on minio - assertThat(minio.list(new AbsoluteLocation<>(BasePrivateResource.forPrivate(minioPath.resolve(""))))) + assertThat(listMinio()) .extracting(it -> minioPath.relativize(it.location())) .extracting(Uri::asString) .contains( @@ -91,6 +96,20 @@ void testProfileOnFsDataOnMinioWorks() { .hasSize(3); } + private List> listMinio() { + try (Stream> ls = + minio.list(new AbsoluteLocation<>(BasePrivateResource.forPrivate(minioPath.resolve("")))) + ) { + return ls.collect(Collectors.toList()); + } + } + + private List listFs() throws IOException { + try (Stream ls = Files.walk(fsPath)) { + return ls.collect(Collectors.toList()); + } + } + static class ProfilesOnFsDataOnMinio extends DefaultDFSConfig { private final Uri profilesPath; diff --git a/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/VersionedDataTest.java b/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/VersionedDataTest.java index d32143f13..da18ede85 100644 --- a/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/VersionedDataTest.java +++ b/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/VersionedDataTest.java @@ -11,7 +11,6 @@ import de.adorsys.datasafe.types.api.actions.RemoveRequest; import de.adorsys.datasafe.types.api.actions.WriteRequest; import de.adorsys.datasafe.types.api.resource.*; -import de.adorsys.datasafe.types.api.shared.Position; import lombok.SneakyThrows; import lombok.extern.slf4j.Slf4j; import org.junit.jupiter.params.ParameterizedTest; @@ -78,8 +77,7 @@ void testVersionedWriteUsingAbsoluteAccess(WithStorageProvider.StorageDescriptor registerAndDoWritesWithDiffMessageInSameLocation(); - Versioned, ResolvedResource, Version> first = - Position.first(versionedListRoot(jane)); + Versioned, ResolvedResource, Version> first = firstOfVersionedListRoot(jane); String directResult = readPrivateUsingPrivateKey(jane, first.stripVersion().asPrivate()); assertThat(directResult).isEqualTo(MESSAGE_THREE); @@ -94,8 +92,7 @@ void testVersionedRemove(WithStorageProvider.StorageDescriptor descriptor) { registerAndDoWritesWithDiffMessageInSameLocation(); - Versioned, ResolvedResource, Version> first = - Position.first(versionedListRoot(jane)); + Versioned, ResolvedResource, Version> first = firstOfVersionedListRoot(jane); versionedDocusafeServices.latestPrivate().remove( RemoveRequest.forPrivate(jane, first.stripVersion().asPrivate()) ); @@ -279,4 +276,15 @@ private void validateThereAreVersions(UserIDAuth user, int versionCount) { versionedDocusafeServices.privateService().list(ListRequest.forDefaultPrivate(user, "./")) ).hasSize(versionCount); } + + private Versioned, ResolvedResource, Version> firstOfVersionedListRoot( + UserIDAuth owner) { + try (Stream, ResolvedResource, Version>> ls = + versionedDocusafeServices + .latestPrivate() + .listWithDetails(ListRequest.forDefaultPrivate(owner, "./")) + ) { + return ls.findFirst().orElseThrow(() -> new IllegalStateException("Empty directory")); + } + } } diff --git a/datasafe-examples/datasafe-examples-multidfs/src/test/java/de/adorsys/datasafe/examples/business/s3/MultiDfsWithCredentialsExampleTest.java b/datasafe-examples/datasafe-examples-multidfs/src/test/java/de/adorsys/datasafe/examples/business/s3/MultiDfsWithCredentialsExampleTest.java index 89e72d161..8d26e1db8 100644 --- a/datasafe-examples/datasafe-examples-multidfs/src/test/java/de/adorsys/datasafe/examples/business/s3/MultiDfsWithCredentialsExampleTest.java +++ b/datasafe-examples/datasafe-examples-multidfs/src/test/java/de/adorsys/datasafe/examples/business/s3/MultiDfsWithCredentialsExampleTest.java @@ -15,7 +15,6 @@ import de.adorsys.datasafe.storage.api.RegexDelegatingStorage; import de.adorsys.datasafe.storage.api.StorageService; import de.adorsys.datasafe.storage.api.UriBasedAuthStorageService; -import de.adorsys.datasafe.types.api.utils.ExecutorServiceUtil; import de.adorsys.datasafe.storage.impl.s3.S3ClientFactory; import de.adorsys.datasafe.storage.impl.s3.S3StorageService; import de.adorsys.datasafe.types.api.actions.ReadRequest; @@ -25,6 +24,7 @@ import de.adorsys.datasafe.types.api.resource.AbsoluteLocation; import de.adorsys.datasafe.types.api.resource.BasePrivateResource; import de.adorsys.datasafe.types.api.resource.StorageIdentifier; +import de.adorsys.datasafe.types.api.utils.ExecutorServiceUtil; import lombok.SneakyThrows; import lombok.experimental.Delegate; import lombok.extern.slf4j.Slf4j; @@ -37,6 +37,7 @@ import org.testcontainers.shaded.com.google.common.collect.ImmutableMap; import java.io.OutputStream; +import java.net.URI; import java.nio.charset.StandardCharsets; import java.security.Security; import java.util.Arrays; @@ -67,12 +68,15 @@ class MultiDfsWithCredentialsExampleTest { @BeforeAll static void startup() { + // on windows this is required + Security.addProvider(new BouncyCastleProvider()); + // Create all required minio-backed S3 buckets: Arrays.stream(MinioContainerId.values()).forEach(it -> { GenericContainer minio = createAndStartMinio(it.getAccessKey(), it.getSecretKey()); minios.put(it, minio); - String endpoint = "http://127.0.0.1:" + minio.getFirstMappedPort() + "/"; + String endpoint = getDockerUri("http://127.0.0.1") + ":" + minio.getFirstMappedPort() + "/"; endpointsByHost.put(it, endpoint + REGION + "/" + it.getBucketName() + "/"); log.info("MINIO for {} is available at: {} with access: '{}'/'{}'", it, endpoint, it.getAccessKey(), it.getSecretKey()); @@ -240,4 +244,15 @@ private WithCredentialProvider(Lazy storageKeyStoreOp this.delegate = new RegexAccessServiceWithStorageCredentialsImpl(storageKeyStoreOperations); } } + + @SneakyThrows + private static String getDockerUri(String defaultUri) { + String dockerHost = System.getenv("DOCKER_HOST"); + if (dockerHost == null) { + return defaultUri; + } + + URI dockerUri = new URI(dockerHost); + return "http://" + dockerUri.getHost(); + } } diff --git a/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/test/java/de/adorsys/datasafe/simple/adapter/impl/CleanupDbTest.java b/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/test/java/de/adorsys/datasafe/simple/adapter/impl/CleanupDbTest.java index 36249a7da..cbc1f6448 100644 --- a/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/test/java/de/adorsys/datasafe/simple/adapter/impl/CleanupDbTest.java +++ b/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/test/java/de/adorsys/datasafe/simple/adapter/impl/CleanupDbTest.java @@ -7,15 +7,18 @@ import de.adorsys.datasafe.simple.adapter.api.types.DocumentContent; import de.adorsys.datasafe.simple.adapter.api.types.DocumentFQN; import de.adorsys.datasafe.teststorage.WithStorageProvider; +import de.adorsys.datasafe.types.api.resource.AbsoluteLocation; import de.adorsys.datasafe.types.api.resource.BasePrivateResource; +import de.adorsys.datasafe.types.api.resource.ResolvedResource; import org.bouncycastle.jce.provider.BouncyCastleProvider; import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.MethodSource; import java.security.Security; +import java.util.stream.Stream; -import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.assertj.core.api.Assertions.assertThat; class CleanupDbTest extends WithStorageProvider { @@ -55,18 +58,20 @@ void cleanupDb(WithStorageProvider.StorageDescriptor descriptor) { new DocumentContent(content.getBytes()))); // (1 keystore + 1 pub key + 1 file) * 2 - assertEquals(6, - descriptor.getStorageService().get().list( - BasePrivateResource.forAbsolutePrivate(descriptor.getLocation()) - ).count() - ); + try (Stream> ls = + descriptor.getStorageService().get() + .list(BasePrivateResource.forAbsolutePrivate(descriptor.getLocation())) + ) { + assertThat(ls).hasSize(6); + } simpleDatasafeService.cleanupDb(); - assertEquals(0, - descriptor.getStorageService().get().list( - BasePrivateResource.forAbsolutePrivate(descriptor.getLocation()) - ).count() - ); + try (Stream> ls = + descriptor.getStorageService().get() + .list(BasePrivateResource.forAbsolutePrivate(descriptor.getLocation())) + ) { + assertThat(ls).isEmpty(); + } } } diff --git a/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/test/java/de/adorsys/datasafe/simple/adapter/impl/DFSRelativeToRootProfileTest.java b/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/test/java/de/adorsys/datasafe/simple/adapter/impl/DFSRelativeToRootProfileTest.java index 99543c87f..b6caea6ba 100644 --- a/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/test/java/de/adorsys/datasafe/simple/adapter/impl/DFSRelativeToRootProfileTest.java +++ b/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/test/java/de/adorsys/datasafe/simple/adapter/impl/DFSRelativeToRootProfileTest.java @@ -9,7 +9,9 @@ import de.adorsys.datasafe.simple.adapter.api.types.DocumentContent; import de.adorsys.datasafe.simple.adapter.api.types.DocumentFQN; import de.adorsys.datasafe.teststorage.WithStorageProvider; +import de.adorsys.datasafe.types.api.resource.AbsoluteLocation; import de.adorsys.datasafe.types.api.resource.BasePrivateResource; +import de.adorsys.datasafe.types.api.resource.ResolvedResource; import lombok.SneakyThrows; import org.bouncycastle.jce.provider.BouncyCastleProvider; import org.junit.jupiter.api.BeforeEach; @@ -17,6 +19,7 @@ import org.junit.jupiter.params.provider.MethodSource; import java.security.Security; +import java.util.stream.Stream; import static org.assertj.core.api.Assertions.assertThat; @@ -53,8 +56,11 @@ void createWriteAndDeleteUserCleansAllNeeded(WithStorageProvider.StorageDescript simpleDatasafeService.destroyUser(userIDAuth); // Everything is cleaned up: - assertThat(descriptor.getStorageService().get().list( - BasePrivateResource.forAbsolutePrivate(descriptor.getLocation())) - ).isEmpty(); + try (Stream> ls = + descriptor.getStorageService().get() + .list(BasePrivateResource.forAbsolutePrivate(descriptor.getLocation())) + ) { + assertThat(ls).isEmpty(); + } } } diff --git a/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/test/java/de/adorsys/datasafe/simple/adapter/impl/SimpleAdapterFeatureTest.java b/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/test/java/de/adorsys/datasafe/simple/adapter/impl/SimpleAdapterFeatureTest.java index 5cdb3271c..dd1b2667b 100644 --- a/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/test/java/de/adorsys/datasafe/simple/adapter/impl/SimpleAdapterFeatureTest.java +++ b/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/test/java/de/adorsys/datasafe/simple/adapter/impl/SimpleAdapterFeatureTest.java @@ -21,11 +21,12 @@ import java.io.InputStream; import java.io.StringWriter; -import java.nio.charset.StandardCharsets; import java.nio.file.FileSystems; import java.nio.file.Path; import java.util.Optional; +import java.util.stream.Stream; +import static java.nio.charset.StandardCharsets.UTF_8; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertTrue; @@ -42,6 +43,7 @@ class SimpleAdapterFeatureTest extends WithBouncyCastle { void afterEach() { System.setProperty(SwitchablePathEncryptionImpl.NO_BUCKETPATH_ENCRYPTION, Boolean.FALSE.toString()); System.setProperty(SwitchableCmsEncryptionImpl.NO_CMSENCRYPTION_AT_ALL, Boolean.FALSE.toString()); + } @Test @@ -51,7 +53,9 @@ void testWithEncryption() { simpleDatasafeService.storeDocument(userIDAuth, document); AbsoluteLocation rootLocation = getPrivateResourceAbsoluteLocation(); - Assertions.assertEquals(0, simpleDatasafeService.getStorageService().list(rootLocation).filter(el -> el.location().toASCIIString().contains(path)).count()); + try (Stream> stream = simpleDatasafeService.getStorageService().list(rootLocation)) { + Assertions.assertEquals(0, stream.filter(el -> el.location().toASCIIString().contains(path)).count()); + } simpleDatasafeService.destroyUser(userIDAuth); } @@ -64,12 +68,18 @@ void testWithoutPathEncryption() { simpleDatasafeService.storeDocument(userIDAuth, document); AbsoluteLocation rootLocation = getPrivateResourceAbsoluteLocation(); - Assertions.assertEquals(1, simpleDatasafeService.getStorageService().list(rootLocation).filter(el -> el.location().toASCIIString().contains(path)).count()); - Optional> first = simpleDatasafeService.getStorageService().list(rootLocation).filter(el -> el.location().toASCIIString().contains(path)).findFirst(); - InputStream read = simpleDatasafeService.getStorageService().read(first.get()); - StringWriter writer = new StringWriter(); - IOUtils.copy(read, writer, StandardCharsets.UTF_8); - assertFalse(writer.toString().equals(content)); + try (Stream> absoluteLocationStream = simpleDatasafeService.getStorageService().list(rootLocation).filter(el -> el.location().toASCIIString().contains(path))) { + Assertions.assertEquals(1, absoluteLocationStream.count()); + } + try (Stream> absoluteLocationStream = simpleDatasafeService.getStorageService().list(rootLocation).filter(el -> el.location().toASCIIString().contains(path))) { + Optional> first = absoluteLocationStream.findFirst(); + + try (InputStream read = simpleDatasafeService.getStorageService().read(first.get())) { + StringWriter writer = new StringWriter(); + IOUtils.copy(read, writer, UTF_8); + assertFalse(writer.toString().equals(content)); + } + } simpleDatasafeService.destroyUser(userIDAuth); } @@ -84,12 +94,18 @@ void testWithoutEncryption() { simpleDatasafeService.storeDocument(userIDAuth, document); AbsoluteLocation rootLocation = getPrivateResourceAbsoluteLocation(); - Assertions.assertEquals(1, simpleDatasafeService.getStorageService().list(rootLocation).filter(el -> el.location().toASCIIString().contains(path)).count()); - Optional> first = simpleDatasafeService.getStorageService().list(rootLocation).filter(el -> el.location().toASCIIString().contains(path)).findFirst(); - InputStream read = simpleDatasafeService.getStorageService().read(first.get()); - StringWriter writer = new StringWriter(); - IOUtils.copy(read, writer, StandardCharsets.UTF_8); - assertTrue(writer.toString().equals(content)); + try (Stream> absoluteLocationStream = simpleDatasafeService.getStorageService().list(rootLocation).filter(el -> el.location().toASCIIString().contains(path))) { + Assertions.assertEquals(1, absoluteLocationStream.count()); + } + try (Stream> absoluteLocationStream = simpleDatasafeService.getStorageService().list(rootLocation).filter(el -> el.location().toASCIIString().contains(path))) { + Optional> first =absoluteLocationStream.findFirst(); + + try (InputStream read = simpleDatasafeService.getStorageService().read(first.get())) { + StringWriter writer = new StringWriter(); + IOUtils.copy(read, writer, UTF_8); + assertTrue(writer.toString().equals(content)); + } + } simpleDatasafeService.destroyUser(userIDAuth); } @@ -108,5 +124,4 @@ private AbsoluteLocation getPrivateResourceAbsoluteLocation() { return rootLocation; } - } diff --git a/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/test/java/de/adorsys/datasafe/simple/adapter/impl/SimpleDatasafeAdapterTest.java b/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/test/java/de/adorsys/datasafe/simple/adapter/impl/SimpleDatasafeAdapterTest.java index da6824d01..fd0d5cfd6 100644 --- a/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/test/java/de/adorsys/datasafe/simple/adapter/impl/SimpleDatasafeAdapterTest.java +++ b/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/test/java/de/adorsys/datasafe/simple/adapter/impl/SimpleDatasafeAdapterTest.java @@ -8,13 +8,16 @@ import de.adorsys.datasafe.simple.adapter.api.types.*; import de.adorsys.datasafe.storage.impl.fs.FileSystemStorageService; import de.adorsys.datasafe.teststorage.WithStorageProvider; +import de.adorsys.datasafe.types.api.resource.AbsoluteLocation; import de.adorsys.datasafe.types.api.resource.BasePrivateResource; +import de.adorsys.datasafe.types.api.resource.ResolvedResource; import lombok.SneakyThrows; import lombok.extern.slf4j.Slf4j; import org.bouncycastle.jce.provider.BouncyCastleProvider; import org.bouncycastle.util.io.Streams; import org.junit.jupiter.api.AfterEach; import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.MethodSource; @@ -48,7 +51,12 @@ void myinit(StorageDescriptor descriptor) { } private static Stream storages() { - return allDefaultStorages(); + return allDefaultStorages(); + } + + @BeforeEach + void mybefore() { + Security.addProvider(new BouncyCastleProvider()); } void mystart() { @@ -67,6 +75,26 @@ void myafter() { simpleDatasafeService.destroyUser(userIDAuth); } + @ParameterizedTest + @MethodSource("minioOnly") + @SneakyThrows + void justCreateAndDeleteUserForMinioOnly(WithStorageProvider.StorageDescriptor descriptor) { + myinit(descriptor); + mystart(); + + // SimpleDatasafeAdapter does not use user profile json files, so only keystore and pubkeys should exist: + try (Stream> ls = descriptor.getStorageService().get() + .list(BasePrivateResource.forAbsolutePrivate(descriptor.getLocation())) + ) { + assertThat(ls).extracting(it -> descriptor.getLocation().relativize(it.location()).asString()) + .containsExactlyInAnyOrder( + "users/peter/public/pubkeys", + "users/peter/private/keystore" + ); + } + log.info("test create user and delete user with " + descriptor.getName()); + } + @ParameterizedTest @MethodSource("storages") @SneakyThrows @@ -75,14 +103,15 @@ void justCreateAndDeleteUser(WithStorageProvider.StorageDescriptor descriptor) { mystart(); // SimpleDatasafeAdapter does not use user profile json files, so only keystore and pubkeys should exist: - assertThat(descriptor.getStorageService().get().list( - BasePrivateResource.forAbsolutePrivate(descriptor.getLocation())) - ).extracting(it -> descriptor.getLocation().relativize(it.location()).asString()) - .containsExactlyInAnyOrder( - "users/peter/public/pubkeys", - "users/peter/private/keystore" - ); - + try (Stream> ls = descriptor.getStorageService().get() + .list(BasePrivateResource.forAbsolutePrivate(descriptor.getLocation())) + ) { + assertThat(ls).extracting(it -> descriptor.getLocation().relativize(it.location()).asString()) + .containsExactlyInAnyOrder( + "users/peter/public/pubkeys", + "users/peter/private/keystore" + ); + } log.info("test create user and delete user with " + descriptor.getName()); } diff --git a/datasafe-storage/datasafe-storage-impl-db/src/test/java/de/adorsys/datasafe/storage/impl/db/DatabaseStorageServiceTest.java b/datasafe-storage/datasafe-storage-impl-db/src/test/java/de/adorsys/datasafe/storage/impl/db/DatabaseStorageServiceTest.java index d30eb640f..d6a5d52ef 100644 --- a/datasafe-storage/datasafe-storage-impl-db/src/test/java/de/adorsys/datasafe/storage/impl/db/DatabaseStorageServiceTest.java +++ b/datasafe-storage/datasafe-storage-impl-db/src/test/java/de/adorsys/datasafe/storage/impl/db/DatabaseStorageServiceTest.java @@ -9,9 +9,11 @@ import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; +import java.io.InputStream; import java.io.OutputStream; import java.util.Collections; import java.util.Set; +import java.util.stream.Stream; import static org.assertj.core.api.Assertions.assertThat; @@ -71,21 +73,28 @@ void objectExists() { void list() { writeData(OTHER_FILE, MESSAGE); - assertThat(storageService.list(FILE)) - .extracting(it -> it.getResource().location().asString()) - .containsOnly("jdbc://localhost:9999/h2:mem:test/private_profiles/path/hello.txt"); + try (Stream> ls = storageService.list(FILE)) { + assertThat(ls) + .extracting(it -> it.getResource().location().asString()) + .containsOnly("jdbc://localhost:9999/h2:mem:test/private_profiles/path/hello.txt"); + } - assertThat(storageService.list(ROOT)) - .extracting(it -> it.getResource().location().asString()) - .containsOnly( - "jdbc://localhost:9999/h2:mem:test/private_profiles/path/hello.txt", - "jdbc://localhost:9999/h2:mem:test/private_profiles/path/hello1.txt" - ); + try (Stream> ls = storageService.list(ROOT)) { + assertThat(ls) + .extracting(it -> it.getResource().location().asString()) + .containsOnly( + "jdbc://localhost:9999/h2:mem:test/private_profiles/path/hello.txt", + "jdbc://localhost:9999/h2:mem:test/private_profiles/path/hello1.txt" + ); + } } @Test + @SneakyThrows void read() { - assertThat(storageService.read(FILE)).hasContent(MESSAGE); + try (InputStream read = storageService.read(FILE)) { + assertThat(read).hasContent(MESSAGE); + } } @Test @@ -95,9 +104,12 @@ void remove() { } @Test + @SneakyThrows void write() { writeData(OTHER_FILE, MESSAGE); - assertThat(storageService.read(OTHER_FILE)).hasContent(MESSAGE); + try (InputStream read = storageService.read(OTHER_FILE)) { + assertThat(read).hasContent(MESSAGE); + } } @SneakyThrows diff --git a/datasafe-storage/datasafe-storage-impl-fs/src/test/java/de/adorsys/datasafe/storage/impl/fs/FileSystemStorageServiceTest.java b/datasafe-storage/datasafe-storage-impl-fs/src/test/java/de/adorsys/datasafe/storage/impl/fs/FileSystemStorageServiceTest.java index 05c75ebf8..b103d6ef8 100644 --- a/datasafe-storage/datasafe-storage-impl-fs/src/test/java/de/adorsys/datasafe/storage/impl/fs/FileSystemStorageServiceTest.java +++ b/datasafe-storage/datasafe-storage-impl-fs/src/test/java/de/adorsys/datasafe/storage/impl/fs/FileSystemStorageServiceTest.java @@ -15,7 +15,7 @@ import java.nio.charset.StandardCharsets; import java.nio.file.*; import java.util.UUID; -import java.util.stream.Collectors; +import java.util.stream.Stream; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatThrownBy; @@ -45,14 +45,18 @@ void prepare(@TempDir Path dir) { @Test void objectExists() { createFileWithMessage(); - assertThat(storageService.objectExists(storageService.list(root).findFirst().get())).isTrue(); + try (Stream> ls = storageService.list(root)) { + assertThat(storageService.objectExists(ls.findFirst().get())).isTrue(); + } } @Test void listEmpty() { Path nonExistingFile = storageDir.resolve(UUID.randomUUID().toString()); AbsoluteLocation nonExistingFileLocation = new AbsoluteLocation<>(BasePrivateResource.forPrivate(nonExistingFile.toUri())); - assertThat(storageService.list(nonExistingFileLocation).collect(Collectors.toList())).isEmpty(); + try (Stream> ls = storageService.list(nonExistingFileLocation)) { + assertThat(ls).isEmpty(); + } } @SneakyThrows @@ -104,33 +108,43 @@ void listDotFilesToo() { Path dotFile = storageDir.resolve(".dotfile"); AbsoluteLocation newFileLocation = new AbsoluteLocation<>(BasePrivateResource.forPrivate(dotFile.toUri())); - assertThat(storageService.list(root).collect(Collectors.toList())).isEmpty(); - try (OutputStream os = storageService.write(WithCallback.noCallback(newFileLocation))) { - os.write(MESSAGE.getBytes()); + try (Stream> lsStorageService = storageService.list(root)) { + assertThat(lsStorageService).isEmpty(); + } + try (OutputStream osStorageService = storageService.write(WithCallback.noCallback(newFileLocation))) { + osStorageService.write(MESSAGE.getBytes()); + } + try (Stream> lsStorageService = storageService.list(root)) { + assertThat(lsStorageService).isNotEmpty(); } - assertThat(storageService.list(root).collect(Collectors.toList())).isNotEmpty(); } @Test void list() { createFileWithMessage(); - assertThat(storageService.list(root)) - .hasSize(1) - .extracting(AbsoluteLocation::location) - .asString().contains(FILE); + try (Stream> lsStorageService = storageService.list(root)) { + assertThat(lsStorageService) + .hasSize(1) + .extracting(AbsoluteLocation::location) + .asString().contains(FILE); + } } @Test void listOnNonExisting() { - assertThat(storageService.list(root)).isEmpty(); + try (Stream> lsStorageService = storageService.list(root)) { + assertThat(lsStorageService).isEmpty(); + } } @Test + @SneakyThrows void read() { createFileWithMessage(); - - assertThat(storageService.read(fileWithMsg)).hasContent(MESSAGE); + try (InputStream read = storageService.read(fileWithMsg)) { + assertThat(read).hasContent(MESSAGE); + } } @Test @@ -140,7 +154,9 @@ void write() { os.write(MESSAGE.getBytes()); } - assertThat(storageService.read(fileWithMsg)).hasContent(MESSAGE); + try (InputStream read = storageService.read(fileWithMsg)) { + assertThat(read).hasContent(MESSAGE); + } } @Test diff --git a/datasafe-test-storages/src/main/java/de/adorsys/datasafe/teststorage/WithStorageProvider.java b/datasafe-test-storages/src/main/java/de/adorsys/datasafe/teststorage/WithStorageProvider.java index 4d806b72b..d744559da 100644 --- a/datasafe-test-storages/src/main/java/de/adorsys/datasafe/teststorage/WithStorageProvider.java +++ b/datasafe-test-storages/src/main/java/de/adorsys/datasafe/teststorage/WithStorageProvider.java @@ -32,6 +32,7 @@ import org.testcontainers.containers.wait.strategy.Wait; import org.testcontainers.shaded.org.apache.commons.io.FileUtils; +import java.net.URI; import java.nio.file.Path; import java.time.Duration; import java.util.Arrays; @@ -62,7 +63,7 @@ public abstract class WithStorageProvider extends BaseMockitoTest { private static String minioAccessKeyID = "admin"; private static String minioSecretAccessKey = "password"; private static String minioRegion = "eu-central-1"; - private static String minioUrl = "http://localhost"; + private static String minioUrl = getDockerUriFromOrigUri("http://localhost"); private static String minioMappedUrl; // Note that CEPH is used to test bucket-level versioning, so you will get versioned bucket: @@ -191,6 +192,13 @@ protected static Stream allStorages() { ).filter(Objects::nonNull); } + @ValueSource + protected static Stream minioOnly() { + return Stream.of( + minio() + ).filter(Objects::nonNull); + } + protected static StorageDescriptor fs() { return new StorageDescriptor( StorageDescriptorName.FILESYSTEM, @@ -449,4 +457,15 @@ public enum StorageDescriptorName { CEPH, AMAZON } + + + @SneakyThrows + private static String getDockerUriFromOrigUri(String uri) { + String dockerhost = System.getenv("DOCKER_HOST"); + if (dockerhost == null) { + return uri; + } + URI dockeruri = new URI(dockerhost); + return "http://" + dockeruri.getHost(); + } } diff --git a/datasafe-types-api/src/test/java/de/adorsys/datasafe/types/api/shared/Position.java b/datasafe-types-api/src/test/java/de/adorsys/datasafe/types/api/shared/Position.java deleted file mode 100644 index 798f4c133..000000000 --- a/datasafe-types-api/src/test/java/de/adorsys/datasafe/types/api/shared/Position.java +++ /dev/null @@ -1,22 +0,0 @@ -package de.adorsys.datasafe.types.api.shared; - -import java.util.stream.Stream; - -/** - * Utility class for getting the element at the position from a stream. - */ -public final class Position { - - private Position() { - } - - /** - * Returns first element from stream. - * @param data Stream from which to get element - * @param Generic - * @return First element of the stream, or throws {@link IllegalArgumentException} if stream is empty. - */ - public static T first(Stream data) { - return data.findFirst().orElseThrow(() -> new IllegalArgumentException("No first element")); - } -} diff --git a/datasafe-types-api/src/test/java/de/adorsys/datasafe/types/api/utils/ObfuscateTest.java b/datasafe-types-api/src/test/java/de/adorsys/datasafe/types/api/utils/ObfuscateTest.java index dddf8ce13..77a7911ad 100644 --- a/datasafe-types-api/src/test/java/de/adorsys/datasafe/types/api/utils/ObfuscateTest.java +++ b/datasafe-types-api/src/test/java/de/adorsys/datasafe/types/api/utils/ObfuscateTest.java @@ -3,8 +3,6 @@ import de.adorsys.datasafe.types.api.resource.Uri; import org.junit.jupiter.api.Test; -import java.nio.file.Paths; - import static org.assertj.core.api.Assertions.assertThat; class ObfuscateTest { @@ -56,7 +54,7 @@ void secureUriWithHashAndAuthorityIgnoresAuthority() { @Test void securePath() { Obfuscate.secureLogs = "STARS"; - assertThat(new Uri(Paths.get(TEST_STRING).toUri()).toString()) + assertThat(new Uri("file:///path/to/file").toString()) .isEqualTo("Uri{uri=fi****e:///****/****/****}"); } From 742c27dbc7a177fa851d07e8e3d5318cffdf7636 Mon Sep 17 00:00:00 2001 From: Valentyn Berezin Date: Mon, 7 Oct 2019 14:29:31 +0300 Subject: [PATCH 161/255] Extract some parts to Util --- .../impl/e2e/MultiDFSFunctionalityTest.java | 13 +----------- .../MultiDfsWithCredentialsExampleTest.java | 2 +- ...DefaultDatasafeOnVersionedStorageTest.java | 14 ++++++++++++- .../teststorage/WithStorageProvider.java | 18 ++++------------ .../datasafe/types/api/shared/DockerUtil.java | 21 +++++++++++++++++++ 5 files changed, 40 insertions(+), 28 deletions(-) create mode 100644 datasafe-types-api/src/test/java/de/adorsys/datasafe/types/api/shared/DockerUtil.java diff --git a/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/MultiDFSFunctionalityTest.java b/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/MultiDFSFunctionalityTest.java index 0b4d4d8e1..b393126ad 100644 --- a/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/MultiDFSFunctionalityTest.java +++ b/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/MultiDFSFunctionalityTest.java @@ -44,7 +44,6 @@ import java.io.InputStream; import java.io.OutputStream; -import java.net.URI; import java.security.Security; import java.security.UnrecoverableKeyException; import java.util.Collections; @@ -56,6 +55,7 @@ import java.util.stream.Collectors; import java.util.stream.Stream; +import static de.adorsys.datasafe.types.api.shared.DockerUtil.getDockerUri; import static org.assertj.core.api.Assertions.assertThat; import static org.junit.jupiter.api.Assertions.assertThrows; @@ -352,15 +352,4 @@ private WithCredentialProvider(Lazy storageKeyStoreOp this.delegate = new RegexAccessServiceWithStorageCredentialsImpl(storageKeyStoreOperations); } } - - @SneakyThrows - private static String getDockerUri(String defaultUri) { - String dockerhost = System.getenv("DOCKER_HOST"); - if (dockerhost == null) { - return defaultUri; - } - - URI dockerUri = new URI(dockerhost); - return "http://" + dockerUri.getHost(); - } } diff --git a/datasafe-examples/datasafe-examples-multidfs/src/test/java/de/adorsys/datasafe/examples/business/s3/MultiDfsWithCredentialsExampleTest.java b/datasafe-examples/datasafe-examples-multidfs/src/test/java/de/adorsys/datasafe/examples/business/s3/MultiDfsWithCredentialsExampleTest.java index 8d26e1db8..b086c539e 100644 --- a/datasafe-examples/datasafe-examples-multidfs/src/test/java/de/adorsys/datasafe/examples/business/s3/MultiDfsWithCredentialsExampleTest.java +++ b/datasafe-examples/datasafe-examples-multidfs/src/test/java/de/adorsys/datasafe/examples/business/s3/MultiDfsWithCredentialsExampleTest.java @@ -128,7 +128,7 @@ void testMultiUserStorageUserSetup() { // bind URI that contains `directoryBucket` to directoryStorage .put(Pattern.compile(directoryBucketS3Uri + ".+"), directoryStorage) .put( - Pattern.compile("http://127.0.0.1.+"), + Pattern.compile(getDockerUri("http://127.0.0.1") + ".+"), // Dynamically creates S3 client with bucket name equal to host value new UriBasedAuthStorageService( acc -> new S3StorageService( diff --git a/datasafe-examples/datasafe-examples-versioned-s3/src/test/java/de/adorsys/datasafe/examples/business/s3/BaseUserOperationsWithDefaultDatasafeOnVersionedStorageTest.java b/datasafe-examples/datasafe-examples-versioned-s3/src/test/java/de/adorsys/datasafe/examples/business/s3/BaseUserOperationsWithDefaultDatasafeOnVersionedStorageTest.java index 2a02971c8..a1c402055 100644 --- a/datasafe-examples/datasafe-examples-versioned-s3/src/test/java/de/adorsys/datasafe/examples/business/s3/BaseUserOperationsWithDefaultDatasafeOnVersionedStorageTest.java +++ b/datasafe-examples/datasafe-examples-versioned-s3/src/test/java/de/adorsys/datasafe/examples/business/s3/BaseUserOperationsWithDefaultDatasafeOnVersionedStorageTest.java @@ -32,6 +32,7 @@ import org.testcontainers.containers.wait.strategy.Wait; import java.io.OutputStream; +import java.net.URI; import java.nio.charset.StandardCharsets; import java.security.Security; import java.util.concurrent.atomic.AtomicReference; @@ -83,7 +84,7 @@ static void createServices() { cephContainer.start(); Integer mappedPort = cephContainer.getMappedPort(8000); // URL for S3 API/bucket root: - cephMappedUrl = "http://0.0.0.0" + ":" + mappedPort; + cephMappedUrl = getDockerUri("http://0.0.0.0") + ":" + mappedPort; log.info("Ceph mapped URL: {}", cephMappedUrl); cephS3 = AmazonS3ClientBuilder.standard() .withEndpointConfiguration( @@ -235,4 +236,15 @@ private UserIDAuth registerUser(String username) { defaultDatasafeServices.userProfile().registerUsingDefaults(creds); return creds; } + + @SneakyThrows + private static String getDockerUri(String defaultUri) { + String dockerHost = System.getenv("DOCKER_HOST"); + if (dockerHost == null) { + return defaultUri; + } + + URI dockerUri = new URI(dockerHost); + return "http://" + dockerUri.getHost(); + } } diff --git a/datasafe-test-storages/src/main/java/de/adorsys/datasafe/teststorage/WithStorageProvider.java b/datasafe-test-storages/src/main/java/de/adorsys/datasafe/teststorage/WithStorageProvider.java index d744559da..983cc7f52 100644 --- a/datasafe-test-storages/src/main/java/de/adorsys/datasafe/teststorage/WithStorageProvider.java +++ b/datasafe-test-storages/src/main/java/de/adorsys/datasafe/teststorage/WithStorageProvider.java @@ -32,7 +32,6 @@ import org.testcontainers.containers.wait.strategy.Wait; import org.testcontainers.shaded.org.apache.commons.io.FileUtils; -import java.net.URI; import java.nio.file.Path; import java.time.Duration; import java.util.Arrays; @@ -44,6 +43,8 @@ import java.util.function.Supplier; import java.util.stream.Stream; +import static de.adorsys.datasafe.types.api.shared.DockerUtil.getDockerUri; + /** * Provides different storage types - filesystem, minio, etc. to be used in tests. @@ -63,14 +64,14 @@ public abstract class WithStorageProvider extends BaseMockitoTest { private static String minioAccessKeyID = "admin"; private static String minioSecretAccessKey = "password"; private static String minioRegion = "eu-central-1"; - private static String minioUrl = getDockerUriFromOrigUri("http://localhost"); + private static String minioUrl = getDockerUri("http://localhost"); private static String minioMappedUrl; // Note that CEPH is used to test bucket-level versioning, so you will get versioned bucket: private static String cephAccessKeyID = "admin"; private static String cephSecretAccessKey = "password"; private static String cephRegion = "eu-central-1"; - private static String cephUrl = "http://0.0.0.0"; // not localhost! + private static String cephUrl = getDockerUri("http://localhost");// not localhost! private static String cephMappedUrl; private static String amazonAccessKeyID = readPropOrEnv("AWS_ACCESS_KEY"); @@ -457,15 +458,4 @@ public enum StorageDescriptorName { CEPH, AMAZON } - - - @SneakyThrows - private static String getDockerUriFromOrigUri(String uri) { - String dockerhost = System.getenv("DOCKER_HOST"); - if (dockerhost == null) { - return uri; - } - URI dockeruri = new URI(dockerhost); - return "http://" + dockeruri.getHost(); - } } diff --git a/datasafe-types-api/src/test/java/de/adorsys/datasafe/types/api/shared/DockerUtil.java b/datasafe-types-api/src/test/java/de/adorsys/datasafe/types/api/shared/DockerUtil.java new file mode 100644 index 000000000..26e94cb5c --- /dev/null +++ b/datasafe-types-api/src/test/java/de/adorsys/datasafe/types/api/shared/DockerUtil.java @@ -0,0 +1,21 @@ +package de.adorsys.datasafe.types.api.shared; + +import lombok.SneakyThrows; +import lombok.experimental.UtilityClass; + +import java.net.URI; + +@UtilityClass +public class DockerUtil { + + @SneakyThrows + public static String getDockerUri(String defaultUri) { + String dockerHost = System.getenv("DOCKER_HOST"); + if (dockerHost == null) { + return defaultUri; + } + + URI dockerUri = new URI(dockerHost); + return "http://" + dockerUri.getHost(); + } +} From c33106432081a622ec9b419ee21670f90c4c53e2 Mon Sep 17 00:00:00 2001 From: Valentyn Berezin Date: Mon, 7 Oct 2019 16:59:31 +0300 Subject: [PATCH 162/255] Modify Dirs --- .../java/de/adorsys/datasafe/types/api/shared/Dirs.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/datasafe-types-api/src/test/java/de/adorsys/datasafe/types/api/shared/Dirs.java b/datasafe-types-api/src/test/java/de/adorsys/datasafe/types/api/shared/Dirs.java index e92528acd..ffaf6985f 100644 --- a/datasafe-types-api/src/test/java/de/adorsys/datasafe/types/api/shared/Dirs.java +++ b/datasafe-types-api/src/test/java/de/adorsys/datasafe/types/api/shared/Dirs.java @@ -23,8 +23,10 @@ public List walk(Path root, int depth) { return walk .filter(it -> !(it.getFileName().startsWith(".") || it.getFileName().startsWith(".."))) .filter(it -> !it.equals(root)) - .map(it -> root.relativize(it).toString().replaceFirst("\\./", "")) + .map(it -> root.toUri().relativize(it.toUri()).toString() + .replaceFirst("\\./", "") + .replaceAll("/$", "")) .collect(Collectors.toList()); } } -} +} \ No newline at end of file From 37796d9235c4b576c73903f73b4076ddc07b08f2 Mon Sep 17 00:00:00 2001 From: Valentyn Berezin Date: Mon, 7 Oct 2019 17:28:57 +0300 Subject: [PATCH 163/255] Use supplied docker dir too --- .../datasafe/storage/impl/s3/S3SystemStorageServiceTest.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/datasafe-storage/datasafe-storage-impl-s3/src/test/java/de/adorsys/datasafe/storage/impl/s3/S3SystemStorageServiceTest.java b/datasafe-storage/datasafe-storage-impl-s3/src/test/java/de/adorsys/datasafe/storage/impl/s3/S3SystemStorageServiceTest.java index 0cea6e983..6dcfe4876 100644 --- a/datasafe-storage/datasafe-storage-impl-s3/src/test/java/de/adorsys/datasafe/storage/impl/s3/S3SystemStorageServiceTest.java +++ b/datasafe-storage/datasafe-storage-impl-s3/src/test/java/de/adorsys/datasafe/storage/impl/s3/S3SystemStorageServiceTest.java @@ -19,6 +19,7 @@ import java.util.List; import java.util.stream.Collectors; +import static de.adorsys.datasafe.types.api.shared.DockerUtil.getDockerUri; import static org.assertj.core.api.Assertions.assertThat; import static org.junit.jupiter.api.Assertions.assertThrows; @@ -31,7 +32,7 @@ class S3SystemStorageServiceTest extends BaseMockitoTest { private static String accessKeyID = "admin"; private static String secretAccessKey = "password"; - private static String url = "http://localhost"; + private static String url = getDockerUri("http://localhost"); private static BasicAWSCredentials creds = new BasicAWSCredentials(accessKeyID, secretAccessKey); private static AmazonS3 s3; private static AbsoluteLocation root; From 196025ad64463e87901b9f9ddaa5776d38f8f173 Mon Sep 17 00:00:00 2001 From: Maxim Grischenko Date: Mon, 7 Oct 2019 16:50:31 +0200 Subject: [PATCH 164/255] throughput multiplied to number of threads, added column throughput in MB --- .../parse_script_table.groovy | 24 ++++++++++++------- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/datasafe-long-run-tests/datasafe-business-tests-random-actions/parse_script_table.groovy b/datasafe-long-run-tests/datasafe-business-tests-random-actions/parse_script_table.groovy index 3cd396788..9365bfc57 100644 --- a/datasafe-long-run-tests/datasafe-business-tests-random-actions/parse_script_table.groovy +++ b/datasafe-long-run-tests/datasafe-business-tests-random-actions/parse_script_table.groovy @@ -1,4 +1,5 @@ import java.nio.file.Paths +import groovy.transform.Field // script expects file name as argument rawData = [:] @@ -31,25 +32,30 @@ Paths.get(this.args[0]).readLines().forEach { line -> } } -final String ANSI_RESET = "\u001B[0m"; -final String ANSI_RED = "\u001B[31m"; -final String ANSI_YELLOW = "\u001B[33m"; +@Field final String ANSI_RESET = "\u001B[0m" +@Field final String ANSI_RED = "\u001B[31m" +@Field final String ANSI_YELLOW = "\u001B[33m" rawData.forEach { op, byOpValues -> byOpValues.forEach { sz, bySizeValues -> - println(ANSI_YELLOW + "${op}" + ANSI_RESET + " operation performance with " + ANSI_YELLOW + "${sz}" + ANSI_RESET +" kb objects") + println(ANSI_YELLOW + "${op}" + ANSI_RESET + " operation performance with " + ANSI_YELLOW + "${sz}" + ANSI_RESET +" KB objects") printSeparator() - curStr = ["Threads", "Throughput", "p50", "p99", "p90", "p75", "p95"] - printString(curStr); + curStr = ["Threads", "Throughput", "Throughput", "p50", "p99", "p90", "p75", "p95"] + printString(curStr) + curStr = ["", "ops", "MB/s", "", "", "", "", ""] + printString(curStr) printSeparator() bySizeValues.forEach { nThreads, byThreadValues -> byThreadValues.forEach { itnum, val -> + def opsPerSec = Double.parseDouble(val[5]) * Integer.parseInt(nThreads) + String thr_ops = opsPerSec.round(2).toString() + String thr_kb = ANSI_RED + (opsPerSec * Integer.parseInt(sz) / 1024).round(2).toString() + ANSI_RESET for (int i=0; i < val.size(); i++) { if (val[i].isDouble() && !val[i].isInteger()) { val[i] = Double.parseDouble(val[i]).round(2).toString() } } - curStr = [nThreads, val[5], val[0], val[1], val[2], val[3], val[4]] + curStr = [nThreads, thr_ops, thr_kb, val[0], val[1], val[2], val[3], val[4]] printString(curStr) printSeparator() } @@ -59,10 +65,10 @@ rawData.forEach { op, byOpValues -> } def printSeparator() { - println(("+"+"-".multiply(10)).multiply(7)+"+") + println(("+"+"-".multiply(10)).multiply(8)+"+") } def printString(List params) { - params.each { print '|' + it.center(10) } + params.each { print '|' + it.center(it.contains(ANSI_RESET) ? 19 : 10) } println("|") } \ No newline at end of file From 92c9948cfb64cd3738640938b2f7893899d79bab Mon Sep 17 00:00:00 2001 From: Valentyn Berezin Date: Mon, 7 Oct 2019 19:20:50 +0300 Subject: [PATCH 165/255] Use supplied docker dir too --- ...BasicFunctionalityWithConcurrencyTest.java | 7 ++-- .../impl/e2e/SchemeDelegationWithDbTest.java | 37 +++++++++++++------ .../impl/e2e/UserProfileWithUtf8Test.java | 23 ++++++------ 3 files changed, 40 insertions(+), 27 deletions(-) diff --git a/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/BasicFunctionalityWithConcurrencyTest.java b/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/BasicFunctionalityWithConcurrencyTest.java index a717555e1..6b3769d20 100644 --- a/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/BasicFunctionalityWithConcurrencyTest.java +++ b/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/BasicFunctionalityWithConcurrencyTest.java @@ -30,6 +30,7 @@ import java.time.Instant; import java.util.ArrayList; import java.util.List; +import java.util.UUID; import java.util.concurrent.CountDownLatch; import java.util.concurrent.Executors; import java.util.concurrent.ThreadPoolExecutor; @@ -60,8 +61,6 @@ class BasicFunctionalityWithConcurrencyTest extends BaseE2ETest { private static int NUMBER_OF_TEST_FILES = 5; private static int EXPECTED_NUMBER_OF_FILES_PER_USER = NUMBER_OF_TEST_FILES; - private static final String TEST_FILENAME = "test.txt"; - @TempDir protected Path tempTestFileFolder; protected StorageService storage; @@ -99,7 +98,7 @@ class BasicFunctionalityWithConcurrencyTest extends BaseE2ETest { void writeToPrivateListPrivateInDifferentThreads(WithStorageProvider.StorageDescriptor descriptor, int size, int poolSize) { init(descriptor); - String testFile = tempTestFileFolder.resolve(TEST_FILENAME).toString(); + String testFile = tempTestFileFolder.resolve(UUID.randomUUID().toString()).toString(); generateTestFile(testFile, size); ThreadPoolExecutor executor = (ThreadPoolExecutor) Executors.newFixedThreadPool(poolSize); @@ -109,7 +108,7 @@ void writeToPrivateListPrivateInDifferentThreads(WithStorageProvider.StorageDesc String checksumOfOriginTestFile; log.trace("*** get checksum of {} ***", testFile); - try(FileInputStream input = new FileInputStream(new File(testFile))) { + try (FileInputStream input = new FileInputStream(new File(testFile))) { checksumOfOriginTestFile = checksum(input); } diff --git a/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/SchemeDelegationWithDbTest.java b/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/SchemeDelegationWithDbTest.java index 06e118a26..aecc46ef5 100644 --- a/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/SchemeDelegationWithDbTest.java +++ b/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/SchemeDelegationWithDbTest.java @@ -20,14 +20,17 @@ import de.adorsys.datasafe.types.api.resource.ResolvedResource; import de.adorsys.datasafe.types.api.resource.Uri; import lombok.SneakyThrows; +import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.io.TempDir; +import org.testcontainers.shaded.org.bouncycastle.jce.provider.BouncyCastleProvider; import java.io.OutputStream; import java.net.URI; import java.nio.file.Files; import java.nio.file.Path; +import java.security.Security; import java.util.List; import java.util.Set; import java.util.stream.Collectors; @@ -44,6 +47,11 @@ class SchemeDelegationWithDbTest extends WithStorageProvider { private StorageService db; private DefaultDatasafeServices datasafeServices; + @BeforeAll + static void addBouncyCastle() { + Security.addProvider(new BouncyCastleProvider()); + } + @BeforeEach void initialize(@TempDir Path tempDir) { this.fsPath = tempDir; @@ -88,25 +96,32 @@ void testProfileOnDbDataOnFsWorks() { .containsExactly("jdbc://localhost:9999/h2:mem:test/public_profiles/john"); Path path = fsPath.resolve(new Uri("users/john/private/files/").resolve(AES_SIV.asUriRoot()).asString()); - Path encryptedFile = Files.walk(path).collect(Collectors.toList()).get(1); + Path encryptedFile = walk(path).get(1); // File and keystore/pub keys are on FS - assertThat(Files.walk(fsPath)) - .extracting(it -> fsPath.relativize(it)) - .extracting(Path::toString) + assertThat(walk(fsPath)) + .extracting(it -> fsPath.toUri().relativize(it.toUri())) + .extracting(URI::toString) .containsExactlyInAnyOrder( "", - "users", - "users/john", - "users/john/public", + "users/", + "users/john/", + "users/john/public/", "users/john/public/pubkeys", - "users/john/private", + "users/john/private/", "users/john/private/keystore", - "users/john/private/files", - "users/john/private/files/SIV", - fsPath.relativize(encryptedFile).toString() + "users/john/private/files/", + "users/john/private/files/SIV/", + fsPath.toUri().relativize(encryptedFile.toUri()).toString() ); } + @SneakyThrows + private List walk(Path at) { + try (Stream ls = Files.walk(at)) { + return ls.collect(Collectors.toList()); + } + } + private List listDb(String path) { try (Stream> stream = db.list(BasePrivateResource.forAbsolutePrivate(URI.create(path)))){ return stream.map(it -> it.location().asURI().toString()).collect(Collectors.toList()); diff --git a/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/UserProfileWithUtf8Test.java b/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/UserProfileWithUtf8Test.java index 815e21ff4..a0166ec78 100644 --- a/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/UserProfileWithUtf8Test.java +++ b/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/UserProfileWithUtf8Test.java @@ -14,17 +14,18 @@ import de.adorsys.datasafe.types.api.resource.BasePrivateResource; import de.adorsys.datasafe.types.api.resource.ResolvedResource; import de.adorsys.datasafe.types.api.resource.Uri; +import de.adorsys.datasafe.types.api.shared.Dirs; import lombok.SneakyThrows; +import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.io.TempDir; import org.testcontainers.shaded.com.google.common.collect.ImmutableMap; +import org.testcontainers.shaded.org.bouncycastle.jce.provider.BouncyCastleProvider; -import java.io.IOException; import java.io.OutputStream; -import java.net.URI; -import java.nio.file.Files; import java.nio.file.Path; +import java.security.Security; import java.util.List; import java.util.stream.Collectors; import java.util.stream.Stream; @@ -38,6 +39,11 @@ class UserProfileWithUtf8Test extends WithStorageProvider { private StorageService minio; private DefaultDatasafeServices datasafeServices; + @BeforeAll + static void addBouncyCastle() { + Security.addProvider(new BouncyCastleProvider()); + } + @BeforeEach void initialize(@TempDir Path tempDir) { StorageDescriptor minioDescriptor = minio(); @@ -74,9 +80,8 @@ void testProfileOnFsDataOnMinioWorks() { } // Profiles are on FS - note that raw file path has `+` instead of space - assertThat(listFs()) - .extracting(it -> fsPath.relativize(it)) - .extracting(it -> URI.create(it.toString()).getPath()) + assertThat(Dirs.walk(fsPath)) + .extracting(it -> new Uri(it).asString()) .containsExactlyInAnyOrder( "", "prüfungs", @@ -104,12 +109,6 @@ private List> listMinio() { } } - private List listFs() throws IOException { - try (Stream ls = Files.walk(fsPath)) { - return ls.collect(Collectors.toList()); - } - } - static class ProfilesOnFsDataOnMinio extends DefaultDFSConfig { private final Uri profilesPath; From 5c1213781ac35834d749e173a55ded4a46dd53f4 Mon Sep 17 00:00:00 2001 From: Valentyn Berezin Date: Mon, 7 Oct 2019 19:41:47 +0300 Subject: [PATCH 166/255] Generify windows path resolve --- .../adorsys/datasafe/types/api/shared/Dirs.java | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/datasafe-types-api/src/test/java/de/adorsys/datasafe/types/api/shared/Dirs.java b/datasafe-types-api/src/test/java/de/adorsys/datasafe/types/api/shared/Dirs.java index ffaf6985f..5b8354230 100644 --- a/datasafe-types-api/src/test/java/de/adorsys/datasafe/types/api/shared/Dirs.java +++ b/datasafe-types-api/src/test/java/de/adorsys/datasafe/types/api/shared/Dirs.java @@ -2,6 +2,7 @@ import lombok.SneakyThrows; import lombok.experimental.UtilityClass; +import org.junit.jupiter.api.condition.OS; import java.nio.file.Files; import java.nio.file.Path; @@ -23,10 +24,19 @@ public List walk(Path root, int depth) { return walk .filter(it -> !(it.getFileName().startsWith(".") || it.getFileName().startsWith(".."))) .filter(it -> !it.equals(root)) - .map(it -> root.toUri().relativize(it.toUri()).toString() - .replaceFirst("\\./", "") - .replaceAll("/$", "")) + .map(it -> computeRelative(root, it) + .replaceFirst("\\./", "") + .replaceAll("/$", "")) .collect(Collectors.toList()); } } + + private String computeRelative(Path root, Path child) { + if (!OS.WINDOWS.isCurrentOs()) { + return root.toUri().relativize(child.toUri()).toString(); + } + + // Windows causes double-encoding of URI + return root.relativize(child).toString().replace('\\', '/'); + } } \ No newline at end of file From abe2b8d80eb250d2f362929522f404926a721271 Mon Sep 17 00:00:00 2001 From: Valentyn Berezin Date: Mon, 7 Oct 2019 19:49:29 +0300 Subject: [PATCH 167/255] Generify windows path resolve --- .../impl/e2e/UserProfileWithUtf8Test.java | 24 ++++++++++++++++--- .../datasafe/types/api/shared/Dirs.java | 16 ++----------- 2 files changed, 23 insertions(+), 17 deletions(-) diff --git a/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/UserProfileWithUtf8Test.java b/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/UserProfileWithUtf8Test.java index a0166ec78..73686a332 100644 --- a/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/UserProfileWithUtf8Test.java +++ b/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/UserProfileWithUtf8Test.java @@ -14,16 +14,18 @@ import de.adorsys.datasafe.types.api.resource.BasePrivateResource; import de.adorsys.datasafe.types.api.resource.ResolvedResource; import de.adorsys.datasafe.types.api.resource.Uri; -import de.adorsys.datasafe.types.api.shared.Dirs; import lombok.SneakyThrows; import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.condition.OS; import org.junit.jupiter.api.io.TempDir; import org.testcontainers.shaded.com.google.common.collect.ImmutableMap; import org.testcontainers.shaded.org.bouncycastle.jce.provider.BouncyCastleProvider; import java.io.OutputStream; +import java.net.URI; +import java.nio.file.Files; import java.nio.file.Path; import java.security.Security; import java.util.List; @@ -80,8 +82,8 @@ void testProfileOnFsDataOnMinioWorks() { } // Profiles are on FS - note that raw file path has `+` instead of space - assertThat(Dirs.walk(fsPath)) - .extracting(it -> new Uri(it).asString()) + assertThat(listFs(fsPath)) + .extracting(it -> computeRelative(fsPath, it)) .containsExactlyInAnyOrder( "", "prüfungs", @@ -109,6 +111,22 @@ private List> listMinio() { } } + @SneakyThrows + private List listFs(Path fsPath) { + try (Stream ls = Files.walk(fsPath)) { + return ls.collect(Collectors.toList()); + } + } + + private String computeRelative(Path root, Path child) { + if (!OS.WINDOWS.isCurrentOs()) { + return URI.create(root.relativize(child).toString()).getPath(); + } + + // Windows causes double-encoding of URI + return root.relativize(child).toString().replace('\\', '/'); + } + static class ProfilesOnFsDataOnMinio extends DefaultDFSConfig { private final Uri profilesPath; diff --git a/datasafe-types-api/src/test/java/de/adorsys/datasafe/types/api/shared/Dirs.java b/datasafe-types-api/src/test/java/de/adorsys/datasafe/types/api/shared/Dirs.java index 5b8354230..e92528acd 100644 --- a/datasafe-types-api/src/test/java/de/adorsys/datasafe/types/api/shared/Dirs.java +++ b/datasafe-types-api/src/test/java/de/adorsys/datasafe/types/api/shared/Dirs.java @@ -2,7 +2,6 @@ import lombok.SneakyThrows; import lombok.experimental.UtilityClass; -import org.junit.jupiter.api.condition.OS; import java.nio.file.Files; import java.nio.file.Path; @@ -24,19 +23,8 @@ public List walk(Path root, int depth) { return walk .filter(it -> !(it.getFileName().startsWith(".") || it.getFileName().startsWith(".."))) .filter(it -> !it.equals(root)) - .map(it -> computeRelative(root, it) - .replaceFirst("\\./", "") - .replaceAll("/$", "")) + .map(it -> root.relativize(it).toString().replaceFirst("\\./", "")) .collect(Collectors.toList()); } } - - private String computeRelative(Path root, Path child) { - if (!OS.WINDOWS.isCurrentOs()) { - return root.toUri().relativize(child.toUri()).toString(); - } - - // Windows causes double-encoding of URI - return root.relativize(child).toString().replace('\\', '/'); - } -} \ No newline at end of file +} From df3474afe419a3adec0511143b6ea72ac3da94ae Mon Sep 17 00:00:00 2001 From: Valentyn Berezin Date: Mon, 7 Oct 2019 19:53:17 +0300 Subject: [PATCH 168/255] Generify windows path resolve --- .../datasafe/business/impl/e2e/UserProfileWithUtf8Test.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/UserProfileWithUtf8Test.java b/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/UserProfileWithUtf8Test.java index 73686a332..60fd11d86 100644 --- a/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/UserProfileWithUtf8Test.java +++ b/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/UserProfileWithUtf8Test.java @@ -124,7 +124,7 @@ private String computeRelative(Path root, Path child) { } // Windows causes double-encoding of URI - return root.relativize(child).toString().replace('\\', '/'); + return new Uri(URI.create(root.relativize(child).toString().replace('\\', '/'))).asString(); } static class ProfilesOnFsDataOnMinio extends DefaultDFSConfig { From 9d397145686ee8b9425bdacccad70f32e3c6c0c6 Mon Sep 17 00:00:00 2001 From: Valentyn Berezin Date: Mon, 7 Oct 2019 20:12:38 +0300 Subject: [PATCH 169/255] Disable CEPH on windows --- .../adorsys/datasafe/teststorage/WithStorageProvider.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/datasafe-test-storages/src/main/java/de/adorsys/datasafe/teststorage/WithStorageProvider.java b/datasafe-test-storages/src/main/java/de/adorsys/datasafe/teststorage/WithStorageProvider.java index 983cc7f52..74920dfea 100644 --- a/datasafe-test-storages/src/main/java/de/adorsys/datasafe/teststorage/WithStorageProvider.java +++ b/datasafe-test-storages/src/main/java/de/adorsys/datasafe/teststorage/WithStorageProvider.java @@ -26,6 +26,7 @@ import org.junit.jupiter.api.AfterAll; import org.junit.jupiter.api.AfterEach; import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.condition.OS; import org.junit.jupiter.api.io.TempDir; import org.junit.jupiter.params.provider.ValueSource; import org.testcontainers.containers.GenericContainer; @@ -71,7 +72,7 @@ public abstract class WithStorageProvider extends BaseMockitoTest { private static String cephAccessKeyID = "admin"; private static String cephSecretAccessKey = "password"; private static String cephRegion = "eu-central-1"; - private static String cephUrl = getDockerUri("http://localhost");// not localhost! + private static String cephUrl = getDockerUri("http://0.0.0.0");// not localhost! private static String cephMappedUrl; private static String amazonAccessKeyID = readPropOrEnv("AWS_ACCESS_KEY"); @@ -226,9 +227,10 @@ protected static StorageDescriptor minio() { } protected static StorageDescriptor cephVersioned() { - if (skipCeph()) { + if (skipCeph() || OS.WINDOWS.isCurrentOs()) { return null; } + return new StorageDescriptor( StorageDescriptorName.CEPH, () -> { From 1841503ae86caaf57343f50a717fb4cf8fac3316 Mon Sep 17 00:00:00 2001 From: Valentyn Berezin Date: Mon, 7 Oct 2019 20:14:34 +0300 Subject: [PATCH 170/255] Re-enable ceph --- .../de/adorsys/datasafe/teststorage/WithStorageProvider.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/datasafe-test-storages/src/main/java/de/adorsys/datasafe/teststorage/WithStorageProvider.java b/datasafe-test-storages/src/main/java/de/adorsys/datasafe/teststorage/WithStorageProvider.java index 74920dfea..a8190b7ef 100644 --- a/datasafe-test-storages/src/main/java/de/adorsys/datasafe/teststorage/WithStorageProvider.java +++ b/datasafe-test-storages/src/main/java/de/adorsys/datasafe/teststorage/WithStorageProvider.java @@ -26,7 +26,6 @@ import org.junit.jupiter.api.AfterAll; import org.junit.jupiter.api.AfterEach; import org.junit.jupiter.api.BeforeAll; -import org.junit.jupiter.api.condition.OS; import org.junit.jupiter.api.io.TempDir; import org.junit.jupiter.params.provider.ValueSource; import org.testcontainers.containers.GenericContainer; @@ -227,10 +226,10 @@ protected static StorageDescriptor minio() { } protected static StorageDescriptor cephVersioned() { - if (skipCeph() || OS.WINDOWS.isCurrentOs()) { + if (skipCeph()) { return null; } - + return new StorageDescriptor( StorageDescriptorName.CEPH, () -> { From 916431743c42cf8c77fccaf9a9fa4237b00099dd Mon Sep 17 00:00:00 2001 From: Valentyn Berezin Date: Mon, 7 Oct 2019 20:18:02 +0300 Subject: [PATCH 171/255] Flatten try with resources --- .../BasicFunctionalityWithConcurrencyTest.java | 16 +++++++--------- .../teststorage/WithStorageProvider.java | 2 +- 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/BasicFunctionalityWithConcurrencyTest.java b/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/BasicFunctionalityWithConcurrencyTest.java index 6b3769d20..bd0cb3c0c 100644 --- a/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/BasicFunctionalityWithConcurrencyTest.java +++ b/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/BasicFunctionalityWithConcurrencyTest.java @@ -184,8 +184,8 @@ private void createFileForUserParallelly(ThreadPoolExecutor executor, CountDownL ); metricCollector.addSaveRecord( - user.getUserID().getValue(), - durationOfSavingFile + user.getUserID().getValue(), + durationOfSavingFile ); log.debug("Save file in {} ms", durationOfSavingFile); @@ -297,16 +297,14 @@ private void init(WithStorageProvider.StorageDescriptor descriptor) { protected void writeDataToFileForUser(UserIDAuth john, String filePathForWriting, String filePathForReading, CountDownLatch latch) { - try { - try (OutputStream write = writeToPrivate.write(WriteRequest.forDefaultPrivate(john, filePathForWriting))) { - try (FileInputStream fis = new FileInputStream(filePathForReading)) { - ByteStreams.copy(fis, write); - } - } + try (OutputStream write = writeToPrivate.write(WriteRequest.forDefaultPrivate(john, filePathForWriting)); + FileInputStream fis = new FileInputStream(filePathForReading) + ) { + ByteStreams.copy(fis, write); } catch (IOException e) { log.error("writeDataToFileForUser: {}", e.getMessage(), e); } - + latch.countDown(); } diff --git a/datasafe-test-storages/src/main/java/de/adorsys/datasafe/teststorage/WithStorageProvider.java b/datasafe-test-storages/src/main/java/de/adorsys/datasafe/teststorage/WithStorageProvider.java index a8190b7ef..15552f0aa 100644 --- a/datasafe-test-storages/src/main/java/de/adorsys/datasafe/teststorage/WithStorageProvider.java +++ b/datasafe-test-storages/src/main/java/de/adorsys/datasafe/teststorage/WithStorageProvider.java @@ -229,7 +229,7 @@ protected static StorageDescriptor cephVersioned() { if (skipCeph()) { return null; } - + return new StorageDescriptor( StorageDescriptorName.CEPH, () -> { From 2d6ff5b35592157f7e4a268e696d97aa245874f2 Mon Sep 17 00:00:00 2001 From: Valentyn Berezin Date: Mon, 7 Oct 2019 20:45:34 +0300 Subject: [PATCH 172/255] Await executor to shutdown --- .../impl/e2e/BasicFunctionalityWithConcurrencyTest.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/BasicFunctionalityWithConcurrencyTest.java b/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/BasicFunctionalityWithConcurrencyTest.java index bd0cb3c0c..b0eb32f7a 100644 --- a/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/BasicFunctionalityWithConcurrencyTest.java +++ b/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/BasicFunctionalityWithConcurrencyTest.java @@ -132,7 +132,7 @@ void writeToPrivateListPrivateInDifferentThreads(WithStorageProvider.StorageDesc log.trace("*** Main thread waiting for all threads ***"); finishHoldingLatch.await(TIMEOUT_S, SECONDS); - executor.shutdown(); + executor.awaitTermination(TIMEOUT_S, SECONDS); log.trace("*** All threads are finished work ***"); log.trace("*** Starting read info saved earlier *** "); @@ -304,7 +304,7 @@ protected void writeDataToFileForUser(UserIDAuth john, String filePathForWriting } catch (IOException e) { log.error("writeDataToFileForUser: {}", e.getMessage(), e); } - + latch.countDown(); } From 69516462e48877b279c5d8d0c8cc6e23b15f954e Mon Sep 17 00:00:00 2001 From: Valentyn Berezin Date: Mon, 7 Oct 2019 21:26:50 +0300 Subject: [PATCH 173/255] Drop File channel due to JDK-4724038 https://bugs.java.com/bugdatabase/view_bug.do?bug_id=4724038 --- ...BasicFunctionalityWithConcurrencyTest.java | 28 ++++++++----------- 1 file changed, 12 insertions(+), 16 deletions(-) diff --git a/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/BasicFunctionalityWithConcurrencyTest.java b/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/BasicFunctionalityWithConcurrencyTest.java index b0eb32f7a..13ddc4996 100644 --- a/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/BasicFunctionalityWithConcurrencyTest.java +++ b/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/BasicFunctionalityWithConcurrencyTest.java @@ -1,6 +1,7 @@ package de.adorsys.datasafe.business.impl.e2e; import com.google.common.io.ByteStreams; +import com.google.common.io.MoreFiles; import de.adorsys.datasafe.business.impl.e2e.metrtics.TestMetricCollector; import de.adorsys.datasafe.business.impl.service.DefaultDatasafeServices; import de.adorsys.datasafe.encrypiton.api.types.UserIDAuth; @@ -22,8 +23,6 @@ import org.junit.jupiter.params.provider.ValueSource; import java.io.*; -import java.nio.MappedByteBuffer; -import java.nio.channels.FileChannel; import java.nio.file.Path; import java.security.MessageDigest; import java.time.Duration; @@ -98,7 +97,7 @@ class BasicFunctionalityWithConcurrencyTest extends BaseE2ETest { void writeToPrivateListPrivateInDifferentThreads(WithStorageProvider.StorageDescriptor descriptor, int size, int poolSize) { init(descriptor); - String testFile = tempTestFileFolder.resolve(UUID.randomUUID().toString()).toString(); + Path testFile = tempTestFileFolder.resolve(UUID.randomUUID().toString()); generateTestFile(testFile, size); ThreadPoolExecutor executor = (ThreadPoolExecutor) Executors.newFixedThreadPool(poolSize); @@ -108,7 +107,7 @@ void writeToPrivateListPrivateInDifferentThreads(WithStorageProvider.StorageDesc String checksumOfOriginTestFile; log.trace("*** get checksum of {} ***", testFile); - try (FileInputStream input = new FileInputStream(new File(testFile))) { + try (FileInputStream input = new FileInputStream(testFile.toFile())) { checksumOfOriginTestFile = checksum(input); } @@ -163,7 +162,7 @@ private List> listAllPrivateFiles(UserIDAuth } private void createFileForUserParallelly(ThreadPoolExecutor executor, CountDownLatch holdingLatch, - CountDownLatch finishHoldingLatch, String testFilePath, + CountDownLatch finishHoldingLatch, Path testFilePath, UserIDAuth user) { AtomicInteger counter = new AtomicInteger(); String remotePath = "folder2"; @@ -222,10 +221,10 @@ private String checksum(InputStream input) { return Hex.toHexString(digest.digest()); } - private static void generateTestFile(String testFile, int testFileSizeInBytes) { + private static void generateTestFile(Path testFile, int testFileSizeInBytes) { log.trace("*** generate {} ***", testFile); - File directory = new File(testFile).getParentFile(); + File directory = testFile.toFile().getParentFile(); // in previous version file handles were not closed directories were not removed // and following tests were able to reuse directory. Now file handles are closed // and all files including directory are deleted. @@ -233,21 +232,18 @@ private static void generateTestFile(String testFile, int testFileSizeInBytes) { log.trace(directory + " does not exist. will be created now"); directory.mkdir(); } - try (RandomAccessFile originTestFile = new RandomAccessFile(testFile, "rw")) { - MappedByteBuffer out = originTestFile.getChannel() - .map(FileChannel.MapMode.READ_WRITE, 0, testFileSizeInBytes); - + try (OutputStream os = MoreFiles.asByteSink(testFile).openBufferedStream()) { for (int i = 0; i < testFileSizeInBytes; i++) { - out.put((byte) 'x'); + os.write((byte) 'x'); } } catch (IOException e) { log.error("generateTestFile: {}", e.getMessage()); } } - private static void deleteTestFile(String testFile) { + private static void deleteTestFile(Path testFile) { log.trace("*** delete {} ***", testFile); - File file = new File(testFile); + File file = testFile.toFile(); if (file.exists()) { boolean ok = file.delete(); if (!ok) { @@ -295,10 +291,10 @@ private void init(WithStorageProvider.StorageDescriptor descriptor) { this.storage = descriptor.getStorageService().get(); } - protected void writeDataToFileForUser(UserIDAuth john, String filePathForWriting, String filePathForReading, + protected void writeDataToFileForUser(UserIDAuth john, String filePathForWriting, Path filePathForReading, CountDownLatch latch) { try (OutputStream write = writeToPrivate.write(WriteRequest.forDefaultPrivate(john, filePathForWriting)); - FileInputStream fis = new FileInputStream(filePathForReading) + FileInputStream fis = new FileInputStream(filePathForReading.toFile()) ) { ByteStreams.copy(fis, write); } catch (IOException e) { From ebb3dd4dd69f466ce362f9b5554afaf9f8a604ed Mon Sep 17 00:00:00 2001 From: Valentyn Berezin Date: Tue, 8 Oct 2019 12:13:17 +0300 Subject: [PATCH 174/255] Move windows-specific part to Dirs --- .../business/impl/e2e/UserProfileWithUtf8Test.java | 12 ++---------- .../impl/SimpleDatasafeAdapter043CompatTest.java | 12 ++++++------ .../de/adorsys/datasafe/types/api/shared/Dirs.java | 14 +++++++++++++- 3 files changed, 21 insertions(+), 17 deletions(-) diff --git a/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/UserProfileWithUtf8Test.java b/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/UserProfileWithUtf8Test.java index 60fd11d86..74d913f09 100644 --- a/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/UserProfileWithUtf8Test.java +++ b/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/UserProfileWithUtf8Test.java @@ -18,13 +18,11 @@ import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; -import org.junit.jupiter.api.condition.OS; import org.junit.jupiter.api.io.TempDir; import org.testcontainers.shaded.com.google.common.collect.ImmutableMap; import org.testcontainers.shaded.org.bouncycastle.jce.provider.BouncyCastleProvider; import java.io.OutputStream; -import java.net.URI; import java.nio.file.Files; import java.nio.file.Path; import java.security.Security; @@ -32,6 +30,7 @@ import java.util.stream.Collectors; import java.util.stream.Stream; +import static de.adorsys.datasafe.types.api.shared.Dirs.computeRelativePreventingDoubleUrlEncode; import static org.assertj.core.api.Assertions.assertThat; class UserProfileWithUtf8Test extends WithStorageProvider { @@ -83,7 +82,7 @@ void testProfileOnFsDataOnMinioWorks() { // Profiles are on FS - note that raw file path has `+` instead of space assertThat(listFs(fsPath)) - .extracting(it -> computeRelative(fsPath, it)) + .extracting(it -> computeRelativePreventingDoubleUrlEncode(fsPath, it)) .containsExactlyInAnyOrder( "", "prüfungs", @@ -118,14 +117,7 @@ private List listFs(Path fsPath) { } } - private String computeRelative(Path root, Path child) { - if (!OS.WINDOWS.isCurrentOs()) { - return URI.create(root.relativize(child).toString()).getPath(); - } - // Windows causes double-encoding of URI - return new Uri(URI.create(root.relativize(child).toString().replace('\\', '/'))).asString(); - } static class ProfilesOnFsDataOnMinio extends DefaultDFSConfig { diff --git a/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/test/java/de/adorsys/datasafe/simple/adapter/impl/SimpleDatasafeAdapter043CompatTest.java b/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/test/java/de/adorsys/datasafe/simple/adapter/impl/SimpleDatasafeAdapter043CompatTest.java index 5c200f050..99a5b89df 100644 --- a/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/test/java/de/adorsys/datasafe/simple/adapter/impl/SimpleDatasafeAdapter043CompatTest.java +++ b/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/test/java/de/adorsys/datasafe/simple/adapter/impl/SimpleDatasafeAdapter043CompatTest.java @@ -61,16 +61,16 @@ void writeNewAndReadFileFromOldVersion() { .containsExactlyInAnyOrder(newPath, oldPath); // validate folder structure - assertThat(Dirs.walk(dfsRoot, 1)).containsExactlyInAnyOrder("profiles", "users"); + assertThat(Dirs.walk(dfsRoot, 1)).containsExactlyInAnyOrder("profiles/", "users/"); assertThat(Dirs.walk(dfsRoot.resolve("profiles"))) - .containsExactlyInAnyOrder("private", "public", "private/peter", "public/peter"); + .containsExactlyInAnyOrder("private/", "public/", "private/peter", "public/peter"); assertThat(Dirs.walk(dfsRoot.resolve("users"), 3)) .containsExactlyInAnyOrder( - "peter", - "peter/private", - "peter/public", + "peter/", + "peter/private/", + "peter/public/", "peter/private/keystore", - "peter/private/files", + "peter/private/files/", "peter/public/pubkeys" ); } diff --git a/datasafe-types-api/src/test/java/de/adorsys/datasafe/types/api/shared/Dirs.java b/datasafe-types-api/src/test/java/de/adorsys/datasafe/types/api/shared/Dirs.java index e92528acd..f2f18831f 100644 --- a/datasafe-types-api/src/test/java/de/adorsys/datasafe/types/api/shared/Dirs.java +++ b/datasafe-types-api/src/test/java/de/adorsys/datasafe/types/api/shared/Dirs.java @@ -1,8 +1,11 @@ package de.adorsys.datasafe.types.api.shared; +import de.adorsys.datasafe.types.api.resource.Uri; import lombok.SneakyThrows; import lombok.experimental.UtilityClass; +import org.junit.jupiter.api.condition.OS; +import java.net.URI; import java.nio.file.Files; import java.nio.file.Path; import java.util.List; @@ -23,8 +26,17 @@ public List walk(Path root, int depth) { return walk .filter(it -> !(it.getFileName().startsWith(".") || it.getFileName().startsWith(".."))) .filter(it -> !it.equals(root)) - .map(it -> root.relativize(it).toString().replaceFirst("\\./", "")) + .map(it -> root.toUri().relativize(it.toUri()).toString().replaceFirst("\\./", "")) .collect(Collectors.toList()); } } + + public String computeRelativePreventingDoubleUrlEncode(Path root, Path child) { + if (!OS.WINDOWS.isCurrentOs()) { + return URI.create(root.relativize(child).toString()).getPath(); + } + + // Windows causes double-encoding of URI + return new Uri(URI.create(root.relativize(child).toString().replace('\\', '/'))).asString(); + } } From 25b8bfa1ab067dc189cb510792d49b1d9f388fed Mon Sep 17 00:00:00 2001 From: Valentyn Berezin Date: Tue, 8 Oct 2019 16:56:54 +0300 Subject: [PATCH 175/255] Fixed CI-CD quality warnings --- .../impl/e2e/BasicFunctionalityWithConcurrencyTest.java | 9 +++++---- .../simple/adapter/impl/SimpleDatasafeAdapterTest.java | 8 ++++---- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/BasicFunctionalityWithConcurrencyTest.java b/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/BasicFunctionalityWithConcurrencyTest.java index 13ddc4996..5554b260e 100644 --- a/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/BasicFunctionalityWithConcurrencyTest.java +++ b/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/BasicFunctionalityWithConcurrencyTest.java @@ -132,6 +132,7 @@ void writeToPrivateListPrivateInDifferentThreads(WithStorageProvider.StorageDesc log.trace("*** Main thread waiting for all threads ***"); finishHoldingLatch.await(TIMEOUT_S, SECONDS); executor.awaitTermination(TIMEOUT_S, SECONDS); + executor.shutdown(); log.trace("*** All threads are finished work ***"); log.trace("*** Starting read info saved earlier *** "); @@ -229,7 +230,7 @@ private static void generateTestFile(Path testFile, int testFileSizeInBytes) { // and following tests were able to reuse directory. Now file handles are closed // and all files including directory are deleted. if (!directory.exists()) { - log.trace(directory + " does not exist. will be created now"); + log.trace("{} does not exist. will be created now", directory); directory.mkdir(); } try (OutputStream os = MoreFiles.asByteSink(testFile).openBufferedStream()) { @@ -247,12 +248,12 @@ private static void deleteTestFile(Path testFile) { if (file.exists()) { boolean ok = file.delete(); if (!ok) { - log.error("can not delete " + testFile); + log.error("can not delete {}", testFile); } else { - log.debug("deleted testfile " + testFile); + log.debug("deleted testfile {}", testFile); } } else { - log.error("testfile did not exist:" + testFile); + log.error("testfile did not exist: {}", testFile); } } diff --git a/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/test/java/de/adorsys/datasafe/simple/adapter/impl/SimpleDatasafeAdapterTest.java b/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/test/java/de/adorsys/datasafe/simple/adapter/impl/SimpleDatasafeAdapterTest.java index fd0d5cfd6..ee881e53a 100644 --- a/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/test/java/de/adorsys/datasafe/simple/adapter/impl/SimpleDatasafeAdapterTest.java +++ b/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/test/java/de/adorsys/datasafe/simple/adapter/impl/SimpleDatasafeAdapterTest.java @@ -92,7 +92,7 @@ void justCreateAndDeleteUserForMinioOnly(WithStorageProvider.StorageDescriptor d "users/peter/private/keystore" ); } - log.info("test create user and delete user with " + descriptor.getName()); + log.info("test create user and delete user with {}", descriptor.getName()); } @ParameterizedTest @@ -112,7 +112,7 @@ void justCreateAndDeleteUser(WithStorageProvider.StorageDescriptor descriptor) { "users/peter/private/keystore" ); } - log.info("test create user and delete user with " + descriptor.getName()); + log.info("test create user and delete user with {}", descriptor.getName()); } @ParameterizedTest @@ -187,7 +187,7 @@ void writeAndReadFiles(WithStorageProvider.StorageDescriptor descriptor) { List list = TestHelper.createDocuments(root, 2, 2, 3); List created = new ArrayList<>(); for (DSDocument dsDocument : list) { - log.debug("store " + dsDocument.getDocumentFQN().toString()); + log.debug("store {}", dsDocument.getDocumentFQN()); simpleDatasafeService.storeDocument(userIDAuth, dsDocument); created.add(dsDocument.getDocumentFQN()); assertTrue(simpleDatasafeService.documentExists(userIDAuth, dsDocument.getDocumentFQN())); @@ -306,7 +306,7 @@ private void show(String message, List listFound) { log.debug("---------------------------------"); log.debug(message); for (DocumentFQN doc : listFound) { - log.debug("found:" + doc); + log.debug("found: {}", doc); } } From 173eebe48197068a7da774ee9070f32aed7ef5d7 Mon Sep 17 00:00:00 2001 From: psp Date: Wed, 9 Oct 2019 17:10:01 +0200 Subject: [PATCH 176/255] DOC-279 main interfaces changed, not compilable yet --- .../datasafe-encryption-api/pom.xml | 10 ++++++- .../api/types/keystore/ReadKeyPassword.java | 7 +++++ .../api/PasswordClearingInputStream.java | 26 +++++++++++++++++ .../api/PasswordClearingOutputStream.java | 24 ++++++++++++++++ .../api/PasswordClearingStream.java | 28 +++++++++++++++++++ .../privatestore/api/actions/ListPrivate.java | 4 ++- .../api/actions/ReadFromPrivate.java | 3 +- .../impl/actions/ListPrivateImpl.java | 7 +++-- .../impl/actions/ReadFromPrivateImpl.java | 10 +++++-- 9 files changed, 110 insertions(+), 9 deletions(-) create mode 100644 datasafe-privatestore/datasafe-privatestore-api/src/main/java/de/adorsys/datasafe/privatestore/api/PasswordClearingInputStream.java create mode 100644 datasafe-privatestore/datasafe-privatestore-api/src/main/java/de/adorsys/datasafe/privatestore/api/PasswordClearingOutputStream.java create mode 100644 datasafe-privatestore/datasafe-privatestore-api/src/main/java/de/adorsys/datasafe/privatestore/api/PasswordClearingStream.java diff --git a/datasafe-encryption/datasafe-encryption-api/pom.xml b/datasafe-encryption/datasafe-encryption-api/pom.xml index e86de2087..e30fc586f 100644 --- a/datasafe-encryption/datasafe-encryption-api/pom.xml +++ b/datasafe-encryption/datasafe-encryption-api/pom.xml @@ -14,7 +14,15 @@ datasafe-types-api ${project.version} - + + org.slf4j + slf4j-api + + + org.slf4j + slf4j-simple + + diff --git a/datasafe-encryption/datasafe-encryption-api/src/main/java/de/adorsys/datasafe/encrypiton/api/types/keystore/ReadKeyPassword.java b/datasafe-encryption/datasafe-encryption-api/src/main/java/de/adorsys/datasafe/encrypiton/api/types/keystore/ReadKeyPassword.java index bc5dc7c3d..4de6edb88 100644 --- a/datasafe-encryption/datasafe-encryption-api/src/main/java/de/adorsys/datasafe/encrypiton/api/types/keystore/ReadKeyPassword.java +++ b/datasafe-encryption/datasafe-encryption-api/src/main/java/de/adorsys/datasafe/encrypiton/api/types/keystore/ReadKeyPassword.java @@ -1,11 +1,18 @@ package de.adorsys.datasafe.encrypiton.api.types.keystore; +import lombok.extern.slf4j.Slf4j; + /** * Wrapper for password for reading secret or private key entry. */ +@Slf4j public class ReadKeyPassword extends BaseTypePasswordString { public ReadKeyPassword(String readKeyPassword) { super(readKeyPassword); } + + public void clear() { + log.info("CLEAR READ KEY PASSWORD"); + } } diff --git a/datasafe-privatestore/datasafe-privatestore-api/src/main/java/de/adorsys/datasafe/privatestore/api/PasswordClearingInputStream.java b/datasafe-privatestore/datasafe-privatestore-api/src/main/java/de/adorsys/datasafe/privatestore/api/PasswordClearingInputStream.java new file mode 100644 index 000000000..6a2f00813 --- /dev/null +++ b/datasafe-privatestore/datasafe-privatestore-api/src/main/java/de/adorsys/datasafe/privatestore/api/PasswordClearingInputStream.java @@ -0,0 +1,26 @@ +package de.adorsys.datasafe.privatestore.api; + +import de.adorsys.datasafe.encrypiton.api.types.keystore.ReadKeyPassword; +import de.adorsys.datasafe.types.api.context.annotations.RuntimeDelegate; +import lombok.AllArgsConstructor; +import lombok.SneakyThrows; +import lombok.experimental.Delegate; + +import java.io.Closeable; +import java.io.InputStream; + +@AllArgsConstructor +@RuntimeDelegate +public class PasswordClearingInputStream extends InputStream { + + @Delegate(types=InputStream.class, excludes = Closeable.class) + private final InputStream inputStream; + private final ReadKeyPassword readKeyPassword; + + @SneakyThrows + @Override + public void close() { + readKeyPassword.clear(); + inputStream.close(); + } +} diff --git a/datasafe-privatestore/datasafe-privatestore-api/src/main/java/de/adorsys/datasafe/privatestore/api/PasswordClearingOutputStream.java b/datasafe-privatestore/datasafe-privatestore-api/src/main/java/de/adorsys/datasafe/privatestore/api/PasswordClearingOutputStream.java new file mode 100644 index 000000000..94e0f0b05 --- /dev/null +++ b/datasafe-privatestore/datasafe-privatestore-api/src/main/java/de/adorsys/datasafe/privatestore/api/PasswordClearingOutputStream.java @@ -0,0 +1,24 @@ +package de.adorsys.datasafe.privatestore.api; + +import de.adorsys.datasafe.encrypiton.api.types.keystore.ReadKeyPassword; +import lombok.AllArgsConstructor; +import lombok.SneakyThrows; +import lombok.experimental.Delegate; + +import java.io.Closeable; +import java.io.OutputStream; + +@AllArgsConstructor +public class PasswordClearingOutputStream extends OutputStream { + + @Delegate(types=OutputStream.class, excludes = Closeable.class) + private final OutputStream outputStream; + private final ReadKeyPassword readKeyPassword; + + @SneakyThrows + @Override + public void close() { + readKeyPassword.clear(); + outputStream.close(); + } +} diff --git a/datasafe-privatestore/datasafe-privatestore-api/src/main/java/de/adorsys/datasafe/privatestore/api/PasswordClearingStream.java b/datasafe-privatestore/datasafe-privatestore-api/src/main/java/de/adorsys/datasafe/privatestore/api/PasswordClearingStream.java new file mode 100644 index 000000000..e55ee7621 --- /dev/null +++ b/datasafe-privatestore/datasafe-privatestore-api/src/main/java/de/adorsys/datasafe/privatestore/api/PasswordClearingStream.java @@ -0,0 +1,28 @@ +package de.adorsys.datasafe.privatestore.api; + +import de.adorsys.datasafe.encrypiton.api.types.keystore.ReadKeyPassword; +import lombok.AllArgsConstructor; +import lombok.SneakyThrows; +import lombok.experimental.Delegate; + +import java.io.Closeable; +import java.util.stream.BaseStream; +import java.util.stream.Stream; + +@AllArgsConstructor +public class PasswordClearingStream implements Stream { + @Delegate(types = LombokGenericStream.class, excludes = Closeable.class) + private final Stream stream; + private final ReadKeyPassword readKeyPassword; + + @SneakyThrows + @Override + public void close() { + readKeyPassword.clear(); + stream.close(); + } + + private abstract class LombokGenericStream implements Stream, BaseStream> { + } + +} diff --git a/datasafe-privatestore/datasafe-privatestore-api/src/main/java/de/adorsys/datasafe/privatestore/api/actions/ListPrivate.java b/datasafe-privatestore/datasafe-privatestore-api/src/main/java/de/adorsys/datasafe/privatestore/api/actions/ListPrivate.java index c8c86541e..4bab3009c 100644 --- a/datasafe-privatestore/datasafe-privatestore-api/src/main/java/de/adorsys/datasafe/privatestore/api/actions/ListPrivate.java +++ b/datasafe-privatestore/datasafe-privatestore-api/src/main/java/de/adorsys/datasafe/privatestore/api/actions/ListPrivate.java @@ -1,6 +1,8 @@ package de.adorsys.datasafe.privatestore.api.actions; import de.adorsys.datasafe.encrypiton.api.types.UserIDAuth; +import de.adorsys.datasafe.privatestore.api.PasswordClearingInputStream; +import de.adorsys.datasafe.privatestore.api.PasswordClearingStream; import de.adorsys.datasafe.types.api.actions.ListRequest; import de.adorsys.datasafe.types.api.resource.AbsoluteLocation; import de.adorsys.datasafe.types.api.resource.PrivateResource; @@ -18,5 +20,5 @@ public interface ListPrivate { * @param request Where to list entries * @return Stream of absolute resource locations (location is decrypted) */ - Stream> list(ListRequest request); + PasswordClearingStream> list(ListRequest request); } diff --git a/datasafe-privatestore/datasafe-privatestore-api/src/main/java/de/adorsys/datasafe/privatestore/api/actions/ReadFromPrivate.java b/datasafe-privatestore/datasafe-privatestore-api/src/main/java/de/adorsys/datasafe/privatestore/api/actions/ReadFromPrivate.java index 9b061348f..86b306c5b 100644 --- a/datasafe-privatestore/datasafe-privatestore-api/src/main/java/de/adorsys/datasafe/privatestore/api/actions/ReadFromPrivate.java +++ b/datasafe-privatestore/datasafe-privatestore-api/src/main/java/de/adorsys/datasafe/privatestore/api/actions/ReadFromPrivate.java @@ -1,6 +1,7 @@ package de.adorsys.datasafe.privatestore.api.actions; import de.adorsys.datasafe.encrypiton.api.types.UserIDAuth; +import de.adorsys.datasafe.privatestore.api.PasswordClearingInputStream; import de.adorsys.datasafe.types.api.actions.ReadRequest; import de.adorsys.datasafe.types.api.resource.PrivateResource; @@ -18,5 +19,5 @@ public interface ReadFromPrivate { * @return Decrypted resource content stream * @apiNote Returned stream should be closed properly */ - InputStream read(ReadRequest request); + PasswordClearingInputStream read(ReadRequest request); } diff --git a/datasafe-privatestore/datasafe-privatestore-impl/src/main/java/de/adorsys/datasafe/privatestore/impl/actions/ListPrivateImpl.java b/datasafe-privatestore/datasafe-privatestore-impl/src/main/java/de/adorsys/datasafe/privatestore/impl/actions/ListPrivateImpl.java index 2a4d22c88..730c1dcba 100644 --- a/datasafe-privatestore/datasafe-privatestore-impl/src/main/java/de/adorsys/datasafe/privatestore/impl/actions/ListPrivateImpl.java +++ b/datasafe-privatestore/datasafe-privatestore-impl/src/main/java/de/adorsys/datasafe/privatestore/impl/actions/ListPrivateImpl.java @@ -1,6 +1,7 @@ package de.adorsys.datasafe.privatestore.impl.actions; import de.adorsys.datasafe.encrypiton.api.types.UserIDAuth; +import de.adorsys.datasafe.privatestore.api.PasswordClearingStream; import de.adorsys.datasafe.privatestore.api.actions.EncryptedResourceResolver; import de.adorsys.datasafe.privatestore.api.actions.ListPrivate; import de.adorsys.datasafe.storage.api.actions.StorageListService; @@ -32,7 +33,7 @@ public ListPrivateImpl(EncryptedResourceResolver resolver, StorageListService li } @Override - public Stream> list(ListRequest request) { + public PasswordClearingStream> list(ListRequest request) { // Access check is implicit - on keystore access in EncryptedResourceResolver AbsoluteLocation listDir = resolver.encryptAndResolvePath( @@ -45,9 +46,9 @@ public Stream> list(ListRequest { + return new PasswordClearingStream<>(listService.list(listDir).map(it -> { AbsoluteLocation decrypted = decryptingResolver.apply(it.getResource().asPrivate()); return new AbsoluteLocation<>(it.getResource().withResource(decrypted.getResource())); - }); + }), request.getOwner().getReadKeyPassword()); } } diff --git a/datasafe-privatestore/datasafe-privatestore-impl/src/main/java/de/adorsys/datasafe/privatestore/impl/actions/ReadFromPrivateImpl.java b/datasafe-privatestore/datasafe-privatestore-impl/src/main/java/de/adorsys/datasafe/privatestore/impl/actions/ReadFromPrivateImpl.java index aabfbd5d1..b88db138b 100644 --- a/datasafe-privatestore/datasafe-privatestore-impl/src/main/java/de/adorsys/datasafe/privatestore/impl/actions/ReadFromPrivateImpl.java +++ b/datasafe-privatestore/datasafe-privatestore-impl/src/main/java/de/adorsys/datasafe/privatestore/impl/actions/ReadFromPrivateImpl.java @@ -2,15 +2,16 @@ import de.adorsys.datasafe.encrypiton.api.document.EncryptedDocumentReadService; import de.adorsys.datasafe.encrypiton.api.types.UserIDAuth; +import de.adorsys.datasafe.encrypiton.api.types.keystore.ReadKeyPassword; import de.adorsys.datasafe.privatestore.api.actions.EncryptedResourceResolver; import de.adorsys.datasafe.privatestore.api.actions.ReadFromPrivate; +import de.adorsys.datasafe.privatestore.api.PasswordClearingInputStream; import de.adorsys.datasafe.types.api.actions.ReadRequest; import de.adorsys.datasafe.types.api.context.annotations.RuntimeDelegate; import de.adorsys.datasafe.types.api.resource.AbsoluteLocation; import de.adorsys.datasafe.types.api.resource.PrivateResource; import javax.inject.Inject; -import java.io.InputStream; /** * Default implementation for stream reading that encrypts incoming resource path if it is relative using @@ -22,6 +23,8 @@ public class ReadFromPrivateImpl implements ReadFromPrivate { private final EncryptedResourceResolver resolver; private final EncryptedDocumentReadService reader; + private ReadKeyPassword readKeyPassword; + @Inject public ReadFromPrivateImpl(EncryptedResourceResolver resolver, EncryptedDocumentReadService reader) { this.resolver = resolver; @@ -29,9 +32,9 @@ public ReadFromPrivateImpl(EncryptedResourceResolver resolver, EncryptedDocument } @Override - public InputStream read(ReadRequest request) { + public PasswordClearingInputStream read(ReadRequest request) { // Access check is implicit - on keystore access in EncryptedResourceResolver - return reader.read(resolveRelative(request)); + return new PasswordClearingInputStream(reader.read(resolveRelative(request)), request.getOwner().getReadKeyPassword()); } private ReadRequest> resolveRelative( @@ -46,4 +49,5 @@ private ReadRequest> resolveRelati .storageIdentifier(request.getStorageIdentifier()) .build(); } + } From d31cfc8575481eafd109cc3a467e02103b7b3d52 Mon Sep 17 00:00:00 2001 From: psp Date: Wed, 9 Oct 2019 17:56:56 +0200 Subject: [PATCH 177/255] DOC-279 now compilable, but not testable yet --- .../version/api/actions/VersionedList.java | 5 +++-- .../version/latest/LatestPrivateSpaceImpl.java | 9 ++++++--- .../version/latest/actions/LatestListImpl.java | 14 ++++++++------ .../version/latest/actions/LatestReadImpl.java | 3 ++- .../version/latest/actions/LatestWriteImpl.java | 8 +++++--- .../api/PasswordClearingInputStream.java | 4 +++- .../api/PasswordClearingOutputStream.java | 4 +++- .../privatestore/api/PasswordClearingStream.java | 4 +++- .../privatestore/api/actions/WriteToPrivate.java | 3 ++- .../impl/actions/WriteToPrivateImpl.java | 7 ++++--- .../impl/controller/DocumentControllerTest.java | 9 ++++++--- .../impl/controller/VersionControllerTest.java | 6 ++++-- 12 files changed, 49 insertions(+), 27 deletions(-) diff --git a/datasafe-metainfo/datasafe-metainfo-version-api/src/main/java/de/adorsys/datasafe/metainfo/version/api/actions/VersionedList.java b/datasafe-metainfo/datasafe-metainfo-version-api/src/main/java/de/adorsys/datasafe/metainfo/version/api/actions/VersionedList.java index 59c00a23c..cf0d9d6b7 100644 --- a/datasafe-metainfo/datasafe-metainfo-version-api/src/main/java/de/adorsys/datasafe/metainfo/version/api/actions/VersionedList.java +++ b/datasafe-metainfo/datasafe-metainfo-version-api/src/main/java/de/adorsys/datasafe/metainfo/version/api/actions/VersionedList.java @@ -2,6 +2,7 @@ import de.adorsys.datasafe.encrypiton.api.types.UserIDAuth; import de.adorsys.datasafe.metainfo.version.api.version.WithVersionStrategy; +import de.adorsys.datasafe.privatestore.api.PasswordClearingStream; import de.adorsys.datasafe.privatestore.api.actions.ListPrivate; import de.adorsys.datasafe.types.api.actions.ListRequest; import de.adorsys.datasafe.types.api.actions.VersionStrategy; @@ -19,12 +20,12 @@ public interface VersionedList extends ListPrivate, W * Lists latest resource locations, their date will correspond to latest one, not actual write date */ @Override - Stream> list(ListRequest request); + PasswordClearingStream> list(ListRequest request); /** * Lists versions of resource and provides latest resource link location. */ - Stream, ResolvedResource, Version>> listVersioned( + PasswordClearingStream, ResolvedResource, Version>> listVersioned( ListRequest request ); } diff --git a/datasafe-metainfo/datasafe-metainfo-version-impl/src/main/java/de/adorsys/datasafe/metainfo/version/impl/version/latest/LatestPrivateSpaceImpl.java b/datasafe-metainfo/datasafe-metainfo-version-impl/src/main/java/de/adorsys/datasafe/metainfo/version/impl/version/latest/LatestPrivateSpaceImpl.java index 2f93fa222..c87c96420 100644 --- a/datasafe-metainfo/datasafe-metainfo-version-impl/src/main/java/de/adorsys/datasafe/metainfo/version/impl/version/latest/LatestPrivateSpaceImpl.java +++ b/datasafe-metainfo/datasafe-metainfo-version-impl/src/main/java/de/adorsys/datasafe/metainfo/version/impl/version/latest/LatestPrivateSpaceImpl.java @@ -7,6 +7,9 @@ import de.adorsys.datasafe.metainfo.version.api.actions.VersionedWrite; import de.adorsys.datasafe.metainfo.version.api.version.VersionedPrivateSpaceService; import de.adorsys.datasafe.metainfo.version.impl.version.types.LatestDFSVersion; +import de.adorsys.datasafe.privatestore.api.PasswordClearingInputStream; +import de.adorsys.datasafe.privatestore.api.PasswordClearingOutputStream; +import de.adorsys.datasafe.privatestore.api.PasswordClearingStream; import de.adorsys.datasafe.types.api.actions.ListRequest; import de.adorsys.datasafe.types.api.actions.ReadRequest; import de.adorsys.datasafe.types.api.actions.RemoveRequest; @@ -49,7 +52,7 @@ public LatestPrivateSpaceImpl(V strategy, VersionedList listService, Versione // Delegate didn't work @Override - public Stream> list(ListRequest request) { + public PasswordClearingStream> list(ListRequest request) { return listService.list(request); } @@ -62,7 +65,7 @@ public Stream, ResolvedResource, Ver // Delegate didn't work @Override - public InputStream read(ReadRequest request) { + public PasswordClearingInputStream read(ReadRequest request) { return readService.read(request); } @@ -74,7 +77,7 @@ public void remove(RemoveRequest request) { // Delegate didn't work @Override - public OutputStream write(WriteRequest request) { + public PasswordClearingOutputStream write(WriteRequest request) { return writeService.write(request); } } diff --git a/datasafe-metainfo/datasafe-metainfo-version-impl/src/main/java/de/adorsys/datasafe/metainfo/version/impl/version/latest/actions/LatestListImpl.java b/datasafe-metainfo/datasafe-metainfo-version-impl/src/main/java/de/adorsys/datasafe/metainfo/version/impl/version/latest/actions/LatestListImpl.java index 2a73b2fbf..f093f6a3e 100644 --- a/datasafe-metainfo/datasafe-metainfo-version-impl/src/main/java/de/adorsys/datasafe/metainfo/version/impl/version/latest/actions/LatestListImpl.java +++ b/datasafe-metainfo/datasafe-metainfo-version-impl/src/main/java/de/adorsys/datasafe/metainfo/version/impl/version/latest/actions/LatestListImpl.java @@ -6,6 +6,8 @@ import de.adorsys.datasafe.metainfo.version.impl.version.VersionEncoderDecoder; import de.adorsys.datasafe.metainfo.version.impl.version.types.DFSVersion; import de.adorsys.datasafe.metainfo.version.impl.version.types.LatestDFSVersion; +import de.adorsys.datasafe.privatestore.api.PasswordClearingInputStream; +import de.adorsys.datasafe.privatestore.api.PasswordClearingStream; import de.adorsys.datasafe.privatestore.api.actions.ListPrivate; import de.adorsys.datasafe.types.api.actions.ListRequest; import de.adorsys.datasafe.types.api.context.annotations.RuntimeDelegate; @@ -45,15 +47,15 @@ public LatestListImpl(V strategy, VersionEncoderDecoder encoder, ListPrivate lis } @Override - public Stream> list(ListRequest request) { + public PasswordClearingStream> list(ListRequest request) { // Returns absolute location of versioned resource tagged with date based on link - return listVersioned(request) + return new PasswordClearingStream(listVersioned(request) .map(Versioned::stripVersion) - .map(AbsoluteLocation::new); + .map(AbsoluteLocation::new), request.getOwner().getReadKeyPassword()); } @Override - public Stream, ResolvedResource, Version>> listVersioned( + public PasswordClearingStream, ResolvedResource, Version>> listVersioned( ListRequest request) { ListRequest forLatestSnapshotDir = request.toBuilder().location( @@ -67,10 +69,10 @@ public Stream, ResolvedResource, Ver request.getStorageIdentifier() ); - return listPrivate + return new PasswordClearingStream<>(listPrivate .list(forLatestSnapshotDir) .map(it -> parseVersion(it, linkDecryptor)) - .filter(Objects::nonNull); + .filter(Objects::nonNull), request.getOwner().getReadKeyPassword()); } private Versioned, ResolvedResource, Version> parseVersion( diff --git a/datasafe-metainfo/datasafe-metainfo-version-impl/src/main/java/de/adorsys/datasafe/metainfo/version/impl/version/latest/actions/LatestReadImpl.java b/datasafe-metainfo/datasafe-metainfo-version-impl/src/main/java/de/adorsys/datasafe/metainfo/version/impl/version/latest/actions/LatestReadImpl.java index 632920a76..1c3a8db07 100644 --- a/datasafe-metainfo/datasafe-metainfo-version-impl/src/main/java/de/adorsys/datasafe/metainfo/version/impl/version/latest/actions/LatestReadImpl.java +++ b/datasafe-metainfo/datasafe-metainfo-version-impl/src/main/java/de/adorsys/datasafe/metainfo/version/impl/version/latest/actions/LatestReadImpl.java @@ -4,6 +4,7 @@ import de.adorsys.datasafe.metainfo.version.api.actions.VersionedRead; import de.adorsys.datasafe.metainfo.version.api.version.EncryptedLatestLinkService; import de.adorsys.datasafe.metainfo.version.impl.version.types.LatestDFSVersion; +import de.adorsys.datasafe.privatestore.api.PasswordClearingInputStream; import de.adorsys.datasafe.privatestore.api.actions.ReadFromPrivate; import de.adorsys.datasafe.types.api.actions.ReadRequest; import de.adorsys.datasafe.types.api.context.annotations.RuntimeDelegate; @@ -39,7 +40,7 @@ public LatestReadImpl(V versionStrategy, ReadFromPrivate readFromPrivate, } @Override - public InputStream read(ReadRequest request) { + public PasswordClearingInputStream read(ReadRequest request) { AbsoluteLocation latestSnapshotLink = latestVersionLinkLocator.resolveLatestLinkLocation( diff --git a/datasafe-metainfo/datasafe-metainfo-version-impl/src/main/java/de/adorsys/datasafe/metainfo/version/impl/version/latest/actions/LatestWriteImpl.java b/datasafe-metainfo/datasafe-metainfo-version-impl/src/main/java/de/adorsys/datasafe/metainfo/version/impl/version/latest/actions/LatestWriteImpl.java index f895f26a7..0e766f782 100644 --- a/datasafe-metainfo/datasafe-metainfo-version-impl/src/main/java/de/adorsys/datasafe/metainfo/version/impl/version/latest/actions/LatestWriteImpl.java +++ b/datasafe-metainfo/datasafe-metainfo-version-impl/src/main/java/de/adorsys/datasafe/metainfo/version/impl/version/latest/actions/LatestWriteImpl.java @@ -5,6 +5,8 @@ import de.adorsys.datasafe.metainfo.version.api.version.EncryptedLatestLinkService; import de.adorsys.datasafe.metainfo.version.impl.version.VersionEncoderDecoder; import de.adorsys.datasafe.metainfo.version.impl.version.types.LatestDFSVersion; +import de.adorsys.datasafe.privatestore.api.PasswordClearingInputStream; +import de.adorsys.datasafe.privatestore.api.PasswordClearingOutputStream; import de.adorsys.datasafe.privatestore.api.actions.EncryptedResourceResolver; import de.adorsys.datasafe.privatestore.api.actions.WriteToPrivate; import de.adorsys.datasafe.types.api.actions.WriteRequest; @@ -51,7 +53,7 @@ public LatestWriteImpl(V strategy, VersionEncoderDecoder encoder, EncryptedResou } @Override - public OutputStream write(WriteRequest request) { + public PasswordClearingOutputStream write(WriteRequest request) { AbsoluteLocation latestSnapshotLink = latestVersionLinkLocator.resolveLatestLinkLocation( request.getOwner(), request.getLocation(), request.getStorageIdentifier() @@ -67,7 +69,7 @@ public OutputStream write(WriteRequest request) { request.getStorageIdentifier() ); - return new VersionCommittingStream( + return new PasswordClearingOutputStream(new VersionCommittingStream( decryptedPathWithVersion.getVersion(), writeToPrivate.write( request.toBuilder().location(BasePrivateResource.forPrivate(decryptedPath)).build() @@ -75,7 +77,7 @@ public OutputStream write(WriteRequest request) { writeToPrivate, request.toBuilder().location(latestSnapshotLink.getResource()).build(), resourceRelativeToPrivate - ); + ), request.getOwner().getReadKeyPassword()); } private PrivateResource encryptPath(UserIDAuth auth, Uri uri, PrivateResource base, StorageIdentifier identifier) { diff --git a/datasafe-privatestore/datasafe-privatestore-api/src/main/java/de/adorsys/datasafe/privatestore/api/PasswordClearingInputStream.java b/datasafe-privatestore/datasafe-privatestore-api/src/main/java/de/adorsys/datasafe/privatestore/api/PasswordClearingInputStream.java index 6a2f00813..979d12ebb 100644 --- a/datasafe-privatestore/datasafe-privatestore-api/src/main/java/de/adorsys/datasafe/privatestore/api/PasswordClearingInputStream.java +++ b/datasafe-privatestore/datasafe-privatestore-api/src/main/java/de/adorsys/datasafe/privatestore/api/PasswordClearingInputStream.java @@ -20,7 +20,9 @@ public class PasswordClearingInputStream extends InputStream { @SneakyThrows @Override public void close() { - readKeyPassword.clear(); + if (readKeyPassword != null) { + readKeyPassword.clear(); + } inputStream.close(); } } diff --git a/datasafe-privatestore/datasafe-privatestore-api/src/main/java/de/adorsys/datasafe/privatestore/api/PasswordClearingOutputStream.java b/datasafe-privatestore/datasafe-privatestore-api/src/main/java/de/adorsys/datasafe/privatestore/api/PasswordClearingOutputStream.java index 94e0f0b05..dab86cb17 100644 --- a/datasafe-privatestore/datasafe-privatestore-api/src/main/java/de/adorsys/datasafe/privatestore/api/PasswordClearingOutputStream.java +++ b/datasafe-privatestore/datasafe-privatestore-api/src/main/java/de/adorsys/datasafe/privatestore/api/PasswordClearingOutputStream.java @@ -18,7 +18,9 @@ public class PasswordClearingOutputStream extends OutputStream { @SneakyThrows @Override public void close() { - readKeyPassword.clear(); + if (readKeyPassword != null) { + readKeyPassword.clear(); + } outputStream.close(); } } diff --git a/datasafe-privatestore/datasafe-privatestore-api/src/main/java/de/adorsys/datasafe/privatestore/api/PasswordClearingStream.java b/datasafe-privatestore/datasafe-privatestore-api/src/main/java/de/adorsys/datasafe/privatestore/api/PasswordClearingStream.java index e55ee7621..941004422 100644 --- a/datasafe-privatestore/datasafe-privatestore-api/src/main/java/de/adorsys/datasafe/privatestore/api/PasswordClearingStream.java +++ b/datasafe-privatestore/datasafe-privatestore-api/src/main/java/de/adorsys/datasafe/privatestore/api/PasswordClearingStream.java @@ -18,7 +18,9 @@ public class PasswordClearingStream implements Stream { @SneakyThrows @Override public void close() { - readKeyPassword.clear(); + if (readKeyPassword != null) { + readKeyPassword.clear(); + } stream.close(); } diff --git a/datasafe-privatestore/datasafe-privatestore-api/src/main/java/de/adorsys/datasafe/privatestore/api/actions/WriteToPrivate.java b/datasafe-privatestore/datasafe-privatestore-api/src/main/java/de/adorsys/datasafe/privatestore/api/actions/WriteToPrivate.java index 7584652de..8ac41b748 100644 --- a/datasafe-privatestore/datasafe-privatestore-api/src/main/java/de/adorsys/datasafe/privatestore/api/actions/WriteToPrivate.java +++ b/datasafe-privatestore/datasafe-privatestore-api/src/main/java/de/adorsys/datasafe/privatestore/api/actions/WriteToPrivate.java @@ -1,6 +1,7 @@ package de.adorsys.datasafe.privatestore.api.actions; import de.adorsys.datasafe.encrypiton.api.types.UserIDAuth; +import de.adorsys.datasafe.privatestore.api.PasswordClearingOutputStream; import de.adorsys.datasafe.types.api.actions.WriteRequest; import de.adorsys.datasafe.types.api.resource.PrivateResource; @@ -17,5 +18,5 @@ public interface WriteToPrivate { * @return Stream that will get encrypted and stored within user privatespace. * @apiNote Returned stream should be closed properly */ - OutputStream write(WriteRequest request); + PasswordClearingOutputStream write(WriteRequest request); } diff --git a/datasafe-privatestore/datasafe-privatestore-impl/src/main/java/de/adorsys/datasafe/privatestore/impl/actions/WriteToPrivateImpl.java b/datasafe-privatestore/datasafe-privatestore-impl/src/main/java/de/adorsys/datasafe/privatestore/impl/actions/WriteToPrivateImpl.java index ddea88ef8..969001427 100644 --- a/datasafe-privatestore/datasafe-privatestore-impl/src/main/java/de/adorsys/datasafe/privatestore/impl/actions/WriteToPrivateImpl.java +++ b/datasafe-privatestore/datasafe-privatestore-impl/src/main/java/de/adorsys/datasafe/privatestore/impl/actions/WriteToPrivateImpl.java @@ -4,6 +4,7 @@ import de.adorsys.datasafe.encrypiton.api.document.EncryptedDocumentWriteService; import de.adorsys.datasafe.encrypiton.api.types.UserIDAuth; import de.adorsys.datasafe.encrypiton.api.types.keystore.SecretKeyIDWithKey; +import de.adorsys.datasafe.privatestore.api.PasswordClearingOutputStream; import de.adorsys.datasafe.privatestore.api.actions.EncryptedResourceResolver; import de.adorsys.datasafe.privatestore.api.actions.WriteToPrivate; import de.adorsys.datasafe.types.api.actions.WriteRequest; @@ -37,11 +38,11 @@ public WriteToPrivateImpl(PrivateKeyService privateKeyService, EncryptedResource } @Override - public OutputStream write(WriteRequest request) { + public PasswordClearingOutputStream write(WriteRequest request) { // Access check is explicit (will fail on bad keystore id): SecretKeyIDWithKey keySpec = privateKeyService.documentEncryptionSecretKey(request.getOwner()); - return writer.write( + return new PasswordClearingOutputStream(writer.write( WithCallback., ResourceWriteCallback>builder() .wrapped( resolver.encryptAndResolvePath( @@ -50,6 +51,6 @@ public OutputStream write(WriteRequest request) { request.getStorageIdentifier()) ).callbacks(request.getCallbacks()).build(), keySpec - ); + ), request.getOwner().getReadKeyPassword()); } } diff --git a/datasafe-rest-impl/src/test/java/de/adorsys/datasafe/rest/impl/controller/DocumentControllerTest.java b/datasafe-rest-impl/src/test/java/de/adorsys/datasafe/rest/impl/controller/DocumentControllerTest.java index 4ec4036bc..fb4f358b5 100644 --- a/datasafe-rest-impl/src/test/java/de/adorsys/datasafe/rest/impl/controller/DocumentControllerTest.java +++ b/datasafe-rest-impl/src/test/java/de/adorsys/datasafe/rest/impl/controller/DocumentControllerTest.java @@ -1,6 +1,9 @@ package de.adorsys.datasafe.rest.impl.controller; import de.adorsys.datasafe.business.impl.service.DefaultDatasafeServices; +import de.adorsys.datasafe.privatestore.api.PasswordClearingInputStream; +import de.adorsys.datasafe.privatestore.api.PasswordClearingOutputStream; +import de.adorsys.datasafe.privatestore.api.PasswordClearingStream; import de.adorsys.datasafe.privatestore.impl.PrivateSpaceServiceImpl; import de.adorsys.datasafe.types.api.resource.*; import lombok.SneakyThrows; @@ -48,7 +51,7 @@ public void setup() { @SneakyThrows @Test void readDocumentTest() { - when(dataSafeService.privateService().read(any())).thenReturn(new ByteArrayInputStream("file content".getBytes())); + when(dataSafeService.privateService().read(any())).thenReturn(new PasswordClearingInputStream(new ByteArrayInputStream("file content".getBytes()), null)); RestDocumentationResultHandler document = document("document-read-success", pathParameters( @@ -76,7 +79,7 @@ void readDocumentTest() { @SneakyThrows @Test void writeDocumentTest() { - when(dataSafeService.privateService().write(any())).thenReturn(new ByteArrayOutputStream()); + when(dataSafeService.privateService().write(any())).thenReturn(new PasswordClearingOutputStream(new ByteArrayOutputStream(), null)); RestDocumentationResultHandler document = document("document-write-success", pathParameters( @@ -106,7 +109,7 @@ void listDocumentsTest() { Uri location = new Uri("s3://bucket/user/path/to/file.txt"); PrivateResource privateResource = new BasePrivateResource(location).resolve(new Uri("/path/to/file.txt"), new Uri("/path/to/file.txt")); AbsoluteLocation resolvedPrivate = new AbsoluteLocation<>(new BaseResolvedResource(privateResource, Instant.now())); - when(dataSafeService.privateService().list(any())).thenReturn(Stream.of(resolvedPrivate)); + when(dataSafeService.privateService().list(any())).thenReturn(new PasswordClearingStream<>(Stream.of(resolvedPrivate), null)); RestDocumentationResultHandler document = document("document-list-success", pathParameters( diff --git a/datasafe-rest-impl/src/test/java/de/adorsys/datasafe/rest/impl/controller/VersionControllerTest.java b/datasafe-rest-impl/src/test/java/de/adorsys/datasafe/rest/impl/controller/VersionControllerTest.java index 812c012ee..0ad043f4e 100644 --- a/datasafe-rest-impl/src/test/java/de/adorsys/datasafe/rest/impl/controller/VersionControllerTest.java +++ b/datasafe-rest-impl/src/test/java/de/adorsys/datasafe/rest/impl/controller/VersionControllerTest.java @@ -4,6 +4,8 @@ import de.adorsys.datasafe.metainfo.version.api.version.VersionedPrivateSpaceService; import de.adorsys.datasafe.metainfo.version.impl.version.latest.DefaultVersionInfoServiceImpl; import de.adorsys.datasafe.metainfo.version.impl.version.types.DFSVersion; +import de.adorsys.datasafe.privatestore.api.PasswordClearingInputStream; +import de.adorsys.datasafe.privatestore.api.PasswordClearingOutputStream; import de.adorsys.datasafe.types.api.resource.*; import lombok.SneakyThrows; import org.junit.jupiter.api.BeforeEach; @@ -51,7 +53,7 @@ public void setup() { @SneakyThrows @Test void readVersionedDocumentTest() { - when(versionedDatasafeServices.latestPrivate().read(any())).thenReturn(new ByteArrayInputStream("hello".getBytes())); + when(versionedDatasafeServices.latestPrivate().read(any())).thenReturn(new PasswordClearingInputStream(new ByteArrayInputStream("hello".getBytes()), null)); RestDocumentationResultHandler document = document("versioned-read-success", pathParameters( @@ -79,7 +81,7 @@ void readVersionedDocumentTest() { @SneakyThrows @Test void writeVersionedDocumentTest() { - when(versionedDatasafeServices.latestPrivate().write(any())).thenReturn(new ByteArrayOutputStream()); + when(versionedDatasafeServices.latestPrivate().write(any())).thenReturn(new PasswordClearingOutputStream(new ByteArrayOutputStream(), null)); RestDocumentationResultHandler document = document("versioned-write-success", pathParameters( From 9c2e84f4b436bcb1b30ba57208228e5cc78dedc5 Mon Sep 17 00:00:00 2001 From: psp Date: Wed, 9 Oct 2019 18:55:46 +0200 Subject: [PATCH 178/255] DOC-279 compilable --- .../impl/e2e/DatasafeServicesProvider.java | 3 +- .../business/impl/e2e/KeystoreE2ETest.java | 5 ++- .../impl/e2e/MultiDFSFunctionalityTest.java | 9 +++-- .../impl/e2e/SchemeDelegationTest.java | 8 ++-- .../impl/e2e/SchemeDelegationWithDbTest.java | 6 ++- .../impl/e2e/UserProfileWithUtf8Test.java | 6 ++- .../java/de/adorsys/datasafe/cli/Cli.java | 10 +++-- .../datasafe/cli/config/DatasafeFactory.java | 3 +- .../config/DFSConfigWithStorageCreds.java | 6 +-- .../impl/profile/config/DefaultDFSConfig.java | 6 +-- .../impl/profile/config/MultiDFSConfig.java | 3 +- .../keys/GenericKeystoreOperations.java | 4 +- .../config/DFSConfigWithStorageCredsTest.java | 6 ++- .../StorageKeyStoreOperationsImplTest.java | 3 +- .../encrypiton/api/types/UserIDAuth.java | 4 +- .../keystore/BaseTypePasswordString.java | 38 +++++++++++++++++-- .../api/types/keystore/ReadKeyPassword.java | 7 ---- .../impl/keystore/KeyStoreServiceImpl.java | 10 ++--- .../KeyStoreServiceImplBaseFunctions.java | 8 ++-- .../impl/cmsencryption/KeyStoreUtil.java | 2 +- ...OperationsTestWithDefaultDatasafeTest.java | 8 ++-- ...erationsTestWithVersionedDatasafeTest.java | 8 ++-- .../RuntimeOverrideOperationsTest.java | 6 ++- .../CustomlyBuiltDatasafeServiceTest.java | 6 ++- .../MultiDfsWithCredentialsExampleTest.java | 6 ++- ...DefaultDatasafeOnVersionedStorageTest.java | 6 ++- .../RandomActionsOnDatasafeTest.java | 3 +- .../RandomActionsOnMultiBucketTest.java | 3 +- ...domActionsOnSimpleDatasafeAdapterTest.java | 19 ++++++---- .../framework/services/OperationExecutor.java | 3 +- .../rest/impl/config/DatasafeConfig.java | 9 +++-- .../BaseTokenDatasafeEndpointTest.java | 3 +- .../impl/SimpleDatasafeServiceImpl.java | 4 +- .../simple/adapter/impl/CleanupDbTest.java | 5 ++- 34 files changed, 149 insertions(+), 87 deletions(-) diff --git a/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/DatasafeServicesProvider.java b/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/DatasafeServicesProvider.java index 7f5600e91..eecce0f83 100644 --- a/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/DatasafeServicesProvider.java +++ b/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/DatasafeServicesProvider.java @@ -6,6 +6,7 @@ import de.adorsys.datasafe.business.impl.service.VersionedDatasafeServices; import de.adorsys.datasafe.directory.api.config.DFSConfig; import de.adorsys.datasafe.directory.impl.profile.config.DefaultDFSConfig; +import de.adorsys.datasafe.encrypiton.api.types.keystore.ReadStorePassword; import de.adorsys.datasafe.storage.api.StorageService; import de.adorsys.datasafe.types.api.resource.Uri; import lombok.experimental.UtilityClass; @@ -19,7 +20,7 @@ @UtilityClass public class DatasafeServicesProvider { - public static final String STORE_PAZZWORD = "PAZZWORD"; + public static final ReadStorePassword STORE_PAZZWORD = new ReadStorePassword("PAZZWORD"); public static DefaultDatasafeServices defaultDatasafeServices(StorageService storageService, Uri systemRoot) { Security.addProvider(new BouncyCastleProvider()); diff --git a/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/KeystoreE2ETest.java b/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/KeystoreE2ETest.java index c3a0e497f..bc6313e8d 100644 --- a/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/KeystoreE2ETest.java +++ b/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/KeystoreE2ETest.java @@ -2,6 +2,7 @@ import de.adorsys.datasafe.business.impl.service.DefaultDatasafeServices; import de.adorsys.datasafe.encrypiton.api.types.UserIDAuth; +import de.adorsys.datasafe.encrypiton.api.types.keystore.ReadKeyPassword; import de.adorsys.datasafe.encrypiton.api.types.keystore.ReadStorePassword; import de.adorsys.datasafe.encrypiton.impl.keystore.DefaultPasswordBasedKeyConfig; import de.adorsys.datasafe.encrypiton.impl.keystore.KeyStoreServiceImpl; @@ -53,7 +54,7 @@ void init(@TempDir Path rootPath) { @Test @SneakyThrows void testDefaultKeystoreHasProperKeys() { - UserIDAuth auth = new UserIDAuth("user", "pass"); + UserIDAuth auth = new UserIDAuth("user", new ReadKeyPassword("pass")); datasafeServices.userProfile().registerUsingDefaults(auth); URI keystorePath = datasafeServices.userProfile().privateProfile(auth) .getKeystore().location().asURI(); @@ -62,7 +63,7 @@ void testDefaultKeystoreHasProperKeys() { KeyStore keyStore = keyStoreService.deserialize( Files.readAllBytes(Paths.get(keystorePath)), "ID", - new ReadStorePassword(STORE_PAZZWORD) + STORE_PAZZWORD ); assertThat(aliases(keyStore)).filteredOn(it -> it.matches(PATH_KEY_ID_PREFIX + ".+")).hasSize(1); diff --git a/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/MultiDFSFunctionalityTest.java b/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/MultiDFSFunctionalityTest.java index 69704bf4f..c605faba0 100644 --- a/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/MultiDFSFunctionalityTest.java +++ b/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/MultiDFSFunctionalityTest.java @@ -16,6 +16,7 @@ import de.adorsys.datasafe.directory.impl.profile.dfs.RegexAccessServiceWithStorageCredentialsImpl; import de.adorsys.datasafe.encrypiton.api.types.UserIDAuth; import de.adorsys.datasafe.encrypiton.api.types.keystore.ReadKeyPassword; +import de.adorsys.datasafe.encrypiton.api.types.keystore.ReadStorePassword; import de.adorsys.datasafe.storage.api.RegexDelegatingStorage; import de.adorsys.datasafe.storage.api.StorageService; import de.adorsys.datasafe.storage.api.UriBasedAuthStorageService; @@ -137,7 +138,7 @@ void initDatasafe() { OverridesRegistry registry = new BaseOverridesRegistry(); this.datasafeServices = DaggerDefaultDatasafeServices.builder() - .config(new DefaultDFSConfig(endpointsByHost.get(CREDENTIALS), "PAZZWORT")) + .config(new DefaultDFSConfig(endpointsByHost.get(CREDENTIALS), new ReadStorePassword("PAZZWORT"))) .overridesRegistry(registry) .storage(new RegexDelegatingStorage( ImmutableMap.builder() @@ -166,7 +167,7 @@ void initDatasafe() { @Test void testWriteToPrivateListPrivateReadPrivate() { - UserIDAuth john = new UserIDAuth("john", "my-passwd"); + UserIDAuth john = new UserIDAuth("john", new ReadKeyPassword("my-passwd")); registerUser(john); validateBasicOperationsAndContent(john); @@ -176,14 +177,14 @@ void testWriteToPrivateListPrivateReadPrivate() { @Test void testWriteToPrivateListPrivateReadPrivateWithPasswordChange() { - UserIDAuth john = new UserIDAuth("john", "my-passwd"); + UserIDAuth john = new UserIDAuth("john", new ReadKeyPassword("my-passwd")); registerUser(john); validateBasicOperationsAndContent(john); ReadKeyPassword newPasswd = new ReadKeyPassword("ANOTHER"); datasafeServices.userProfile().updateReadKeyPassword(john, newPasswd); - UserIDAuth newJohn = new UserIDAuth("john", newPasswd.getValue()); + UserIDAuth newJohn = new UserIDAuth("john", newPasswd); assertThrows(UnrecoverableKeyException.class, () -> doBasicOperations(john)); validateBasicOperationsAndContent(newJohn); diff --git a/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/SchemeDelegationTest.java b/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/SchemeDelegationTest.java index 9d36efbca..55d8a7a5d 100644 --- a/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/SchemeDelegationTest.java +++ b/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/SchemeDelegationTest.java @@ -5,6 +5,8 @@ import de.adorsys.datasafe.directory.impl.profile.config.DefaultDFSConfig; import de.adorsys.datasafe.encrypiton.api.types.UserID; import de.adorsys.datasafe.encrypiton.api.types.UserIDAuth; +import de.adorsys.datasafe.encrypiton.api.types.keystore.ReadKeyPassword; +import de.adorsys.datasafe.encrypiton.api.types.keystore.ReadStorePassword; import de.adorsys.datasafe.storage.api.SchemeDelegatingStorage; import de.adorsys.datasafe.storage.api.StorageService; import de.adorsys.datasafe.storage.impl.fs.FileSystemStorageService; @@ -57,7 +59,7 @@ void initialize(@TempDir Path tempDir) { @Test @SneakyThrows void testProfileOnFsDataOnMinioWorks() { - UserIDAuth userJohn = new UserIDAuth("john", "doe"); + UserIDAuth userJohn = new UserIDAuth("john", new ReadKeyPassword("doe")); // John's profile will be saved to filesystem datasafeServices.userProfile().registerUsingDefaults(userJohn); @@ -87,7 +89,7 @@ static class ProfilesOnFsDataOnMinio extends DefaultDFSConfig { private final Path profilesPath; ProfilesOnFsDataOnMinio(Uri minioBucketPath, Path profilesPath) { - super(minioBucketPath, "PAZZWORT"); + super(minioBucketPath, new ReadStorePassword("PAZZWORT")); this.profilesPath = profilesPath; } @@ -105,4 +107,4 @@ public AbsoluteLocation privateProfile(UserID forUser) { ); } } -} \ No newline at end of file +} diff --git a/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/SchemeDelegationWithDbTest.java b/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/SchemeDelegationWithDbTest.java index 517150428..f7d1d674a 100644 --- a/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/SchemeDelegationWithDbTest.java +++ b/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/SchemeDelegationWithDbTest.java @@ -7,6 +7,8 @@ import de.adorsys.datasafe.directory.impl.profile.config.DefaultDFSConfig; import de.adorsys.datasafe.encrypiton.api.types.UserID; import de.adorsys.datasafe.encrypiton.api.types.UserIDAuth; +import de.adorsys.datasafe.encrypiton.api.types.keystore.ReadKeyPassword; +import de.adorsys.datasafe.encrypiton.api.types.keystore.ReadStorePassword; import de.adorsys.datasafe.storage.api.SchemeDelegatingStorage; import de.adorsys.datasafe.storage.api.StorageService; import de.adorsys.datasafe.storage.impl.db.DatabaseConnectionRegistry; @@ -68,7 +70,7 @@ void initialize(@TempDir Path tempDir) { @Test @SneakyThrows void testProfileOnDbDataOnFsWorks() { - UserIDAuth userJohn = new UserIDAuth("john", "doe"); + UserIDAuth userJohn = new UserIDAuth("john", new ReadKeyPassword("doe")); // John's profile will be saved to Database datasafeServices.userProfile().registerUsingDefaults(userJohn); @@ -115,7 +117,7 @@ static class ProfilesOnDbDataOnFs extends DefaultDFSConfig { private final Uri profilesPath; ProfilesOnDbDataOnFs(URI fsPath, URI profilesPath) { - super(fsPath, "PAZZWORT"); + super(fsPath, new ReadStorePassword("PAZZWORT")); this.profilesPath = new Uri(profilesPath); } diff --git a/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/UserProfileWithUtf8Test.java b/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/UserProfileWithUtf8Test.java index 6426b081e..b6c42784a 100644 --- a/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/UserProfileWithUtf8Test.java +++ b/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/UserProfileWithUtf8Test.java @@ -5,6 +5,8 @@ import de.adorsys.datasafe.directory.impl.profile.config.DefaultDFSConfig; import de.adorsys.datasafe.encrypiton.api.types.UserID; import de.adorsys.datasafe.encrypiton.api.types.UserIDAuth; +import de.adorsys.datasafe.encrypiton.api.types.keystore.ReadKeyPassword; +import de.adorsys.datasafe.encrypiton.api.types.keystore.ReadStorePassword; import de.adorsys.datasafe.storage.api.SchemeDelegatingStorage; import de.adorsys.datasafe.storage.api.StorageService; import de.adorsys.datasafe.storage.impl.fs.FileSystemStorageService; @@ -57,7 +59,7 @@ void initialize(@TempDir Path tempDir) { @Test @SneakyThrows void testProfileOnFsDataOnMinioWorks() { - UserIDAuth userJohn = new UserIDAuth("john", "doe"); + UserIDAuth userJohn = new UserIDAuth("john", new ReadKeyPassword("doe")); // John's profile will be saved to filesystem datasafeServices.userProfile().registerUsingDefaults(userJohn); @@ -96,7 +98,7 @@ static class ProfilesOnFsDataOnMinio extends DefaultDFSConfig { private final Uri profilesPath; ProfilesOnFsDataOnMinio(Uri minioBucketPath, Uri profilesPath) { - super(minioBucketPath, "PAZZWORT"); + super(minioBucketPath, new ReadStorePassword("PAZZWORT")); this.profilesPath = profilesPath; } diff --git a/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/Cli.java b/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/Cli.java index 29c0f7399..da16a84f1 100644 --- a/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/Cli.java +++ b/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/Cli.java @@ -9,6 +9,8 @@ import de.adorsys.datasafe.cli.config.DatasafeFactory; import de.adorsys.datasafe.cli.dto.Credentials; import de.adorsys.datasafe.encrypiton.api.types.UserIDAuth; +import de.adorsys.datasafe.encrypiton.api.types.keystore.ReadKeyPassword; +import de.adorsys.datasafe.encrypiton.api.types.keystore.ReadStorePassword; import lombok.Getter; import lombok.RequiredArgsConstructor; import lombok.SneakyThrows; @@ -89,12 +91,12 @@ String getUsername() { return credentials().getUsername(); } - String getPassword() { - return credentials().getPassword(); + ReadKeyPassword getPassword() { + return new ReadKeyPassword(credentials().getPassword()); } - String getSystemPassword() { - return credentials().getSystemPassword(); + ReadStorePassword getSystemPassword() { + return new ReadStorePassword(credentials().getSystemPassword()); } @SneakyThrows diff --git a/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/config/DatasafeFactory.java b/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/config/DatasafeFactory.java index 49aaa6ba3..cc0f7238b 100644 --- a/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/config/DatasafeFactory.java +++ b/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/config/DatasafeFactory.java @@ -16,6 +16,7 @@ import de.adorsys.datasafe.directory.impl.profile.dfs.BucketAccessServiceImpl; import de.adorsys.datasafe.directory.impl.profile.dfs.BucketAccessServiceImplRuntimeDelegatable; import de.adorsys.datasafe.directory.impl.profile.dfs.RegexAccessServiceWithStorageCredentialsImpl; +import de.adorsys.datasafe.encrypiton.api.types.keystore.ReadStorePassword; import de.adorsys.datasafe.storage.api.RegexDelegatingStorage; import de.adorsys.datasafe.storage.api.StorageService; import de.adorsys.datasafe.storage.api.UriBasedAuthStorageService; @@ -36,7 +37,7 @@ @UtilityClass public class DatasafeFactory { - public static DefaultDatasafeServices datasafe(Path fsRoot, String systemPassword) { + public static DefaultDatasafeServices datasafe(Path fsRoot, ReadStorePassword systemPassword) { OverridesRegistry registry = new BaseOverridesRegistry(); DefaultDatasafeServices multiDfsDatasafe = DaggerDefaultDatasafeServices .builder() diff --git a/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/config/DFSConfigWithStorageCreds.java b/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/config/DFSConfigWithStorageCreds.java index abf73f15e..90e568d1d 100644 --- a/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/config/DFSConfigWithStorageCreds.java +++ b/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/config/DFSConfigWithStorageCreds.java @@ -14,15 +14,15 @@ public DFSConfigWithStorageCreds(Uri systemRoot, ReadStorePassword systemPasswor super(systemRoot, systemPassword, userProfileLocation); } - public DFSConfigWithStorageCreds(String systemRoot, String systemPassword) { + public DFSConfigWithStorageCreds(String systemRoot, ReadStorePassword systemPassword) { super(systemRoot, systemPassword); } - public DFSConfigWithStorageCreds(URI systemRoot, String systemPassword) { + public DFSConfigWithStorageCreds(URI systemRoot, ReadStorePassword systemPassword) { super(systemRoot, systemPassword); } - public DFSConfigWithStorageCreds(Uri systemRoot, String systemPassword) { + public DFSConfigWithStorageCreds(Uri systemRoot, ReadStorePassword systemPassword) { super(systemRoot, systemPassword); } diff --git a/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/config/DefaultDFSConfig.java b/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/config/DefaultDFSConfig.java index f0883b8ca..25398c9e7 100644 --- a/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/config/DefaultDFSConfig.java +++ b/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/config/DefaultDFSConfig.java @@ -38,7 +38,7 @@ public class DefaultDFSConfig implements DFSConfig { * to place everything in datasafe/system directory within storage * @param systemPassword System password to open keystore */ - public DefaultDFSConfig(String systemRoot, String systemPassword) { + public DefaultDFSConfig(String systemRoot, ReadStorePassword systemPassword) { this(new Uri(systemRoot), systemPassword); } @@ -47,7 +47,7 @@ public DefaultDFSConfig(String systemRoot, String systemPassword) { * to place everything in datasafe/system directory within storage * @param systemPassword System password to open keystore */ - public DefaultDFSConfig(URI systemRoot, String systemPassword) { + public DefaultDFSConfig(URI systemRoot, ReadStorePassword systemPassword) { this(new Uri(systemRoot), systemPassword); } @@ -56,7 +56,7 @@ public DefaultDFSConfig(URI systemRoot, String systemPassword) { * to place everything in datasafe/system directory within storage * @param systemPassword System password to open keystore */ - public DefaultDFSConfig(Uri systemRoot, String systemPassword) { + public DefaultDFSConfig(Uri systemRoot, ReadStorePassword systemPassword) { this(systemRoot, systemPassword, new DefaultUserProfileLocationImpl(systemRoot)); } diff --git a/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/config/MultiDFSConfig.java b/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/config/MultiDFSConfig.java index 9ca68a21e..bc47ffe00 100644 --- a/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/config/MultiDFSConfig.java +++ b/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/config/MultiDFSConfig.java @@ -1,6 +1,7 @@ package de.adorsys.datasafe.directory.impl.profile.config; import de.adorsys.datasafe.encrypiton.api.types.UserID; +import de.adorsys.datasafe.encrypiton.api.types.keystore.ReadStorePassword; import de.adorsys.datasafe.types.api.resource.AbsoluteLocation; import de.adorsys.datasafe.types.api.resource.BasePrivateResource; import de.adorsys.datasafe.types.api.resource.Uri; @@ -11,7 +12,7 @@ public class MultiDFSConfig extends DefaultDFSConfig { private final Uri profilesPath; - public MultiDFSConfig(URI fsPath, URI profilesPath, String systemPassword) { + public MultiDFSConfig(URI fsPath, URI profilesPath, ReadStorePassword systemPassword) { super(fsPath, systemPassword); this.profilesPath = new Uri(profilesPath); } diff --git a/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/keys/GenericKeystoreOperations.java b/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/keys/GenericKeystoreOperations.java index 0f0cf289b..aff763c4c 100644 --- a/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/keys/GenericKeystoreOperations.java +++ b/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/keys/GenericKeystoreOperations.java @@ -65,10 +65,10 @@ public KeyStore createEmptyKeystore(UserIDAuth auth) { @SneakyThrows public Key getKey(Supplier keystore, UserIDAuth forUser, String alias) { try { - return keystore.get().getKey(alias, forUser.getReadKeyPassword().getValue().toCharArray()); + return keystore.get().getKey(alias, forUser.getReadKeyPassword().getValue()); } catch (UnrecoverableKeyException ex) { keystoreCache.remove(forUser.getUserID()); - return keystore.get().getKey(alias, forUser.getReadKeyPassword().getValue().toCharArray()); + return keystore.get().getKey(alias, forUser.getReadKeyPassword().getValue()); } } diff --git a/datasafe-directory/datasafe-directory-impl/src/test/java/de/adorsys/datasafe/directory/impl/profile/config/DFSConfigWithStorageCredsTest.java b/datasafe-directory/datasafe-directory-impl/src/test/java/de/adorsys/datasafe/directory/impl/profile/config/DFSConfigWithStorageCredsTest.java index 0dbe6d9d8..9b6af0ad1 100644 --- a/datasafe-directory/datasafe-directory-impl/src/test/java/de/adorsys/datasafe/directory/impl/profile/config/DFSConfigWithStorageCredsTest.java +++ b/datasafe-directory/datasafe-directory-impl/src/test/java/de/adorsys/datasafe/directory/impl/profile/config/DFSConfigWithStorageCredsTest.java @@ -2,6 +2,8 @@ import de.adorsys.datasafe.directory.api.types.CreateUserPrivateProfile; import de.adorsys.datasafe.encrypiton.api.types.UserIDAuth; +import de.adorsys.datasafe.encrypiton.api.types.keystore.ReadKeyPassword; +import de.adorsys.datasafe.encrypiton.api.types.keystore.ReadStorePassword; import de.adorsys.datasafe.types.api.global.Version; import de.adorsys.datasafe.types.api.shared.BaseMockitoTest; import org.junit.jupiter.api.Test; @@ -10,11 +12,11 @@ class DFSConfigWithStorageCredsTest extends BaseMockitoTest { - private DFSConfigWithStorageCreds tested = new DFSConfigWithStorageCreds("file://path", "secret"); + private DFSConfigWithStorageCreds tested = new DFSConfigWithStorageCreds("file://path", new ReadStorePassword("secret")); @Test void defaultPrivateTemplate() { - UserIDAuth user = new UserIDAuth("", ""); + UserIDAuth user = new UserIDAuth("", new ReadKeyPassword("")); CreateUserPrivateProfile profile = tested.defaultPrivateTemplate(user); diff --git a/datasafe-directory/datasafe-directory-impl/src/test/java/de/adorsys/datasafe/directory/impl/profile/keys/StorageKeyStoreOperationsImplTest.java b/datasafe-directory/datasafe-directory-impl/src/test/java/de/adorsys/datasafe/directory/impl/profile/keys/StorageKeyStoreOperationsImplTest.java index a182ed217..74279166b 100644 --- a/datasafe-directory/datasafe-directory-impl/src/test/java/de/adorsys/datasafe/directory/impl/profile/keys/StorageKeyStoreOperationsImplTest.java +++ b/datasafe-directory/datasafe-directory-impl/src/test/java/de/adorsys/datasafe/directory/impl/profile/keys/StorageKeyStoreOperationsImplTest.java @@ -6,6 +6,7 @@ import de.adorsys.datasafe.directory.impl.profile.serde.GsonSerde; import de.adorsys.datasafe.encrypiton.api.keystore.KeyStoreService; import de.adorsys.datasafe.encrypiton.api.types.UserIDAuth; +import de.adorsys.datasafe.encrypiton.api.types.keystore.ReadKeyPassword; import de.adorsys.datasafe.types.api.resource.AbsoluteLocation; import de.adorsys.datasafe.types.api.resource.BasePrivateResource; import de.adorsys.datasafe.types.api.resource.PrivateResource; @@ -25,7 +26,7 @@ class StorageKeyStoreOperationsImplTest extends BaseMockitoTest { private static final String STORAGE_ID = "id"; - private static final String SECRET = "secret"; + private static final ReadKeyPassword SECRET = new ReadKeyPassword("secret"); private static final AbsoluteLocation STORAGE_KEYSTORE = BasePrivateResource.forAbsolutePrivate("file://path"); diff --git a/datasafe-encryption/datasafe-encryption-api/src/main/java/de/adorsys/datasafe/encrypiton/api/types/UserIDAuth.java b/datasafe-encryption/datasafe-encryption-api/src/main/java/de/adorsys/datasafe/encrypiton/api/types/UserIDAuth.java index 76ed14d20..d9fcc9a93 100644 --- a/datasafe-encryption/datasafe-encryption-api/src/main/java/de/adorsys/datasafe/encrypiton/api/types/UserIDAuth.java +++ b/datasafe-encryption/datasafe-encryption-api/src/main/java/de/adorsys/datasafe/encrypiton/api/types/UserIDAuth.java @@ -16,9 +16,9 @@ public class UserIDAuth { private final UserID userID; private final ReadKeyPassword readKeyPassword; - public UserIDAuth(String userID, String readKeyPassword) { + public UserIDAuth(String userID, ReadKeyPassword readKeyPassword) { this.userID = new UserID(userID); - this.readKeyPassword = new ReadKeyPassword(readKeyPassword); + this.readKeyPassword = readKeyPassword; } @Override diff --git a/datasafe-encryption/datasafe-encryption-api/src/main/java/de/adorsys/datasafe/encrypiton/api/types/keystore/BaseTypePasswordString.java b/datasafe-encryption/datasafe-encryption-api/src/main/java/de/adorsys/datasafe/encrypiton/api/types/keystore/BaseTypePasswordString.java index 409bbffc4..bd55a59b8 100644 --- a/datasafe-encryption/datasafe-encryption-api/src/main/java/de/adorsys/datasafe/encrypiton/api/types/keystore/BaseTypePasswordString.java +++ b/datasafe-encryption/datasafe-encryption-api/src/main/java/de/adorsys/datasafe/encrypiton/api/types/keystore/BaseTypePasswordString.java @@ -2,18 +2,50 @@ import de.adorsys.datasafe.encrypiton.api.types.BaseTypeString; import de.adorsys.datasafe.types.api.utils.Obfuscate; +import lombok.EqualsAndHashCode; +import lombok.Getter; +import lombok.RequiredArgsConstructor; +import lombok.ToString; +import lombok.extern.slf4j.Slf4j; /** * Wrapper for password sensitive data. */ -public class BaseTypePasswordString extends BaseTypeString { +@Slf4j +@Getter +@RequiredArgsConstructor +@EqualsAndHashCode +@ToString +public class BaseTypePasswordString { + private char[] value; + @Deprecated + /** + * + * @param this string stays in memory + * until gc is called. + * please user other constructor. + */ public BaseTypePasswordString(String value) { - super(value); + this.value = value.toCharArray(); + } + + /** + * + * @param value will be invalidated after usage + */ + public BaseTypePasswordString(char[] value) { + this.value = value; + } + + + public void clear() { + log.info("CLEAR READ KEY PASSWORD"); } @Override public String toString() { - return "BaseTypePasswordString{" + Obfuscate.secureSensitive(getValue()) + "}"; + return "BaseTypePasswordString{-not-supported-yet}"; + // return "BaseTypePasswordString{" + Obfuscate.secureSensitive(getValue()) + "}"; } } diff --git a/datasafe-encryption/datasafe-encryption-api/src/main/java/de/adorsys/datasafe/encrypiton/api/types/keystore/ReadKeyPassword.java b/datasafe-encryption/datasafe-encryption-api/src/main/java/de/adorsys/datasafe/encrypiton/api/types/keystore/ReadKeyPassword.java index 4de6edb88..bc5dc7c3d 100644 --- a/datasafe-encryption/datasafe-encryption-api/src/main/java/de/adorsys/datasafe/encrypiton/api/types/keystore/ReadKeyPassword.java +++ b/datasafe-encryption/datasafe-encryption-api/src/main/java/de/adorsys/datasafe/encrypiton/api/types/keystore/ReadKeyPassword.java @@ -1,18 +1,11 @@ package de.adorsys.datasafe.encrypiton.api.types.keystore; -import lombok.extern.slf4j.Slf4j; - /** * Wrapper for password for reading secret or private key entry. */ -@Slf4j public class ReadKeyPassword extends BaseTypePasswordString { public ReadKeyPassword(String readKeyPassword) { super(readKeyPassword); } - - public void clear() { - log.info("CLEAR READ KEY PASSWORD"); - } } diff --git a/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/keystore/KeyStoreServiceImpl.java b/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/keystore/KeyStoreServiceImpl.java index 2ba7c1619..57a2ec163 100644 --- a/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/keystore/KeyStoreServiceImpl.java +++ b/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/keystore/KeyStoreServiceImpl.java @@ -88,11 +88,11 @@ public KeyStore updateKeyStoreReadKeyPassword(KeyStore current, while (aliases.hasMoreElements()) { String alias = aliases.nextElement(); - Key currentKey = current.getKey(alias, currentCredentials.getReadKeyPassword().getValue().toCharArray()); + Key currentKey = current.getKey(alias, currentCredentials.getReadKeyPassword().getValue()); newKeystore.setKeyEntry( alias, currentKey, - newCredentials.getReadKeyPassword().getValue().toCharArray(), + newCredentials.getReadKeyPassword().getValue(), current.getCertificateChain(alias) ); } @@ -126,7 +126,7 @@ public PrivateKey getPrivateKey(KeyStoreAccess keyStoreAccess, KeyID keyID) { ReadKeyPassword readKeyPassword = keyStoreAccess.getKeyStoreAuth().getReadKeyPassword(); KeyStore keyStore = keyStoreAccess.getKeyStore(); PrivateKey privateKey; - privateKey = (PrivateKey) keyStore.getKey(keyID.getValue(), readKeyPassword.getValue().toCharArray()); + privateKey = (PrivateKey) keyStore.getKey(keyID.getValue(), readKeyPassword.getValue()); return privateKey; } @@ -134,7 +134,7 @@ public PrivateKey getPrivateKey(KeyStoreAccess keyStoreAccess, KeyID keyID) { @SneakyThrows public SecretKeySpec getSecretKey(KeyStoreAccess keyStoreAccess, KeyID keyID) { KeyStore keyStore = keyStoreAccess.getKeyStore(); - char[] password = keyStoreAccess.getKeyStoreAuth().getReadKeyPassword().getValue().toCharArray(); + char[] password = keyStoreAccess.getKeyStoreAuth().getReadKeyPassword().getValue(); return (SecretKeySpec) keyStore.getKey(keyID.getValue(), password); } @@ -148,7 +148,7 @@ public void addPasswordBasedSecretKey(KeyStoreAccess keyStoreAccess, String alia .setKeyEntry( alias, key, - keyStoreAccess.getKeyStoreAuth().getReadKeyPassword().getValue().toCharArray(), + keyStoreAccess.getKeyStoreAuth().getReadKeyPassword().getValue(), new Certificate[0] ); } diff --git a/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/keystore/generator/KeyStoreServiceImplBaseFunctions.java b/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/keystore/generator/KeyStoreServiceImplBaseFunctions.java index b3a91bd9f..a47c31675 100644 --- a/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/keystore/generator/KeyStoreServiceImplBaseFunctions.java +++ b/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/keystore/generator/KeyStoreServiceImplBaseFunctions.java @@ -49,7 +49,7 @@ public static KeyStore newKeyStore(KeyStoreType keyStoreType) { @SneakyThrows public static byte[] toByteArray(KeyStore keystore, String storeId, ReadStorePassword readStorePassword) { ByteArrayOutputStream stream = new ByteArrayOutputStream(); - keystore.store(stream, readStorePassword.getValue().toCharArray()); + keystore.store(stream, readStorePassword.getValue()); return stream.toByteArray(); } @@ -68,7 +68,7 @@ public static KeyStore loadKeyStore(InputStream in, String storeId, KeyStoreType KeyStore ks = KeyStore.getInstance(storeType.getValue()); - ks.load(in, readStorePassword.getValue().toCharArray()); + ks.load(in, readStorePassword.getValue()); return ks; } @@ -115,7 +115,7 @@ private static void addToKeyStore(final KeyStore ks, KeyPairEntry keyPairHolder) chainList.add(V3CertificateUtils.getX509JavaCertificate(subjectCert)); Certificate[] chain = chainList.toArray(new Certificate[chainList.size()]); ks.setKeyEntry(keyPairHolder.getAlias(), keyPairHolder.getKeyPair().getKeyPair().getPrivate(), - keyPairHolder.getReadKeyPassword().getValue().toCharArray(), chain); + keyPairHolder.getReadKeyPassword().getValue(), chain); } @SneakyThrows @@ -126,7 +126,7 @@ public static void addToKeyStore(final KeyStore ks, SecretKeyEntry secretKeyData } private static ProtectionParameter getPasswordProtectionParameter(ReadKeyPassword readKeyPassword) { - return new KeyStore.PasswordProtection(readKeyPassword.getValue().toCharArray()); + return new KeyStore.PasswordProtection(readKeyPassword.getValue()); } } diff --git a/datasafe-encryption/datasafe-encryption-impl/src/test/java/de/adorsys/datasafe/encrypiton/impl/cmsencryption/KeyStoreUtil.java b/datasafe-encryption/datasafe-encryption-impl/src/test/java/de/adorsys/datasafe/encrypiton/impl/cmsencryption/KeyStoreUtil.java index ba461d968..30c9d674d 100644 --- a/datasafe-encryption/datasafe-encryption-impl/src/test/java/de/adorsys/datasafe/encrypiton/impl/cmsencryption/KeyStoreUtil.java +++ b/datasafe-encryption/datasafe-encryption-impl/src/test/java/de/adorsys/datasafe/encrypiton/impl/cmsencryption/KeyStoreUtil.java @@ -27,6 +27,6 @@ private boolean containsAlias(String id, KeyStoreAccess access) { @SneakyThrows private Key getKey(String id, KeyStoreAccess access) { - return access.getKeyStore().getKey(id, access.getKeyStoreAuth().getReadKeyPassword().getValue().toCharArray()); + return access.getKeyStore().getKey(id, access.getKeyStoreAuth().getReadKeyPassword().getValue()); } } diff --git a/datasafe-examples/datasafe-examples-business/src/test/java/de/adorsys/datasafe/examples/business/filesystem/BaseUserOperationsTestWithDefaultDatasafeTest.java b/datasafe-examples/datasafe-examples-business/src/test/java/de/adorsys/datasafe/examples/business/filesystem/BaseUserOperationsTestWithDefaultDatasafeTest.java index 90165d97b..186d5395f 100644 --- a/datasafe-examples/datasafe-examples-business/src/test/java/de/adorsys/datasafe/examples/business/filesystem/BaseUserOperationsTestWithDefaultDatasafeTest.java +++ b/datasafe-examples/datasafe-examples-business/src/test/java/de/adorsys/datasafe/examples/business/filesystem/BaseUserOperationsTestWithDefaultDatasafeTest.java @@ -7,6 +7,8 @@ import de.adorsys.datasafe.directory.impl.profile.config.DefaultDFSConfig; import de.adorsys.datasafe.encrypiton.api.types.UserID; import de.adorsys.datasafe.encrypiton.api.types.UserIDAuth; +import de.adorsys.datasafe.encrypiton.api.types.keystore.ReadKeyPassword; +import de.adorsys.datasafe.encrypiton.api.types.keystore.ReadStorePassword; import de.adorsys.datasafe.storage.impl.fs.FileSystemStorageService; import de.adorsys.datasafe.types.api.actions.ListRequest; import de.adorsys.datasafe.types.api.actions.ReadRequest; @@ -47,7 +49,7 @@ void createServices(@TempDir Path root) { Security.addProvider(new BouncyCastleProvider()); // this will create all Datasafe files and user documents under defaultDatasafeServices = DaggerDefaultDatasafeServices.builder() - .config(new DefaultDFSConfig(root.toAbsolutePath().toUri(), "secret")) + .config(new DefaultDFSConfig(root.toAbsolutePath().toUri(), new ReadStorePassword("secret"))) .storage(new FileSystemStorageService(root)) .build(); // END_SNIPPET @@ -64,7 +66,7 @@ void registerUser() { IMPORTANT: For cases when user profile is stored on S3 without object locks, this requires some global synchronization due to eventual consistency or you need to supply globally unique username on registration */ - defaultDatasafeServices.userProfile().registerUsingDefaults(new UserIDAuth("user", "passwrd")); + defaultDatasafeServices.userProfile().registerUsingDefaults(new UserIDAuth("user", new ReadKeyPassword("passwrd"))); // END_SNIPPET assertThat(defaultDatasafeServices.userProfile().userExists(new UserID("user"))); @@ -294,7 +296,7 @@ private void writeToPrivate(UserIDAuth user, String path, String fileContent) { } private UserIDAuth registerUser(String username) { - UserIDAuth creds = new UserIDAuth(username, "passwrd" + username); + UserIDAuth creds = new UserIDAuth(username, new ReadKeyPassword("passwrd" + username)); defaultDatasafeServices.userProfile().registerUsingDefaults(creds); return creds; } diff --git a/datasafe-examples/datasafe-examples-business/src/test/java/de/adorsys/datasafe/examples/business/filesystem/BaseUserOperationsTestWithVersionedDatasafeTest.java b/datasafe-examples/datasafe-examples-business/src/test/java/de/adorsys/datasafe/examples/business/filesystem/BaseUserOperationsTestWithVersionedDatasafeTest.java index bc6a4c52b..14652f3f7 100644 --- a/datasafe-examples/datasafe-examples-business/src/test/java/de/adorsys/datasafe/examples/business/filesystem/BaseUserOperationsTestWithVersionedDatasafeTest.java +++ b/datasafe-examples/datasafe-examples-business/src/test/java/de/adorsys/datasafe/examples/business/filesystem/BaseUserOperationsTestWithVersionedDatasafeTest.java @@ -5,6 +5,8 @@ import de.adorsys.datasafe.directory.impl.profile.config.DefaultDFSConfig; import de.adorsys.datasafe.encrypiton.api.types.UserID; import de.adorsys.datasafe.encrypiton.api.types.UserIDAuth; +import de.adorsys.datasafe.encrypiton.api.types.keystore.ReadKeyPassword; +import de.adorsys.datasafe.encrypiton.api.types.keystore.ReadStorePassword; import de.adorsys.datasafe.metainfo.version.impl.version.types.DFSVersion; import de.adorsys.datasafe.storage.impl.fs.FileSystemStorageService; import de.adorsys.datasafe.types.api.actions.ListRequest; @@ -48,7 +50,7 @@ void createServices(@TempDir Path root) { Security.addProvider(new BouncyCastleProvider()); // this will create all Datasafe files and user documents under versionedServices = DaggerVersionedDatasafeServices.builder() - .config(new DefaultDFSConfig(root.toAbsolutePath().toUri(), "secret")) + .config(new DefaultDFSConfig(root.toAbsolutePath().toUri(), new ReadStorePassword("secret"))) .storage(new FileSystemStorageService(root)) .build(); // END_SNIPPET @@ -65,7 +67,7 @@ void registerUser() { IMPORTANT: For cases when user profile is stored on S3 without object locks, this requires some global synchronization due to eventual consistency or you need to supply globally unique username on registration */ - versionedServices.userProfile().registerUsingDefaults(new UserIDAuth("user", "passwrd")); + versionedServices.userProfile().registerUsingDefaults(new UserIDAuth("user", new ReadKeyPassword("passwrd"))); // END_SNIPPET assertThat(versionedServices.userProfile().userExists(new UserID("user"))); @@ -165,7 +167,7 @@ void checkThatWeNeedToDownloadNewFile() { } private UserIDAuth registerUser(String username) { - UserIDAuth creds = new UserIDAuth(username, "passwrd" + username); + UserIDAuth creds = new UserIDAuth(username, new ReadKeyPassword("passwrd" + username)); versionedServices.userProfile().registerUsingDefaults(creds); return creds; } diff --git a/datasafe-examples/datasafe-examples-business/src/test/java/de/adorsys/datasafe/examples/business/filesystem/RuntimeOverrideOperationsTest.java b/datasafe-examples/datasafe-examples-business/src/test/java/de/adorsys/datasafe/examples/business/filesystem/RuntimeOverrideOperationsTest.java index 55d29c0e5..c09c09a5b 100644 --- a/datasafe-examples/datasafe-examples-business/src/test/java/de/adorsys/datasafe/examples/business/filesystem/RuntimeOverrideOperationsTest.java +++ b/datasafe-examples/datasafe-examples-business/src/test/java/de/adorsys/datasafe/examples/business/filesystem/RuntimeOverrideOperationsTest.java @@ -4,6 +4,8 @@ import de.adorsys.datasafe.business.impl.service.DefaultDatasafeServices; import de.adorsys.datasafe.directory.impl.profile.config.DefaultDFSConfig; import de.adorsys.datasafe.encrypiton.api.types.UserIDAuth; +import de.adorsys.datasafe.encrypiton.api.types.keystore.ReadKeyPassword; +import de.adorsys.datasafe.encrypiton.api.types.keystore.ReadStorePassword; import de.adorsys.datasafe.encrypiton.impl.pathencryption.PathEncryptionImpl; import de.adorsys.datasafe.encrypiton.impl.pathencryption.PathEncryptionImplRuntimeDelegatable; import de.adorsys.datasafe.storage.impl.fs.FileSystemStorageService; @@ -39,13 +41,13 @@ void testPathEncryptionOverridden(@TempDir Path root) { // Customized service, without creating complete module and building it: DefaultDatasafeServices datasafeServices = DaggerDefaultDatasafeServices.builder() - .config(new DefaultDFSConfig(root.toAbsolutePath().toUri(), "secret")) + .config(new DefaultDFSConfig(root.toAbsolutePath().toUri(), new ReadStorePassword("secret"))) .storage(new FileSystemStorageService(root)) .overridesRegistry(registry) .build(); // registering user - UserIDAuth user = new UserIDAuth("user", "passwrd"); + UserIDAuth user = new UserIDAuth("user", new ReadKeyPassword("passwrd")); datasafeServices.userProfile().registerUsingDefaults(user); // writing into user privatespace, note that with default implementation `file.txt` would be encrypted datasafeServices.privateService().write(WriteRequest.forDefaultPrivate(user, "file.txt")); diff --git a/datasafe-examples/datasafe-examples-customize-dagger/src/test/java/de/adorsys/datasafe/examples/business/filesystem/CustomlyBuiltDatasafeServiceTest.java b/datasafe-examples/datasafe-examples-customize-dagger/src/test/java/de/adorsys/datasafe/examples/business/filesystem/CustomlyBuiltDatasafeServiceTest.java index 04c0735fd..0a30eef53 100644 --- a/datasafe-examples/datasafe-examples-customize-dagger/src/test/java/de/adorsys/datasafe/examples/business/filesystem/CustomlyBuiltDatasafeServiceTest.java +++ b/datasafe-examples/datasafe-examples-customize-dagger/src/test/java/de/adorsys/datasafe/examples/business/filesystem/CustomlyBuiltDatasafeServiceTest.java @@ -2,6 +2,8 @@ import de.adorsys.datasafe.directory.impl.profile.config.DefaultDFSConfig; import de.adorsys.datasafe.encrypiton.api.types.UserIDAuth; +import de.adorsys.datasafe.encrypiton.api.types.keystore.ReadKeyPassword; +import de.adorsys.datasafe.encrypiton.api.types.keystore.ReadStorePassword; import de.adorsys.datasafe.storage.impl.fs.FileSystemStorageService; import de.adorsys.datasafe.types.api.actions.WriteRequest; import org.bouncycastle.jce.provider.BouncyCastleProvider; @@ -26,12 +28,12 @@ void testPathEncryptionOverridden(@TempDir Path root) { Security.addProvider(new BouncyCastleProvider()); // Customized service, we create required module using compile time DI provided by Dagger: CustomlyBuiltDatasafeServices datasafeServices = DaggerCustomlyBuiltDatasafeServices.builder() - .config(new DefaultDFSConfig(root.toAbsolutePath().toUri(), "secret")) + .config(new DefaultDFSConfig(root.toAbsolutePath().toUri(), new ReadStorePassword("secret"))) .storage(new FileSystemStorageService(root)) .build(); // registering user - UserIDAuth user = new UserIDAuth("user", "passwrd"); + UserIDAuth user = new UserIDAuth("user", new ReadKeyPassword("passwrd")); datasafeServices.userProfile().registerUsingDefaults(user); // writing into user privatespace, note that with default implementation `file.txt` would be encrypted datasafeServices.privateService().write(WriteRequest.forDefaultPrivate(user, "file.txt")); diff --git a/datasafe-examples/datasafe-examples-multidfs/src/test/java/de/adorsys/datasafe/examples/business/s3/MultiDfsWithCredentialsExampleTest.java b/datasafe-examples/datasafe-examples-multidfs/src/test/java/de/adorsys/datasafe/examples/business/s3/MultiDfsWithCredentialsExampleTest.java index 89e72d161..8dead7e74 100644 --- a/datasafe-examples/datasafe-examples-multidfs/src/test/java/de/adorsys/datasafe/examples/business/s3/MultiDfsWithCredentialsExampleTest.java +++ b/datasafe-examples/datasafe-examples-multidfs/src/test/java/de/adorsys/datasafe/examples/business/s3/MultiDfsWithCredentialsExampleTest.java @@ -12,6 +12,8 @@ import de.adorsys.datasafe.directory.impl.profile.dfs.BucketAccessServiceImplRuntimeDelegatable; import de.adorsys.datasafe.directory.impl.profile.dfs.RegexAccessServiceWithStorageCredentialsImpl; import de.adorsys.datasafe.encrypiton.api.types.UserIDAuth; +import de.adorsys.datasafe.encrypiton.api.types.keystore.ReadKeyPassword; +import de.adorsys.datasafe.encrypiton.api.types.keystore.ReadStorePassword; import de.adorsys.datasafe.storage.api.RegexDelegatingStorage; import de.adorsys.datasafe.storage.api.StorageService; import de.adorsys.datasafe.storage.api.UriBasedAuthStorageService; @@ -113,7 +115,7 @@ void testMultiUserStorageUserSetup() { OverridesRegistry registry = new BaseOverridesRegistry(); DefaultDatasafeServices multiDfsDatasafe = DaggerDefaultDatasafeServices .builder() - .config(new DFSConfigWithStorageCreds(directoryBucketS3Uri, "PAZZWORT")) + .config(new DFSConfigWithStorageCreds(directoryBucketS3Uri, new ReadStorePassword("PAZZWORT"))) // This storage service will route requests to proper bucket based on URI content: // URI with directoryBucket to `directoryStorage` // URI with filesBucketOne will get dynamically generated S3Storage @@ -154,7 +156,7 @@ void testMultiUserStorageUserSetup() { // Depending on path of file - filesBucketOne or filesBucketTwo - requests will be routed to proper bucket. // I.e. path filesBucketOne/path/to/file will end up in `filesBucketOne` with key path/to/file // his profile and access credentials for `filesBucketOne` will be in `configBucket` - UserIDAuth john = new UserIDAuth("john", "secret"); + UserIDAuth john = new UserIDAuth("john", new ReadKeyPassword("secret")); // Here, nothing expects John has own storage credentials: multiDfsDatasafe.userProfile().registerUsingDefaults(john); diff --git a/datasafe-examples/datasafe-examples-versioned-s3/src/test/java/de/adorsys/datasafe/examples/business/s3/BaseUserOperationsWithDefaultDatasafeOnVersionedStorageTest.java b/datasafe-examples/datasafe-examples-versioned-s3/src/test/java/de/adorsys/datasafe/examples/business/s3/BaseUserOperationsWithDefaultDatasafeOnVersionedStorageTest.java index 2a02971c8..11e8159fe 100644 --- a/datasafe-examples/datasafe-examples-versioned-s3/src/test/java/de/adorsys/datasafe/examples/business/s3/BaseUserOperationsWithDefaultDatasafeOnVersionedStorageTest.java +++ b/datasafe-examples/datasafe-examples-versioned-s3/src/test/java/de/adorsys/datasafe/examples/business/s3/BaseUserOperationsWithDefaultDatasafeOnVersionedStorageTest.java @@ -12,6 +12,8 @@ import de.adorsys.datasafe.business.impl.service.DefaultDatasafeServices; import de.adorsys.datasafe.directory.impl.profile.config.DefaultDFSConfig; import de.adorsys.datasafe.encrypiton.api.types.UserIDAuth; +import de.adorsys.datasafe.encrypiton.api.types.keystore.ReadKeyPassword; +import de.adorsys.datasafe.encrypiton.api.types.keystore.ReadStorePassword; import de.adorsys.datasafe.storage.impl.s3.S3StorageService; import de.adorsys.datasafe.types.api.actions.ListRequest; import de.adorsys.datasafe.types.api.actions.ReadRequest; @@ -119,7 +121,7 @@ void init() { // this will create all Datasafe files and user documents under S3 bucket root, we assume that // S3 versioned bucket was already created defaultDatasafeServices = DaggerDefaultDatasafeServices.builder() - .config(new DefaultDFSConfig(cephMappedUrl, "secret")) + .config(new DefaultDFSConfig(cephMappedUrl, new ReadStorePassword("secret"))) .storage(new S3StorageService( cephS3, VERSIONED_BUCKET_NAME, @@ -231,7 +233,7 @@ private String writeToPrivate(UserIDAuth user, String path, String fileContent) } private UserIDAuth registerUser(String username) { - UserIDAuth creds = new UserIDAuth(username, "passwrd" + username); + UserIDAuth creds = new UserIDAuth(username, new ReadKeyPassword("passwrd" + username)); defaultDatasafeServices.userProfile().registerUsingDefaults(creds); return creds; } diff --git a/datasafe-long-run-tests/datasafe-business-tests-random-actions/src/test/java/de/adorsys/datasafe/business/impl/e2e/randomactions/RandomActionsOnDatasafeTest.java b/datasafe-long-run-tests/datasafe-business-tests-random-actions/src/test/java/de/adorsys/datasafe/business/impl/e2e/randomactions/RandomActionsOnDatasafeTest.java index 1c0412748..34f5eb24e 100644 --- a/datasafe-long-run-tests/datasafe-business-tests-random-actions/src/test/java/de/adorsys/datasafe/business/impl/e2e/randomactions/RandomActionsOnDatasafeTest.java +++ b/datasafe-long-run-tests/datasafe-business-tests-random-actions/src/test/java/de/adorsys/datasafe/business/impl/e2e/randomactions/RandomActionsOnDatasafeTest.java @@ -5,6 +5,7 @@ import de.adorsys.datasafe.business.impl.service.DaggerDefaultDatasafeServices; import de.adorsys.datasafe.business.impl.service.DefaultDatasafeServices; import de.adorsys.datasafe.directory.impl.profile.config.DefaultDFSConfig; +import de.adorsys.datasafe.encrypiton.api.types.keystore.ReadStorePassword; import lombok.extern.slf4j.Slf4j; import org.junit.jupiter.api.condition.DisabledIfSystemProperty; import org.junit.jupiter.params.ParameterizedTest; @@ -44,7 +45,7 @@ void testRandomActionsParallelThreads(StorageDescriptor descriptor, int threadCo private DefaultDatasafeServices datasafeServices(StorageDescriptor descriptor) { return DaggerDefaultDatasafeServices.builder() - .config(new DefaultDFSConfig(descriptor.getLocation(), "PAZZWORT")) + .config(new DefaultDFSConfig(descriptor.getLocation(), new ReadStorePassword("PAZZWORT"))) .storage(descriptor.getStorageService().get()) .build(); } diff --git a/datasafe-long-run-tests/datasafe-business-tests-random-actions/src/test/java/de/adorsys/datasafe/business/impl/e2e/randomactions/RandomActionsOnMultiBucketTest.java b/datasafe-long-run-tests/datasafe-business-tests-random-actions/src/test/java/de/adorsys/datasafe/business/impl/e2e/randomactions/RandomActionsOnMultiBucketTest.java index 460ff43db..318f6745c 100644 --- a/datasafe-long-run-tests/datasafe-business-tests-random-actions/src/test/java/de/adorsys/datasafe/business/impl/e2e/randomactions/RandomActionsOnMultiBucketTest.java +++ b/datasafe-long-run-tests/datasafe-business-tests-random-actions/src/test/java/de/adorsys/datasafe/business/impl/e2e/randomactions/RandomActionsOnMultiBucketTest.java @@ -5,6 +5,7 @@ import de.adorsys.datasafe.business.impl.service.DaggerDefaultDatasafeServices; import de.adorsys.datasafe.business.impl.service.DefaultDatasafeServices; import de.adorsys.datasafe.directory.impl.profile.config.DefaultDFSConfig; +import de.adorsys.datasafe.encrypiton.api.types.keystore.ReadStorePassword; import de.adorsys.datasafe.storage.api.UserBasedDelegatingStorage; import lombok.extern.slf4j.Slf4j; import org.junit.jupiter.api.condition.EnabledIfSystemProperty; @@ -41,7 +42,7 @@ private DefaultDatasafeServices datasafeServices(StorageDescriptor descriptor) { return DaggerDefaultDatasafeServices .builder() - .config(new DefaultDFSConfig(descriptor.getLocation(), "PAZZWORT")) + .config(new DefaultDFSConfig(descriptor.getLocation(), new ReadStorePassword("PAZZWORT"))) .storage(new UserBasedDelegatingStorage(storageServiceByBucket(), buckets)) .build(); } diff --git a/datasafe-long-run-tests/datasafe-business-tests-random-actions/src/test/java/de/adorsys/datasafe/business/impl/e2e/randomactions/RandomActionsOnSimpleDatasafeAdapterTest.java b/datasafe-long-run-tests/datasafe-business-tests-random-actions/src/test/java/de/adorsys/datasafe/business/impl/e2e/randomactions/RandomActionsOnSimpleDatasafeAdapterTest.java index ac39d6c9c..5a90c732a 100644 --- a/datasafe-long-run-tests/datasafe-business-tests-random-actions/src/test/java/de/adorsys/datasafe/business/impl/e2e/randomactions/RandomActionsOnSimpleDatasafeAdapterTest.java +++ b/datasafe-long-run-tests/datasafe-business-tests-random-actions/src/test/java/de/adorsys/datasafe/business/impl/e2e/randomactions/RandomActionsOnSimpleDatasafeAdapterTest.java @@ -9,6 +9,9 @@ import de.adorsys.datasafe.encrypiton.api.types.UserIDAuth; import de.adorsys.datasafe.encrypiton.api.types.keystore.ReadKeyPassword; import de.adorsys.datasafe.inbox.api.InboxService; +import de.adorsys.datasafe.privatestore.api.PasswordClearingInputStream; +import de.adorsys.datasafe.privatestore.api.PasswordClearingOutputStream; +import de.adorsys.datasafe.privatestore.api.PasswordClearingStream; import de.adorsys.datasafe.privatestore.api.PrivateSpaceService; import de.adorsys.datasafe.simple.adapter.api.SimpleDatasafeService; import de.adorsys.datasafe.simple.adapter.api.exceptions.SimpleAdapterException; @@ -71,21 +74,21 @@ private DefaultDatasafeServices datasafeServicesFromSimpleDatasafeAdapter(Storag public PrivateSpaceService privateService() { return new PrivateSpaceService() { @Override - public Stream> list(ListRequest request) { - return datasafeService.list( + public PasswordClearingStream> list(ListRequest request) { + return new PasswordClearingStream<>(datasafeService.list( request.getOwner(), asFqnDir(request.getLocation()), ListRecursiveFlag.TRUE - ).stream().map(it -> new AbsoluteLocation<>(asResolved(descriptor.getLocation(), it))); + ).stream().map(it -> new AbsoluteLocation<>(asResolved(descriptor.getLocation(), it))), request.getOwner().getReadKeyPassword()); } @Override - public InputStream read(ReadRequest request) { - return new ByteArrayInputStream( + public PasswordClearingInputStream read(ReadRequest request) { + return new PasswordClearingInputStream(new ByteArrayInputStream( datasafeService.readDocument( request.getOwner(), asFqnDoc(request.getLocation())).getDocumentContent().getValue() - ); + ), request.getOwner().getReadKeyPassword()); } @Override @@ -94,8 +97,8 @@ public void remove(RemoveRequest request) { } @Override - public OutputStream write(WriteRequest request) { - return new PutBlobOnClose(asFqnDoc(request.getLocation()), request.getOwner(), datasafeService); + public PasswordClearingOutputStream write(WriteRequest request) { + return new PasswordClearingOutputStream(new PutBlobOnClose(asFqnDoc(request.getLocation()), request.getOwner(), datasafeService), request.getOwner().getReadKeyPassword()); } @RequiredArgsConstructor diff --git a/datasafe-long-run-tests/datasafe-business-tests-random-actions/src/test/java/de/adorsys/datasafe/business/impl/e2e/randomactions/framework/services/OperationExecutor.java b/datasafe-long-run-tests/datasafe-business-tests-random-actions/src/test/java/de/adorsys/datasafe/business/impl/e2e/randomactions/framework/services/OperationExecutor.java index e9165109e..8ba9cebb7 100644 --- a/datasafe-long-run-tests/datasafe-business-tests-random-actions/src/test/java/de/adorsys/datasafe/business/impl/e2e/randomactions/framework/services/OperationExecutor.java +++ b/datasafe-long-run-tests/datasafe-business-tests-random-actions/src/test/java/de/adorsys/datasafe/business/impl/e2e/randomactions/framework/services/OperationExecutor.java @@ -7,6 +7,7 @@ import de.adorsys.datasafe.directory.api.profile.operations.ProfileRegistrationService; import de.adorsys.datasafe.directory.impl.profile.exceptions.UserNotFoundException; import de.adorsys.datasafe.encrypiton.api.types.UserIDAuth; +import de.adorsys.datasafe.encrypiton.api.types.keystore.ReadKeyPassword; import de.adorsys.datasafe.inbox.api.InboxService; import de.adorsys.datasafe.privatestore.api.PrivateSpaceService; import de.adorsys.datasafe.types.api.actions.ListRequest; @@ -130,7 +131,7 @@ private Stream generateValidatingOperations(String execId, @SneakyThrows private void doCreate(Operation oper) { - UserIDAuth auth = new UserIDAuth(oper.getUserId(), oper.getUserId()); + UserIDAuth auth = new UserIDAuth(oper.getUserId(), new ReadKeyPassword(oper.getUserId())); registrationService.registerUsingDefaults(auth); users.put(auth.getUserID().getValue(), new UserSpec(auth, new ContentGenerator(fileContentSize))); } diff --git a/datasafe-rest-impl/src/main/java/de/adorsys/datasafe/rest/impl/config/DatasafeConfig.java b/datasafe-rest-impl/src/main/java/de/adorsys/datasafe/rest/impl/config/DatasafeConfig.java index d30a654ee..19028df87 100644 --- a/datasafe-rest-impl/src/main/java/de/adorsys/datasafe/rest/impl/config/DatasafeConfig.java +++ b/datasafe-rest-impl/src/main/java/de/adorsys/datasafe/rest/impl/config/DatasafeConfig.java @@ -20,6 +20,7 @@ import de.adorsys.datasafe.directory.impl.profile.dfs.BucketAccessServiceImpl; import de.adorsys.datasafe.directory.impl.profile.dfs.BucketAccessServiceImplRuntimeDelegatable; import de.adorsys.datasafe.directory.impl.profile.dfs.RegexAccessServiceWithStorageCredentialsImpl; +import de.adorsys.datasafe.encrypiton.api.types.keystore.ReadStorePassword; import de.adorsys.datasafe.storage.api.RegexDelegatingStorage; import de.adorsys.datasafe.storage.api.SchemeDelegatingStorage; import de.adorsys.datasafe.storage.api.StorageService; @@ -65,19 +66,19 @@ public class DatasafeConfig { @Bean @ConditionalOnProperty(name = DATASAFE_S3_STORAGE, havingValue = "true") DFSConfig singleDfsConfigS3(DatasafeProperties properties) { - return new DefaultDFSConfig(properties.getSystemRoot(), properties.getKeystorePassword()); + return new DefaultDFSConfig(properties.getSystemRoot(), new ReadStorePassword(properties.getKeystorePassword())); } @Bean @ConditionalOnProperty(FILESYSTEM_ENV) DFSConfig singleDfsConfigFilesystem(DatasafeProperties properties) { - return new DefaultDFSConfig(properties.getSystemRoot(), properties.getKeystorePassword()); + return new DefaultDFSConfig(properties.getSystemRoot(), new ReadStorePassword(properties.getKeystorePassword())); } @Bean @ConditionalOnProperty(name = CLIENT_CREDENTIALS, havingValue = "true") DFSConfig withClientCredentials(DatasafeProperties properties) { - return new DFSConfigWithStorageCreds(properties.getSystemRoot(), properties.getKeystorePassword()); + return new DFSConfigWithStorageCreds(properties.getSystemRoot(), new ReadStorePassword(properties.getKeystorePassword())); } @Bean @@ -93,7 +94,7 @@ OverridesRegistry withClientCredentialsOverrides() { @ConditionalOnMissingBean(DFSConfig.class) DFSConfig multiDfsConfig(DatasafeProperties properties) { return new MultiDFSConfig(URI.create(properties.getS3Path()), URI.create(properties.getDbProfilePath()), - properties.getKeystorePassword()); + new ReadStorePassword(properties.getKeystorePassword())); } /** diff --git a/datasafe-rest-impl/src/test/java/de/adorsys/datasafe/rest/impl/controller/BaseTokenDatasafeEndpointTest.java b/datasafe-rest-impl/src/test/java/de/adorsys/datasafe/rest/impl/controller/BaseTokenDatasafeEndpointTest.java index bad5bc08e..a389c2ec0 100644 --- a/datasafe-rest-impl/src/test/java/de/adorsys/datasafe/rest/impl/controller/BaseTokenDatasafeEndpointTest.java +++ b/datasafe-rest-impl/src/test/java/de/adorsys/datasafe/rest/impl/controller/BaseTokenDatasafeEndpointTest.java @@ -1,5 +1,6 @@ package de.adorsys.datasafe.rest.impl.controller; +import de.adorsys.datasafe.encrypiton.api.types.keystore.ReadKeyPassword; import de.adorsys.datasafe.rest.impl.dto.UserDTO; import de.adorsys.datasafe.rest.impl.security.SecurityConstants; import de.adorsys.datasafe.rest.impl.security.SecurityProperties; @@ -14,7 +15,7 @@ public abstract class BaseTokenDatasafeEndpointTest extends BaseDatasafeEndpoint static final String PASSWORD_DESCRIPTION = "datasafe user's password"; static final String TEST_USER = "test"; - static final String TEST_PASS = "test"; + static final ReadKeyPassword TEST_PASS = new ReadKeyPassword("test"); String token; private SecurityProperties securityProperties; diff --git a/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/main/java/de/adorsys/datasafe/simple/adapter/impl/SimpleDatasafeServiceImpl.java b/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/main/java/de/adorsys/datasafe/simple/adapter/impl/SimpleDatasafeServiceImpl.java index e48d54da6..2e21edd8e 100644 --- a/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/main/java/de/adorsys/datasafe/simple/adapter/impl/SimpleDatasafeServiceImpl.java +++ b/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/main/java/de/adorsys/datasafe/simple/adapter/impl/SimpleDatasafeServiceImpl.java @@ -67,7 +67,7 @@ public SimpleDatasafeServiceImpl(DFSCredentials dfsCredentials) { this.systemRoot = FileSystems.getDefault().getPath(filesystemDFSCredentials.getRoot()).toAbsolutePath().toUri(); storageService = new FileSystemStorageService(FileSystems.getDefault().getPath(filesystemDFSCredentials.getRoot())); customlyBuiltDatasafeServices = DaggerLegacyDatasafeService.builder() - .config(new DefaultDFSConfig(systemRoot, universalReadStorePassword.getValue())) + .config(new DefaultDFSConfig(systemRoot, universalReadStorePassword)) .storage(getStorageService()) .build(); @@ -131,7 +131,7 @@ public SimpleDatasafeServiceImpl(DFSCredentials dfsCredentials) { this.systemRoot = URI.create(S3_PREFIX + amazonS3DFSCredentials.getRootBucket()); customlyBuiltDatasafeServices = DaggerLegacyDatasafeService.builder() - .config(new DefaultDFSConfig(systemRoot, universalReadStorePassword.getValue())) + .config(new DefaultDFSConfig(systemRoot, universalReadStorePassword)) .storage(getStorageService()) .build(); diff --git a/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/test/java/de/adorsys/datasafe/simple/adapter/impl/CleanupDbTest.java b/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/test/java/de/adorsys/datasafe/simple/adapter/impl/CleanupDbTest.java index 36249a7da..0144a8e0c 100644 --- a/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/test/java/de/adorsys/datasafe/simple/adapter/impl/CleanupDbTest.java +++ b/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/test/java/de/adorsys/datasafe/simple/adapter/impl/CleanupDbTest.java @@ -1,6 +1,7 @@ package de.adorsys.datasafe.simple.adapter.impl; import de.adorsys.datasafe.encrypiton.api.types.UserIDAuth; +import de.adorsys.datasafe.encrypiton.api.types.keystore.ReadKeyPassword; import de.adorsys.datasafe.simple.adapter.api.SimpleDatasafeService; import de.adorsys.datasafe.simple.adapter.api.types.DFSCredentials; import de.adorsys.datasafe.simple.adapter.api.types.DSDocument; @@ -44,8 +45,8 @@ void cleanupDb(WithStorageProvider.StorageDescriptor descriptor) { String content = "content of document"; String path = "a/b/c.txt"; - UserIDAuth user1 = new UserIDAuth("uzr", "user"); - UserIDAuth user2 = new UserIDAuth("other", "user"); + UserIDAuth user1 = new UserIDAuth("uzr", new ReadKeyPassword("user")); + UserIDAuth user2 = new UserIDAuth("other", new ReadKeyPassword("user")); simpleDatasafeService.createUser(user1); simpleDatasafeService.createUser(user2); From 298c964700f8bd0cb47344da49e8bfbbb2d9ce21 Mon Sep 17 00:00:00 2001 From: Maxim Grischenko Date: Wed, 9 Oct 2019 19:02:39 +0200 Subject: [PATCH 179/255] keystore config --- .../impl/keystore/DefaultKeyStoreModule.java | 2 +- .../business/impl/e2e/KeystoreE2ETest.java | 4 +-- .../keys/DFSPrivateKeyServiceImpl.java | 2 +- .../keys/DocumentKeyStoreOperationsImpl.java | 4 +-- .../keys/GenericKeystoreOperations.java | 4 +-- .../datasafe-encryption-api/pom.xml | 4 +++ .../api/keystore/KeyStoreService.java | 12 +++---- .../api/types/keystore/KeyCreationConfig.java | 19 ++++++++++ .../keystore/KeyStoreCreationConfig.java | 26 +++++++++----- .../api/types/keystore/KeyStoreType.java | 23 ------------ .../impl/keystore/KeyStoreGenerator.java | 16 ++++----- .../impl/keystore/KeyStoreServiceImpl.java | 20 +++++------ ...igImpl.java => KeyCreationConfigImpl.java} | 8 ++--- .../KeyStoreServiceImplBaseFunctions.java | 32 ++++++++++------- .../keystore/generator/KeystoreBuilder.java | 10 +++--- .../CmsEncryptionServiceImplTest.java | 4 +-- .../cmsencryption/SymetricEncryptionTest.java | 10 +++--- .../keystore/KeyStoreCreationConfigTest.java | 30 ++++++++++++++++ .../impl/keystore/KeyStoreServiceTest.java | 28 +++++++-------- .../impl/keystore/KeyStoreTypeTest.java | 35 ------------------- ...ymmetricPathEncryptionServiceImplTest.java | 8 ++--- .../rest/impl/DatasafeRestApplication.java | 3 +- .../rest/impl/config/DatasafeConfig.java | 16 +++++++++ .../rest/impl/config/KeystoreProperties.java | 12 +++++++ .../src/main/resources/application.properties | 4 +++ .../LegacyDFSPrivateKeyServiceImpl.java | 2 +- ...ymmetricPathEncryptionServiceImplTest.java | 6 ++-- pom.xml | 2 +- 28 files changed, 196 insertions(+), 150 deletions(-) create mode 100644 datasafe-encryption/datasafe-encryption-api/src/main/java/de/adorsys/datasafe/encrypiton/api/types/keystore/KeyCreationConfig.java delete mode 100644 datasafe-encryption/datasafe-encryption-api/src/main/java/de/adorsys/datasafe/encrypiton/api/types/keystore/KeyStoreType.java rename datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/keystore/generator/{KeyStoreCreationConfigImpl.java => KeyCreationConfigImpl.java} (76%) create mode 100644 datasafe-encryption/datasafe-encryption-impl/src/test/java/de/adorsys/datasafe/encrypiton/impl/keystore/KeyStoreCreationConfigTest.java delete mode 100644 datasafe-encryption/datasafe-encryption-impl/src/test/java/de/adorsys/datasafe/encrypiton/impl/keystore/KeyStoreTypeTest.java create mode 100644 datasafe-rest-impl/src/main/java/de/adorsys/datasafe/rest/impl/config/KeystoreProperties.java diff --git a/datasafe-business/src/main/java/de/adorsys/datasafe/business/impl/keystore/DefaultKeyStoreModule.java b/datasafe-business/src/main/java/de/adorsys/datasafe/business/impl/keystore/DefaultKeyStoreModule.java index 2fb8477b3..7be68b857 100644 --- a/datasafe-business/src/main/java/de/adorsys/datasafe/business/impl/keystore/DefaultKeyStoreModule.java +++ b/datasafe-business/src/main/java/de/adorsys/datasafe/business/impl/keystore/DefaultKeyStoreModule.java @@ -22,7 +22,7 @@ public abstract class DefaultKeyStoreModule { public abstract PublicKeySerde publicKeySerde(PublicKeySerdeImplRuntimeDelegatable impl); /** - * By default, BouncyCastle keystore - UBER, or one specified by system property SERVER_KEYSTORE_TYPE. + * If no external configuration provided, BCFKS key store type is used by default. */ @Binds public abstract KeyStoreService keyStoreService(KeyStoreServiceImplRuntimeDelegatable impl); diff --git a/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/KeystoreE2ETest.java b/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/KeystoreE2ETest.java index c3a0e497f..8be7b8ac1 100644 --- a/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/KeystoreE2ETest.java +++ b/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/KeystoreE2ETest.java @@ -26,8 +26,8 @@ import java.util.Set; import static de.adorsys.datasafe.business.impl.e2e.DatasafeServicesProvider.STORE_PAZZWORD; -import static de.adorsys.datasafe.encrypiton.api.types.keystore.KeyStoreCreationConfig.PATH_KEY_ID_PREFIX; -import static de.adorsys.datasafe.encrypiton.api.types.keystore.KeyStoreCreationConfig.PATH_KEY_ID_PREFIX_CTR; +import static de.adorsys.datasafe.encrypiton.api.types.keystore.KeyCreationConfig.PATH_KEY_ID_PREFIX; +import static de.adorsys.datasafe.encrypiton.api.types.keystore.KeyCreationConfig.PATH_KEY_ID_PREFIX_CTR; import static org.assertj.core.api.Assertions.assertThat; /** diff --git a/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/keys/DFSPrivateKeyServiceImpl.java b/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/keys/DFSPrivateKeyServiceImpl.java index 0aac3cfca..a9f05fc21 100644 --- a/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/keys/DFSPrivateKeyServiceImpl.java +++ b/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/keys/DFSPrivateKeyServiceImpl.java @@ -21,7 +21,7 @@ import java.util.Set; import java.util.stream.Collectors; -import static de.adorsys.datasafe.encrypiton.api.types.keystore.KeyStoreCreationConfig.*; +import static de.adorsys.datasafe.encrypiton.api.types.keystore.KeyCreationConfig.*; /** * Retrieves and opens private keystore associated with user location DFS storage. diff --git a/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/keys/DocumentKeyStoreOperationsImpl.java b/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/keys/DocumentKeyStoreOperationsImpl.java index b1c683aaa..91e46f8ba 100644 --- a/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/keys/DocumentKeyStoreOperationsImpl.java +++ b/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/keys/DocumentKeyStoreOperationsImpl.java @@ -77,8 +77,8 @@ public List createAndWriteKeyStore(UserIDAuth forUser) KeyStoreAuth auth = keystoreAuth(forUser, forUser.getReadKeyPassword()); KeyStore keystoreBlob = keyStoreService.createKeyStore( auth, - KeyStoreType.DEFAULT, - new KeyStoreCreationConfig(1, 1) + KeyStoreCreationConfig.DEFAULT, + new KeyCreationConfig(1, 1) ); writeKeystore(forUser.getUserID(), auth, keystoreLocationWithAccess(forUser), keystoreBlob); diff --git a/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/keys/GenericKeystoreOperations.java b/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/keys/GenericKeystoreOperations.java index 0f0cf289b..040d151b7 100644 --- a/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/keys/GenericKeystoreOperations.java +++ b/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/keys/GenericKeystoreOperations.java @@ -6,8 +6,8 @@ import de.adorsys.datasafe.encrypiton.api.types.UserID; import de.adorsys.datasafe.encrypiton.api.types.UserIDAuth; import de.adorsys.datasafe.encrypiton.api.types.keystore.KeyStoreAuth; +import de.adorsys.datasafe.encrypiton.api.types.keystore.KeyCreationConfig; import de.adorsys.datasafe.encrypiton.api.types.keystore.KeyStoreCreationConfig; -import de.adorsys.datasafe.encrypiton.api.types.keystore.KeyStoreType; import de.adorsys.datasafe.encrypiton.api.types.keystore.ReadKeyPassword; import de.adorsys.datasafe.encrypiton.api.types.keystore.ReadStorePassword; import de.adorsys.datasafe.storage.api.actions.StorageReadService; @@ -55,7 +55,7 @@ public GenericKeystoreOperations(DFSConfig dfsConfig, StorageWriteService writeS public KeyStore createEmptyKeystore(UserIDAuth auth) { return keyStoreService - .createKeyStore(keystoreAuth(auth), KeyStoreType.DEFAULT, new KeyStoreCreationConfig(0, 0)); + .createKeyStore(keystoreAuth(auth), KeyStoreCreationConfig.DEFAULT, new KeyCreationConfig(0, 0)); } /** diff --git a/datasafe-encryption/datasafe-encryption-api/pom.xml b/datasafe-encryption/datasafe-encryption-api/pom.xml index e86de2087..5f2335562 100644 --- a/datasafe-encryption/datasafe-encryption-api/pom.xml +++ b/datasafe-encryption/datasafe-encryption-api/pom.xml @@ -14,6 +14,10 @@ datasafe-types-api ${project.version} + + org.bouncycastle + bcprov-jdk15on + diff --git a/datasafe-encryption/datasafe-encryption-api/src/main/java/de/adorsys/datasafe/encrypiton/api/keystore/KeyStoreService.java b/datasafe-encryption/datasafe-encryption-api/src/main/java/de/adorsys/datasafe/encrypiton/api/keystore/KeyStoreService.java index 0b55e9638..bb093ed7d 100644 --- a/datasafe-encryption/datasafe-encryption-api/src/main/java/de/adorsys/datasafe/encrypiton/api/keystore/KeyStoreService.java +++ b/datasafe-encryption/datasafe-encryption-api/src/main/java/de/adorsys/datasafe/encrypiton/api/keystore/KeyStoreService.java @@ -19,25 +19,25 @@ public interface KeyStoreService { /** * Creates keystore. * @param keyStoreAuth Keys for opening keystore and reading key from it - * @param keyStoreType Keystore type, example: PKCS or PKCS12 or JKS + * @param keyStoreCreationConfig Keystore type, example: PKCS or PKCS12 or JKS * @param config Keystore will be pre-populated with keys according to it * @return Built keystore that is ready to use */ KeyStore createKeyStore(KeyStoreAuth keyStoreAuth, - KeyStoreType keyStoreType, - KeyStoreCreationConfig config); + KeyStoreCreationConfig keyStoreCreationConfig, + KeyCreationConfig config); /** * Creates keystore that has additional secret keys in it. * @param keyStoreAuth Keys for opening keystore and reading key from it - * @param keyStoreType Keystore type, example: PKCS12 or UBER or JKS + * @param keyStoreCreationConfig Keystore type, example: PKCS12 or UBER or JKS * @param config Keystore will be pre-populated with keys according to it * @param secretKeys Secret keys to store in keystore, if value is empty - key will be generated * @return Built keystore that is ready to use */ KeyStore createKeyStore(KeyStoreAuth keyStoreAuth, - KeyStoreType keyStoreType, - KeyStoreCreationConfig config, + KeyStoreCreationConfig keyStoreCreationConfig, + KeyCreationConfig config, Map> secretKeys); /** diff --git a/datasafe-encryption/datasafe-encryption-api/src/main/java/de/adorsys/datasafe/encrypiton/api/types/keystore/KeyCreationConfig.java b/datasafe-encryption/datasafe-encryption-api/src/main/java/de/adorsys/datasafe/encrypiton/api/types/keystore/KeyCreationConfig.java new file mode 100644 index 000000000..cc5522a78 --- /dev/null +++ b/datasafe-encryption/datasafe-encryption-api/src/main/java/de/adorsys/datasafe/encrypiton/api/types/keystore/KeyCreationConfig.java @@ -0,0 +1,19 @@ +package de.adorsys.datasafe.encrypiton.api.types.keystore; + +import lombok.Getter; +import lombok.RequiredArgsConstructor; + +/** + * Wrapper that contains count of public-key pairs and count of encryption keys. + */ +@Getter +@RequiredArgsConstructor +public class KeyCreationConfig { + + public static final String PATH_KEY_ID_PREFIX = "PATH_SECRET"; + public static final String PATH_KEY_ID_PREFIX_CTR = "PATH_CTR_SECRET_"; + public static final String DOCUMENT_KEY_ID_PREFIX = "PRIVATE_SECRET"; + + private final int encKeyNumber; + private final int signKeyNumber; +} diff --git a/datasafe-encryption/datasafe-encryption-api/src/main/java/de/adorsys/datasafe/encrypiton/api/types/keystore/KeyStoreCreationConfig.java b/datasafe-encryption/datasafe-encryption-api/src/main/java/de/adorsys/datasafe/encrypiton/api/types/keystore/KeyStoreCreationConfig.java index 05afe58ed..135d9bb35 100644 --- a/datasafe-encryption/datasafe-encryption-api/src/main/java/de/adorsys/datasafe/encrypiton/api/types/keystore/KeyStoreCreationConfig.java +++ b/datasafe-encryption/datasafe-encryption-api/src/main/java/de/adorsys/datasafe/encrypiton/api/types/keystore/KeyStoreCreationConfig.java @@ -1,19 +1,29 @@ package de.adorsys.datasafe.encrypiton.api.types.keystore; +import lombok.Builder; import lombok.Getter; -import lombok.RequiredArgsConstructor; +import org.bouncycastle.crypto.util.PBKDF2Config; +import org.bouncycastle.jcajce.BCFKSLoadStoreParameter; + +import static org.bouncycastle.crypto.util.PBKDF2Config.PRF_SHA512; /** - * Wrapper that contains count of public-key pairs and count of encryption keys. + * Wrapper for keystore config. */ +@Builder(toBuilder = true) @Getter -@RequiredArgsConstructor public class KeyStoreCreationConfig { + public static KeyStoreCreationConfig DEFAULT = getDefaultConfig(); - public static final String PATH_KEY_ID_PREFIX = "PATH_SECRET"; - public static final String PATH_KEY_ID_PREFIX_CTR = "PATH_CTR_SECRET_"; - public static final String DOCUMENT_KEY_ID_PREFIX = "PRIVATE_SECRET"; + private BCFKSLoadStoreParameter.EncryptionAlgorithm storeEncryptionAlgorithm; + private PBKDF2Config storePBKDFConfig; + private BCFKSLoadStoreParameter.MacAlgorithm storeMacAlgorithm; - private final int encKeyNumber; - private final int signKeyNumber; + private static KeyStoreCreationConfig getDefaultConfig() { + return KeyStoreCreationConfig.builder() + .storeEncryptionAlgorithm(BCFKSLoadStoreParameter.EncryptionAlgorithm.AES256_KWP) + .storePBKDFConfig(new PBKDF2Config.Builder().withPRF(PRF_SHA512).build()) + .storeMacAlgorithm(BCFKSLoadStoreParameter.MacAlgorithm.HmacSHA3_512) + .build(); + } } diff --git a/datasafe-encryption/datasafe-encryption-api/src/main/java/de/adorsys/datasafe/encrypiton/api/types/keystore/KeyStoreType.java b/datasafe-encryption/datasafe-encryption-api/src/main/java/de/adorsys/datasafe/encrypiton/api/types/keystore/KeyStoreType.java deleted file mode 100644 index 0dfad747e..000000000 --- a/datasafe-encryption/datasafe-encryption-api/src/main/java/de/adorsys/datasafe/encrypiton/api/types/keystore/KeyStoreType.java +++ /dev/null @@ -1,23 +0,0 @@ -package de.adorsys.datasafe.encrypiton.api.types.keystore; - -import de.adorsys.datasafe.encrypiton.api.types.BaseTypeString; - -/** - * Wrapper for keystore type - example: PKCS12,JKS,UBER. - */ -public class KeyStoreType extends BaseTypeString { - - public static KeyStoreType DEFAULT = getDefaultKeyStoreType(); - - public KeyStoreType(String value) { - super(value); - } - - protected static KeyStoreType getDefaultKeyStoreType() { - String serverKeystoreType = System.getProperty("SERVER_KEYSTORE_TYPE"); - if (null != serverKeystoreType && !serverKeystoreType.isEmpty()) { - return new KeyStoreType(serverKeystoreType); - } - return new KeyStoreType("UBER"); - } -} diff --git a/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/keystore/KeyStoreGenerator.java b/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/keystore/KeyStoreGenerator.java index 4d6df4970..65ab514ed 100644 --- a/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/keystore/KeyStoreGenerator.java +++ b/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/keystore/KeyStoreGenerator.java @@ -2,7 +2,7 @@ import de.adorsys.datasafe.encrypiton.api.types.keystore.*; import de.adorsys.datasafe.encrypiton.api.types.keystore.exceptions.KeyStoreConfigException; -import de.adorsys.datasafe.encrypiton.impl.keystore.generator.KeyStoreCreationConfigImpl; +import de.adorsys.datasafe.encrypiton.impl.keystore.generator.KeyCreationConfigImpl; import de.adorsys.datasafe.encrypiton.impl.keystore.generator.KeystoreBuilder; import de.adorsys.datasafe.encrypiton.impl.keystore.types.KeyPairEntry; import de.adorsys.datasafe.encrypiton.impl.keystore.types.KeyPairGenerator; @@ -22,13 +22,13 @@ public class KeyStoreGenerator { @NonNull - private final KeyStoreType keyStoreType; + private final KeyStoreCreationConfig keyStoreCreationConfig; @NonNull private final String serverKeyPairAliasPrefix; @NonNull - private final KeyStoreCreationConfigImpl config; + private final KeyCreationConfigImpl config; @NonNull private final ReadKeyPassword readKeyPassword; @@ -38,14 +38,14 @@ public class KeyStoreGenerator { @Builder protected KeyStoreGenerator( - KeyStoreCreationConfig config, - KeyStoreType keyStoreType, + KeyCreationConfig keyCreationConfig, + KeyStoreCreationConfig keyStoreCreationConfig, String serverKeyPairAliasPrefix, ReadKeyPassword readKeyPassword, Map> secretKeys ) { - this.config = new KeyStoreCreationConfigImpl(config); - this.keyStoreType = keyStoreType; + this.config = new KeyCreationConfigImpl(keyCreationConfig); + this.keyStoreCreationConfig = keyStoreCreationConfig; this.serverKeyPairAliasPrefix = "KEYSTORE-ID-0"; this.readKeyPassword = readKeyPassword; this.secretKeys = secretKeys; @@ -62,7 +62,7 @@ public KeyStore generate() { Date startTime = new Date(); try { String keyStoreID = serverKeyPairAliasPrefix; - KeystoreBuilder keystoreBuilder = new KeystoreBuilder().withStoreType(keyStoreType); + KeystoreBuilder keystoreBuilder = new KeystoreBuilder().withStoreType(keyStoreCreationConfig); { KeyPairGenerator encKeyPairGenerator = config.getEncKeyPairGenerator(keyStoreID); diff --git a/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/keystore/KeyStoreServiceImpl.java b/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/keystore/KeyStoreServiceImpl.java index 2ba7c1619..7c1b157cd 100644 --- a/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/keystore/KeyStoreServiceImpl.java +++ b/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/keystore/KeyStoreServiceImpl.java @@ -21,7 +21,7 @@ import java.security.cert.X509Certificate; import java.util.*; -import static de.adorsys.datasafe.encrypiton.api.types.keystore.KeyStoreCreationConfig.*; +import static de.adorsys.datasafe.encrypiton.api.types.keystore.KeyCreationConfig.*; @Slf4j @RuntimeDelegate @@ -36,12 +36,12 @@ public KeyStoreServiceImpl(PasswordBasedKeyConfig passwordBasedKeyConfig) { @Override public KeyStore createKeyStore(KeyStoreAuth keyStoreAuth, - KeyStoreType keyStoreType, - KeyStoreCreationConfig config) { + KeyStoreCreationConfig keyStoreCreationConfig, + KeyCreationConfig config) { return createKeyStore( keyStoreAuth, - keyStoreType, + keyStoreCreationConfig, config, ImmutableMap.of( new KeyID(PATH_KEY_ID_PREFIX + UUID.randomUUID().toString()), Optional.empty(), @@ -53,20 +53,20 @@ public KeyStore createKeyStore(KeyStoreAuth keyStoreAuth, @Override public KeyStore createKeyStore(KeyStoreAuth keyStoreAuth, - KeyStoreType keyStoreType, - KeyStoreCreationConfig config, + KeyStoreCreationConfig keyStoreCreationConfig, + KeyCreationConfig config, Map> secretKeys) { log.debug("start create keystore "); if (config == null) { - config = new KeyStoreCreationConfig(5, 5); + config = new KeyCreationConfig(5, 5); } // TODO, hier also statt der StoreID nun das String serverKeyPairAliasPrefix = UUID.randomUUID().toString(); log.debug("keystoreid = {}", serverKeyPairAliasPrefix); KeyStoreGenerator keyStoreGenerator = KeyStoreGenerator.builder() - .config(config) - .keyStoreType(keyStoreType) + .keyCreationConfig(config) + .keyStoreCreationConfig(keyStoreCreationConfig) .serverKeyPairAliasPrefix(serverKeyPairAliasPrefix) .readKeyPassword(keyStoreAuth.getReadKeyPassword()) .secretKeys(secretKeys) @@ -173,7 +173,7 @@ public KeyStore deserialize(byte[] payload, String storeId, ReadStorePassword re return KeyStoreServiceImplBaseFunctions.loadKeyStore( payload, storeId, - KeyStoreType.DEFAULT, + KeyStoreCreationConfig.DEFAULT, readStorePassword ); } diff --git a/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/keystore/generator/KeyStoreCreationConfigImpl.java b/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/keystore/generator/KeyCreationConfigImpl.java similarity index 76% rename from datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/keystore/generator/KeyStoreCreationConfigImpl.java rename to datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/keystore/generator/KeyCreationConfigImpl.java index 31f4934b1..8c3c3fe42 100644 --- a/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/keystore/generator/KeyStoreCreationConfigImpl.java +++ b/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/keystore/generator/KeyCreationConfigImpl.java @@ -1,14 +1,14 @@ package de.adorsys.datasafe.encrypiton.impl.keystore.generator; -import de.adorsys.datasafe.encrypiton.api.types.keystore.KeyStoreCreationConfig; +import de.adorsys.datasafe.encrypiton.api.types.keystore.KeyCreationConfig; /** * Created by peter on 09.01.18. */ -public class KeyStoreCreationConfigImpl { - private final KeyStoreCreationConfig config; +public class KeyCreationConfigImpl { + private final KeyCreationConfig config; - public KeyStoreCreationConfigImpl(KeyStoreCreationConfig config) { + public KeyCreationConfigImpl(KeyCreationConfig config) { this.config = config; } diff --git a/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/keystore/generator/KeyStoreServiceImplBaseFunctions.java b/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/keystore/generator/KeyStoreServiceImplBaseFunctions.java index b3a91bd9f..b3644dc3e 100644 --- a/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/keystore/generator/KeyStoreServiceImplBaseFunctions.java +++ b/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/keystore/generator/KeyStoreServiceImplBaseFunctions.java @@ -4,6 +4,7 @@ import de.adorsys.datasafe.encrypiton.impl.keystore.types.KeyPairEntry; import lombok.SneakyThrows; import org.bouncycastle.cert.X509CertificateHolder; +import org.bouncycastle.jcajce.BCFKSLoadStoreParameter; import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; @@ -22,6 +23,8 @@ */ public class KeyStoreServiceImplBaseFunctions { + public static final String KEYSTORE_TYPE = "BCFKS"; + private KeyStoreServiceImplBaseFunctions() { throw new IllegalStateException("Not supported"); } @@ -29,13 +32,18 @@ private KeyStoreServiceImplBaseFunctions() { /** * Create an initializes a new key store. The key store is not yet password protected. * - * @param keyStoreType storeType + * @param keyStoreConfig storeType * @return KeyStore keyStore */ @SneakyThrows - public static KeyStore newKeyStore(KeyStoreType keyStoreType) { - KeyStore ks = KeyStore.getInstance(keyStoreType.getValue()); - ks.load(null, null); + public static KeyStore newKeyStore(KeyStoreCreationConfig keyStoreConfig) { + KeyStore ks = KeyStore.getInstance(KEYSTORE_TYPE); + ks.load(new BCFKSLoadStoreParameter.Builder() + .withStoreEncryptionAlgorithm(keyStoreConfig.getStoreEncryptionAlgorithm()) + .withStorePBKDFConfig(keyStoreConfig.getStorePBKDFConfig()) + .withStoreMacAlgorithm(keyStoreConfig.getStoreMacAlgorithm()) + .build() + ); return ks; } @@ -58,15 +66,15 @@ public static byte[] toByteArray(KeyStore keystore, String storeId, ReadStorePas * * @param in : the inputStream location which to read the keystore * @param storeId : The store id. This is passed to the callback handler to identify the requested password record. - * @param storeType : the type of this key store. f null, the defaut java keystore type is used. + * @param keyStoreConfig : the type of this key store. f null, the defaut java keystore type is used. * @return KeyStore */ @SneakyThrows - public static KeyStore loadKeyStore(InputStream in, String storeId, KeyStoreType storeType, ReadStorePassword readStorePassword) { - // Use default type if blank. - if (storeType == null) storeType = KeyStoreType.DEFAULT; + public static KeyStore loadKeyStore(InputStream in, String storeId, KeyStoreCreationConfig keyStoreConfig, ReadStorePassword readStorePassword) { + // Use default if blank. + if (keyStoreConfig == null) keyStoreConfig = KeyStoreCreationConfig.DEFAULT; - KeyStore ks = KeyStore.getInstance(storeType.getValue()); + KeyStore ks = KeyStore.getInstance(KEYSTORE_TYPE); ks.load(in, readStorePassword.getValue().toCharArray()); return ks; @@ -75,11 +83,11 @@ public static KeyStore loadKeyStore(InputStream in, String storeId, KeyStoreType /** * @param data : the byte array containing key store data. * @param storeId : The store id. This is passed to the callback handler to identify the requested password record. - * @param keyStoreType : the type of this key store. f null, the defaut java keystore type is used. + * @param keyStoreCreationConfig : the type of this key store. f null, the defaut java keystore type is used. * @return KeyStore */ - public static KeyStore loadKeyStore(byte[] data, String storeId, KeyStoreType keyStoreType, ReadStorePassword readStorePassword) { - return loadKeyStore(new ByteArrayInputStream(data), storeId, keyStoreType, readStorePassword); + public static KeyStore loadKeyStore(byte[] data, String storeId, KeyStoreCreationConfig keyStoreCreationConfig, ReadStorePassword readStorePassword) { + return loadKeyStore(new ByteArrayInputStream(data), storeId, keyStoreCreationConfig, readStorePassword); } /** diff --git a/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/keystore/generator/KeystoreBuilder.java b/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/keystore/generator/KeystoreBuilder.java index 3115b6a7f..4ca55157b 100644 --- a/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/keystore/generator/KeystoreBuilder.java +++ b/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/keystore/generator/KeystoreBuilder.java @@ -1,18 +1,18 @@ package de.adorsys.datasafe.encrypiton.impl.keystore.generator; import de.adorsys.datasafe.encrypiton.api.types.keystore.KeyEntry; -import de.adorsys.datasafe.encrypiton.api.types.keystore.KeyStoreType; +import de.adorsys.datasafe.encrypiton.api.types.keystore.KeyStoreCreationConfig; import java.security.KeyStore; import java.util.HashMap; import java.util.Map; public class KeystoreBuilder { - private KeyStoreType storeType; + private KeyStoreCreationConfig keyStoreConfig; private Map keyEntries = new HashMap<>(); - public KeystoreBuilder withStoreType(KeyStoreType storeType) { - this.storeType = storeType; + public KeystoreBuilder withStoreType(KeyStoreCreationConfig keyStoreConfig) { + this.keyStoreConfig = keyStoreConfig; return this; } @@ -22,7 +22,7 @@ public KeystoreBuilder withKeyEntry(KeyEntry keyEntry) { } public KeyStore build() { - KeyStore ks = KeyStoreServiceImplBaseFunctions.newKeyStore(storeType); + KeyStore ks = KeyStoreServiceImplBaseFunctions.newKeyStore(keyStoreConfig); KeyStoreServiceImplBaseFunctions.fillKeyStore(ks, keyEntries.values()); return ks; diff --git a/datasafe-encryption/datasafe-encryption-impl/src/test/java/de/adorsys/datasafe/encrypiton/impl/cmsencryption/CmsEncryptionServiceImplTest.java b/datasafe-encryption/datasafe-encryption-impl/src/test/java/de/adorsys/datasafe/encrypiton/impl/cmsencryption/CmsEncryptionServiceImplTest.java index c417a7b79..2a2c00c37 100644 --- a/datasafe-encryption/datasafe-encryption-impl/src/test/java/de/adorsys/datasafe/encrypiton/impl/cmsencryption/CmsEncryptionServiceImplTest.java +++ b/datasafe-encryption/datasafe-encryption-impl/src/test/java/de/adorsys/datasafe/encrypiton/impl/cmsencryption/CmsEncryptionServiceImplTest.java @@ -202,8 +202,8 @@ private static KeyStoreAccess getKeyStoreAccess(String label) { ReadStorePassword readStorePassword = new ReadStorePassword(label); KeyStoreAuth keyStoreAuth = new KeyStoreAuth(readStorePassword, readKeyPassword); - KeyStoreCreationConfig config = new KeyStoreCreationConfig(1, 1); - KeyStore keyStore = keyStoreService.createKeyStore(keyStoreAuth, KeyStoreType.DEFAULT, config); + KeyCreationConfig config = new KeyCreationConfig(1, 1); + KeyStore keyStore = keyStoreService.createKeyStore(keyStoreAuth, KeyStoreCreationConfig.DEFAULT, config); return new KeyStoreAccess(keyStore, keyStoreAuth); } diff --git a/datasafe-encryption/datasafe-encryption-impl/src/test/java/de/adorsys/datasafe/encrypiton/impl/cmsencryption/SymetricEncryptionTest.java b/datasafe-encryption/datasafe-encryption-impl/src/test/java/de/adorsys/datasafe/encrypiton/impl/cmsencryption/SymetricEncryptionTest.java index a7fc8428d..59e60c4d4 100644 --- a/datasafe-encryption/datasafe-encryption-impl/src/test/java/de/adorsys/datasafe/encrypiton/impl/cmsencryption/SymetricEncryptionTest.java +++ b/datasafe-encryption/datasafe-encryption-impl/src/test/java/de/adorsys/datasafe/encrypiton/impl/cmsencryption/SymetricEncryptionTest.java @@ -20,8 +20,8 @@ import java.security.KeyStore; import java.util.Enumeration; -import static de.adorsys.datasafe.encrypiton.api.types.keystore.KeyStoreCreationConfig.PATH_KEY_ID_PREFIX; -import static de.adorsys.datasafe.encrypiton.api.types.keystore.KeyStoreCreationConfig.DOCUMENT_KEY_ID_PREFIX; +import static de.adorsys.datasafe.encrypiton.api.types.keystore.KeyCreationConfig.PATH_KEY_ID_PREFIX; +import static de.adorsys.datasafe.encrypiton.api.types.keystore.KeyCreationConfig.DOCUMENT_KEY_ID_PREFIX; import static de.adorsys.datasafe.encrypiton.impl.cmsencryption.KeyStoreUtil.getKeys; import static org.assertj.core.api.Assertions.assertThat; @@ -35,8 +35,8 @@ class SymetricEncryptionTest extends WithBouncyCastle { private ReadKeyPassword readKeyPassword = new ReadKeyPassword("readkeypassword"); private ReadStorePassword readStorePassword = new ReadStorePassword("readstorepassword"); private KeyStoreAuth keyStoreAuth = new KeyStoreAuth(readStorePassword, readKeyPassword); - private KeyStoreCreationConfig config = new KeyStoreCreationConfig(1, 1); - private KeyStore keyStore = keyStoreService.createKeyStore(keyStoreAuth, KeyStoreType.DEFAULT, config); + private KeyCreationConfig config = new KeyCreationConfig(1, 1); + private KeyStore keyStore = keyStoreService.createKeyStore(keyStoreAuth, KeyStoreCreationConfig.DEFAULT, config); private KeyStoreAccess keyStoreAccess = new KeyStoreAccess(keyStore, keyStoreAuth); @Test @@ -64,7 +64,7 @@ void symetricStreamEncryptAndDecryptTest() { @SneakyThrows void symetricNegativeStreamEncryptAndDecryptTest() { // This is the keystore we use to encrypt, it has SYMM_KEY_ID and PATH_KEY_ID symm. keys. - keyStoreService.createKeyStore(keyStoreAuth, KeyStoreType.DEFAULT, config); + keyStoreService.createKeyStore(keyStoreAuth, KeyStoreCreationConfig.DEFAULT, config); SecretKey realSecretKey = keyStoreService.getSecretKey(keyStoreAccess, keyIdByPrefix(DOCUMENT_KEY_ID_PREFIX)); ByteArrayOutputStream outputStream = new ByteArrayOutputStream(); // Test consist in encrypting with real secret key, but use fake secretKeyId - PATH_KEY_ID diff --git a/datasafe-encryption/datasafe-encryption-impl/src/test/java/de/adorsys/datasafe/encrypiton/impl/keystore/KeyStoreCreationConfigTest.java b/datasafe-encryption/datasafe-encryption-impl/src/test/java/de/adorsys/datasafe/encrypiton/impl/keystore/KeyStoreCreationConfigTest.java new file mode 100644 index 000000000..870ea4537 --- /dev/null +++ b/datasafe-encryption/datasafe-encryption-impl/src/test/java/de/adorsys/datasafe/encrypiton/impl/keystore/KeyStoreCreationConfigTest.java @@ -0,0 +1,30 @@ +package de.adorsys.datasafe.encrypiton.impl.keystore; + +import de.adorsys.datasafe.types.api.shared.BaseMockitoTest; + +class KeyStoreTypeTest extends BaseMockitoTest { + +// @Test +// void typeBySystemEnv() { +// String value = this.getClass().getSimpleName() + UUID.randomUUID().toString(); +// System.setProperty("SERVER_KEYSTORE_TYPE", value); +// Assertions.assertEquals(value, TestableKeyStoreType.getStaticDefaultKeyStoreType().getValue()); +// System.clearProperty("SERVER_KEYSTORE_TYPE"); +// TestableKeyStoreType.resetType(); +// } +// +// public static class TestableKeyStoreType extends KeyStoreType { +// +// public TestableKeyStoreType(String value) { +// super(value); +// } +// +// static KeyStoreType getStaticDefaultKeyStoreType() { +// return KeyStoreType.getDefaultKeyStoreType(); +// } +// +// static void resetType() { +// DEFAULT = getStaticDefaultKeyStoreType(); +// } +// } +} diff --git a/datasafe-encryption/datasafe-encryption-impl/src/test/java/de/adorsys/datasafe/encrypiton/impl/keystore/KeyStoreServiceTest.java b/datasafe-encryption/datasafe-encryption-impl/src/test/java/de/adorsys/datasafe/encrypiton/impl/keystore/KeyStoreServiceTest.java index 31916178c..8a7e28031 100644 --- a/datasafe-encryption/datasafe-encryption-impl/src/test/java/de/adorsys/datasafe/encrypiton/impl/keystore/KeyStoreServiceTest.java +++ b/datasafe-encryption/datasafe-encryption-impl/src/test/java/de/adorsys/datasafe/encrypiton/impl/keystore/KeyStoreServiceTest.java @@ -5,7 +5,7 @@ import de.adorsys.datasafe.encrypiton.api.types.keystore.exceptions.KeyStoreConfigException; import de.adorsys.datasafe.encrypiton.impl.KeystoreUtil; import de.adorsys.datasafe.encrypiton.impl.WithBouncyCastle; -import de.adorsys.datasafe.encrypiton.impl.keystore.generator.KeyStoreCreationConfigImpl; +import de.adorsys.datasafe.encrypiton.impl.keystore.generator.KeyCreationConfigImpl; import de.adorsys.datasafe.encrypiton.impl.keystore.generator.KeyStoreServiceImplBaseFunctions; import de.adorsys.datasafe.encrypiton.impl.keystore.types.KeyPairEntry; import de.adorsys.datasafe.encrypiton.impl.keystore.types.KeyPairGenerator; @@ -21,7 +21,7 @@ import java.util.List; import java.util.UUID; -import static de.adorsys.datasafe.encrypiton.api.types.keystore.KeyStoreCreationConfig.DOCUMENT_KEY_ID_PREFIX; +import static de.adorsys.datasafe.encrypiton.api.types.keystore.KeyCreationConfig.DOCUMENT_KEY_ID_PREFIX; class KeyStoreServiceTest extends WithBouncyCastle { @@ -37,8 +37,8 @@ void setUp() { @Test void createKeyStore() throws Exception { - KeyStoreCreationConfig config = new KeyStoreCreationConfig(0, 1); - KeyStore keyStore = keyStoreService.createKeyStore(keyStoreAuth, KeyStoreType.DEFAULT, config); + KeyCreationConfig config = new KeyCreationConfig(0, 1); + KeyStore keyStore = keyStoreService.createKeyStore(keyStoreAuth, KeyStoreCreationConfig.DEFAULT, config); Assertions.assertNotNull(keyStore); @@ -46,13 +46,13 @@ void createKeyStore() throws Exception { // Two additional secret key(key and counter key) being generated for path encryption and one for private doc encryption. Assertions.assertEquals(4, list.size()); - Assertions.assertEquals("UBER", keyStore.getType()); + Assertions.assertEquals("BCFKS", keyStore.getType()); Assertions.assertEquals(Security.getProvider("BC"), keyStore.getProvider()); } @Test void createKeyStoreEmptyConfig() throws Exception { - KeyStore keyStore = keyStoreService.createKeyStore(keyStoreAuth, KeyStoreType.DEFAULT, null); + KeyStore keyStore = keyStoreService.createKeyStore(keyStoreAuth, KeyStoreCreationConfig.DEFAULT, null); Assertions.assertNotNull(keyStore); List list = Collections.list(keyStore.aliases()); // One additional secret key being generated for path encryption and one for private doc encryption. @@ -61,16 +61,16 @@ void createKeyStoreEmptyConfig() throws Exception { @Test void createKeyStoreException() { - KeyStoreCreationConfig config = new KeyStoreCreationConfig(0, 0); + KeyCreationConfig config = new KeyCreationConfig(0, 0); Assertions.assertThrows(KeyStoreConfigException.class, () -> - keyStoreService.createKeyStore(keyStoreAuth, KeyStoreType.DEFAULT, config, Collections.emptyMap()) + keyStoreService.createKeyStore(keyStoreAuth, KeyStoreCreationConfig.DEFAULT, config, Collections.emptyMap()) ); } @Test void getPublicKeys() { - KeyStore keyStore = keyStoreService.createKeyStore(keyStoreAuth, KeyStoreType.DEFAULT, null); + KeyStore keyStore = keyStoreService.createKeyStore(keyStoreAuth, KeyStoreCreationConfig.DEFAULT, null); KeyStoreAccess keyStoreAccess = new KeyStoreAccess(keyStore, keyStoreAuth); List publicKeys = keyStoreService.getPublicKeys(keyStoreAccess); @@ -79,10 +79,10 @@ void getPublicKeys() { @Test void getPrivateKey() throws Exception { - KeyStore keyStore = KeyStoreServiceImplBaseFunctions.newKeyStore(KeyStoreType.DEFAULT); // UBER + KeyStore keyStore = KeyStoreServiceImplBaseFunctions.newKeyStore(KeyStoreCreationConfig.DEFAULT); // UBER ReadKeyPassword readKeyPassword = new ReadKeyPassword("keypass"); - KeyStoreCreationConfigImpl keyStoreCreationConfig = new KeyStoreCreationConfigImpl(null); + KeyCreationConfigImpl keyStoreCreationConfig = new KeyCreationConfigImpl(null); KeyPairGenerator encKeyPairGenerator = keyStoreCreationConfig.getEncKeyPairGenerator("KEYSTORE-ID-0"); String alias = "KEYSTORE-ID-0" + UUID.randomUUID().toString(); KeyPairEntry keyPairEntry = encKeyPairGenerator.generateEncryptionKey(alias, readKeyPassword); @@ -99,7 +99,7 @@ void getPrivateKey() throws Exception { @Test void getPrivateKeyException() throws Exception { - KeyStore keyStore = keyStoreService.createKeyStore(keyStoreAuth, KeyStoreType.DEFAULT, null); + KeyStore keyStore = keyStoreService.createKeyStore(keyStoreAuth, KeyStoreCreationConfig.DEFAULT, null); KeyStoreAccess keyStoreAccess = new KeyStoreAccess(keyStore, keyStoreAuth); List list = Collections.list(keyStore.aliases()); Assertions.assertThrows(ClassCastException.class, () -> { @@ -111,8 +111,8 @@ void getPrivateKeyException() throws Exception { @Test void getSecretKey() { - KeyStoreCreationConfig config = new KeyStoreCreationConfig(0, 1); - KeyStore keyStore = keyStoreService.createKeyStore(keyStoreAuth, KeyStoreType.DEFAULT, config); + KeyCreationConfig config = new KeyCreationConfig(0, 1); + KeyStore keyStore = keyStoreService.createKeyStore(keyStoreAuth, KeyStoreCreationConfig.DEFAULT, config); KeyStoreAccess keyStoreAccess = new KeyStoreAccess(keyStore, keyStoreAuth); KeyID keyID = KeystoreUtil.keyIdByPrefix(keyStore, DOCUMENT_KEY_ID_PREFIX); diff --git a/datasafe-encryption/datasafe-encryption-impl/src/test/java/de/adorsys/datasafe/encrypiton/impl/keystore/KeyStoreTypeTest.java b/datasafe-encryption/datasafe-encryption-impl/src/test/java/de/adorsys/datasafe/encrypiton/impl/keystore/KeyStoreTypeTest.java deleted file mode 100644 index 8b03baedc..000000000 --- a/datasafe-encryption/datasafe-encryption-impl/src/test/java/de/adorsys/datasafe/encrypiton/impl/keystore/KeyStoreTypeTest.java +++ /dev/null @@ -1,35 +0,0 @@ -package de.adorsys.datasafe.encrypiton.impl.keystore; - -import de.adorsys.datasafe.encrypiton.api.types.keystore.KeyStoreType; -import de.adorsys.datasafe.types.api.shared.BaseMockitoTest; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -import java.util.UUID; - -class KeyStoreTypeTest extends BaseMockitoTest { - - @Test - void typeBySystemEnv() { - String value = this.getClass().getSimpleName() + UUID.randomUUID().toString(); - System.setProperty("SERVER_KEYSTORE_TYPE", value); - Assertions.assertEquals(value, TestableKeyStoreType.getStaticDefaultKeyStoreType().getValue()); - System.clearProperty("SERVER_KEYSTORE_TYPE"); - TestableKeyStoreType.resetType(); - } - - public static class TestableKeyStoreType extends KeyStoreType { - - public TestableKeyStoreType(String value) { - super(value); - } - - static KeyStoreType getStaticDefaultKeyStoreType() { - return KeyStoreType.getDefaultKeyStoreType(); - } - - static void resetType() { - DEFAULT = getStaticDefaultKeyStoreType(); - } - } -} diff --git a/datasafe-encryption/datasafe-encryption-impl/src/test/java/de/adorsys/datasafe/encrypiton/impl/pathencryption/SymmetricPathEncryptionServiceImplTest.java b/datasafe-encryption/datasafe-encryption-impl/src/test/java/de/adorsys/datasafe/encrypiton/impl/pathencryption/SymmetricPathEncryptionServiceImplTest.java index e90563458..bc8d1cce3 100644 --- a/datasafe-encryption/datasafe-encryption-impl/src/test/java/de/adorsys/datasafe/encrypiton/impl/pathencryption/SymmetricPathEncryptionServiceImplTest.java +++ b/datasafe-encryption/datasafe-encryption-impl/src/test/java/de/adorsys/datasafe/encrypiton/impl/pathencryption/SymmetricPathEncryptionServiceImplTest.java @@ -17,7 +17,7 @@ import java.net.URI; import java.security.KeyStore; -import static de.adorsys.datasafe.encrypiton.api.types.keystore.KeyStoreCreationConfig.PATH_KEY_ID_PREFIX_CTR; +import static de.adorsys.datasafe.encrypiton.api.types.keystore.KeyCreationConfig.PATH_KEY_ID_PREFIX_CTR; import static org.assertj.core.api.Assertions.assertThat; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertThrows; @@ -33,8 +33,8 @@ class SymmetricPathEncryptionServiceImplTest extends WithBouncyCastle { private ReadKeyPassword readKeyPassword = new ReadKeyPassword("readkeypassword"); private ReadStorePassword readStorePassword = new ReadStorePassword("readstorepassword"); private KeyStoreAuth keyStoreAuth = new KeyStoreAuth(readStorePassword, readKeyPassword); - private KeyStoreCreationConfig config = new KeyStoreCreationConfig(0, 1); - private KeyStore keyStore = keyStoreService.createKeyStore(keyStoreAuth, KeyStoreType.DEFAULT, config); + private KeyCreationConfig config = new KeyCreationConfig(0, 1); + private KeyStore keyStore = keyStoreService.createKeyStore(keyStoreAuth, KeyStoreCreationConfig.DEFAULT, config); private KeyStoreAccess keyStoreAccess = new KeyStoreAccess(keyStore, keyStoreAuth); @Test @@ -87,7 +87,7 @@ void testFailEncryptPathWithTextPath() { } private AuthPathEncryptionSecretKey pathEncryptionSecretKey() { - KeyID secretKeyId = KeystoreUtil.keyIdByPrefix(keyStore, KeyStoreCreationConfig.PATH_KEY_ID_PREFIX); + KeyID secretKeyId = KeystoreUtil.keyIdByPrefix(keyStore, KeyCreationConfig.PATH_KEY_ID_PREFIX); SecretKeySpec secretKey = keyStoreService.getSecretKey( keyStoreAccess, secretKeyId diff --git a/datasafe-rest-impl/src/main/java/de/adorsys/datasafe/rest/impl/DatasafeRestApplication.java b/datasafe-rest-impl/src/main/java/de/adorsys/datasafe/rest/impl/DatasafeRestApplication.java index 6fb6e0dc4..e27a622f3 100644 --- a/datasafe-rest-impl/src/main/java/de/adorsys/datasafe/rest/impl/DatasafeRestApplication.java +++ b/datasafe-rest-impl/src/main/java/de/adorsys/datasafe/rest/impl/DatasafeRestApplication.java @@ -1,6 +1,7 @@ package de.adorsys.datasafe.rest.impl; import de.adorsys.datasafe.rest.impl.config.DatasafeProperties; +import de.adorsys.datasafe.rest.impl.config.KeystoreProperties; import de.adorsys.datasafe.rest.impl.security.SecurityProperties; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.EnableAutoConfiguration; @@ -11,7 +12,7 @@ import org.springframework.boot.context.properties.EnableConfigurationProperties; @SpringBootApplication -@EnableConfigurationProperties({DatasafeProperties.class, SecurityProperties.class}) +@EnableConfigurationProperties({DatasafeProperties.class, SecurityProperties.class, KeystoreProperties.class}) @EnableAutoConfiguration(exclude = {DataSourceAutoConfiguration.class, DataSourceTransactionManagerAutoConfiguration.class, HibernateJpaAutoConfiguration.class}) public class DatasafeRestApplication { diff --git a/datasafe-rest-impl/src/main/java/de/adorsys/datasafe/rest/impl/config/DatasafeConfig.java b/datasafe-rest-impl/src/main/java/de/adorsys/datasafe/rest/impl/config/DatasafeConfig.java index d30a654ee..32da6207f 100644 --- a/datasafe-rest-impl/src/main/java/de/adorsys/datasafe/rest/impl/config/DatasafeConfig.java +++ b/datasafe-rest-impl/src/main/java/de/adorsys/datasafe/rest/impl/config/DatasafeConfig.java @@ -20,6 +20,7 @@ import de.adorsys.datasafe.directory.impl.profile.dfs.BucketAccessServiceImpl; import de.adorsys.datasafe.directory.impl.profile.dfs.BucketAccessServiceImplRuntimeDelegatable; import de.adorsys.datasafe.directory.impl.profile.dfs.RegexAccessServiceWithStorageCredentialsImpl; +import de.adorsys.datasafe.encrypiton.api.types.keystore.KeyStoreCreationConfig; import de.adorsys.datasafe.storage.api.RegexDelegatingStorage; import de.adorsys.datasafe.storage.api.SchemeDelegatingStorage; import de.adorsys.datasafe.storage.api.StorageService; @@ -33,8 +34,12 @@ import de.adorsys.datasafe.types.api.context.BaseOverridesRegistry; import de.adorsys.datasafe.types.api.context.overrides.OverridesRegistry; import de.adorsys.datasafe.types.api.utils.ExecutorServiceUtil; +import lombok.SneakyThrows; import lombok.experimental.Delegate; import lombok.extern.slf4j.Slf4j; +import org.bouncycastle.asn1.x509.AlgorithmIdentifier; +import org.bouncycastle.crypto.util.PBKDF2Config; +import org.bouncycastle.jcajce.BCFKSLoadStoreParameter; import org.bouncycastle.jce.provider.BouncyCastleProvider; import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean; import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; @@ -250,6 +255,17 @@ AmazonS3 s3(DatasafeProperties properties) { return amazonS3; } + @Bean + @SneakyThrows + KeyStoreCreationConfig keystoreConfig(KeystoreProperties kp) { + AlgorithmIdentifier prf = (AlgorithmIdentifier) PBKDF2Config.class.getDeclaredField(kp.getPrfAlgorithm()).get(PBKDF2Config.class); + return KeyStoreCreationConfig.builder() + .storeEncryptionAlgorithm(BCFKSLoadStoreParameter.EncryptionAlgorithm.valueOf(kp.getEncAlgorithm())) + .storePBKDFConfig(new PBKDF2Config.Builder().withPRF(prf).build()) + .storeMacAlgorithm(BCFKSLoadStoreParameter.MacAlgorithm.valueOf(kp.getMacAlgorithm())) + .build(); + } + private static class WithAccessCredentials extends BucketAccessServiceImpl { @Delegate diff --git a/datasafe-rest-impl/src/main/java/de/adorsys/datasafe/rest/impl/config/KeystoreProperties.java b/datasafe-rest-impl/src/main/java/de/adorsys/datasafe/rest/impl/config/KeystoreProperties.java new file mode 100644 index 000000000..c9d5d8c5d --- /dev/null +++ b/datasafe-rest-impl/src/main/java/de/adorsys/datasafe/rest/impl/config/KeystoreProperties.java @@ -0,0 +1,12 @@ +package de.adorsys.datasafe.rest.impl.config; + +import lombok.Data; +import org.springframework.boot.context.properties.ConfigurationProperties; + +@ConfigurationProperties(prefix = "keystore") +@Data +public class KeystoreProperties { + private String encAlgorithm; + private String prfAlgorithm; + private String macAlgorithm; +} diff --git a/datasafe-rest-impl/src/main/resources/application.properties b/datasafe-rest-impl/src/main/resources/application.properties index 222fcfafb..9401396db 100644 --- a/datasafe-rest-impl/src/main/resources/application.properties +++ b/datasafe-rest-impl/src/main/resources/application.properties @@ -30,3 +30,7 @@ datasafe.dbUsername=${MYSQL_USER} datasafe.dbPassword=${MYSQL_PASSWORD} spring.liquibase.enabled=false + +keystore.encAlgorithm=AES256_KWP +keystore.prfAlgorithm=PRF_SHA512 +keystore.macAlgorithm=HmacSHA3_512 diff --git a/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/main/java/de/adorsys/datasafe/simple/adapter/impl/legacy/directory/LegacyDFSPrivateKeyServiceImpl.java b/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/main/java/de/adorsys/datasafe/simple/adapter/impl/legacy/directory/LegacyDFSPrivateKeyServiceImpl.java index b51b1ff08..1c12ed17d 100644 --- a/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/main/java/de/adorsys/datasafe/simple/adapter/impl/legacy/directory/LegacyDFSPrivateKeyServiceImpl.java +++ b/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/main/java/de/adorsys/datasafe/simple/adapter/impl/legacy/directory/LegacyDFSPrivateKeyServiceImpl.java @@ -8,7 +8,7 @@ import javax.inject.Inject; -import static de.adorsys.datasafe.encrypiton.api.types.keystore.KeyStoreCreationConfig.PATH_KEY_ID_PREFIX; +import static de.adorsys.datasafe.encrypiton.api.types.keystore.KeyCreationConfig.PATH_KEY_ID_PREFIX; /** * Retrieves and opens private keystore associated with user location DFS storage. diff --git a/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/test/java/de/adorsys/datasafe/simple/adapter/impl/legacy/LegacySymmetricPathEncryptionServiceImplTest.java b/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/test/java/de/adorsys/datasafe/simple/adapter/impl/legacy/LegacySymmetricPathEncryptionServiceImplTest.java index 837105068..b160eaa49 100644 --- a/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/test/java/de/adorsys/datasafe/simple/adapter/impl/legacy/LegacySymmetricPathEncryptionServiceImplTest.java +++ b/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/test/java/de/adorsys/datasafe/simple/adapter/impl/legacy/LegacySymmetricPathEncryptionServiceImplTest.java @@ -20,7 +20,7 @@ import java.net.URISyntaxException; import java.security.KeyStore; -import static de.adorsys.datasafe.encrypiton.api.types.keystore.KeyStoreCreationConfig.PATH_KEY_ID_PREFIX; +import static de.adorsys.datasafe.encrypiton.api.types.keystore.KeyCreationConfig.PATH_KEY_ID_PREFIX; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertThrows; @@ -35,8 +35,8 @@ class LegacySymmetricPathEncryptionServiceImplTest extends WithBouncyCastle { private ReadKeyPassword readKeyPassword = new ReadKeyPassword("readkeypassword"); private ReadStorePassword readStorePassword = new ReadStorePassword("readstorepassword"); private KeyStoreAuth keyStoreAuth = new KeyStoreAuth(readStorePassword, readKeyPassword); - private KeyStoreCreationConfig config = new KeyStoreCreationConfig(0, 1); - private KeyStore keyStore = keyStoreService.createKeyStore(keyStoreAuth, KeyStoreType.DEFAULT, config); + private KeyCreationConfig config = new KeyCreationConfig(0, 1); + private KeyStore keyStore = keyStoreService.createKeyStore(keyStoreAuth, KeyStoreCreationConfig.DEFAULT, config); private KeyStoreAccess keyStoreAccess = new KeyStoreAccess(keyStore, keyStoreAuth); @Test diff --git a/pom.xml b/pom.xml index 1b03a17a9..2cf63f1ac 100644 --- a/pom.xml +++ b/pom.xml @@ -84,7 +84,7 @@ 3.1.1 1.18.6 3.5 - 1.58 + 1.63 2.8.5 2.17 27.0.1-jre From a4a9c55bce2ea8fa9eb3f83912094dd6fe7ef39a Mon Sep 17 00:00:00 2001 From: Maxim Grischenko Date: Thu, 10 Oct 2019 10:54:48 +0200 Subject: [PATCH 180/255] test fix --- .../datasafe/encrypiton/impl/keystore/KeyStoreServiceImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/keystore/KeyStoreServiceImpl.java b/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/keystore/KeyStoreServiceImpl.java index 7c1b157cd..fc3f6e453 100644 --- a/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/keystore/KeyStoreServiceImpl.java +++ b/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/keystore/KeyStoreServiceImpl.java @@ -149,7 +149,7 @@ public void addPasswordBasedSecretKey(KeyStoreAccess keyStoreAccess, String alia alias, key, keyStoreAccess.getKeyStoreAuth().getReadKeyPassword().getValue().toCharArray(), - new Certificate[0] + null ); } From fa683a33e4b64397c160d5e78eadce03796ffea4 Mon Sep 17 00:00:00 2001 From: psp Date: Thu, 10 Oct 2019 16:12:33 +0200 Subject: [PATCH 181/255] DOC-279 update --- datasafe-encryption/datasafe-encryption-api/pom.xml | 1 + .../datasafe/simple/adapter/impl/SimpleDatasafeServiceImpl.java | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/datasafe-encryption/datasafe-encryption-api/pom.xml b/datasafe-encryption/datasafe-encryption-api/pom.xml index e30fc586f..5caaf2369 100644 --- a/datasafe-encryption/datasafe-encryption-api/pom.xml +++ b/datasafe-encryption/datasafe-encryption-api/pom.xml @@ -21,6 +21,7 @@ org.slf4j slf4j-simple + test diff --git a/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/main/java/de/adorsys/datasafe/simple/adapter/impl/SimpleDatasafeServiceImpl.java b/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/main/java/de/adorsys/datasafe/simple/adapter/impl/SimpleDatasafeServiceImpl.java index 2e21edd8e..283ce5fdc 100644 --- a/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/main/java/de/adorsys/datasafe/simple/adapter/impl/SimpleDatasafeServiceImpl.java +++ b/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/main/java/de/adorsys/datasafe/simple/adapter/impl/SimpleDatasafeServiceImpl.java @@ -81,7 +81,6 @@ public SimpleDatasafeServiceImpl(DFSCredentials dfsCredentials) { lsf.add("url : " + amazonS3DFSCredentials.getUrl()); lsf.add("region : " + amazonS3DFSCredentials.getRegion()); lsf.add("path encryption : " + SwitchablePathEncryptionImpl.checkIsPathEncryptionToUse()); - lsf.add("region : " + amazonS3DFSCredentials.getRegion()); lsf.add("no https : " + amazonS3DFSCredentials.isNoHttps()); lsf.add("threadpool size : " + amazonS3DFSCredentials.getThreadPoolSize()); log.info(lsf.toString()); From 2edf97fd61d99b7ff99bf309460f65519397457c Mon Sep 17 00:00:00 2001 From: psp Date: Thu, 10 Oct 2019 17:11:02 +0200 Subject: [PATCH 182/255] compileable and testsable --- .../impl/profile/config/DFSConfigWithStorageCreds.java | 4 ---- .../directory/impl/profile/config/DefaultDFSConfig.java | 5 ++--- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/config/DFSConfigWithStorageCreds.java b/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/config/DFSConfigWithStorageCreds.java index 90e568d1d..299cc5a78 100644 --- a/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/config/DFSConfigWithStorageCreds.java +++ b/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/config/DFSConfigWithStorageCreds.java @@ -26,10 +26,6 @@ public DFSConfigWithStorageCreds(Uri systemRoot, ReadStorePassword systemPasswor super(systemRoot, systemPassword); } - public DFSConfigWithStorageCreds(Uri systemRoot, String systemPassword, UserProfileLocation userProfileLocation) { - super(systemRoot, systemPassword, userProfileLocation); - } - @Override public CreateUserPrivateProfile defaultPrivateTemplate(UserIDAuth id) { CreateUserPrivateProfile base = super.defaultPrivateTemplate(id); diff --git a/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/config/DefaultDFSConfig.java b/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/config/DefaultDFSConfig.java index 25398c9e7..697052f95 100644 --- a/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/config/DefaultDFSConfig.java +++ b/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/config/DefaultDFSConfig.java @@ -19,7 +19,6 @@ * Default DFS folders layout provider, suitable both for s3 and filesystem. */ @Slf4j -@RequiredArgsConstructor public class DefaultDFSConfig implements DFSConfig { protected static final String USERS_ROOT = "users/"; @@ -66,10 +65,10 @@ public DefaultDFSConfig(Uri systemRoot, ReadStorePassword systemPassword) { * @param systemPassword System password to open keystore * @param userProfileLocation Bootstrap for user profile files placement */ - public DefaultDFSConfig(Uri systemRoot, String systemPassword, UserProfileLocation userProfileLocation) { + public DefaultDFSConfig(Uri systemRoot, ReadStorePassword systemPassword, UserProfileLocation userProfileLocation) { systemRoot = addTrailingSlashIfNeeded(systemRoot); this.systemRoot = systemRoot; - this.systemPassword = new ReadStorePassword(systemPassword); + this.systemPassword = systemPassword; this.userProfileLocation = userProfileLocation; log.debug("Root is {}", dfsRoot()); } From 51c22709a7186d2a0d569c92e94db7457767e64f Mon Sep 17 00:00:00 2001 From: Maxim Grischenko Date: Thu, 10 Oct 2019 17:45:23 +0200 Subject: [PATCH 183/255] keystore config optional binding --- .../impl/keystore/DefaultKeyStoreModule.java | 6 ++++++ .../business/impl/e2e/KeystoreE2ETest.java | 2 +- .../impl/keystore/KeyStoreGenerator.java | 2 +- .../impl/keystore/KeyStoreServiceImpl.java | 7 +++++-- .../impl/keystore/generator/KeystoreBuilder.java | 2 +- .../CmsEncryptionServiceImplTest.java | 2 +- .../impl/cmsencryption/SymetricEncryptionTest.java | 6 +++--- .../impl/keystore/KeyStoreServiceTest.java | 14 +++++++------- .../SymmetricPathEncryptionServiceImplTest.java | 4 ++-- ...gacySymmetricPathEncryptionServiceImplTest.java | 2 +- 10 files changed, 28 insertions(+), 19 deletions(-) diff --git a/datasafe-business/src/main/java/de/adorsys/datasafe/business/impl/keystore/DefaultKeyStoreModule.java b/datasafe-business/src/main/java/de/adorsys/datasafe/business/impl/keystore/DefaultKeyStoreModule.java index 7be68b857..7ad38f61f 100644 --- a/datasafe-business/src/main/java/de/adorsys/datasafe/business/impl/keystore/DefaultKeyStoreModule.java +++ b/datasafe-business/src/main/java/de/adorsys/datasafe/business/impl/keystore/DefaultKeyStoreModule.java @@ -1,12 +1,14 @@ package de.adorsys.datasafe.business.impl.keystore; import dagger.Binds; +import dagger.BindsOptionalOf; import dagger.Module; import de.adorsys.datasafe.encrypiton.api.keystore.KeyStoreService; import de.adorsys.datasafe.encrypiton.api.keystore.PublicKeySerde; import de.adorsys.datasafe.encrypiton.impl.keystore.DefaultPasswordBasedKeyConfigRuntimeDelegatable; import de.adorsys.datasafe.encrypiton.impl.keystore.KeyStoreServiceImplRuntimeDelegatable; import de.adorsys.datasafe.encrypiton.impl.keystore.PublicKeySerdeImplRuntimeDelegatable; +import de.adorsys.datasafe.encrypiton.api.types.keystore.KeyStoreCreationConfig; import de.adorsys.datasafe.encrypiton.impl.keystore.types.PasswordBasedKeyConfig; /** @@ -29,4 +31,8 @@ public abstract class DefaultKeyStoreModule { @Binds public abstract PasswordBasedKeyConfig passwordBasedKeyConfig(DefaultPasswordBasedKeyConfigRuntimeDelegatable impl); + + @BindsOptionalOf + public abstract KeyStoreCreationConfig keyStoreCreationConfig(); + } diff --git a/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/KeystoreE2ETest.java b/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/KeystoreE2ETest.java index 8be7b8ac1..9f2097116 100644 --- a/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/KeystoreE2ETest.java +++ b/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/KeystoreE2ETest.java @@ -58,7 +58,7 @@ void testDefaultKeystoreHasProperKeys() { URI keystorePath = datasafeServices.userProfile().privateProfile(auth) .getKeystore().location().asURI(); - KeyStoreServiceImpl keyStoreService = new KeyStoreServiceImpl(new DefaultPasswordBasedKeyConfig()); + KeyStoreServiceImpl keyStoreService = new KeyStoreServiceImpl(new DefaultPasswordBasedKeyConfig(), null); KeyStore keyStore = keyStoreService.deserialize( Files.readAllBytes(Paths.get(keystorePath)), "ID", diff --git a/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/keystore/KeyStoreGenerator.java b/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/keystore/KeyStoreGenerator.java index 65ab514ed..fc19af623 100644 --- a/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/keystore/KeyStoreGenerator.java +++ b/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/keystore/KeyStoreGenerator.java @@ -62,7 +62,7 @@ public KeyStore generate() { Date startTime = new Date(); try { String keyStoreID = serverKeyPairAliasPrefix; - KeystoreBuilder keystoreBuilder = new KeystoreBuilder().withStoreType(keyStoreCreationConfig); + KeystoreBuilder keystoreBuilder = new KeystoreBuilder().withKeyStoreConfig(keyStoreCreationConfig); { KeyPairGenerator encKeyPairGenerator = config.getEncKeyPairGenerator(keyStoreID); diff --git a/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/keystore/KeyStoreServiceImpl.java b/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/keystore/KeyStoreServiceImpl.java index fc3f6e453..9284c2c41 100644 --- a/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/keystore/KeyStoreServiceImpl.java +++ b/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/keystore/KeyStoreServiceImpl.java @@ -4,6 +4,7 @@ import de.adorsys.datasafe.encrypiton.api.keystore.KeyStoreService; import de.adorsys.datasafe.encrypiton.api.types.keystore.*; import de.adorsys.datasafe.encrypiton.impl.keystore.generator.KeyStoreServiceImplBaseFunctions; +import de.adorsys.datasafe.encrypiton.api.types.keystore.KeyStoreCreationConfig; import de.adorsys.datasafe.encrypiton.impl.keystore.types.PasswordBasedKeyConfig; import de.adorsys.datasafe.types.api.context.annotations.RuntimeDelegate; import lombok.SneakyThrows; @@ -17,7 +18,6 @@ import java.security.Key; import java.security.KeyStore; import java.security.PrivateKey; -import java.security.cert.Certificate; import java.security.cert.X509Certificate; import java.util.*; @@ -28,10 +28,13 @@ public class KeyStoreServiceImpl implements KeyStoreService { private final PasswordBasedKeyConfig passwordBasedKeyConfig; + private final Optional keyStoreCreationConfig; @Inject - public KeyStoreServiceImpl(PasswordBasedKeyConfig passwordBasedKeyConfig) { + public KeyStoreServiceImpl(PasswordBasedKeyConfig passwordBasedKeyConfig, + Optional keyStoreCreationConfig) { this.passwordBasedKeyConfig = passwordBasedKeyConfig; + this.keyStoreCreationConfig = keyStoreCreationConfig; } @Override diff --git a/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/keystore/generator/KeystoreBuilder.java b/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/keystore/generator/KeystoreBuilder.java index 4ca55157b..6403f7a4d 100644 --- a/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/keystore/generator/KeystoreBuilder.java +++ b/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/keystore/generator/KeystoreBuilder.java @@ -11,7 +11,7 @@ public class KeystoreBuilder { private KeyStoreCreationConfig keyStoreConfig; private Map keyEntries = new HashMap<>(); - public KeystoreBuilder withStoreType(KeyStoreCreationConfig keyStoreConfig) { + public KeystoreBuilder withKeyStoreConfig(KeyStoreCreationConfig keyStoreConfig) { this.keyStoreConfig = keyStoreConfig; return this; } diff --git a/datasafe-encryption/datasafe-encryption-impl/src/test/java/de/adorsys/datasafe/encrypiton/impl/cmsencryption/CmsEncryptionServiceImplTest.java b/datasafe-encryption/datasafe-encryption-impl/src/test/java/de/adorsys/datasafe/encrypiton/impl/cmsencryption/CmsEncryptionServiceImplTest.java index 2a2c00c37..17c13f3c1 100644 --- a/datasafe-encryption/datasafe-encryption-impl/src/test/java/de/adorsys/datasafe/encrypiton/impl/cmsencryption/CmsEncryptionServiceImplTest.java +++ b/datasafe-encryption/datasafe-encryption-impl/src/test/java/de/adorsys/datasafe/encrypiton/impl/cmsencryption/CmsEncryptionServiceImplTest.java @@ -43,7 +43,7 @@ class CmsEncryptionServiceImplTest extends WithBouncyCastle { private static final String TEST_MESSAGE_CONTENT = "message content"; private static KeyStoreAccess keyStoreAccess; - private static KeyStoreService keyStoreService = new KeyStoreServiceImpl(new DefaultPasswordBasedKeyConfig()); + private static KeyStoreService keyStoreService = new KeyStoreServiceImpl(new DefaultPasswordBasedKeyConfig(), null); private CMSEncryptionService cmsEncryptionService = new CMSEncryptionServiceImpl(new DefaultCMSEncryptionConfig()); diff --git a/datasafe-encryption/datasafe-encryption-impl/src/test/java/de/adorsys/datasafe/encrypiton/impl/cmsencryption/SymetricEncryptionTest.java b/datasafe-encryption/datasafe-encryption-impl/src/test/java/de/adorsys/datasafe/encrypiton/impl/cmsencryption/SymetricEncryptionTest.java index 59e60c4d4..77c282084 100644 --- a/datasafe-encryption/datasafe-encryption-impl/src/test/java/de/adorsys/datasafe/encrypiton/impl/cmsencryption/SymetricEncryptionTest.java +++ b/datasafe-encryption/datasafe-encryption-impl/src/test/java/de/adorsys/datasafe/encrypiton/impl/cmsencryption/SymetricEncryptionTest.java @@ -31,12 +31,12 @@ class SymetricEncryptionTest extends WithBouncyCastle { private static final String MESSAGE_CONTENT = "message content"; private CMSEncryptionService cmsEncryptionService = new CMSEncryptionServiceImpl(new DefaultCMSEncryptionConfig()); - private KeyStoreService keyStoreService = new KeyStoreServiceImpl(new DefaultPasswordBasedKeyConfig()); + private KeyStoreService keyStoreService = new KeyStoreServiceImpl(new DefaultPasswordBasedKeyConfig(), null); private ReadKeyPassword readKeyPassword = new ReadKeyPassword("readkeypassword"); private ReadStorePassword readStorePassword = new ReadStorePassword("readstorepassword"); private KeyStoreAuth keyStoreAuth = new KeyStoreAuth(readStorePassword, readKeyPassword); private KeyCreationConfig config = new KeyCreationConfig(1, 1); - private KeyStore keyStore = keyStoreService.createKeyStore(keyStoreAuth, KeyStoreCreationConfig.DEFAULT, config); + private KeyStore keyStore = keyStoreService.createKeyStore(keyStoreAuth, null, config); private KeyStoreAccess keyStoreAccess = new KeyStoreAccess(keyStore, keyStoreAuth); @Test @@ -64,7 +64,7 @@ void symetricStreamEncryptAndDecryptTest() { @SneakyThrows void symetricNegativeStreamEncryptAndDecryptTest() { // This is the keystore we use to encrypt, it has SYMM_KEY_ID and PATH_KEY_ID symm. keys. - keyStoreService.createKeyStore(keyStoreAuth, KeyStoreCreationConfig.DEFAULT, config); + keyStoreService.createKeyStore(keyStoreAuth, null, config); SecretKey realSecretKey = keyStoreService.getSecretKey(keyStoreAccess, keyIdByPrefix(DOCUMENT_KEY_ID_PREFIX)); ByteArrayOutputStream outputStream = new ByteArrayOutputStream(); // Test consist in encrypting with real secret key, but use fake secretKeyId - PATH_KEY_ID diff --git a/datasafe-encryption/datasafe-encryption-impl/src/test/java/de/adorsys/datasafe/encrypiton/impl/keystore/KeyStoreServiceTest.java b/datasafe-encryption/datasafe-encryption-impl/src/test/java/de/adorsys/datasafe/encrypiton/impl/keystore/KeyStoreServiceTest.java index 8a7e28031..80def7656 100644 --- a/datasafe-encryption/datasafe-encryption-impl/src/test/java/de/adorsys/datasafe/encrypiton/impl/keystore/KeyStoreServiceTest.java +++ b/datasafe-encryption/datasafe-encryption-impl/src/test/java/de/adorsys/datasafe/encrypiton/impl/keystore/KeyStoreServiceTest.java @@ -25,7 +25,7 @@ class KeyStoreServiceTest extends WithBouncyCastle { - private KeyStoreService keyStoreService = new KeyStoreServiceImpl(new DefaultPasswordBasedKeyConfig()); + private KeyStoreService keyStoreService = new KeyStoreServiceImpl(new DefaultPasswordBasedKeyConfig(), null); private KeyStoreAuth keyStoreAuth; @BeforeEach @@ -38,7 +38,7 @@ void setUp() { @Test void createKeyStore() throws Exception { KeyCreationConfig config = new KeyCreationConfig(0, 1); - KeyStore keyStore = keyStoreService.createKeyStore(keyStoreAuth, KeyStoreCreationConfig.DEFAULT, config); + KeyStore keyStore = keyStoreService.createKeyStore(keyStoreAuth, null, config); Assertions.assertNotNull(keyStore); @@ -52,7 +52,7 @@ void createKeyStore() throws Exception { @Test void createKeyStoreEmptyConfig() throws Exception { - KeyStore keyStore = keyStoreService.createKeyStore(keyStoreAuth, KeyStoreCreationConfig.DEFAULT, null); + KeyStore keyStore = keyStoreService.createKeyStore(keyStoreAuth, null, null); Assertions.assertNotNull(keyStore); List list = Collections.list(keyStore.aliases()); // One additional secret key being generated for path encryption and one for private doc encryption. @@ -64,13 +64,13 @@ void createKeyStoreException() { KeyCreationConfig config = new KeyCreationConfig(0, 0); Assertions.assertThrows(KeyStoreConfigException.class, () -> - keyStoreService.createKeyStore(keyStoreAuth, KeyStoreCreationConfig.DEFAULT, config, Collections.emptyMap()) + keyStoreService.createKeyStore(keyStoreAuth, null, config, Collections.emptyMap()) ); } @Test void getPublicKeys() { - KeyStore keyStore = keyStoreService.createKeyStore(keyStoreAuth, KeyStoreCreationConfig.DEFAULT, null); + KeyStore keyStore = keyStoreService.createKeyStore(keyStoreAuth, null, null); KeyStoreAccess keyStoreAccess = new KeyStoreAccess(keyStore, keyStoreAuth); List publicKeys = keyStoreService.getPublicKeys(keyStoreAccess); @@ -99,7 +99,7 @@ void getPrivateKey() throws Exception { @Test void getPrivateKeyException() throws Exception { - KeyStore keyStore = keyStoreService.createKeyStore(keyStoreAuth, KeyStoreCreationConfig.DEFAULT, null); + KeyStore keyStore = keyStoreService.createKeyStore(keyStoreAuth, null, null); KeyStoreAccess keyStoreAccess = new KeyStoreAccess(keyStore, keyStoreAuth); List list = Collections.list(keyStore.aliases()); Assertions.assertThrows(ClassCastException.class, () -> { @@ -112,7 +112,7 @@ void getPrivateKeyException() throws Exception { @Test void getSecretKey() { KeyCreationConfig config = new KeyCreationConfig(0, 1); - KeyStore keyStore = keyStoreService.createKeyStore(keyStoreAuth, KeyStoreCreationConfig.DEFAULT, config); + KeyStore keyStore = keyStoreService.createKeyStore(keyStoreAuth, null, config); KeyStoreAccess keyStoreAccess = new KeyStoreAccess(keyStore, keyStoreAuth); KeyID keyID = KeystoreUtil.keyIdByPrefix(keyStore, DOCUMENT_KEY_ID_PREFIX); diff --git a/datasafe-encryption/datasafe-encryption-impl/src/test/java/de/adorsys/datasafe/encrypiton/impl/pathencryption/SymmetricPathEncryptionServiceImplTest.java b/datasafe-encryption/datasafe-encryption-impl/src/test/java/de/adorsys/datasafe/encrypiton/impl/pathencryption/SymmetricPathEncryptionServiceImplTest.java index bc8d1cce3..fee4f109d 100644 --- a/datasafe-encryption/datasafe-encryption-impl/src/test/java/de/adorsys/datasafe/encrypiton/impl/pathencryption/SymmetricPathEncryptionServiceImplTest.java +++ b/datasafe-encryption/datasafe-encryption-impl/src/test/java/de/adorsys/datasafe/encrypiton/impl/pathencryption/SymmetricPathEncryptionServiceImplTest.java @@ -29,12 +29,12 @@ class SymmetricPathEncryptionServiceImplTest extends WithBouncyCastle { new DefaultPathEncryptorDecryptor(new SivMode()) ); - private KeyStoreService keyStoreService = new KeyStoreServiceImpl(new DefaultPasswordBasedKeyConfig()); + private KeyStoreService keyStoreService = new KeyStoreServiceImpl(new DefaultPasswordBasedKeyConfig(), null); private ReadKeyPassword readKeyPassword = new ReadKeyPassword("readkeypassword"); private ReadStorePassword readStorePassword = new ReadStorePassword("readstorepassword"); private KeyStoreAuth keyStoreAuth = new KeyStoreAuth(readStorePassword, readKeyPassword); private KeyCreationConfig config = new KeyCreationConfig(0, 1); - private KeyStore keyStore = keyStoreService.createKeyStore(keyStoreAuth, KeyStoreCreationConfig.DEFAULT, config); + private KeyStore keyStore = keyStoreService.createKeyStore(keyStoreAuth, null, config); private KeyStoreAccess keyStoreAccess = new KeyStoreAccess(keyStore, keyStoreAuth); @Test diff --git a/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/test/java/de/adorsys/datasafe/simple/adapter/impl/legacy/LegacySymmetricPathEncryptionServiceImplTest.java b/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/test/java/de/adorsys/datasafe/simple/adapter/impl/legacy/LegacySymmetricPathEncryptionServiceImplTest.java index b160eaa49..00a2eaf81 100644 --- a/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/test/java/de/adorsys/datasafe/simple/adapter/impl/legacy/LegacySymmetricPathEncryptionServiceImplTest.java +++ b/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/test/java/de/adorsys/datasafe/simple/adapter/impl/legacy/LegacySymmetricPathEncryptionServiceImplTest.java @@ -31,7 +31,7 @@ class LegacySymmetricPathEncryptionServiceImplTest extends WithBouncyCastle { new LegacyPathEncryptor(new LegacyPathDigestConfig()) ); - private KeyStoreService keyStoreService = new KeyStoreServiceImpl(new DefaultPasswordBasedKeyConfig()); + private KeyStoreService keyStoreService = new KeyStoreServiceImpl(new DefaultPasswordBasedKeyConfig(), null); private ReadKeyPassword readKeyPassword = new ReadKeyPassword("readkeypassword"); private ReadStorePassword readStorePassword = new ReadStorePassword("readstorepassword"); private KeyStoreAuth keyStoreAuth = new KeyStoreAuth(readStorePassword, readKeyPassword); From 523d3abe19b7c3a088f74c3364c8ffb731d72db9 Mon Sep 17 00:00:00 2001 From: Maxim Grischenko Date: Thu, 10 Oct 2019 18:08:41 +0200 Subject: [PATCH 184/255] tests fix --- .../types/keystore/KeyStoreCreationConfig.java | 10 ++++++---- .../KeyStoreServiceImplBaseFunctions.java | 18 +++++++++--------- 2 files changed, 15 insertions(+), 13 deletions(-) diff --git a/datasafe-encryption/datasafe-encryption-api/src/main/java/de/adorsys/datasafe/encrypiton/api/types/keystore/KeyStoreCreationConfig.java b/datasafe-encryption/datasafe-encryption-api/src/main/java/de/adorsys/datasafe/encrypiton/api/types/keystore/KeyStoreCreationConfig.java index 135d9bb35..b14b3aae5 100644 --- a/datasafe-encryption/datasafe-encryption-api/src/main/java/de/adorsys/datasafe/encrypiton/api/types/keystore/KeyStoreCreationConfig.java +++ b/datasafe-encryption/datasafe-encryption-api/src/main/java/de/adorsys/datasafe/encrypiton/api/types/keystore/KeyStoreCreationConfig.java @@ -15,15 +15,17 @@ public class KeyStoreCreationConfig { public static KeyStoreCreationConfig DEFAULT = getDefaultConfig(); + private String keyStoreType; private BCFKSLoadStoreParameter.EncryptionAlgorithm storeEncryptionAlgorithm; private PBKDF2Config storePBKDFConfig; private BCFKSLoadStoreParameter.MacAlgorithm storeMacAlgorithm; private static KeyStoreCreationConfig getDefaultConfig() { return KeyStoreCreationConfig.builder() - .storeEncryptionAlgorithm(BCFKSLoadStoreParameter.EncryptionAlgorithm.AES256_KWP) - .storePBKDFConfig(new PBKDF2Config.Builder().withPRF(PRF_SHA512).build()) - .storeMacAlgorithm(BCFKSLoadStoreParameter.MacAlgorithm.HmacSHA3_512) - .build(); + .keyStoreType("BCFKS") + .storeEncryptionAlgorithm(BCFKSLoadStoreParameter.EncryptionAlgorithm.AES256_KWP) + .storePBKDFConfig(new PBKDF2Config.Builder().withPRF(PRF_SHA512).build()) + .storeMacAlgorithm(BCFKSLoadStoreParameter.MacAlgorithm.HmacSHA3_512) + .build(); } } diff --git a/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/keystore/generator/KeyStoreServiceImplBaseFunctions.java b/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/keystore/generator/KeyStoreServiceImplBaseFunctions.java index b3644dc3e..1857a2c5a 100644 --- a/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/keystore/generator/KeyStoreServiceImplBaseFunctions.java +++ b/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/keystore/generator/KeyStoreServiceImplBaseFunctions.java @@ -23,8 +23,6 @@ */ public class KeyStoreServiceImplBaseFunctions { - public static final String KEYSTORE_TYPE = "BCFKS"; - private KeyStoreServiceImplBaseFunctions() { throw new IllegalStateException("Not supported"); } @@ -37,7 +35,8 @@ private KeyStoreServiceImplBaseFunctions() { */ @SneakyThrows public static KeyStore newKeyStore(KeyStoreCreationConfig keyStoreConfig) { - KeyStore ks = KeyStore.getInstance(KEYSTORE_TYPE); + if (keyStoreConfig == null) keyStoreConfig = KeyStoreCreationConfig.DEFAULT; + KeyStore ks = KeyStore.getInstance(keyStoreConfig.getKeyStoreType()); ks.load(new BCFKSLoadStoreParameter.Builder() .withStoreEncryptionAlgorithm(keyStoreConfig.getStoreEncryptionAlgorithm()) .withStorePBKDFConfig(keyStoreConfig.getStorePBKDFConfig()) @@ -51,7 +50,6 @@ public static KeyStore newKeyStore(KeyStoreCreationConfig keyStoreConfig) { * Write this key store into a byte array * * @param keystore keystore - * @param storeId storeId * @return key store byte array */ @SneakyThrows @@ -65,16 +63,17 @@ public static byte[] toByteArray(KeyStore keystore, String storeId, ReadStorePas * Loads a key store. Given the store bytes, the store type * * @param in : the inputStream location which to read the keystore - * @param storeId : The store id. This is passed to the callback handler to identify the requested password record. * @param keyStoreConfig : the type of this key store. f null, the defaut java keystore type is used. * @return KeyStore */ @SneakyThrows - public static KeyStore loadKeyStore(InputStream in, String storeId, KeyStoreCreationConfig keyStoreConfig, ReadStorePassword readStorePassword) { + public static KeyStore loadKeyStore(InputStream in, String storeId, + KeyStoreCreationConfig keyStoreConfig, + ReadStorePassword readStorePassword) { // Use default if blank. if (keyStoreConfig == null) keyStoreConfig = KeyStoreCreationConfig.DEFAULT; - KeyStore ks = KeyStore.getInstance(KEYSTORE_TYPE); + KeyStore ks = KeyStore.getInstance(keyStoreConfig.getKeyStoreType()); ks.load(in, readStorePassword.getValue().toCharArray()); return ks; @@ -82,11 +81,12 @@ public static KeyStore loadKeyStore(InputStream in, String storeId, KeyStoreCrea /** * @param data : the byte array containing key store data. - * @param storeId : The store id. This is passed to the callback handler to identify the requested password record. * @param keyStoreCreationConfig : the type of this key store. f null, the defaut java keystore type is used. * @return KeyStore */ - public static KeyStore loadKeyStore(byte[] data, String storeId, KeyStoreCreationConfig keyStoreCreationConfig, ReadStorePassword readStorePassword) { + public static KeyStore loadKeyStore(byte[] data, String storeId, + KeyStoreCreationConfig keyStoreCreationConfig, + ReadStorePassword readStorePassword) { return loadKeyStore(new ByteArrayInputStream(data), storeId, keyStoreCreationConfig, readStorePassword); } From 55d6503973901d2230ba9188e1033074050d0635 Mon Sep 17 00:00:00 2001 From: Maxim Grischenko Date: Thu, 10 Oct 2019 19:02:08 +0200 Subject: [PATCH 185/255] tests fix --- .../datasafe/encrypiton/impl/keystore/KeyStoreServiceImpl.java | 2 +- .../datasafe/simple/adapter/impl/LegacyDatasafeService.java | 3 +++ .../simple/adapter/impl/SimpleDatasafeServiceImpl.java | 3 +++ 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/keystore/KeyStoreServiceImpl.java b/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/keystore/KeyStoreServiceImpl.java index 9284c2c41..db2bf84b0 100644 --- a/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/keystore/KeyStoreServiceImpl.java +++ b/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/keystore/KeyStoreServiceImpl.java @@ -176,7 +176,7 @@ public KeyStore deserialize(byte[] payload, String storeId, ReadStorePassword re return KeyStoreServiceImplBaseFunctions.loadKeyStore( payload, storeId, - KeyStoreCreationConfig.DEFAULT, + keyStoreCreationConfig.orElse(KeyStoreCreationConfig.DEFAULT), readStorePassword ); } diff --git a/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/main/java/de/adorsys/datasafe/simple/adapter/impl/LegacyDatasafeService.java b/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/main/java/de/adorsys/datasafe/simple/adapter/impl/LegacyDatasafeService.java index 68635fbaf..7e3135cbe 100644 --- a/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/main/java/de/adorsys/datasafe/simple/adapter/impl/LegacyDatasafeService.java +++ b/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/main/java/de/adorsys/datasafe/simple/adapter/impl/LegacyDatasafeService.java @@ -9,6 +9,7 @@ import de.adorsys.datasafe.business.impl.service.DefaultDatasafeServices; import de.adorsys.datasafe.business.impl.storage.DefaultStorageModule; import de.adorsys.datasafe.directory.api.config.DFSConfig; +import de.adorsys.datasafe.encrypiton.api.types.keystore.KeyStoreCreationConfig; import de.adorsys.datasafe.simple.adapter.impl.cmsencryption.SwitchableCMSEncryptionModule; import de.adorsys.datasafe.simple.adapter.impl.pathencryption.LegacyCredentialsModule; import de.adorsys.datasafe.simple.adapter.impl.pathencryption.LegacyPathEncryptionModule; @@ -60,6 +61,8 @@ interface Builder { @BindsInstance Builder overridesRegistry(@Nullable OverridesRegistry overridesRegistry); + @BindsInstance + Builder keyStoreConfig(KeyStoreCreationConfig keyStoreCreationConfig); /** * @return Provide NEW instance of Legacy Datasafe services. All dependencies except * annotated with {@code @Singleton} will have scope analogous to Spring {code @Prototype}. diff --git a/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/main/java/de/adorsys/datasafe/simple/adapter/impl/SimpleDatasafeServiceImpl.java b/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/main/java/de/adorsys/datasafe/simple/adapter/impl/SimpleDatasafeServiceImpl.java index e48d54da6..9ad2f8fcf 100644 --- a/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/main/java/de/adorsys/datasafe/simple/adapter/impl/SimpleDatasafeServiceImpl.java +++ b/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/main/java/de/adorsys/datasafe/simple/adapter/impl/SimpleDatasafeServiceImpl.java @@ -12,6 +12,7 @@ import de.adorsys.datasafe.directory.impl.profile.config.DefaultDFSConfig; import de.adorsys.datasafe.encrypiton.api.types.UserID; import de.adorsys.datasafe.encrypiton.api.types.UserIDAuth; +import de.adorsys.datasafe.encrypiton.api.types.keystore.KeyStoreCreationConfig; import de.adorsys.datasafe.encrypiton.api.types.keystore.ReadKeyPassword; import de.adorsys.datasafe.encrypiton.api.types.keystore.ReadStorePassword; import de.adorsys.datasafe.simple.adapter.api.SimpleDatasafeService; @@ -68,6 +69,7 @@ public SimpleDatasafeServiceImpl(DFSCredentials dfsCredentials) { storageService = new FileSystemStorageService(FileSystems.getDefault().getPath(filesystemDFSCredentials.getRoot())); customlyBuiltDatasafeServices = DaggerLegacyDatasafeService.builder() .config(new DefaultDFSConfig(systemRoot, universalReadStorePassword.getValue())) + .keyStoreConfig(KeyStoreCreationConfig.builder().keyStoreType("UBER").build()) .storage(getStorageService()) .build(); @@ -132,6 +134,7 @@ public SimpleDatasafeServiceImpl(DFSCredentials dfsCredentials) { customlyBuiltDatasafeServices = DaggerLegacyDatasafeService.builder() .config(new DefaultDFSConfig(systemRoot, universalReadStorePassword.getValue())) + .keyStoreConfig(KeyStoreCreationConfig.builder().keyStoreType("UBER").build()) .storage(getStorageService()) .build(); From 1b84eb9f9d6731dd6db9bd255a4d335dd4df901b Mon Sep 17 00:00:00 2001 From: psp Date: Thu, 10 Oct 2019 20:39:16 +0200 Subject: [PATCH 186/255] DOC-279 TEST FOR READ WRITE AND DELETE with Password Clearance --- .../business/impl/e2e/BaseE2ETest.java | 6 +- .../impl/e2e/BasicFunctionalityTest.java | 56 +++++++++++++++++-- .../actions/ProfileRemovalServiceImpl.java | 1 + .../datasafe-encryption-api/pom.xml | 12 ++++ .../keystore/BaseTypePasswordString.java | 26 +++++++-- .../api/types/keystore/ReadKeyPassword.java | 23 ++++++++ .../api/types/keystore/ReadStorePassword.java | 1 + .../types/keystore/ReadKeyPasswordTest.java | 40 +++++++++++++ ...domActionsOnSimpleDatasafeAdapterTest.java | 6 ++ .../latest/LatestPrivateSpaceImpl.java | 6 ++ .../latest/actions/LatestRemoveImpl.java | 6 ++ .../api/actions/RemoveFromPrivate.java | 1 + .../impl/actions/RemoveFromPrivateImpl.java | 6 ++ .../teststorage/WithStorageProvider.java | 7 +++ 14 files changed, 188 insertions(+), 9 deletions(-) create mode 100644 datasafe-encryption/datasafe-encryption-api/src/test/java/de/adorsys/datasafe/encrypiton/api/types/keystore/ReadKeyPasswordTest.java diff --git a/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/BaseE2ETest.java b/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/BaseE2ETest.java index c02526974..f38b58f20 100644 --- a/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/BaseE2ETest.java +++ b/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/BaseE2ETest.java @@ -206,7 +206,11 @@ protected void removeFromInbox(UserIDAuth inboxOwner, PrivateResource location) } protected UserIDAuth registerUser(String userName) { - UserIDAuth auth = new UserIDAuth(new UserID(userName), new ReadKeyPassword("secure-password " + userName)); + return registerUser(userName, new ReadKeyPassword("secure-password " + userName)); + } + + protected UserIDAuth registerUser(String userName, ReadKeyPassword readKeyPassword) { + UserIDAuth auth = new UserIDAuth(new UserID(userName), readKeyPassword); profileRegistrationService.registerUsingDefaults(auth); log.info("Created user: {}", Obfuscate.secure(userName)); return auth; diff --git a/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/BasicFunctionalityTest.java b/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/BasicFunctionalityTest.java index ebd4e6036..0e2d1ab3b 100644 --- a/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/BasicFunctionalityTest.java +++ b/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/BasicFunctionalityTest.java @@ -3,15 +3,14 @@ import de.adorsys.datasafe.business.impl.service.DefaultDatasafeServices; import de.adorsys.datasafe.encrypiton.api.types.UserID; import de.adorsys.datasafe.encrypiton.api.types.UserIDAuth; +import de.adorsys.datasafe.encrypiton.api.types.keystore.ReadKeyPassword; import de.adorsys.datasafe.storage.api.StorageService; import de.adorsys.datasafe.teststorage.WithStorageProvider; import de.adorsys.datasafe.types.api.actions.ReadRequest; +import de.adorsys.datasafe.types.api.actions.RemoveRequest; import de.adorsys.datasafe.types.api.actions.WriteRequest; import de.adorsys.datasafe.types.api.global.Version; -import de.adorsys.datasafe.types.api.resource.AbsoluteLocation; -import de.adorsys.datasafe.types.api.resource.BasePrivateResource; -import de.adorsys.datasafe.types.api.resource.ResolvedResource; -import de.adorsys.datasafe.types.api.resource.Uri; +import de.adorsys.datasafe.types.api.resource.*; import lombok.SneakyThrows; import lombok.extern.slf4j.Slf4j; import org.junit.jupiter.params.ParameterizedTest; @@ -20,6 +19,8 @@ import java.io.ByteArrayInputStream; import java.io.OutputStream; +import java.security.UnrecoverableKeyException; +import java.util.Arrays; import java.util.List; import java.util.concurrent.ThreadLocalRandom; import java.util.function.Predicate; @@ -27,6 +28,7 @@ import static de.adorsys.datasafe.business.impl.e2e.Const.*; import static org.assertj.core.api.Assertions.assertThat; +import static org.junit.jupiter.api.Assertions.assertThrows; /** * Tests that validates basic functionality - storing data to inbox, privatespace, listing files, etc. @@ -39,6 +41,52 @@ class BasicFunctionalityTest extends BaseE2ETest { private StorageService storage; private Uri location; + @ParameterizedTest + @MethodSource("fsOnly") + void testDFSPasswordClearance(WithStorageProvider.StorageDescriptor descriptor) { + init(descriptor); + UserID userJohn = new UserID("john"); + assertThat(profileRetrievalService.userExists(userJohn)).isFalse(); + + String passwordString = "a password that should be nullyfied"; + char[] password = passwordString.toCharArray(); + char[] copyOfPassword = Arrays.copyOf(password, password.length); + + assertThat(Arrays.equals(password, copyOfPassword)).isTrue(); + + ReadKeyPassword readKeyPassword = new ReadKeyPassword(password); + john = registerUser(userJohn.getValue(), readKeyPassword); + assertThat(profileRetrievalService.userExists(userJohn)).isTrue(); + assertThat(profileRetrievalService.privateProfile(john).getAppVersion()).isEqualTo(Version.current()); + assertThat(profileRetrievalService.publicProfile(john.getUserID()).getAppVersion()).isEqualTo(Version.current()); + writeDataToPrivate(john, "root.txt", MESSAGE_ONE); + + assertThat(Arrays.equals(password, copyOfPassword)).isFalse(); + + assertThrows(UnrecoverableKeyException.class, () -> profileRemovalService.deregister(john)); + + // recover password + for (int i = 0; i < copyOfPassword.length; i++) { + password[i] = copyOfPassword[i]; + } + + writeDataToPrivate(john, "root.txt", MESSAGE_ONE); + // recover password + for (int i = 0; i < copyOfPassword.length; i++) { + password[i] = copyOfPassword[i]; + } + removeFromPrivate.remove(RemoveRequest.forDefaultPrivate(john, new Uri("root.txt"))); + // recover password + for (int i = 0; i < copyOfPassword.length; i++) { + password[i] = copyOfPassword[i]; + } + + profileRemovalService.deregister(john); + assertThat(Arrays.equals(password, copyOfPassword)).isFalse(); + + assertThat(profileRetrievalService.userExists(userJohn)).isFalse(); + } + @ParameterizedTest @MethodSource("allStorages") void testDFSBasedProfileStorage(WithStorageProvider.StorageDescriptor descriptor) { diff --git a/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/operations/actions/ProfileRemovalServiceImpl.java b/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/operations/actions/ProfileRemovalServiceImpl.java index f076872af..bc846f643 100644 --- a/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/operations/actions/ProfileRemovalServiceImpl.java +++ b/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/operations/actions/ProfileRemovalServiceImpl.java @@ -98,6 +98,7 @@ public void deregister(UserIDAuth userID) { keyStoreCache.remove(userID.getUserID()); log.debug("Deregistered user {}", userID); + userID.getReadKeyPassword().clear(); } protected void removeUserProfileFiles(UserID forUser) { diff --git a/datasafe-encryption/datasafe-encryption-api/pom.xml b/datasafe-encryption/datasafe-encryption-api/pom.xml index 5caaf2369..8298daa5d 100644 --- a/datasafe-encryption/datasafe-encryption-api/pom.xml +++ b/datasafe-encryption/datasafe-encryption-api/pom.xml @@ -23,6 +23,18 @@ slf4j-simple test + + org.junit.jupiter + junit-jupiter-api + test + + + org.assertj + assertj-core + test + + + diff --git a/datasafe-encryption/datasafe-encryption-api/src/main/java/de/adorsys/datasafe/encrypiton/api/types/keystore/BaseTypePasswordString.java b/datasafe-encryption/datasafe-encryption-api/src/main/java/de/adorsys/datasafe/encrypiton/api/types/keystore/BaseTypePasswordString.java index bd55a59b8..35ae3f638 100644 --- a/datasafe-encryption/datasafe-encryption-api/src/main/java/de/adorsys/datasafe/encrypiton/api/types/keystore/BaseTypePasswordString.java +++ b/datasafe-encryption/datasafe-encryption-api/src/main/java/de/adorsys/datasafe/encrypiton/api/types/keystore/BaseTypePasswordString.java @@ -1,13 +1,14 @@ package de.adorsys.datasafe.encrypiton.api.types.keystore; -import de.adorsys.datasafe.encrypiton.api.types.BaseTypeString; -import de.adorsys.datasafe.types.api.utils.Obfuscate; import lombok.EqualsAndHashCode; import lombok.Getter; import lombok.RequiredArgsConstructor; import lombok.ToString; import lombok.extern.slf4j.Slf4j; +import java.util.Arrays; +import java.util.function.Supplier; + /** * Wrapper for password sensitive data. */ @@ -31,16 +32,33 @@ public BaseTypePasswordString(String value) { } /** + * ATTENTION + *

+ * caller of method gives responsiblity of char[] + * to this class. char[] will be nullyfied + * asap (after successfull read/write/list) * - * @param value will be invalidated after usage + * @param value will be nullified asap */ public BaseTypePasswordString(char[] value) { this.value = value; } + /** + * caller of method makes sure, supplied char[] is deleted asap + * + * @param value will stay unchanged + */ + public BaseTypePasswordString(Supplier value) { + this.value = Arrays.copyOf(value.get(), value.get().length); + } + public void clear() { - log.info("CLEAR READ KEY PASSWORD"); + log.warn("CLEAR PASSWORD {}", this.getClass().getSimpleName()); + for (int i = 0; i < value.length; i++) { + value[i] = '0'; + } } @Override diff --git a/datasafe-encryption/datasafe-encryption-api/src/main/java/de/adorsys/datasafe/encrypiton/api/types/keystore/ReadKeyPassword.java b/datasafe-encryption/datasafe-encryption-api/src/main/java/de/adorsys/datasafe/encrypiton/api/types/keystore/ReadKeyPassword.java index bc5dc7c3d..0cd81d4ee 100644 --- a/datasafe-encryption/datasafe-encryption-api/src/main/java/de/adorsys/datasafe/encrypiton/api/types/keystore/ReadKeyPassword.java +++ b/datasafe-encryption/datasafe-encryption-api/src/main/java/de/adorsys/datasafe/encrypiton/api/types/keystore/ReadKeyPassword.java @@ -1,11 +1,34 @@ package de.adorsys.datasafe.encrypiton.api.types.keystore; +import java.util.function.Supplier; + /** * Wrapper for password for reading secret or private key entry. */ public class ReadKeyPassword extends BaseTypePasswordString { + @Deprecated public ReadKeyPassword(String readKeyPassword) { super(readKeyPassword); } + + /** + * caller of method makes sure, supplied char[] is deleted asap + * @param readKeyPassword will stay unchanged + */ + public ReadKeyPassword(Supplier readKeyPassword) { + super(readKeyPassword); + } + + /** + * ATTENTION + * + * caller of method gives responsiblity of char[] + * to this class. char[] will be nullyfied + * asap (after successfull read/write/list) + * @param readKeyPassword will be nullified asap + */ + public ReadKeyPassword(char[] readKeyPassword) { + super(readKeyPassword); + } } diff --git a/datasafe-encryption/datasafe-encryption-api/src/main/java/de/adorsys/datasafe/encrypiton/api/types/keystore/ReadStorePassword.java b/datasafe-encryption/datasafe-encryption-api/src/main/java/de/adorsys/datasafe/encrypiton/api/types/keystore/ReadStorePassword.java index c721bb8a7..ebfff3b37 100644 --- a/datasafe-encryption/datasafe-encryption-api/src/main/java/de/adorsys/datasafe/encrypiton/api/types/keystore/ReadStorePassword.java +++ b/datasafe-encryption/datasafe-encryption-api/src/main/java/de/adorsys/datasafe/encrypiton/api/types/keystore/ReadStorePassword.java @@ -5,6 +5,7 @@ */ public class ReadStorePassword extends BaseTypePasswordString { + @Deprecated public ReadStorePassword(String readStorePassword) { super(readStorePassword); } diff --git a/datasafe-encryption/datasafe-encryption-api/src/test/java/de/adorsys/datasafe/encrypiton/api/types/keystore/ReadKeyPasswordTest.java b/datasafe-encryption/datasafe-encryption-api/src/test/java/de/adorsys/datasafe/encrypiton/api/types/keystore/ReadKeyPasswordTest.java new file mode 100644 index 000000000..b387b84a4 --- /dev/null +++ b/datasafe-encryption/datasafe-encryption-api/src/test/java/de/adorsys/datasafe/encrypiton/api/types/keystore/ReadKeyPasswordTest.java @@ -0,0 +1,40 @@ +package de.adorsys.datasafe.encrypiton.api.types.keystore; + +import org.junit.jupiter.api.Test; + +import java.util.Arrays; +import java.util.function.Supplier; + +import static org.assertj.core.api.Assertions.assertThat; + +public class ReadKeyPasswordTest { + String passwordString = "a password that should be nullyfied"; + @Test + public void testClearanceForUnsupplied() { + char[] password = passwordString.toCharArray(); + char[] copyOfPassword = Arrays.copyOf(password, password.length); + + ReadKeyPassword readKeyPassword = new ReadKeyPassword(password); + assertThat(Arrays.equals(password, copyOfPassword)).isTrue(); + readKeyPassword.clear(); + assertThat(Arrays.equals(password, copyOfPassword)).isFalse(); + + } + + @Test + public void testClearanceForSupplied() { + char[] password = passwordString.toCharArray(); + char[] copyOfPassword = Arrays.copyOf(password, password.length); + + ReadKeyPassword readKeyPassword = new ReadKeyPassword(new Supplier() { + @Override + public char[] get() { + return password; + } + }); + assertThat(Arrays.equals(password, copyOfPassword)).isTrue(); + readKeyPassword.clear(); + assertThat(Arrays.equals(password, copyOfPassword)).isTrue(); + + } +} diff --git a/datasafe-long-run-tests/datasafe-business-tests-random-actions/src/test/java/de/adorsys/datasafe/business/impl/e2e/randomactions/RandomActionsOnSimpleDatasafeAdapterTest.java b/datasafe-long-run-tests/datasafe-business-tests-random-actions/src/test/java/de/adorsys/datasafe/business/impl/e2e/randomactions/RandomActionsOnSimpleDatasafeAdapterTest.java index 5a90c732a..c04fdedc0 100644 --- a/datasafe-long-run-tests/datasafe-business-tests-random-actions/src/test/java/de/adorsys/datasafe/business/impl/e2e/randomactions/RandomActionsOnSimpleDatasafeAdapterTest.java +++ b/datasafe-long-run-tests/datasafe-business-tests-random-actions/src/test/java/de/adorsys/datasafe/business/impl/e2e/randomactions/RandomActionsOnSimpleDatasafeAdapterTest.java @@ -94,6 +94,12 @@ public PasswordClearingInputStream read(ReadRequest @Override public void remove(RemoveRequest request) { datasafeService.deleteFolder(request.getOwner(), asFqnDir(request.getLocation())); + request.getOwner().getReadKeyPassword().clear(); + } + + @Override + public void makeSurePasswordClearanceIsDone() { + } @Override diff --git a/datasafe-metainfo/datasafe-metainfo-version-impl/src/main/java/de/adorsys/datasafe/metainfo/version/impl/version/latest/LatestPrivateSpaceImpl.java b/datasafe-metainfo/datasafe-metainfo-version-impl/src/main/java/de/adorsys/datasafe/metainfo/version/impl/version/latest/LatestPrivateSpaceImpl.java index c87c96420..dec1aa0a7 100644 --- a/datasafe-metainfo/datasafe-metainfo-version-impl/src/main/java/de/adorsys/datasafe/metainfo/version/impl/version/latest/LatestPrivateSpaceImpl.java +++ b/datasafe-metainfo/datasafe-metainfo-version-impl/src/main/java/de/adorsys/datasafe/metainfo/version/impl/version/latest/LatestPrivateSpaceImpl.java @@ -73,6 +73,12 @@ public PasswordClearingInputStream read(ReadRequest @Override public void remove(RemoveRequest request) { removeService.remove(request); + // password clearance is done in removeService + } + + @Override + public void makeSurePasswordClearanceIsDone() { + } // Delegate didn't work diff --git a/datasafe-metainfo/datasafe-metainfo-version-impl/src/main/java/de/adorsys/datasafe/metainfo/version/impl/version/latest/actions/LatestRemoveImpl.java b/datasafe-metainfo/datasafe-metainfo-version-impl/src/main/java/de/adorsys/datasafe/metainfo/version/impl/version/latest/actions/LatestRemoveImpl.java index c75f0cb3b..4a5d2e7d2 100644 --- a/datasafe-metainfo/datasafe-metainfo-version-impl/src/main/java/de/adorsys/datasafe/metainfo/version/impl/version/latest/actions/LatestRemoveImpl.java +++ b/datasafe-metainfo/datasafe-metainfo-version-impl/src/main/java/de/adorsys/datasafe/metainfo/version/impl/version/latest/actions/LatestRemoveImpl.java @@ -49,5 +49,11 @@ public void remove(RemoveRequest request) { .location(latestSnapshotLink.getResource()) .build() ); + request.getOwner().getReadKeyPassword().clear(); + } + + @Override + public void makeSurePasswordClearanceIsDone() { + } } diff --git a/datasafe-privatestore/datasafe-privatestore-api/src/main/java/de/adorsys/datasafe/privatestore/api/actions/RemoveFromPrivate.java b/datasafe-privatestore/datasafe-privatestore-api/src/main/java/de/adorsys/datasafe/privatestore/api/actions/RemoveFromPrivate.java index 6e966e2d3..8c2d8af45 100644 --- a/datasafe-privatestore/datasafe-privatestore-api/src/main/java/de/adorsys/datasafe/privatestore/api/actions/RemoveFromPrivate.java +++ b/datasafe-privatestore/datasafe-privatestore-api/src/main/java/de/adorsys/datasafe/privatestore/api/actions/RemoveFromPrivate.java @@ -14,4 +14,5 @@ public interface RemoveFromPrivate { * @param request Resource location (relative or absolute) */ void remove(RemoveRequest request); + void makeSurePasswordClearanceIsDone(); // this abstract method will make sure new implementations dont forget to handle password clearance } diff --git a/datasafe-privatestore/datasafe-privatestore-impl/src/main/java/de/adorsys/datasafe/privatestore/impl/actions/RemoveFromPrivateImpl.java b/datasafe-privatestore/datasafe-privatestore-impl/src/main/java/de/adorsys/datasafe/privatestore/impl/actions/RemoveFromPrivateImpl.java index 6ca59bb6d..1a84c0fb1 100644 --- a/datasafe-privatestore/datasafe-privatestore-impl/src/main/java/de/adorsys/datasafe/privatestore/impl/actions/RemoveFromPrivateImpl.java +++ b/datasafe-privatestore/datasafe-privatestore-impl/src/main/java/de/adorsys/datasafe/privatestore/impl/actions/RemoveFromPrivateImpl.java @@ -33,5 +33,11 @@ public void remove(RemoveRequest request) { request.getLocation(), request.getStorageIdentifier()) ); + request.getOwner().getReadKeyPassword().clear(); + } + + @Override + public void makeSurePasswordClearanceIsDone() { + } } diff --git a/datasafe-test-storages/src/main/java/de/adorsys/datasafe/teststorage/WithStorageProvider.java b/datasafe-test-storages/src/main/java/de/adorsys/datasafe/teststorage/WithStorageProvider.java index 4d806b72b..e1e6fecdf 100644 --- a/datasafe-test-storages/src/main/java/de/adorsys/datasafe/teststorage/WithStorageProvider.java +++ b/datasafe-test-storages/src/main/java/de/adorsys/datasafe/teststorage/WithStorageProvider.java @@ -191,6 +191,13 @@ protected static Stream allStorages() { ).filter(Objects::nonNull); } + @ValueSource + protected static Stream fsOnly() { + return Stream.of( + fs() + ).filter(Objects::nonNull); + } + protected static StorageDescriptor fs() { return new StorageDescriptor( StorageDescriptorName.FILESYSTEM, From ab79fc6a6c52952bf7a4d730850dff1e60e20309 Mon Sep 17 00:00:00 2001 From: psp Date: Thu, 10 Oct 2019 23:30:55 +0200 Subject: [PATCH 187/255] DOC-279 clear ReadPassword only in allowed cases, other no test will run... --- .../keystore/BaseTypePasswordString.java | 14 ++++++--- .../types/keystore/ReadKeyPasswordTest.java | 29 +++++++++++++++++++ 2 files changed, 39 insertions(+), 4 deletions(-) diff --git a/datasafe-encryption/datasafe-encryption-api/src/main/java/de/adorsys/datasafe/encrypiton/api/types/keystore/BaseTypePasswordString.java b/datasafe-encryption/datasafe-encryption-api/src/main/java/de/adorsys/datasafe/encrypiton/api/types/keystore/BaseTypePasswordString.java index 35ae3f638..4577602af 100644 --- a/datasafe-encryption/datasafe-encryption-api/src/main/java/de/adorsys/datasafe/encrypiton/api/types/keystore/BaseTypePasswordString.java +++ b/datasafe-encryption/datasafe-encryption-api/src/main/java/de/adorsys/datasafe/encrypiton/api/types/keystore/BaseTypePasswordString.java @@ -19,6 +19,7 @@ @ToString public class BaseTypePasswordString { private char[] value; + private boolean toBeCleared = true; @Deprecated /** @@ -29,6 +30,7 @@ public class BaseTypePasswordString { */ public BaseTypePasswordString(String value) { this.value = value.toCharArray(); + toBeCleared = false; } /** @@ -42,6 +44,7 @@ public BaseTypePasswordString(String value) { */ public BaseTypePasswordString(char[] value) { this.value = value; + toBeCleared = true; } /** @@ -50,14 +53,17 @@ public BaseTypePasswordString(char[] value) { * @param value will stay unchanged */ public BaseTypePasswordString(Supplier value) { - this.value = Arrays.copyOf(value.get(), value.get().length); + this.value = value.get(); + toBeCleared = false; } public void clear() { - log.warn("CLEAR PASSWORD {}", this.getClass().getSimpleName()); - for (int i = 0; i < value.length; i++) { - value[i] = '0'; + if (toBeCleared) { + log.debug("CLEAR PASSWORD {}", this.getClass().getSimpleName()); + for (int i = 0; i < value.length; i++) { + value[i] = '0'; + } } } diff --git a/datasafe-encryption/datasafe-encryption-api/src/test/java/de/adorsys/datasafe/encrypiton/api/types/keystore/ReadKeyPasswordTest.java b/datasafe-encryption/datasafe-encryption-api/src/test/java/de/adorsys/datasafe/encrypiton/api/types/keystore/ReadKeyPasswordTest.java index b387b84a4..fc869a970 100644 --- a/datasafe-encryption/datasafe-encryption-api/src/test/java/de/adorsys/datasafe/encrypiton/api/types/keystore/ReadKeyPasswordTest.java +++ b/datasafe-encryption/datasafe-encryption-api/src/test/java/de/adorsys/datasafe/encrypiton/api/types/keystore/ReadKeyPasswordTest.java @@ -1,5 +1,6 @@ package de.adorsys.datasafe.encrypiton.api.types.keystore; +import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; import java.util.Arrays; @@ -18,6 +19,7 @@ public void testClearanceForUnsupplied() { assertThat(Arrays.equals(password, copyOfPassword)).isTrue(); readKeyPassword.clear(); assertThat(Arrays.equals(password, copyOfPassword)).isFalse(); + assertThat(Arrays.equals(readKeyPassword.getValue(), copyOfPassword)).isFalse(); } @@ -35,6 +37,33 @@ public char[] get() { assertThat(Arrays.equals(password, copyOfPassword)).isTrue(); readKeyPassword.clear(); assertThat(Arrays.equals(password, copyOfPassword)).isTrue(); + assertThat(Arrays.equals(readKeyPassword.getValue(), copyOfPassword)).isTrue(); } + + + @Test + public void testWithDeprecatedConstructor() { + String passwordString = "that is the password"; + char[] copyOfPassword = Arrays.copyOf(passwordString.toCharArray(), passwordString.toCharArray().length); + + ReadKeyPassword readKeyPassword = new ReadKeyPassword(passwordString); + ReadKeyPassword readKeyPasswordBackup = new ReadKeyPassword(new Supplier() { + @Override + public char[] get() { + return readKeyPassword.getValue(); + } + }); + assertThat(Arrays.equals(passwordString.toCharArray(), copyOfPassword)).isTrue(); + readKeyPassword.clear(); + assertThat(Arrays.equals(passwordString.toCharArray(), copyOfPassword)).isTrue(); + assertThat(Arrays.equals(readKeyPassword.getValue(), copyOfPassword)).isTrue(); + } + + @Test + public void overwriteString() { + String s = "peter"; + s.toCharArray()[0] = 'P'; + assertThat(s.equals("Peter")).isFalse(); + } } From 5e326c9e56753852d5daa0f562b225b8cd94d466 Mon Sep 17 00:00:00 2001 From: Maxim Grischenko Date: Fri, 11 Oct 2019 10:06:10 +0200 Subject: [PATCH 188/255] version enum->class, tests fix --- .../adorsys/datasafe/business/impl/e2e/KeystoreE2ETest.java | 3 ++- .../impl/cmsencryption/CmsEncryptionServiceImplTest.java | 3 ++- .../impl/cmsencryption/SymetricEncryptionTest.java | 3 ++- .../encrypiton/impl/keystore/KeyStoreServiceTest.java | 5 +++-- .../SymmetricPathEncryptionServiceImplTest.java | 3 ++- .../legacy/LegacySymmetricPathEncryptionServiceImplTest.java | 3 ++- .../java/de/adorsys/datasafe/types/api/global/Version.java | 5 +++-- 7 files changed, 16 insertions(+), 9 deletions(-) diff --git a/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/KeystoreE2ETest.java b/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/KeystoreE2ETest.java index 9f2097116..f5aebdfed 100644 --- a/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/KeystoreE2ETest.java +++ b/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/KeystoreE2ETest.java @@ -23,6 +23,7 @@ import java.security.Security; import java.util.Enumeration; import java.util.HashSet; +import java.util.Optional; import java.util.Set; import static de.adorsys.datasafe.business.impl.e2e.DatasafeServicesProvider.STORE_PAZZWORD; @@ -58,7 +59,7 @@ void testDefaultKeystoreHasProperKeys() { URI keystorePath = datasafeServices.userProfile().privateProfile(auth) .getKeystore().location().asURI(); - KeyStoreServiceImpl keyStoreService = new KeyStoreServiceImpl(new DefaultPasswordBasedKeyConfig(), null); + KeyStoreServiceImpl keyStoreService = new KeyStoreServiceImpl(new DefaultPasswordBasedKeyConfig(), Optional.empty()); KeyStore keyStore = keyStoreService.deserialize( Files.readAllBytes(Paths.get(keystorePath)), "ID", diff --git a/datasafe-encryption/datasafe-encryption-impl/src/test/java/de/adorsys/datasafe/encrypiton/impl/cmsencryption/CmsEncryptionServiceImplTest.java b/datasafe-encryption/datasafe-encryption-impl/src/test/java/de/adorsys/datasafe/encrypiton/impl/cmsencryption/CmsEncryptionServiceImplTest.java index 17c13f3c1..3aa9e6233 100644 --- a/datasafe-encryption/datasafe-encryption-impl/src/test/java/de/adorsys/datasafe/encrypiton/impl/cmsencryption/CmsEncryptionServiceImplTest.java +++ b/datasafe-encryption/datasafe-encryption-impl/src/test/java/de/adorsys/datasafe/encrypiton/impl/cmsencryption/CmsEncryptionServiceImplTest.java @@ -30,6 +30,7 @@ import java.security.MessageDigest; import java.util.Arrays; import java.util.Collections; +import java.util.Optional; import static com.google.common.io.ByteStreams.toByteArray; import static de.adorsys.datasafe.encrypiton.impl.cmsencryption.KeyStoreUtil.getKeys; @@ -43,7 +44,7 @@ class CmsEncryptionServiceImplTest extends WithBouncyCastle { private static final String TEST_MESSAGE_CONTENT = "message content"; private static KeyStoreAccess keyStoreAccess; - private static KeyStoreService keyStoreService = new KeyStoreServiceImpl(new DefaultPasswordBasedKeyConfig(), null); + private static KeyStoreService keyStoreService = new KeyStoreServiceImpl(new DefaultPasswordBasedKeyConfig(), Optional.empty()); private CMSEncryptionService cmsEncryptionService = new CMSEncryptionServiceImpl(new DefaultCMSEncryptionConfig()); diff --git a/datasafe-encryption/datasafe-encryption-impl/src/test/java/de/adorsys/datasafe/encrypiton/impl/cmsencryption/SymetricEncryptionTest.java b/datasafe-encryption/datasafe-encryption-impl/src/test/java/de/adorsys/datasafe/encrypiton/impl/cmsencryption/SymetricEncryptionTest.java index 77c282084..ba13237d6 100644 --- a/datasafe-encryption/datasafe-encryption-impl/src/test/java/de/adorsys/datasafe/encrypiton/impl/cmsencryption/SymetricEncryptionTest.java +++ b/datasafe-encryption/datasafe-encryption-impl/src/test/java/de/adorsys/datasafe/encrypiton/impl/cmsencryption/SymetricEncryptionTest.java @@ -19,6 +19,7 @@ import java.io.OutputStream; import java.security.KeyStore; import java.util.Enumeration; +import java.util.Optional; import static de.adorsys.datasafe.encrypiton.api.types.keystore.KeyCreationConfig.PATH_KEY_ID_PREFIX; import static de.adorsys.datasafe.encrypiton.api.types.keystore.KeyCreationConfig.DOCUMENT_KEY_ID_PREFIX; @@ -31,7 +32,7 @@ class SymetricEncryptionTest extends WithBouncyCastle { private static final String MESSAGE_CONTENT = "message content"; private CMSEncryptionService cmsEncryptionService = new CMSEncryptionServiceImpl(new DefaultCMSEncryptionConfig()); - private KeyStoreService keyStoreService = new KeyStoreServiceImpl(new DefaultPasswordBasedKeyConfig(), null); + private KeyStoreService keyStoreService = new KeyStoreServiceImpl(new DefaultPasswordBasedKeyConfig(), Optional.empty()); private ReadKeyPassword readKeyPassword = new ReadKeyPassword("readkeypassword"); private ReadStorePassword readStorePassword = new ReadStorePassword("readstorepassword"); private KeyStoreAuth keyStoreAuth = new KeyStoreAuth(readStorePassword, readKeyPassword); diff --git a/datasafe-encryption/datasafe-encryption-impl/src/test/java/de/adorsys/datasafe/encrypiton/impl/keystore/KeyStoreServiceTest.java b/datasafe-encryption/datasafe-encryption-impl/src/test/java/de/adorsys/datasafe/encrypiton/impl/keystore/KeyStoreServiceTest.java index 80def7656..aad9189ea 100644 --- a/datasafe-encryption/datasafe-encryption-impl/src/test/java/de/adorsys/datasafe/encrypiton/impl/keystore/KeyStoreServiceTest.java +++ b/datasafe-encryption/datasafe-encryption-impl/src/test/java/de/adorsys/datasafe/encrypiton/impl/keystore/KeyStoreServiceTest.java @@ -19,13 +19,14 @@ import java.security.Security; import java.util.Collections; import java.util.List; +import java.util.Optional; import java.util.UUID; import static de.adorsys.datasafe.encrypiton.api.types.keystore.KeyCreationConfig.DOCUMENT_KEY_ID_PREFIX; class KeyStoreServiceTest extends WithBouncyCastle { - private KeyStoreService keyStoreService = new KeyStoreServiceImpl(new DefaultPasswordBasedKeyConfig(), null); + private KeyStoreService keyStoreService = new KeyStoreServiceImpl(new DefaultPasswordBasedKeyConfig(), Optional.empty()); private KeyStoreAuth keyStoreAuth; @BeforeEach @@ -79,7 +80,7 @@ void getPublicKeys() { @Test void getPrivateKey() throws Exception { - KeyStore keyStore = KeyStoreServiceImplBaseFunctions.newKeyStore(KeyStoreCreationConfig.DEFAULT); // UBER + KeyStore keyStore = KeyStoreServiceImplBaseFunctions.newKeyStore(KeyStoreCreationConfig.DEFAULT); // BCFKS ReadKeyPassword readKeyPassword = new ReadKeyPassword("keypass"); KeyCreationConfigImpl keyStoreCreationConfig = new KeyCreationConfigImpl(null); diff --git a/datasafe-encryption/datasafe-encryption-impl/src/test/java/de/adorsys/datasafe/encrypiton/impl/pathencryption/SymmetricPathEncryptionServiceImplTest.java b/datasafe-encryption/datasafe-encryption-impl/src/test/java/de/adorsys/datasafe/encrypiton/impl/pathencryption/SymmetricPathEncryptionServiceImplTest.java index fee4f109d..6fcf61ada 100644 --- a/datasafe-encryption/datasafe-encryption-impl/src/test/java/de/adorsys/datasafe/encrypiton/impl/pathencryption/SymmetricPathEncryptionServiceImplTest.java +++ b/datasafe-encryption/datasafe-encryption-impl/src/test/java/de/adorsys/datasafe/encrypiton/impl/pathencryption/SymmetricPathEncryptionServiceImplTest.java @@ -16,6 +16,7 @@ import javax.crypto.spec.SecretKeySpec; import java.net.URI; import java.security.KeyStore; +import java.util.Optional; import static de.adorsys.datasafe.encrypiton.api.types.keystore.KeyCreationConfig.PATH_KEY_ID_PREFIX_CTR; import static org.assertj.core.api.Assertions.assertThat; @@ -29,7 +30,7 @@ class SymmetricPathEncryptionServiceImplTest extends WithBouncyCastle { new DefaultPathEncryptorDecryptor(new SivMode()) ); - private KeyStoreService keyStoreService = new KeyStoreServiceImpl(new DefaultPasswordBasedKeyConfig(), null); + private KeyStoreService keyStoreService = new KeyStoreServiceImpl(new DefaultPasswordBasedKeyConfig(), Optional.empty()); private ReadKeyPassword readKeyPassword = new ReadKeyPassword("readkeypassword"); private ReadStorePassword readStorePassword = new ReadStorePassword("readstorepassword"); private KeyStoreAuth keyStoreAuth = new KeyStoreAuth(readStorePassword, readKeyPassword); diff --git a/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/test/java/de/adorsys/datasafe/simple/adapter/impl/legacy/LegacySymmetricPathEncryptionServiceImplTest.java b/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/test/java/de/adorsys/datasafe/simple/adapter/impl/legacy/LegacySymmetricPathEncryptionServiceImplTest.java index 00a2eaf81..99efb825a 100644 --- a/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/test/java/de/adorsys/datasafe/simple/adapter/impl/legacy/LegacySymmetricPathEncryptionServiceImplTest.java +++ b/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/test/java/de/adorsys/datasafe/simple/adapter/impl/legacy/LegacySymmetricPathEncryptionServiceImplTest.java @@ -19,6 +19,7 @@ import java.net.URI; import java.net.URISyntaxException; import java.security.KeyStore; +import java.util.Optional; import static de.adorsys.datasafe.encrypiton.api.types.keystore.KeyCreationConfig.PATH_KEY_ID_PREFIX; import static org.junit.jupiter.api.Assertions.assertEquals; @@ -31,7 +32,7 @@ class LegacySymmetricPathEncryptionServiceImplTest extends WithBouncyCastle { new LegacyPathEncryptor(new LegacyPathDigestConfig()) ); - private KeyStoreService keyStoreService = new KeyStoreServiceImpl(new DefaultPasswordBasedKeyConfig(), null); + private KeyStoreService keyStoreService = new KeyStoreServiceImpl(new DefaultPasswordBasedKeyConfig(), Optional.empty()); private ReadKeyPassword readKeyPassword = new ReadKeyPassword("readkeypassword"); private ReadStorePassword readStorePassword = new ReadStorePassword("readstorepassword"); private KeyStoreAuth keyStoreAuth = new KeyStoreAuth(readStorePassword, readKeyPassword); diff --git a/datasafe-types-api/src/main/java/de/adorsys/datasafe/types/api/global/Version.java b/datasafe-types-api/src/main/java/de/adorsys/datasafe/types/api/global/Version.java index 7b4c6e21d..25bff9324 100644 --- a/datasafe-types-api/src/main/java/de/adorsys/datasafe/types/api/global/Version.java +++ b/datasafe-types-api/src/main/java/de/adorsys/datasafe/types/api/global/Version.java @@ -6,15 +6,16 @@ /** * This class carries logical Datasafe version (i.e. dictates user profile structure) so that application can * detect incompatibilities between old data and new code and act accordingly. + * Can be extended and used by Datasafe client for identifying different profiles/keystores configurations */ @Getter @RequiredArgsConstructor -public enum Version { +public class Version { /** * The first version before major changes happened. */ - BASELINE("v0"); + public static Version BASELINE = new Version("v0"); private final String id; From 1b1c033961e2d032b3045ebddeab13c5de2be2d3 Mon Sep 17 00:00:00 2001 From: psp Date: Fri, 11 Oct 2019 11:30:52 +0200 Subject: [PATCH 189/255] DOC-279 extended test --- .../impl/e2e/BasicFunctionalityTest.java | 76 +++++++++++++++---- .../keystore/BaseTypePasswordString.java | 17 +++-- .../types/keystore/ReadKeyPasswordTest.java | 1 - 3 files changed, 70 insertions(+), 24 deletions(-) diff --git a/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/BasicFunctionalityTest.java b/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/BasicFunctionalityTest.java index 0e2d1ab3b..b259e086c 100644 --- a/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/BasicFunctionalityTest.java +++ b/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/BasicFunctionalityTest.java @@ -4,8 +4,10 @@ import de.adorsys.datasafe.encrypiton.api.types.UserID; import de.adorsys.datasafe.encrypiton.api.types.UserIDAuth; import de.adorsys.datasafe.encrypiton.api.types.keystore.ReadKeyPassword; +import de.adorsys.datasafe.privatestore.api.PasswordClearingStream; import de.adorsys.datasafe.storage.api.StorageService; import de.adorsys.datasafe.teststorage.WithStorageProvider; +import de.adorsys.datasafe.types.api.actions.ListRequest; import de.adorsys.datasafe.types.api.actions.ReadRequest; import de.adorsys.datasafe.types.api.actions.RemoveRequest; import de.adorsys.datasafe.types.api.actions.WriteRequest; @@ -16,18 +18,27 @@ import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.MethodSource; import org.testcontainers.shaded.com.google.common.collect.ImmutableSet; +import org.testcontainers.shaded.org.apache.commons.io.IOUtils; import java.io.ByteArrayInputStream; +import java.io.InputStream; import java.io.OutputStream; +import java.net.URI; +import java.nio.charset.Charset; +import java.nio.file.Files; +import java.nio.file.Path; +import java.nio.file.Paths; import java.security.UnrecoverableKeyException; import java.util.Arrays; import java.util.List; import java.util.concurrent.ThreadLocalRandom; import java.util.function.Predicate; import java.util.stream.Collectors; +import java.util.stream.Stream; import static de.adorsys.datasafe.business.impl.e2e.Const.*; import static org.assertj.core.api.Assertions.assertThat; +import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertThrows; /** @@ -41,6 +52,7 @@ class BasicFunctionalityTest extends BaseE2ETest { private StorageService storage; private Uri location; + @SneakyThrows @ParameterizedTest @MethodSource("fsOnly") void testDFSPasswordClearance(WithStorageProvider.StorageDescriptor descriptor) { @@ -51,36 +63,70 @@ void testDFSPasswordClearance(WithStorageProvider.StorageDescriptor descriptor) String passwordString = "a password that should be nullyfied"; char[] password = passwordString.toCharArray(); char[] copyOfPassword = Arrays.copyOf(password, password.length); + ReadKeyPassword readKeyPassword = new ReadKeyPassword(password); - assertThat(Arrays.equals(password, copyOfPassword)).isTrue(); - ReadKeyPassword readKeyPassword = new ReadKeyPassword(password); john = registerUser(userJohn.getValue(), readKeyPassword); assertThat(profileRetrievalService.userExists(userJohn)).isTrue(); assertThat(profileRetrievalService.privateProfile(john).getAppVersion()).isEqualTo(Version.current()); assertThat(profileRetrievalService.publicProfile(john.getUserID()).getAppVersion()).isEqualTo(Version.current()); - writeDataToPrivate(john, "root.txt", MESSAGE_ONE); - assertThat(Arrays.equals(password, copyOfPassword)).isFalse(); - assertThrows(UnrecoverableKeyException.class, () -> profileRemovalService.deregister(john)); + /** + * Test clearance after write of file + */ + log.info("1. write file"); + assertThat(Arrays.equals(password, copyOfPassword)).isTrue(); + writeDataToPrivate(john, "root.txt", MESSAGE_ONE); + assertThat(Arrays.equals(password, copyOfPassword)).isFalse(); + /** + * Test clearance after read of file + */ // recover password - for (int i = 0; i < copyOfPassword.length; i++) { - password[i] = copyOfPassword[i]; +/* + System.arraycopy(copyOfPassword, 0, password, 0, copyOfPassword.length); + log.info("password recovered"); + log.info("2. read file"); + try (InputStream is = readFromPrivate.read(ReadRequest.forDefaultPrivate(john, "root.txt"))) { } - - writeDataToPrivate(john, "root.txt", MESSAGE_ONE); + assertThat(Arrays.equals(password, copyOfPassword)).isFalse(); +*/ + /** + * Test clearance after list of files + */ // recover password - for (int i = 0; i < copyOfPassword.length; i++) { - password[i] = copyOfPassword[i]; + System.arraycopy(copyOfPassword, 0, password, 0, copyOfPassword.length); + log.info("password recovered"); + log.info("3. list files"); + try (Stream> list = listPrivate.list(ListRequest.forDefaultPrivate(john, new Uri("/")))) { + assertEquals(list + .map(it -> it.getResource().asPrivate().decryptedPath().asString()) + .collect(Collectors.toList()) + .size(), 1); } - removeFromPrivate.remove(RemoveRequest.forDefaultPrivate(john, new Uri("root.txt"))); + assertThat(Arrays.equals(password, copyOfPassword)).isFalse(); + + + /** + * Test clearance after removal of file + */ // recover password - for (int i = 0; i < copyOfPassword.length; i++) { - password[i] = copyOfPassword[i]; - } + System.arraycopy(copyOfPassword, 0, password, 0, copyOfPassword.length); + log.info("password recovered"); + log.info("4. remove file"); + removeFromPrivate.remove(RemoveRequest.forDefaultPrivate(john, new Uri("root.txt"))); + assertThat(Arrays.equals(password, copyOfPassword)).isFalse(); + + /** + * Test clearance after removal of user + */ + assertThrows(UnrecoverableKeyException.class, () -> profileRemovalService.deregister(john)); + // recover password + System.arraycopy(copyOfPassword, 0, password, 0, copyOfPassword.length); + log.info("password recovered"); + log.info("5. remove user"); profileRemovalService.deregister(john); assertThat(Arrays.equals(password, copyOfPassword)).isFalse(); diff --git a/datasafe-encryption/datasafe-encryption-api/src/main/java/de/adorsys/datasafe/encrypiton/api/types/keystore/BaseTypePasswordString.java b/datasafe-encryption/datasafe-encryption-api/src/main/java/de/adorsys/datasafe/encrypiton/api/types/keystore/BaseTypePasswordString.java index 4577602af..15db3c637 100644 --- a/datasafe-encryption/datasafe-encryption-api/src/main/java/de/adorsys/datasafe/encrypiton/api/types/keystore/BaseTypePasswordString.java +++ b/datasafe-encryption/datasafe-encryption-api/src/main/java/de/adorsys/datasafe/encrypiton/api/types/keystore/BaseTypePasswordString.java @@ -1,9 +1,6 @@ package de.adorsys.datasafe.encrypiton.api.types.keystore; -import lombok.EqualsAndHashCode; -import lombok.Getter; -import lombok.RequiredArgsConstructor; -import lombok.ToString; +import lombok.*; import lombok.extern.slf4j.Slf4j; import java.util.Arrays; @@ -58,12 +55,16 @@ public BaseTypePasswordString(Supplier value) { } + /** + * Hi Valentyn, dont understand synchronized in this context. + * Java synchronized is too expensive, as there may run several threads + * all using a password. synchronizing with user not possible as + * user is not known here. So how should I synchronize ? + */ public void clear() { if (toBeCleared) { - log.debug("CLEAR PASSWORD {}", this.getClass().getSimpleName()); - for (int i = 0; i < value.length; i++) { - value[i] = '0'; - } + log.warn("CLEAR PASSWORD {}", this.getClass().getSimpleName()); + Arrays.fill(value, '0'); } } diff --git a/datasafe-encryption/datasafe-encryption-api/src/test/java/de/adorsys/datasafe/encrypiton/api/types/keystore/ReadKeyPasswordTest.java b/datasafe-encryption/datasafe-encryption-api/src/test/java/de/adorsys/datasafe/encrypiton/api/types/keystore/ReadKeyPasswordTest.java index fc869a970..8e50e6882 100644 --- a/datasafe-encryption/datasafe-encryption-api/src/test/java/de/adorsys/datasafe/encrypiton/api/types/keystore/ReadKeyPasswordTest.java +++ b/datasafe-encryption/datasafe-encryption-api/src/test/java/de/adorsys/datasafe/encrypiton/api/types/keystore/ReadKeyPasswordTest.java @@ -1,6 +1,5 @@ package de.adorsys.datasafe.encrypiton.api.types.keystore; -import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; import java.util.Arrays; From 90db0ce3b917d11af4f6f505a3bd88221369d8b4 Mon Sep 17 00:00:00 2001 From: psp Date: Fri, 11 Oct 2019 12:15:02 +0200 Subject: [PATCH 190/255] DOC-279 no more with a String Constructor --- .../business/impl/e2e/BaseE2ETest.java | 4 ++-- ...icFunctionalityWithPasswordChangeTest.java | 24 +++++++++---------- .../business/impl/e2e/KeystoreE2ETest.java | 2 +- .../impl/e2e/MultiDFSFunctionalityTest.java | 6 ++--- .../impl/e2e/SchemeDelegationTest.java | 2 +- .../impl/e2e/SchemeDelegationWithDbTest.java | 2 +- .../impl/e2e/UserProfileWithUtf8Test.java | 2 +- .../java/de/adorsys/datasafe/cli/Cli.java | 2 +- .../config/DFSConfigWithStorageCredsTest.java | 2 +- .../dfs/BucketAccessServiceImplTest.java | 2 +- .../StorageKeyStoreOperationsImplTest.java | 2 +- .../keystore/BaseTypePasswordString.java | 5 ++-- .../api/types/keystore/ReadKeyPassword.java | 14 +++++++---- .../api/types/keystore/ReadStorePassword.java | 1 - .../types/keystore/ReadKeyPasswordTest.java | 2 +- .../encrypiton/impl/KeyPairGeneratorTest.java | 2 +- .../CmsEncryptionServiceImplTest.java | 2 +- .../cmsencryption/SymetricEncryptionTest.java | 2 +- .../impl/keystore/KeyStoreServiceTest.java | 4 ++-- ...ymmetricPathEncryptionServiceImplTest.java | 2 +- ...OperationsTestWithDefaultDatasafeTest.java | 4 ++-- ...erationsTestWithVersionedDatasafeTest.java | 4 ++-- .../RuntimeOverrideOperationsTest.java | 2 +- .../CustomlyBuiltDatasafeServiceTest.java | 2 +- .../MultiDfsWithCredentialsExampleTest.java | 2 +- ...DefaultDatasafeOnVersionedStorageTest.java | 2 +- .../inbox/api/actions/ListInboxImplTest.java | 2 +- .../api/actions/ReadFromInboxImplTest.java | 2 +- .../api/actions/RemoveFromInboxImplTest.java | 2 +- .../framework/fixture/dto/TestUser.java | 2 +- .../framework/services/OperationExecutor.java | 2 +- .../EncryptedResourceResolverImplTest.java | 2 +- .../impl/actions/ListPrivateImplTest.java | 2 +- .../impl/actions/ReadFromPrivateImplTest.java | 2 +- .../impl/actions/WriteToPrivateImplTest.java | 2 +- .../impl/controller/DocumentController.java | 8 +++---- .../rest/impl/controller/InboxController.java | 6 ++--- .../rest/impl/controller/UserController.java | 20 ++++++++-------- .../impl/controller/VersionController.java | 10 ++++---- .../BaseTokenDatasafeEndpointTest.java | 2 +- .../impl/controller/UserControllerTest.java | 2 +- .../simple/adapter/impl/CleanupDbTest.java | 4 ++-- .../impl/DFSRelativeToRootProfileTest.java | 2 +- .../impl/SimpleAdapterFeatureTest.java | 2 +- .../SimpleDatasafeAdapter043CompatTest.java | 2 +- .../impl/SimpleDatasafeAdapterTest.java | 10 ++++---- ...ymmetricPathEncryptionServiceImplTest.java | 2 +- .../simple/adapter/spring/InjectionTest.java | 2 +- 48 files changed, 96 insertions(+), 94 deletions(-) diff --git a/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/BaseE2ETest.java b/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/BaseE2ETest.java index f38b58f20..0af231079 100644 --- a/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/BaseE2ETest.java +++ b/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/BaseE2ETest.java @@ -206,7 +206,7 @@ protected void removeFromInbox(UserIDAuth inboxOwner, PrivateResource location) } protected UserIDAuth registerUser(String userName) { - return registerUser(userName, new ReadKeyPassword("secure-password " + userName)); + return registerUser(userName, ReadKeyPassword.getForString("secure-password " + userName)); } protected UserIDAuth registerUser(String userName, ReadKeyPassword readKeyPassword) { @@ -221,7 +221,7 @@ protected UserIDAuth createJohnTestUser(int i) { return new UserIDAuth( userName, - new ReadKeyPassword("secure-password " + userName.getValue()) + ReadKeyPassword.getForString("secure-password " + userName.getValue()) ); } diff --git a/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/BasicFunctionalityWithPasswordChangeTest.java b/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/BasicFunctionalityWithPasswordChangeTest.java index d203044e8..6ce9188a2 100644 --- a/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/BasicFunctionalityWithPasswordChangeTest.java +++ b/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/BasicFunctionalityWithPasswordChangeTest.java @@ -37,14 +37,14 @@ void testUserIsRemovedWithFiles(WithStorageProvider.StorageDescriptor descriptor writeDataToPrivate(john, "root.txt", MESSAGE_ONE); writeDataToPrivate(john, "some/some.txt", MESSAGE_ONE); - john = checkUpdatedCredsWorkAndOldDont(john, new ReadKeyPassword("Some other"), auth -> { + john = checkUpdatedCredsWorkAndOldDont(john, ReadKeyPassword.getForString("Some other"), auth -> { writeDataToPrivate(auth, "some/other/other.txt", MESSAGE_ONE); writeDataToPrivate(auth, "different/data.txt", MESSAGE_ONE); }); john = checkUpdatedCredsWorkAndOldDont( john, - new ReadKeyPassword("Some another"), + ReadKeyPassword.getForString("Some another"), auth -> profileRemovalService.deregister(auth) ); @@ -67,7 +67,7 @@ void testMultipleRecipientsSharing(WithStorageProvider.StorageDescriptor descrip Stream.of(john, jane, jamie).forEach( it -> checkUpdatedCredsWorkAndOldDont( it, - new ReadKeyPassword(UUID.randomUUID().toString()), + ReadKeyPassword.getForString(UUID.randomUUID().toString()), auth -> assertThat(readFromInbox.read(ReadRequest.forDefaultPrivate(auth, multiShareFile))) .hasContent(MESSAGE_ONE)) ); @@ -85,7 +85,7 @@ void testWriteToPrivateListPrivateReadPrivateAndSendToAndReadFromInbox( jane = checkUpdatedCredsWorkAndOldDont( jane, - new ReadKeyPassword("Another passwd1"), + ReadKeyPassword.getForString("Another passwd1"), this::getFirstFileInPrivate ); @@ -93,7 +93,7 @@ void testWriteToPrivateListPrivateReadPrivateAndSendToAndReadFromInbox( jane = checkUpdatedCredsWorkAndOldDont( jane, - new ReadKeyPassword("Another passwd2"), + ReadKeyPassword.getForString("Another passwd2"), auth -> readPrivateUsingPrivateKey(auth, privateJane.getResource().asPrivate()) ); @@ -105,7 +105,7 @@ void testWriteToPrivateListPrivateReadPrivateAndSendToAndReadFromInbox( john = checkUpdatedCredsWorkAndOldDont( john, - new ReadKeyPassword("Another passwd4"), + ReadKeyPassword.getForString("Another passwd4"), auth -> readInboxUsingPrivateKey(auth, inboxJohn.getResource().asPrivate()) ); @@ -131,13 +131,13 @@ void listingValidation(WithStorageProvider.StorageDescriptor descriptor) { jane = checkUpdatedCredsWorkAndOldDont( jane, - new ReadKeyPassword("Another passwd1"), + ReadKeyPassword.getForString("Another passwd1"), auth -> writeDataToPrivate(auth, "level1/level2/file", MESSAGE_ONE) ); jane = checkUpdatedCredsWorkAndOldDont( jane, - new ReadKeyPassword("Another passwd2"), + ReadKeyPassword.getForString("Another passwd2"), auth -> { assertPrivateSpaceList(auth, "", "root.file", "level1/file", "level1/level2/file"); assertPrivateSpaceList(auth, "./", "root.file", "level1/file", "level1/level2/file"); @@ -147,7 +147,7 @@ void listingValidation(WithStorageProvider.StorageDescriptor descriptor) { jane = checkUpdatedCredsWorkAndOldDont( jane, - new ReadKeyPassword("Another passwd3"), + ReadKeyPassword.getForString("Another passwd3"), auth -> { assertPrivateSpaceList(auth, "root.file", "root.file"); assertPrivateSpaceList(auth, "./root.file", "root.file"); @@ -156,7 +156,7 @@ void listingValidation(WithStorageProvider.StorageDescriptor descriptor) { jane = checkUpdatedCredsWorkAndOldDont( jane, - new ReadKeyPassword("Another passwd4"), + ReadKeyPassword.getForString("Another passwd4"), auth -> { assertPrivateSpaceList(auth, "level1", "level1/file", "level1/level2/file"); assertPrivateSpaceList(auth, "level1/", "level1/file", "level1/level2/file"); @@ -165,7 +165,7 @@ void listingValidation(WithStorageProvider.StorageDescriptor descriptor) { jane = checkUpdatedCredsWorkAndOldDont( jane, - new ReadKeyPassword("Another passwd5"), + ReadKeyPassword.getForString("Another passwd5"), auth -> { assertPrivateSpaceList(auth, "./level1", "level1/file", "level1/level2/file"); assertPrivateSpaceList(auth, "./level1/", "level1/file", "level1/level2/file"); @@ -174,7 +174,7 @@ void listingValidation(WithStorageProvider.StorageDescriptor descriptor) { jane = checkUpdatedCredsWorkAndOldDont( jane, - new ReadKeyPassword("Another passwd6"), + ReadKeyPassword.getForString("Another passwd6"), auth -> { assertPrivateSpaceList(auth, "./level1/level2", "level1/level2/file"); assertPrivateSpaceList(auth, "./level1/level2/", "level1/level2/file"); diff --git a/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/KeystoreE2ETest.java b/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/KeystoreE2ETest.java index bc6313e8d..42d3b8fb5 100644 --- a/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/KeystoreE2ETest.java +++ b/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/KeystoreE2ETest.java @@ -54,7 +54,7 @@ void init(@TempDir Path rootPath) { @Test @SneakyThrows void testDefaultKeystoreHasProperKeys() { - UserIDAuth auth = new UserIDAuth("user", new ReadKeyPassword("pass")); + UserIDAuth auth = new UserIDAuth("user", ReadKeyPassword.getForString("pass")); datasafeServices.userProfile().registerUsingDefaults(auth); URI keystorePath = datasafeServices.userProfile().privateProfile(auth) .getKeystore().location().asURI(); diff --git a/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/MultiDFSFunctionalityTest.java b/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/MultiDFSFunctionalityTest.java index c605faba0..bcfe8e40f 100644 --- a/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/MultiDFSFunctionalityTest.java +++ b/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/MultiDFSFunctionalityTest.java @@ -167,7 +167,7 @@ void initDatasafe() { @Test void testWriteToPrivateListPrivateReadPrivate() { - UserIDAuth john = new UserIDAuth("john", new ReadKeyPassword("my-passwd")); + UserIDAuth john = new UserIDAuth("john", ReadKeyPassword.getForString("my-passwd")); registerUser(john); validateBasicOperationsAndContent(john); @@ -177,12 +177,12 @@ void testWriteToPrivateListPrivateReadPrivate() { @Test void testWriteToPrivateListPrivateReadPrivateWithPasswordChange() { - UserIDAuth john = new UserIDAuth("john", new ReadKeyPassword("my-passwd")); + UserIDAuth john = new UserIDAuth("john", ReadKeyPassword.getForString("my-passwd")); registerUser(john); validateBasicOperationsAndContent(john); - ReadKeyPassword newPasswd = new ReadKeyPassword("ANOTHER"); + ReadKeyPassword newPasswd = ReadKeyPassword.getForString("ANOTHER"); datasafeServices.userProfile().updateReadKeyPassword(john, newPasswd); UserIDAuth newJohn = new UserIDAuth("john", newPasswd); diff --git a/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/SchemeDelegationTest.java b/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/SchemeDelegationTest.java index 55d8a7a5d..1a60486d3 100644 --- a/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/SchemeDelegationTest.java +++ b/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/SchemeDelegationTest.java @@ -59,7 +59,7 @@ void initialize(@TempDir Path tempDir) { @Test @SneakyThrows void testProfileOnFsDataOnMinioWorks() { - UserIDAuth userJohn = new UserIDAuth("john", new ReadKeyPassword("doe")); + UserIDAuth userJohn = new UserIDAuth("john", ReadKeyPassword.getForString("doe")); // John's profile will be saved to filesystem datasafeServices.userProfile().registerUsingDefaults(userJohn); diff --git a/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/SchemeDelegationWithDbTest.java b/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/SchemeDelegationWithDbTest.java index f7d1d674a..ffe2dbe67 100644 --- a/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/SchemeDelegationWithDbTest.java +++ b/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/SchemeDelegationWithDbTest.java @@ -70,7 +70,7 @@ void initialize(@TempDir Path tempDir) { @Test @SneakyThrows void testProfileOnDbDataOnFsWorks() { - UserIDAuth userJohn = new UserIDAuth("john", new ReadKeyPassword("doe")); + UserIDAuth userJohn = new UserIDAuth("john", ReadKeyPassword.getForString("doe")); // John's profile will be saved to Database datasafeServices.userProfile().registerUsingDefaults(userJohn); diff --git a/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/UserProfileWithUtf8Test.java b/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/UserProfileWithUtf8Test.java index b6c42784a..4eefa8382 100644 --- a/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/UserProfileWithUtf8Test.java +++ b/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/UserProfileWithUtf8Test.java @@ -59,7 +59,7 @@ void initialize(@TempDir Path tempDir) { @Test @SneakyThrows void testProfileOnFsDataOnMinioWorks() { - UserIDAuth userJohn = new UserIDAuth("john", new ReadKeyPassword("doe")); + UserIDAuth userJohn = new UserIDAuth("john", ReadKeyPassword.getForString("doe")); // John's profile will be saved to filesystem datasafeServices.userProfile().registerUsingDefaults(userJohn); diff --git a/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/Cli.java b/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/Cli.java index da16a84f1..268c86432 100644 --- a/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/Cli.java +++ b/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/Cli.java @@ -92,7 +92,7 @@ String getUsername() { } ReadKeyPassword getPassword() { - return new ReadKeyPassword(credentials().getPassword()); + return ReadKeyPassword.getForString(credentials().getPassword()); } ReadStorePassword getSystemPassword() { diff --git a/datasafe-directory/datasafe-directory-impl/src/test/java/de/adorsys/datasafe/directory/impl/profile/config/DFSConfigWithStorageCredsTest.java b/datasafe-directory/datasafe-directory-impl/src/test/java/de/adorsys/datasafe/directory/impl/profile/config/DFSConfigWithStorageCredsTest.java index 9b6af0ad1..bf6580fc7 100644 --- a/datasafe-directory/datasafe-directory-impl/src/test/java/de/adorsys/datasafe/directory/impl/profile/config/DFSConfigWithStorageCredsTest.java +++ b/datasafe-directory/datasafe-directory-impl/src/test/java/de/adorsys/datasafe/directory/impl/profile/config/DFSConfigWithStorageCredsTest.java @@ -16,7 +16,7 @@ class DFSConfigWithStorageCredsTest extends BaseMockitoTest { @Test void defaultPrivateTemplate() { - UserIDAuth user = new UserIDAuth("", new ReadKeyPassword("")); + UserIDAuth user = new UserIDAuth("", ReadKeyPassword.getForString("")); CreateUserPrivateProfile profile = tested.defaultPrivateTemplate(user); diff --git a/datasafe-directory/datasafe-directory-impl/src/test/java/de/adorsys/datasafe/directory/impl/profile/dfs/BucketAccessServiceImplTest.java b/datasafe-directory/datasafe-directory-impl/src/test/java/de/adorsys/datasafe/directory/impl/profile/dfs/BucketAccessServiceImplTest.java index 4c6c46415..713e1569b 100644 --- a/datasafe-directory/datasafe-directory-impl/src/test/java/de/adorsys/datasafe/directory/impl/profile/dfs/BucketAccessServiceImplTest.java +++ b/datasafe-directory/datasafe-directory-impl/src/test/java/de/adorsys/datasafe/directory/impl/profile/dfs/BucketAccessServiceImplTest.java @@ -15,7 +15,7 @@ class BucketAccessServiceImplTest extends BaseMockitoTest { private static final String ABSOLUTE_BUCKET = "s3://bucket"; - private UserIDAuth auth = new UserIDAuth(new UserID(""), new ReadKeyPassword("")); + private UserIDAuth auth = new UserIDAuth(new UserID(""), ReadKeyPassword.getForString("")); @InjectMocks private BucketAccessServiceImpl bucketAccessService; diff --git a/datasafe-directory/datasafe-directory-impl/src/test/java/de/adorsys/datasafe/directory/impl/profile/keys/StorageKeyStoreOperationsImplTest.java b/datasafe-directory/datasafe-directory-impl/src/test/java/de/adorsys/datasafe/directory/impl/profile/keys/StorageKeyStoreOperationsImplTest.java index 74279166b..2f5c62f29 100644 --- a/datasafe-directory/datasafe-directory-impl/src/test/java/de/adorsys/datasafe/directory/impl/profile/keys/StorageKeyStoreOperationsImplTest.java +++ b/datasafe-directory/datasafe-directory-impl/src/test/java/de/adorsys/datasafe/directory/impl/profile/keys/StorageKeyStoreOperationsImplTest.java @@ -26,7 +26,7 @@ class StorageKeyStoreOperationsImplTest extends BaseMockitoTest { private static final String STORAGE_ID = "id"; - private static final ReadKeyPassword SECRET = new ReadKeyPassword("secret"); + private static final ReadKeyPassword SECRET = ReadKeyPassword.getForString("secret"); private static final AbsoluteLocation STORAGE_KEYSTORE = BasePrivateResource.forAbsolutePrivate("file://path"); diff --git a/datasafe-encryption/datasafe-encryption-api/src/main/java/de/adorsys/datasafe/encrypiton/api/types/keystore/BaseTypePasswordString.java b/datasafe-encryption/datasafe-encryption-api/src/main/java/de/adorsys/datasafe/encrypiton/api/types/keystore/BaseTypePasswordString.java index 15db3c637..389c12108 100644 --- a/datasafe-encryption/datasafe-encryption-api/src/main/java/de/adorsys/datasafe/encrypiton/api/types/keystore/BaseTypePasswordString.java +++ b/datasafe-encryption/datasafe-encryption-api/src/main/java/de/adorsys/datasafe/encrypiton/api/types/keystore/BaseTypePasswordString.java @@ -18,14 +18,13 @@ public class BaseTypePasswordString { private char[] value; private boolean toBeCleared = true; - @Deprecated /** * - * @param this string stays in memory + * @param value string stays in memory * until gc is called. * please user other constructor. */ - public BaseTypePasswordString(String value) { + protected BaseTypePasswordString(String value) { this.value = value.toCharArray(); toBeCleared = false; } diff --git a/datasafe-encryption/datasafe-encryption-api/src/main/java/de/adorsys/datasafe/encrypiton/api/types/keystore/ReadKeyPassword.java b/datasafe-encryption/datasafe-encryption-api/src/main/java/de/adorsys/datasafe/encrypiton/api/types/keystore/ReadKeyPassword.java index 0cd81d4ee..ed2a720f0 100644 --- a/datasafe-encryption/datasafe-encryption-api/src/main/java/de/adorsys/datasafe/encrypiton/api/types/keystore/ReadKeyPassword.java +++ b/datasafe-encryption/datasafe-encryption-api/src/main/java/de/adorsys/datasafe/encrypiton/api/types/keystore/ReadKeyPassword.java @@ -7,11 +7,6 @@ */ public class ReadKeyPassword extends BaseTypePasswordString { - @Deprecated - public ReadKeyPassword(String readKeyPassword) { - super(readKeyPassword); - } - /** * caller of method makes sure, supplied char[] is deleted asap * @param readKeyPassword will stay unchanged @@ -31,4 +26,13 @@ public ReadKeyPassword(Supplier readKeyPassword) { public ReadKeyPassword(char[] readKeyPassword) { super(readKeyPassword); } + + public static ReadKeyPassword getForString(String a) { + return new ReadKeyPassword(new Supplier() { + @Override + public char[] get() { + return a.toCharArray(); + } + }); + } } diff --git a/datasafe-encryption/datasafe-encryption-api/src/main/java/de/adorsys/datasafe/encrypiton/api/types/keystore/ReadStorePassword.java b/datasafe-encryption/datasafe-encryption-api/src/main/java/de/adorsys/datasafe/encrypiton/api/types/keystore/ReadStorePassword.java index ebfff3b37..c721bb8a7 100644 --- a/datasafe-encryption/datasafe-encryption-api/src/main/java/de/adorsys/datasafe/encrypiton/api/types/keystore/ReadStorePassword.java +++ b/datasafe-encryption/datasafe-encryption-api/src/main/java/de/adorsys/datasafe/encrypiton/api/types/keystore/ReadStorePassword.java @@ -5,7 +5,6 @@ */ public class ReadStorePassword extends BaseTypePasswordString { - @Deprecated public ReadStorePassword(String readStorePassword) { super(readStorePassword); } diff --git a/datasafe-encryption/datasafe-encryption-api/src/test/java/de/adorsys/datasafe/encrypiton/api/types/keystore/ReadKeyPasswordTest.java b/datasafe-encryption/datasafe-encryption-api/src/test/java/de/adorsys/datasafe/encrypiton/api/types/keystore/ReadKeyPasswordTest.java index 8e50e6882..c803faf06 100644 --- a/datasafe-encryption/datasafe-encryption-api/src/test/java/de/adorsys/datasafe/encrypiton/api/types/keystore/ReadKeyPasswordTest.java +++ b/datasafe-encryption/datasafe-encryption-api/src/test/java/de/adorsys/datasafe/encrypiton/api/types/keystore/ReadKeyPasswordTest.java @@ -46,7 +46,7 @@ public void testWithDeprecatedConstructor() { String passwordString = "that is the password"; char[] copyOfPassword = Arrays.copyOf(passwordString.toCharArray(), passwordString.toCharArray().length); - ReadKeyPassword readKeyPassword = new ReadKeyPassword(passwordString); + ReadKeyPassword readKeyPassword = ReadKeyPassword.getForString(passwordString); ReadKeyPassword readKeyPasswordBackup = new ReadKeyPassword(new Supplier() { @Override public char[] get() { diff --git a/datasafe-encryption/datasafe-encryption-impl/src/test/java/de/adorsys/datasafe/encrypiton/impl/KeyPairGeneratorTest.java b/datasafe-encryption/datasafe-encryption-impl/src/test/java/de/adorsys/datasafe/encrypiton/impl/KeyPairGeneratorTest.java index 09f4efbbe..9d2bc1823 100644 --- a/datasafe-encryption/datasafe-encryption-impl/src/test/java/de/adorsys/datasafe/encrypiton/impl/KeyPairGeneratorTest.java +++ b/datasafe-encryption/datasafe-encryption-impl/src/test/java/de/adorsys/datasafe/encrypiton/impl/KeyPairGeneratorTest.java @@ -11,7 +11,7 @@ class KeyPairGeneratorTest extends WithBouncyCastle { @Test void testKeyPairGenerationWithCA() { - ReadKeyPassword readKeyPassword = new ReadKeyPassword("read"); + ReadKeyPassword readKeyPassword = ReadKeyPassword.getForString("read"); TestableKeyPairGeneratorImpl i = new TestableKeyPairGeneratorImpl("RSA", 2048, "SHA256withRSA", "enc"); i.setDayAfter(40); i.setWithCA(true); diff --git a/datasafe-encryption/datasafe-encryption-impl/src/test/java/de/adorsys/datasafe/encrypiton/impl/cmsencryption/CmsEncryptionServiceImplTest.java b/datasafe-encryption/datasafe-encryption-impl/src/test/java/de/adorsys/datasafe/encrypiton/impl/cmsencryption/CmsEncryptionServiceImplTest.java index c417a7b79..7f44d5638 100644 --- a/datasafe-encryption/datasafe-encryption-impl/src/test/java/de/adorsys/datasafe/encrypiton/impl/cmsencryption/CmsEncryptionServiceImplTest.java +++ b/datasafe-encryption/datasafe-encryption-impl/src/test/java/de/adorsys/datasafe/encrypiton/impl/cmsencryption/CmsEncryptionServiceImplTest.java @@ -198,7 +198,7 @@ void cmsStreamEnvelopeOneKeyPairFailTest() { } private static KeyStoreAccess getKeyStoreAccess(String label) { - ReadKeyPassword readKeyPassword = new ReadKeyPassword(label); + ReadKeyPassword readKeyPassword = ReadKeyPassword.getForString(label); ReadStorePassword readStorePassword = new ReadStorePassword(label); KeyStoreAuth keyStoreAuth = new KeyStoreAuth(readStorePassword, readKeyPassword); diff --git a/datasafe-encryption/datasafe-encryption-impl/src/test/java/de/adorsys/datasafe/encrypiton/impl/cmsencryption/SymetricEncryptionTest.java b/datasafe-encryption/datasafe-encryption-impl/src/test/java/de/adorsys/datasafe/encrypiton/impl/cmsencryption/SymetricEncryptionTest.java index a7fc8428d..806a30087 100644 --- a/datasafe-encryption/datasafe-encryption-impl/src/test/java/de/adorsys/datasafe/encrypiton/impl/cmsencryption/SymetricEncryptionTest.java +++ b/datasafe-encryption/datasafe-encryption-impl/src/test/java/de/adorsys/datasafe/encrypiton/impl/cmsencryption/SymetricEncryptionTest.java @@ -32,7 +32,7 @@ class SymetricEncryptionTest extends WithBouncyCastle { private CMSEncryptionService cmsEncryptionService = new CMSEncryptionServiceImpl(new DefaultCMSEncryptionConfig()); private KeyStoreService keyStoreService = new KeyStoreServiceImpl(new DefaultPasswordBasedKeyConfig()); - private ReadKeyPassword readKeyPassword = new ReadKeyPassword("readkeypassword"); + private ReadKeyPassword readKeyPassword = ReadKeyPassword.getForString("readkeypassword"); private ReadStorePassword readStorePassword = new ReadStorePassword("readstorepassword"); private KeyStoreAuth keyStoreAuth = new KeyStoreAuth(readStorePassword, readKeyPassword); private KeyStoreCreationConfig config = new KeyStoreCreationConfig(1, 1); diff --git a/datasafe-encryption/datasafe-encryption-impl/src/test/java/de/adorsys/datasafe/encrypiton/impl/keystore/KeyStoreServiceTest.java b/datasafe-encryption/datasafe-encryption-impl/src/test/java/de/adorsys/datasafe/encrypiton/impl/keystore/KeyStoreServiceTest.java index 31916178c..b3be0f03d 100644 --- a/datasafe-encryption/datasafe-encryption-impl/src/test/java/de/adorsys/datasafe/encrypiton/impl/keystore/KeyStoreServiceTest.java +++ b/datasafe-encryption/datasafe-encryption-impl/src/test/java/de/adorsys/datasafe/encrypiton/impl/keystore/KeyStoreServiceTest.java @@ -31,7 +31,7 @@ class KeyStoreServiceTest extends WithBouncyCastle { @BeforeEach void setUp() { ReadStorePassword readStorePassword = new ReadStorePassword("keystorepass"); - ReadKeyPassword readKeyPassword = new ReadKeyPassword("keypass"); + ReadKeyPassword readKeyPassword = ReadKeyPassword.getForString("keypass"); keyStoreAuth = new KeyStoreAuth(readStorePassword, readKeyPassword); } @@ -81,7 +81,7 @@ void getPublicKeys() { void getPrivateKey() throws Exception { KeyStore keyStore = KeyStoreServiceImplBaseFunctions.newKeyStore(KeyStoreType.DEFAULT); // UBER - ReadKeyPassword readKeyPassword = new ReadKeyPassword("keypass"); + ReadKeyPassword readKeyPassword = ReadKeyPassword.getForString("keypass"); KeyStoreCreationConfigImpl keyStoreCreationConfig = new KeyStoreCreationConfigImpl(null); KeyPairGenerator encKeyPairGenerator = keyStoreCreationConfig.getEncKeyPairGenerator("KEYSTORE-ID-0"); String alias = "KEYSTORE-ID-0" + UUID.randomUUID().toString(); diff --git a/datasafe-encryption/datasafe-encryption-impl/src/test/java/de/adorsys/datasafe/encrypiton/impl/pathencryption/SymmetricPathEncryptionServiceImplTest.java b/datasafe-encryption/datasafe-encryption-impl/src/test/java/de/adorsys/datasafe/encrypiton/impl/pathencryption/SymmetricPathEncryptionServiceImplTest.java index e90563458..3ea09aead 100644 --- a/datasafe-encryption/datasafe-encryption-impl/src/test/java/de/adorsys/datasafe/encrypiton/impl/pathencryption/SymmetricPathEncryptionServiceImplTest.java +++ b/datasafe-encryption/datasafe-encryption-impl/src/test/java/de/adorsys/datasafe/encrypiton/impl/pathencryption/SymmetricPathEncryptionServiceImplTest.java @@ -30,7 +30,7 @@ class SymmetricPathEncryptionServiceImplTest extends WithBouncyCastle { ); private KeyStoreService keyStoreService = new KeyStoreServiceImpl(new DefaultPasswordBasedKeyConfig()); - private ReadKeyPassword readKeyPassword = new ReadKeyPassword("readkeypassword"); + private ReadKeyPassword readKeyPassword = ReadKeyPassword.getForString("readkeypassword"); private ReadStorePassword readStorePassword = new ReadStorePassword("readstorepassword"); private KeyStoreAuth keyStoreAuth = new KeyStoreAuth(readStorePassword, readKeyPassword); private KeyStoreCreationConfig config = new KeyStoreCreationConfig(0, 1); diff --git a/datasafe-examples/datasafe-examples-business/src/test/java/de/adorsys/datasafe/examples/business/filesystem/BaseUserOperationsTestWithDefaultDatasafeTest.java b/datasafe-examples/datasafe-examples-business/src/test/java/de/adorsys/datasafe/examples/business/filesystem/BaseUserOperationsTestWithDefaultDatasafeTest.java index 186d5395f..a76590859 100644 --- a/datasafe-examples/datasafe-examples-business/src/test/java/de/adorsys/datasafe/examples/business/filesystem/BaseUserOperationsTestWithDefaultDatasafeTest.java +++ b/datasafe-examples/datasafe-examples-business/src/test/java/de/adorsys/datasafe/examples/business/filesystem/BaseUserOperationsTestWithDefaultDatasafeTest.java @@ -66,7 +66,7 @@ void registerUser() { IMPORTANT: For cases when user profile is stored on S3 without object locks, this requires some global synchronization due to eventual consistency or you need to supply globally unique username on registration */ - defaultDatasafeServices.userProfile().registerUsingDefaults(new UserIDAuth("user", new ReadKeyPassword("passwrd"))); + defaultDatasafeServices.userProfile().registerUsingDefaults(new UserIDAuth("user", ReadKeyPassword.getForString("passwrd"))); // END_SNIPPET assertThat(defaultDatasafeServices.userProfile().userExists(new UserID("user"))); @@ -296,7 +296,7 @@ private void writeToPrivate(UserIDAuth user, String path, String fileContent) { } private UserIDAuth registerUser(String username) { - UserIDAuth creds = new UserIDAuth(username, new ReadKeyPassword("passwrd" + username)); + UserIDAuth creds = new UserIDAuth(username, ReadKeyPassword.getForString("passwrd" + username)); defaultDatasafeServices.userProfile().registerUsingDefaults(creds); return creds; } diff --git a/datasafe-examples/datasafe-examples-business/src/test/java/de/adorsys/datasafe/examples/business/filesystem/BaseUserOperationsTestWithVersionedDatasafeTest.java b/datasafe-examples/datasafe-examples-business/src/test/java/de/adorsys/datasafe/examples/business/filesystem/BaseUserOperationsTestWithVersionedDatasafeTest.java index 14652f3f7..9de9d5ea6 100644 --- a/datasafe-examples/datasafe-examples-business/src/test/java/de/adorsys/datasafe/examples/business/filesystem/BaseUserOperationsTestWithVersionedDatasafeTest.java +++ b/datasafe-examples/datasafe-examples-business/src/test/java/de/adorsys/datasafe/examples/business/filesystem/BaseUserOperationsTestWithVersionedDatasafeTest.java @@ -67,7 +67,7 @@ void registerUser() { IMPORTANT: For cases when user profile is stored on S3 without object locks, this requires some global synchronization due to eventual consistency or you need to supply globally unique username on registration */ - versionedServices.userProfile().registerUsingDefaults(new UserIDAuth("user", new ReadKeyPassword("passwrd"))); + versionedServices.userProfile().registerUsingDefaults(new UserIDAuth("user", ReadKeyPassword.getForString("passwrd"))); // END_SNIPPET assertThat(versionedServices.userProfile().userExists(new UserID("user"))); @@ -167,7 +167,7 @@ void checkThatWeNeedToDownloadNewFile() { } private UserIDAuth registerUser(String username) { - UserIDAuth creds = new UserIDAuth(username, new ReadKeyPassword("passwrd" + username)); + UserIDAuth creds = new UserIDAuth(username, ReadKeyPassword.getForString("passwrd" + username)); versionedServices.userProfile().registerUsingDefaults(creds); return creds; } diff --git a/datasafe-examples/datasafe-examples-business/src/test/java/de/adorsys/datasafe/examples/business/filesystem/RuntimeOverrideOperationsTest.java b/datasafe-examples/datasafe-examples-business/src/test/java/de/adorsys/datasafe/examples/business/filesystem/RuntimeOverrideOperationsTest.java index c09c09a5b..119c07efa 100644 --- a/datasafe-examples/datasafe-examples-business/src/test/java/de/adorsys/datasafe/examples/business/filesystem/RuntimeOverrideOperationsTest.java +++ b/datasafe-examples/datasafe-examples-business/src/test/java/de/adorsys/datasafe/examples/business/filesystem/RuntimeOverrideOperationsTest.java @@ -47,7 +47,7 @@ void testPathEncryptionOverridden(@TempDir Path root) { .build(); // registering user - UserIDAuth user = new UserIDAuth("user", new ReadKeyPassword("passwrd")); + UserIDAuth user = new UserIDAuth("user", ReadKeyPassword.getForString("passwrd")); datasafeServices.userProfile().registerUsingDefaults(user); // writing into user privatespace, note that with default implementation `file.txt` would be encrypted datasafeServices.privateService().write(WriteRequest.forDefaultPrivate(user, "file.txt")); diff --git a/datasafe-examples/datasafe-examples-customize-dagger/src/test/java/de/adorsys/datasafe/examples/business/filesystem/CustomlyBuiltDatasafeServiceTest.java b/datasafe-examples/datasafe-examples-customize-dagger/src/test/java/de/adorsys/datasafe/examples/business/filesystem/CustomlyBuiltDatasafeServiceTest.java index 0a30eef53..cf65d88c6 100644 --- a/datasafe-examples/datasafe-examples-customize-dagger/src/test/java/de/adorsys/datasafe/examples/business/filesystem/CustomlyBuiltDatasafeServiceTest.java +++ b/datasafe-examples/datasafe-examples-customize-dagger/src/test/java/de/adorsys/datasafe/examples/business/filesystem/CustomlyBuiltDatasafeServiceTest.java @@ -33,7 +33,7 @@ void testPathEncryptionOverridden(@TempDir Path root) { .build(); // registering user - UserIDAuth user = new UserIDAuth("user", new ReadKeyPassword("passwrd")); + UserIDAuth user = new UserIDAuth("user", ReadKeyPassword.getForString("passwrd")); datasafeServices.userProfile().registerUsingDefaults(user); // writing into user privatespace, note that with default implementation `file.txt` would be encrypted datasafeServices.privateService().write(WriteRequest.forDefaultPrivate(user, "file.txt")); diff --git a/datasafe-examples/datasafe-examples-multidfs/src/test/java/de/adorsys/datasafe/examples/business/s3/MultiDfsWithCredentialsExampleTest.java b/datasafe-examples/datasafe-examples-multidfs/src/test/java/de/adorsys/datasafe/examples/business/s3/MultiDfsWithCredentialsExampleTest.java index 8dead7e74..99c0eb226 100644 --- a/datasafe-examples/datasafe-examples-multidfs/src/test/java/de/adorsys/datasafe/examples/business/s3/MultiDfsWithCredentialsExampleTest.java +++ b/datasafe-examples/datasafe-examples-multidfs/src/test/java/de/adorsys/datasafe/examples/business/s3/MultiDfsWithCredentialsExampleTest.java @@ -156,7 +156,7 @@ void testMultiUserStorageUserSetup() { // Depending on path of file - filesBucketOne or filesBucketTwo - requests will be routed to proper bucket. // I.e. path filesBucketOne/path/to/file will end up in `filesBucketOne` with key path/to/file // his profile and access credentials for `filesBucketOne` will be in `configBucket` - UserIDAuth john = new UserIDAuth("john", new ReadKeyPassword("secret")); + UserIDAuth john = new UserIDAuth("john", ReadKeyPassword.getForString("secret")); // Here, nothing expects John has own storage credentials: multiDfsDatasafe.userProfile().registerUsingDefaults(john); diff --git a/datasafe-examples/datasafe-examples-versioned-s3/src/test/java/de/adorsys/datasafe/examples/business/s3/BaseUserOperationsWithDefaultDatasafeOnVersionedStorageTest.java b/datasafe-examples/datasafe-examples-versioned-s3/src/test/java/de/adorsys/datasafe/examples/business/s3/BaseUserOperationsWithDefaultDatasafeOnVersionedStorageTest.java index 11e8159fe..d84a74378 100644 --- a/datasafe-examples/datasafe-examples-versioned-s3/src/test/java/de/adorsys/datasafe/examples/business/s3/BaseUserOperationsWithDefaultDatasafeOnVersionedStorageTest.java +++ b/datasafe-examples/datasafe-examples-versioned-s3/src/test/java/de/adorsys/datasafe/examples/business/s3/BaseUserOperationsWithDefaultDatasafeOnVersionedStorageTest.java @@ -233,7 +233,7 @@ private String writeToPrivate(UserIDAuth user, String path, String fileContent) } private UserIDAuth registerUser(String username) { - UserIDAuth creds = new UserIDAuth(username, new ReadKeyPassword("passwrd" + username)); + UserIDAuth creds = new UserIDAuth(username, ReadKeyPassword.getForString("passwrd" + username)); defaultDatasafeServices.userProfile().registerUsingDefaults(creds); return creds; } diff --git a/datasafe-inbox/datasafe-inbox-impl/src/test/java/de/adorsys/datasafe/inbox/api/actions/ListInboxImplTest.java b/datasafe-inbox/datasafe-inbox-impl/src/test/java/de/adorsys/datasafe/inbox/api/actions/ListInboxImplTest.java index 76039de06..d9ccccfa5 100644 --- a/datasafe-inbox/datasafe-inbox-impl/src/test/java/de/adorsys/datasafe/inbox/api/actions/ListInboxImplTest.java +++ b/datasafe-inbox/datasafe-inbox-impl/src/test/java/de/adorsys/datasafe/inbox/api/actions/ListInboxImplTest.java @@ -29,7 +29,7 @@ class ListInboxImplTest extends BaseMockitoTest { private static final String PATH = "./"; private static final URI ABSOLUTE_PATH = URI.create("s3://absolute"); - private UserIDAuth auth = new UserIDAuth(new UserID(""), new ReadKeyPassword("")); + private UserIDAuth auth = new UserIDAuth(new UserID(""), ReadKeyPassword.getForString("")); @Mock private PrivateKeyService privateKeyService; diff --git a/datasafe-inbox/datasafe-inbox-impl/src/test/java/de/adorsys/datasafe/inbox/api/actions/ReadFromInboxImplTest.java b/datasafe-inbox/datasafe-inbox-impl/src/test/java/de/adorsys/datasafe/inbox/api/actions/ReadFromInboxImplTest.java index 54ed279f7..906789c73 100644 --- a/datasafe-inbox/datasafe-inbox-impl/src/test/java/de/adorsys/datasafe/inbox/api/actions/ReadFromInboxImplTest.java +++ b/datasafe-inbox/datasafe-inbox-impl/src/test/java/de/adorsys/datasafe/inbox/api/actions/ReadFromInboxImplTest.java @@ -28,7 +28,7 @@ class ReadFromInboxImplTest extends BaseMockitoTest { private static final String BYTES = "Hello"; private static final URI ABSOLUTE_PATH = URI.create("s3://absolute"); - private UserIDAuth auth = new UserIDAuth(new UserID(""), new ReadKeyPassword("")); + private UserIDAuth auth = new UserIDAuth(new UserID(""), ReadKeyPassword.getForString("")); @Mock private ResourceResolver resolver; diff --git a/datasafe-inbox/datasafe-inbox-impl/src/test/java/de/adorsys/datasafe/inbox/api/actions/RemoveFromInboxImplTest.java b/datasafe-inbox/datasafe-inbox-impl/src/test/java/de/adorsys/datasafe/inbox/api/actions/RemoveFromInboxImplTest.java index 4414dd48d..57282d6e4 100644 --- a/datasafe-inbox/datasafe-inbox-impl/src/test/java/de/adorsys/datasafe/inbox/api/actions/RemoveFromInboxImplTest.java +++ b/datasafe-inbox/datasafe-inbox-impl/src/test/java/de/adorsys/datasafe/inbox/api/actions/RemoveFromInboxImplTest.java @@ -25,7 +25,7 @@ class RemoveFromInboxImplTest extends BaseMockitoTest { private static final String PATH = "./"; private static final URI ABSOLUTE_PATH = URI.create("s3://absolute"); - private UserIDAuth auth = new UserIDAuth(new UserID(""), new ReadKeyPassword("")); + private UserIDAuth auth = new UserIDAuth(new UserID(""), ReadKeyPassword.getForString("")); @Mock private PrivateKeyService privateKeyService; diff --git a/datasafe-long-run-tests/datasafe-business-tests-random-actions/src/test/java/de/adorsys/datasafe/business/impl/e2e/randomactions/framework/fixture/dto/TestUser.java b/datasafe-long-run-tests/datasafe-business-tests-random-actions/src/test/java/de/adorsys/datasafe/business/impl/e2e/randomactions/framework/fixture/dto/TestUser.java index ac2c82f8a..9d89c6bcf 100644 --- a/datasafe-long-run-tests/datasafe-business-tests-random-actions/src/test/java/de/adorsys/datasafe/business/impl/e2e/randomactions/framework/fixture/dto/TestUser.java +++ b/datasafe-long-run-tests/datasafe-business-tests-random-actions/src/test/java/de/adorsys/datasafe/business/impl/e2e/randomactions/framework/fixture/dto/TestUser.java @@ -20,6 +20,6 @@ public class TestUser { public TestUser(String username, String password) { this.username = username; this.password = password; - this.auth = new UserIDAuth(new UserID(username), new ReadKeyPassword(password)); + this.auth = new UserIDAuth(new UserID(username), ReadKeyPassword.getForString(password)); } } diff --git a/datasafe-long-run-tests/datasafe-business-tests-random-actions/src/test/java/de/adorsys/datasafe/business/impl/e2e/randomactions/framework/services/OperationExecutor.java b/datasafe-long-run-tests/datasafe-business-tests-random-actions/src/test/java/de/adorsys/datasafe/business/impl/e2e/randomactions/framework/services/OperationExecutor.java index 8ba9cebb7..6c2f002c8 100644 --- a/datasafe-long-run-tests/datasafe-business-tests-random-actions/src/test/java/de/adorsys/datasafe/business/impl/e2e/randomactions/framework/services/OperationExecutor.java +++ b/datasafe-long-run-tests/datasafe-business-tests-random-actions/src/test/java/de/adorsys/datasafe/business/impl/e2e/randomactions/framework/services/OperationExecutor.java @@ -131,7 +131,7 @@ private Stream generateValidatingOperations(String execId, @SneakyThrows private void doCreate(Operation oper) { - UserIDAuth auth = new UserIDAuth(oper.getUserId(), new ReadKeyPassword(oper.getUserId())); + UserIDAuth auth = new UserIDAuth(oper.getUserId(), ReadKeyPassword.getForString(oper.getUserId())); registrationService.registerUsingDefaults(auth); users.put(auth.getUserID().getValue(), new UserSpec(auth, new ContentGenerator(fileContentSize))); } diff --git a/datasafe-privatestore/datasafe-privatestore-impl/src/test/java/de/adorsys/datasafe/privatestore/impl/actions/EncryptedResourceResolverImplTest.java b/datasafe-privatestore/datasafe-privatestore-impl/src/test/java/de/adorsys/datasafe/privatestore/impl/actions/EncryptedResourceResolverImplTest.java index b29844708..e18a448a9 100644 --- a/datasafe-privatestore/datasafe-privatestore-impl/src/test/java/de/adorsys/datasafe/privatestore/impl/actions/EncryptedResourceResolverImplTest.java +++ b/datasafe-privatestore/datasafe-privatestore-impl/src/test/java/de/adorsys/datasafe/privatestore/impl/actions/EncryptedResourceResolverImplTest.java @@ -36,7 +36,7 @@ class EncryptedResourceResolverImplTest extends BaseMockitoTest { private PrivateResource relative = BasePrivateResource.forPrivate(URI.create("./path")); private PrivateResource relativeEncrypted = BasePrivateResource.forPrivate(URI.create("./path/") .resolve(ENCRYPTED)); - private UserIDAuth auth = new UserIDAuth(new UserID(""), new ReadKeyPassword("")); + private UserIDAuth auth = new UserIDAuth(new UserID(""), ReadKeyPassword.getForString("")); @Mock private BucketAccessService accessService; diff --git a/datasafe-privatestore/datasafe-privatestore-impl/src/test/java/de/adorsys/datasafe/privatestore/impl/actions/ListPrivateImplTest.java b/datasafe-privatestore/datasafe-privatestore-impl/src/test/java/de/adorsys/datasafe/privatestore/impl/actions/ListPrivateImplTest.java index 251d13143..bb6e60993 100644 --- a/datasafe-privatestore/datasafe-privatestore-impl/src/test/java/de/adorsys/datasafe/privatestore/impl/actions/ListPrivateImplTest.java +++ b/datasafe-privatestore/datasafe-privatestore-impl/src/test/java/de/adorsys/datasafe/privatestore/impl/actions/ListPrivateImplTest.java @@ -24,7 +24,7 @@ class ListPrivateImplTest extends BaseMockitoTest { private static final String PATH = "./"; private static final URI ABSOLUTE_PATH = URI.create("s3://absolute"); - private UserIDAuth auth = new UserIDAuth(new UserID(""), new ReadKeyPassword("")); + private UserIDAuth auth = new UserIDAuth(new UserID(""), ReadKeyPassword.getForString("")); @Mock private ResolvedResource resolvedResource; diff --git a/datasafe-privatestore/datasafe-privatestore-impl/src/test/java/de/adorsys/datasafe/privatestore/impl/actions/ReadFromPrivateImplTest.java b/datasafe-privatestore/datasafe-privatestore-impl/src/test/java/de/adorsys/datasafe/privatestore/impl/actions/ReadFromPrivateImplTest.java index bf4bab786..bdfacb0f0 100644 --- a/datasafe-privatestore/datasafe-privatestore-impl/src/test/java/de/adorsys/datasafe/privatestore/impl/actions/ReadFromPrivateImplTest.java +++ b/datasafe-privatestore/datasafe-privatestore-impl/src/test/java/de/adorsys/datasafe/privatestore/impl/actions/ReadFromPrivateImplTest.java @@ -27,7 +27,7 @@ class ReadFromPrivateImplTest extends BaseMockitoTest { private static final String BYTES = "Hello"; private static final URI ABSOLUTE_PATH = URI.create("s3://absolute"); - private UserIDAuth auth = new UserIDAuth(new UserID(""), new ReadKeyPassword("")); + private UserIDAuth auth = new UserIDAuth(new UserID(""), ReadKeyPassword.getForString("")); @Mock private EncryptedResourceResolver resolver; diff --git a/datasafe-privatestore/datasafe-privatestore-impl/src/test/java/de/adorsys/datasafe/privatestore/impl/actions/WriteToPrivateImplTest.java b/datasafe-privatestore/datasafe-privatestore-impl/src/test/java/de/adorsys/datasafe/privatestore/impl/actions/WriteToPrivateImplTest.java index e9f203172..ff21d74fd 100644 --- a/datasafe-privatestore/datasafe-privatestore-impl/src/test/java/de/adorsys/datasafe/privatestore/impl/actions/WriteToPrivateImplTest.java +++ b/datasafe-privatestore/datasafe-privatestore-impl/src/test/java/de/adorsys/datasafe/privatestore/impl/actions/WriteToPrivateImplTest.java @@ -36,7 +36,7 @@ class WriteToPrivateImplTest extends BaseMockitoTest { private static final String BYTES = "Hello"; private static final URI ABSOLUTE_PATH = URI.create("s3://absolute"); - private UserIDAuth auth = new UserIDAuth(new UserID(""), new ReadKeyPassword("")); + private UserIDAuth auth = new UserIDAuth(new UserID(""), ReadKeyPassword.getForString("")); private SecretKeyIDWithKey secretKeyIDWithKey; diff --git a/datasafe-rest-impl/src/main/java/de/adorsys/datasafe/rest/impl/controller/DocumentController.java b/datasafe-rest-impl/src/main/java/de/adorsys/datasafe/rest/impl/controller/DocumentController.java index b155bacb0..8df7bde3c 100644 --- a/datasafe-rest-impl/src/main/java/de/adorsys/datasafe/rest/impl/controller/DocumentController.java +++ b/datasafe-rest-impl/src/main/java/de/adorsys/datasafe/rest/impl/controller/DocumentController.java @@ -67,7 +67,7 @@ public void readDocument(@RequestHeader String user, @RequestHeader(defaultValue = StorageIdentifier.DEFAULT_ID) String storageId, @PathVariable String path, HttpServletResponse response) { - UserIDAuth userIDAuth = new UserIDAuth(new UserID(user), new ReadKeyPassword(password)); + UserIDAuth userIDAuth = new UserIDAuth(new UserID(user), ReadKeyPassword.getForString(password)); ReadRequest request = ReadRequest.forPrivate(userIDAuth, new StorageIdentifier(storageId), path); // this is needed for swagger, produces is just a directive: @@ -94,7 +94,7 @@ public void writeDocument(@RequestHeader String user, @RequestHeader(defaultValue = StorageIdentifier.DEFAULT_ID) String storageId, @PathVariable String path, @RequestParam("file") MultipartFile file) { - UserIDAuth userIDAuth = new UserIDAuth(new UserID(user), new ReadKeyPassword(password)); + UserIDAuth userIDAuth = new UserIDAuth(new UserID(user), ReadKeyPassword.getForString(password)); WriteRequest request = WriteRequest.forPrivate(userIDAuth, new StorageIdentifier(storageId), path); try (OutputStream os = datasafeService.privateService().write(request); @@ -118,7 +118,7 @@ public List listDocuments(@RequestHeader String user, @RequestHeader(defaultValue = StorageIdentifier.DEFAULT_ID) String storageId, @ApiParam(defaultValue = ".") @PathVariable(required = false) String path) { - UserIDAuth userIDAuth = new UserIDAuth(new UserID(user), new ReadKeyPassword(password)); + UserIDAuth userIDAuth = new UserIDAuth(new UserID(user), ReadKeyPassword.getForString(password)); path = Optional.ofNullable(path) .map(it -> it.replaceAll("^\\.$", "")) .orElse("./"); @@ -146,7 +146,7 @@ public void removeDocument(@RequestHeader String user, @RequestHeader String password, @RequestHeader(defaultValue = StorageIdentifier.DEFAULT_ID) String storageId, @PathVariable String path) { - UserIDAuth userIDAuth = new UserIDAuth(new UserID(user), new ReadKeyPassword(password)); + UserIDAuth userIDAuth = new UserIDAuth(new UserID(user), ReadKeyPassword.getForString(password)); RemoveRequest request = RemoveRequest.forPrivate(userIDAuth, new StorageIdentifier(storageId), path); datasafeService.privateService().remove(request); diff --git a/datasafe-rest-impl/src/main/java/de/adorsys/datasafe/rest/impl/controller/InboxController.java b/datasafe-rest-impl/src/main/java/de/adorsys/datasafe/rest/impl/controller/InboxController.java index 75cedfff1..fb553a083 100644 --- a/datasafe-rest-impl/src/main/java/de/adorsys/datasafe/rest/impl/controller/InboxController.java +++ b/datasafe-rest-impl/src/main/java/de/adorsys/datasafe/rest/impl/controller/InboxController.java @@ -77,7 +77,7 @@ public void readFromInbox(@RequestHeader String user, @RequestHeader String password, @PathVariable String path, HttpServletResponse response) { - UserIDAuth userIDAuth = new UserIDAuth(new UserID(user), new ReadKeyPassword(password)); + UserIDAuth userIDAuth = new UserIDAuth(new UserID(user), ReadKeyPassword.getForString(password)); PrivateResource resource = BasePrivateResource.forPrivate(path); // this is needed for swagger, produces is just a directive: response.addHeader(CONTENT_TYPE, APPLICATION_OCTET_STREAM_VALUE); @@ -100,7 +100,7 @@ public void readFromInbox(@RequestHeader String user, public void deleteFromInbox(@RequestHeader String user, @RequestHeader String password, @PathVariable String path) { - UserIDAuth userIDAuth = new UserIDAuth(new UserID(user), new ReadKeyPassword(password)); + UserIDAuth userIDAuth = new UserIDAuth(new UserID(user), ReadKeyPassword.getForString(password)); PrivateResource resource = BasePrivateResource.forPrivate(path); RemoveRequest request = RemoveRequest.forPrivate(userIDAuth, resource); dataSafeService.inboxService().remove(request); @@ -120,7 +120,7 @@ public List listInbox(@RequestHeader String user, @RequestHeader String password, @ApiParam(defaultValue = ".") @PathVariable(required = false) String path) { - UserIDAuth userIDAuth = new UserIDAuth(new UserID(user), new ReadKeyPassword(password)); + UserIDAuth userIDAuth = new UserIDAuth(new UserID(user), ReadKeyPassword.getForString(password)); path = Optional.ofNullable(path) .map(it -> it.replaceAll("^\\.$", "")) .orElse("./"); diff --git a/datasafe-rest-impl/src/main/java/de/adorsys/datasafe/rest/impl/controller/UserController.java b/datasafe-rest-impl/src/main/java/de/adorsys/datasafe/rest/impl/controller/UserController.java index 4f6230025..434a7bb19 100644 --- a/datasafe-rest-impl/src/main/java/de/adorsys/datasafe/rest/impl/controller/UserController.java +++ b/datasafe-rest-impl/src/main/java/de/adorsys/datasafe/rest/impl/controller/UserController.java @@ -62,7 +62,7 @@ public class UserController { @ApiResponse(code = 400, message = "User already exists") }) public void createUser(@Validated @RequestBody UserDTO userDTO) { - ReadKeyPassword readKeyPassword = new ReadKeyPassword(userDTO.getPassword()); + ReadKeyPassword readKeyPassword = ReadKeyPassword.getForString(userDTO.getPassword()); UserIDAuth auth = new UserIDAuth(new UserID(userDTO.getUserName()), readKeyPassword); if (dataSafeService.userProfile().userExists(auth.getUserID())) { throw new UserExistsException("user '" + auth.getUserID().getValue() + "' already exists"); @@ -75,16 +75,16 @@ public void createUser(@Validated @RequestBody UserDTO userDTO) { public void changePassword(@RequestHeader String user, @RequestHeader String password, @Validated @RequestBody NewPasswordDTO newPassword) { - ReadKeyPassword readKeyPassword = new ReadKeyPassword(password); + ReadKeyPassword readKeyPassword = ReadKeyPassword.getForString(password); UserIDAuth auth = new UserIDAuth(new UserID(user), readKeyPassword); - dataSafeService.userProfile().updateReadKeyPassword(auth, new ReadKeyPassword(newPassword.getNewPassword())); + dataSafeService.userProfile().updateReadKeyPassword(auth, ReadKeyPassword.getForString(newPassword.getNewPassword())); } @GetMapping("/publicProfile") @ApiOperation("Reads users' public profile") public UserPublicProfileDTO getPublicProfile(@RequestHeader String user, @RequestHeader String password) { - ReadKeyPassword readKeyPassword = new ReadKeyPassword(password); + ReadKeyPassword readKeyPassword = ReadKeyPassword.getForString(password); UserIDAuth auth = new UserIDAuth(new UserID(user), readKeyPassword); return UserPublicProfileDTO.from(dataSafeService.userProfile().publicProfile(auth.getUserID())); } @@ -93,7 +93,7 @@ public UserPublicProfileDTO getPublicProfile(@RequestHeader String user, @ApiOperation("Reads users' private profile") public UserPrivateProfileDTO getPrivateProfile(@RequestHeader String user, @RequestHeader String password) { - ReadKeyPassword readKeyPassword = new ReadKeyPassword(password); + ReadKeyPassword readKeyPassword = ReadKeyPassword.getForString(password); UserIDAuth auth = new UserIDAuth(new UserID(user), readKeyPassword); return UserPrivateProfileDTO.from(dataSafeService.userProfile().privateProfile(auth)); } @@ -103,7 +103,7 @@ public UserPrivateProfileDTO getPrivateProfile(@RequestHeader String user, public void updatePublicProfile(@RequestHeader String user, @RequestHeader String password, @Validated @RequestBody UserPublicProfileDTO profileDto) { - ReadKeyPassword readKeyPassword = new ReadKeyPassword(password); + ReadKeyPassword readKeyPassword = ReadKeyPassword.getForString(password); UserIDAuth auth = new UserIDAuth(new UserID(user), readKeyPassword); dataSafeService.userProfile().updatePublicProfile(auth, profileDto.toProfile()); } @@ -113,7 +113,7 @@ public void updatePublicProfile(@RequestHeader String user, public void updatePrivateProfile(@RequestHeader String user, @RequestHeader String password, @Validated @RequestBody UserPrivateProfileDTO profileDto) { - ReadKeyPassword readKeyPassword = new ReadKeyPassword(password); + ReadKeyPassword readKeyPassword = ReadKeyPassword.getForString(password); UserIDAuth auth = new UserIDAuth(new UserID(user), readKeyPassword); dataSafeService.userProfile().updatePrivateProfile(auth, profileDto.toProfile()); } @@ -123,7 +123,7 @@ public void updatePrivateProfile(@RequestHeader String user, public void addStorageCredentials(@RequestHeader String user, @RequestHeader String password, @Validated @RequestBody StorageCredsDTO creds) { - ReadKeyPassword readKeyPassword = new ReadKeyPassword(password); + ReadKeyPassword readKeyPassword = ReadKeyPassword.getForString(password); UserIDAuth auth = new UserIDAuth(new UserID(user), readKeyPassword); dataSafeService.userProfile().registerStorageCredentials( auth, @@ -137,7 +137,7 @@ public void addStorageCredentials(@RequestHeader String user, public void removeStorageCredentials(@RequestHeader String user, @RequestHeader String password, @RequestHeader String storageId) { - ReadKeyPassword readKeyPassword = new ReadKeyPassword(password); + ReadKeyPassword readKeyPassword = ReadKeyPassword.getForString(password); UserIDAuth auth = new UserIDAuth(new UserID(user), readKeyPassword); dataSafeService.userProfile().deregisterStorageCredentials(auth, new StorageIdentifier(storageId)); } @@ -156,7 +156,7 @@ public void removeStorageCredentials(@RequestHeader String user, }) public void deleteUser(@RequestHeader String user, @RequestHeader String password) { - UserIDAuth auth = new UserIDAuth(new UserID(user), new ReadKeyPassword(password)); + UserIDAuth auth = new UserIDAuth(new UserID(user), ReadKeyPassword.getForString(password)); if (!dataSafeService.userProfile().userExists(auth.getUserID())) { throw new UserDoesNotExistsException("user '" + auth.getUserID().getValue() + "' does not exists"); } diff --git a/datasafe-rest-impl/src/main/java/de/adorsys/datasafe/rest/impl/controller/VersionController.java b/datasafe-rest-impl/src/main/java/de/adorsys/datasafe/rest/impl/controller/VersionController.java index 11c8a33af..216b64261 100644 --- a/datasafe-rest-impl/src/main/java/de/adorsys/datasafe/rest/impl/controller/VersionController.java +++ b/datasafe-rest-impl/src/main/java/de/adorsys/datasafe/rest/impl/controller/VersionController.java @@ -51,7 +51,7 @@ public List listVersionedDocuments(@RequestHeader String user, @RequestHeader String password, @RequestHeader(defaultValue = StorageIdentifier.DEFAULT_ID) String storageId, @PathVariable(required = false) String path) { - UserIDAuth userIDAuth = new UserIDAuth(new UserID(user), new ReadKeyPassword(password)); + UserIDAuth userIDAuth = new UserIDAuth(new UserID(user), ReadKeyPassword.getForString(password)); path = Optional.ofNullable(path).orElse("./"); try { List documentList = versionedDatasafeServices.latestPrivate().listWithDetails( @@ -81,7 +81,7 @@ public void readVersionedDocument(@RequestHeader String user, @RequestHeader(defaultValue = StorageIdentifier.DEFAULT_ID) String storageId, @PathVariable String path, HttpServletResponse response) { - UserIDAuth userIDAuth = new UserIDAuth(new UserID(user), new ReadKeyPassword(password)); + UserIDAuth userIDAuth = new UserIDAuth(new UserID(user), ReadKeyPassword.getForString(password)); ReadRequest request = ReadRequest.forPrivate(userIDAuth, new StorageIdentifier(storageId), path); // this is needed for swagger, produces is just a directive: @@ -108,7 +108,7 @@ public void writeVersionedDocument(@RequestHeader String user, @RequestHeader(defaultValue = StorageIdentifier.DEFAULT_ID) String storageId, @PathVariable String path, @RequestParam("file") MultipartFile file) { - UserIDAuth userIDAuth = new UserIDAuth(new UserID(user), new ReadKeyPassword(password)); + UserIDAuth userIDAuth = new UserIDAuth(new UserID(user), ReadKeyPassword.getForString(password)); WriteRequest request = WriteRequest.forPrivate(userIDAuth, new StorageIdentifier(storageId), path); try (OutputStream os = versionedDatasafeServices.latestPrivate().write(request); @@ -130,7 +130,7 @@ public void deleteVersionedDocument(@RequestHeader String user, @RequestHeader String password, @RequestHeader(defaultValue = StorageIdentifier.DEFAULT_ID) String storageId, @PathVariable String path) { - UserIDAuth userIDAuth = new UserIDAuth(new UserID(user), new ReadKeyPassword(password)); + UserIDAuth userIDAuth = new UserIDAuth(new UserID(user), ReadKeyPassword.getForString(password)); RemoveRequest request = RemoveRequest.forPrivate(userIDAuth, new StorageIdentifier(storageId), path); versionedDatasafeServices.latestPrivate().remove(request); @@ -151,7 +151,7 @@ public List versionsOf(@RequestHeader String user, @RequestHeader(defaultValue = StorageIdentifier.DEFAULT_ID) String storageId, @ApiParam(defaultValue = ".") @PathVariable(required = false) String path) { - UserIDAuth userIDAuth = new UserIDAuth(new UserID(user), new ReadKeyPassword(password)); + UserIDAuth userIDAuth = new UserIDAuth(new UserID(user), ReadKeyPassword.getForString(password)); path = Optional.ofNullable(path) .map(it -> it.replaceAll("^\\.$", "")) .orElse("./"); diff --git a/datasafe-rest-impl/src/test/java/de/adorsys/datasafe/rest/impl/controller/BaseTokenDatasafeEndpointTest.java b/datasafe-rest-impl/src/test/java/de/adorsys/datasafe/rest/impl/controller/BaseTokenDatasafeEndpointTest.java index a389c2ec0..b31035443 100644 --- a/datasafe-rest-impl/src/test/java/de/adorsys/datasafe/rest/impl/controller/BaseTokenDatasafeEndpointTest.java +++ b/datasafe-rest-impl/src/test/java/de/adorsys/datasafe/rest/impl/controller/BaseTokenDatasafeEndpointTest.java @@ -15,7 +15,7 @@ public abstract class BaseTokenDatasafeEndpointTest extends BaseDatasafeEndpoint static final String PASSWORD_DESCRIPTION = "datasafe user's password"; static final String TEST_USER = "test"; - static final ReadKeyPassword TEST_PASS = new ReadKeyPassword("test"); + static final ReadKeyPassword TEST_PASS = ReadKeyPassword.getForString("test"); String token; private SecurityProperties securityProperties; diff --git a/datasafe-rest-impl/src/test/java/de/adorsys/datasafe/rest/impl/controller/UserControllerTest.java b/datasafe-rest-impl/src/test/java/de/adorsys/datasafe/rest/impl/controller/UserControllerTest.java index 5cce87c6a..c5f8afa74 100644 --- a/datasafe-rest-impl/src/test/java/de/adorsys/datasafe/rest/impl/controller/UserControllerTest.java +++ b/datasafe-rest-impl/src/test/java/de/adorsys/datasafe/rest/impl/controller/UserControllerTest.java @@ -93,7 +93,7 @@ void changePasswordTest() { verify(userProfile).updateReadKeyPassword( eq(new UserIDAuth(TEST_USER, TEST_PASS)), - eq(new ReadKeyPassword(newPassword)) + eq(ReadKeyPassword.getForString(newPassword)) ); } diff --git a/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/test/java/de/adorsys/datasafe/simple/adapter/impl/CleanupDbTest.java b/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/test/java/de/adorsys/datasafe/simple/adapter/impl/CleanupDbTest.java index 0144a8e0c..941caee86 100644 --- a/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/test/java/de/adorsys/datasafe/simple/adapter/impl/CleanupDbTest.java +++ b/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/test/java/de/adorsys/datasafe/simple/adapter/impl/CleanupDbTest.java @@ -45,8 +45,8 @@ void cleanupDb(WithStorageProvider.StorageDescriptor descriptor) { String content = "content of document"; String path = "a/b/c.txt"; - UserIDAuth user1 = new UserIDAuth("uzr", new ReadKeyPassword("user")); - UserIDAuth user2 = new UserIDAuth("other", new ReadKeyPassword("user")); + UserIDAuth user1 = new UserIDAuth("uzr", ReadKeyPassword.getForString("user")); + UserIDAuth user2 = new UserIDAuth("other", ReadKeyPassword.getForString("user")); simpleDatasafeService.createUser(user1); simpleDatasafeService.createUser(user2); diff --git a/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/test/java/de/adorsys/datasafe/simple/adapter/impl/DFSRelativeToRootProfileTest.java b/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/test/java/de/adorsys/datasafe/simple/adapter/impl/DFSRelativeToRootProfileTest.java index 99543c87f..16c8e6bd7 100644 --- a/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/test/java/de/adorsys/datasafe/simple/adapter/impl/DFSRelativeToRootProfileTest.java +++ b/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/test/java/de/adorsys/datasafe/simple/adapter/impl/DFSRelativeToRootProfileTest.java @@ -36,7 +36,7 @@ void createDatasafeAdapter(StorageDescriptor descriptor) { simpleDatasafeService = null != credentials ? new SimpleDatasafeServiceImpl(credentials) : new SimpleDatasafeServiceImpl(); - userIDAuth = new UserIDAuth(new UserID("peter"), new ReadKeyPassword("password")); + userIDAuth = new UserIDAuth(new UserID("peter"), ReadKeyPassword.getForString("password")); simpleDatasafeService.createUser(userIDAuth); } diff --git a/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/test/java/de/adorsys/datasafe/simple/adapter/impl/SimpleAdapterFeatureTest.java b/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/test/java/de/adorsys/datasafe/simple/adapter/impl/SimpleAdapterFeatureTest.java index 5cdb3271c..d53eaef75 100644 --- a/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/test/java/de/adorsys/datasafe/simple/adapter/impl/SimpleAdapterFeatureTest.java +++ b/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/test/java/de/adorsys/datasafe/simple/adapter/impl/SimpleAdapterFeatureTest.java @@ -32,7 +32,7 @@ @Slf4j class SimpleAdapterFeatureTest extends WithBouncyCastle { - private UserIDAuth userIDAuth = new UserIDAuth(new UserID("peter"), new ReadKeyPassword("password")); + private UserIDAuth userIDAuth = new UserIDAuth(new UserID("peter"), ReadKeyPassword.getForString("password")); private String content = "content of document"; private String path = "a/b/c.txt"; private DSDocument document = new DSDocument(new DocumentFQN(path), new DocumentContent(content.getBytes())); diff --git a/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/test/java/de/adorsys/datasafe/simple/adapter/impl/SimpleDatasafeAdapter043CompatTest.java b/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/test/java/de/adorsys/datasafe/simple/adapter/impl/SimpleDatasafeAdapter043CompatTest.java index 5c200f050..d3fce8944 100644 --- a/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/test/java/de/adorsys/datasafe/simple/adapter/impl/SimpleDatasafeAdapter043CompatTest.java +++ b/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/test/java/de/adorsys/datasafe/simple/adapter/impl/SimpleDatasafeAdapter043CompatTest.java @@ -21,7 +21,7 @@ */ class SimpleDatasafeAdapter043CompatTest extends WithBouncyCastle { - private UserIDAuth userIDAuth = new UserIDAuth(new UserID("peter"), new ReadKeyPassword("password")); + private UserIDAuth userIDAuth = new UserIDAuth(new UserID("peter"), ReadKeyPassword.getForString("password")); private SimpleDatasafeServiceImpl simpleDatasafeService; private Path dfsRoot; diff --git a/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/test/java/de/adorsys/datasafe/simple/adapter/impl/SimpleDatasafeAdapterTest.java b/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/test/java/de/adorsys/datasafe/simple/adapter/impl/SimpleDatasafeAdapterTest.java index da6824d01..a9bde133d 100644 --- a/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/test/java/de/adorsys/datasafe/simple/adapter/impl/SimpleDatasafeAdapterTest.java +++ b/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/test/java/de/adorsys/datasafe/simple/adapter/impl/SimpleDatasafeAdapterTest.java @@ -57,7 +57,7 @@ void mystart() { } else { simpleDatasafeService = new SimpleDatasafeServiceImpl(); } - userIDAuth = new UserIDAuth(new UserID("peter"), new ReadKeyPassword("password")); + userIDAuth = new UserIDAuth(new UserID("peter"), ReadKeyPassword.getForString("password")); simpleDatasafeService.createUser(userIDAuth); } @@ -113,7 +113,7 @@ void writeAndReadFileWithPasswordChange(WithStorageProvider.StorageDescriptor de String path = "a/b/c.txt"; DSDocument document = new DSDocument(new DocumentFQN(path), new DocumentContent(content.getBytes())); simpleDatasafeService.storeDocument(userIDAuth, document); - ReadKeyPassword newPassword = new ReadKeyPassword("AAAAAAHHH!"); + ReadKeyPassword newPassword = ReadKeyPassword.getForString("AAAAAAHHH!"); simpleDatasafeService.changeKeystorePassword(userIDAuth, newPassword); assertThrows( @@ -227,7 +227,7 @@ void writeAndReadFilesAsStream(WithStorageProvider.StorageDescriptor descriptor) void testTwoUsers(WithStorageProvider.StorageDescriptor descriptor) { myinit(descriptor); mystart(); - UserIDAuth userIDAuth2 = new UserIDAuth(new UserID("peter2"), new ReadKeyPassword("password2")); + UserIDAuth userIDAuth2 = new UserIDAuth(new UserID("peter2"), ReadKeyPassword.getForString("password2")); simpleDatasafeService.createUser(userIDAuth2); String content = "content of document"; @@ -238,10 +238,10 @@ void testTwoUsers(WithStorageProvider.StorageDescriptor descriptor) { simpleDatasafeService.storeDocument(userIDAuth2, document); // tiny checks, that the password is important - UserIDAuth wrongPasswordUser1 = new UserIDAuth(userIDAuth.getUserID(), new ReadKeyPassword(UUID.randomUUID().toString())); + UserIDAuth wrongPasswordUser1 = new UserIDAuth(userIDAuth.getUserID(), ReadKeyPassword.getForString(UUID.randomUUID().toString())); assertThrows(UnrecoverableKeyException.class, () -> simpleDatasafeService.readDocument(wrongPasswordUser1, new DocumentFQN(path))); - UserIDAuth wrongPasswordUser2 = new UserIDAuth(userIDAuth2.getUserID(), new ReadKeyPassword(UUID.randomUUID().toString())); + UserIDAuth wrongPasswordUser2 = new UserIDAuth(userIDAuth2.getUserID(), ReadKeyPassword.getForString(UUID.randomUUID().toString())); assertThrows(UnrecoverableKeyException.class, () -> simpleDatasafeService.readDocument(wrongPasswordUser2, new DocumentFQN(path))); // now read the docs with the correct password diff --git a/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/test/java/de/adorsys/datasafe/simple/adapter/impl/legacy/LegacySymmetricPathEncryptionServiceImplTest.java b/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/test/java/de/adorsys/datasafe/simple/adapter/impl/legacy/LegacySymmetricPathEncryptionServiceImplTest.java index 837105068..02b676f80 100644 --- a/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/test/java/de/adorsys/datasafe/simple/adapter/impl/legacy/LegacySymmetricPathEncryptionServiceImplTest.java +++ b/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/test/java/de/adorsys/datasafe/simple/adapter/impl/legacy/LegacySymmetricPathEncryptionServiceImplTest.java @@ -32,7 +32,7 @@ class LegacySymmetricPathEncryptionServiceImplTest extends WithBouncyCastle { ); private KeyStoreService keyStoreService = new KeyStoreServiceImpl(new DefaultPasswordBasedKeyConfig()); - private ReadKeyPassword readKeyPassword = new ReadKeyPassword("readkeypassword"); + private ReadKeyPassword readKeyPassword = ReadKeyPassword.getForString("readkeypassword"); private ReadStorePassword readStorePassword = new ReadStorePassword("readstorepassword"); private KeyStoreAuth keyStoreAuth = new KeyStoreAuth(readStorePassword, readKeyPassword); private KeyStoreCreationConfig config = new KeyStoreCreationConfig(0, 1); diff --git a/datasafe-simple-adapter/datasafe-simple-adapter-spring/src/test/java/de/adorsys/datasafe/simple/adapter/spring/InjectionTest.java b/datasafe-simple-adapter/datasafe-simple-adapter-spring/src/test/java/de/adorsys/datasafe/simple/adapter/spring/InjectionTest.java index 577d72961..bf53a68d2 100644 --- a/datasafe-simple-adapter/datasafe-simple-adapter-spring/src/test/java/de/adorsys/datasafe/simple/adapter/spring/InjectionTest.java +++ b/datasafe-simple-adapter/datasafe-simple-adapter-spring/src/test/java/de/adorsys/datasafe/simple/adapter/spring/InjectionTest.java @@ -24,7 +24,7 @@ public class InjectionTest extends WithStorageProvider { public void testCreateUser(SimpleDatasafeService datasafeService) { assertThat(datasafeService).isNotNull(); UserID userid = new UserID("peter"); - ReadKeyPassword password = new ReadKeyPassword("password"); + ReadKeyPassword password = ReadKeyPassword.getForString("password"); UserIDAuth userIDAuth = new UserIDAuth(userid, password); assertThat(datasafeService.userExists(userid)).isFalse(); datasafeService.createUser(userIDAuth); From 87f027072dccdfe9c403d25a22443633266d5d7c Mon Sep 17 00:00:00 2001 From: Maxim Grischenko Date: Fri, 11 Oct 2019 10:51:43 +0200 Subject: [PATCH 191/255] test fix --- .../impl/e2e/BasicFunctionalityTest.java | 6 ++++-- .../e2e/ProfileContainsDatasafeVersionTest.java | 2 +- .../keys/DocumentKeyStoreOperationsImpl.java | 8 ++++++-- .../profile/keys/GenericKeystoreOperations.java | 11 +++++++++-- .../KeyStoreServiceImplBaseFunctions.java | 16 ++++++++++------ 5 files changed, 30 insertions(+), 13 deletions(-) diff --git a/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/BasicFunctionalityTest.java b/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/BasicFunctionalityTest.java index ebd4e6036..6a5ee16f0 100644 --- a/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/BasicFunctionalityTest.java +++ b/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/BasicFunctionalityTest.java @@ -48,8 +48,10 @@ void testDFSBasedProfileStorage(WithStorageProvider.StorageDescriptor descriptor john = registerUser(userJohn.getValue()); assertThat(profileRetrievalService.userExists(userJohn)).isTrue(); - assertThat(profileRetrievalService.privateProfile(john).getAppVersion()).isEqualTo(Version.current()); - assertThat(profileRetrievalService.publicProfile(john.getUserID()).getAppVersion()).isEqualTo(Version.current()); + assertThat(profileRetrievalService.privateProfile(john).getAppVersion().getId()) + .isEqualTo(Version.current().getId()); + assertThat(profileRetrievalService.publicProfile(john.getUserID()).getAppVersion().getId()) + .isEqualTo(Version.current().getId()); profileRemovalService.deregister(john); assertThat(profileRetrievalService.userExists(userJohn)).isFalse(); diff --git a/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/ProfileContainsDatasafeVersionTest.java b/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/ProfileContainsDatasafeVersionTest.java index 62c5f6f09..cf7afb707 100644 --- a/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/ProfileContainsDatasafeVersionTest.java +++ b/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/ProfileContainsDatasafeVersionTest.java @@ -18,7 +18,7 @@ void getProfileVersionTest() { UserIDAuth bob = registerUser("bob"); Version version = profileRetrievalService.privateProfile(bob).getAppVersion(); - assertThat(version).isEqualTo(Version.current()); + assertThat(version.getId()).isEqualTo(Version.current().getId()); } private void init() { diff --git a/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/keys/DocumentKeyStoreOperationsImpl.java b/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/keys/DocumentKeyStoreOperationsImpl.java index 91e46f8ba..13b28b0cf 100644 --- a/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/keys/DocumentKeyStoreOperationsImpl.java +++ b/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/keys/DocumentKeyStoreOperationsImpl.java @@ -22,6 +22,7 @@ import java.security.Key; import java.security.KeyStore; import java.util.List; +import java.util.Optional; import java.util.Set; /** @@ -38,12 +39,14 @@ public class DocumentKeyStoreOperationsImpl implements DocumentKeyStoreOperation private final StorageWriteService writeService; private final KeyStoreCache keystoreCache; private final KeyStoreService keyStoreService; + private final Optional keyStoreCreationConfig; @Inject public DocumentKeyStoreOperationsImpl(GenericKeystoreOperations genericOper, DFSConfig dfsConfig, BucketAccessService access, ProfileRetrievalService profile, StorageWriteService writeService, KeyStoreCache keystoreCache, - KeyStoreService keyStoreService) { + KeyStoreService keyStoreService, + Optional keyStoreCreationConfig) { this.genericOper = genericOper; this.dfsConfig = dfsConfig; this.access = access; @@ -51,6 +54,7 @@ public DocumentKeyStoreOperationsImpl(GenericKeystoreOperations genericOper, DFS this.writeService = writeService; this.keystoreCache = keystoreCache; this.keyStoreService = keyStoreService; + this.keyStoreCreationConfig = keyStoreCreationConfig; } /** @@ -77,7 +81,7 @@ public List createAndWriteKeyStore(UserIDAuth forUser) KeyStoreAuth auth = keystoreAuth(forUser, forUser.getReadKeyPassword()); KeyStore keystoreBlob = keyStoreService.createKeyStore( auth, - KeyStoreCreationConfig.DEFAULT, + keyStoreCreationConfig.orElse(KeyStoreCreationConfig.DEFAULT), new KeyCreationConfig(1, 1) ); diff --git a/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/keys/GenericKeystoreOperations.java b/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/keys/GenericKeystoreOperations.java index 040d151b7..f84f8e028 100644 --- a/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/keys/GenericKeystoreOperations.java +++ b/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/keys/GenericKeystoreOperations.java @@ -26,6 +26,7 @@ import java.security.UnrecoverableKeyException; import java.util.Enumeration; import java.util.HashSet; +import java.util.Optional; import java.util.Set; import java.util.function.Supplier; @@ -41,21 +42,27 @@ public class GenericKeystoreOperations { private final StorageReadService readService; private final KeyStoreCache keystoreCache; private final KeyStoreService keyStoreService; + private final Optional keyStoreCreationConfig; @Inject public GenericKeystoreOperations(DFSConfig dfsConfig, StorageWriteService writeService, StorageReadService readService, KeyStoreCache keystoreCache, - KeyStoreService keyStoreService) { + KeyStoreService keyStoreService, + Optional keyStoreCreationConfig) { this.dfsConfig = dfsConfig; this.writeService = writeService; this.readService = readService; this.keystoreCache = keystoreCache; this.keyStoreService = keyStoreService; + this.keyStoreCreationConfig = keyStoreCreationConfig; } public KeyStore createEmptyKeystore(UserIDAuth auth) { return keyStoreService - .createKeyStore(keystoreAuth(auth), KeyStoreCreationConfig.DEFAULT, new KeyCreationConfig(0, 0)); + .createKeyStore(keystoreAuth(auth), + keyStoreCreationConfig.orElse(KeyStoreCreationConfig.DEFAULT), + new KeyCreationConfig(0, 0) + ); } /** diff --git a/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/keystore/generator/KeyStoreServiceImplBaseFunctions.java b/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/keystore/generator/KeyStoreServiceImplBaseFunctions.java index 1857a2c5a..73385b100 100644 --- a/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/keystore/generator/KeyStoreServiceImplBaseFunctions.java +++ b/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/keystore/generator/KeyStoreServiceImplBaseFunctions.java @@ -37,12 +37,16 @@ private KeyStoreServiceImplBaseFunctions() { public static KeyStore newKeyStore(KeyStoreCreationConfig keyStoreConfig) { if (keyStoreConfig == null) keyStoreConfig = KeyStoreCreationConfig.DEFAULT; KeyStore ks = KeyStore.getInstance(keyStoreConfig.getKeyStoreType()); - ks.load(new BCFKSLoadStoreParameter.Builder() - .withStoreEncryptionAlgorithm(keyStoreConfig.getStoreEncryptionAlgorithm()) - .withStorePBKDFConfig(keyStoreConfig.getStorePBKDFConfig()) - .withStoreMacAlgorithm(keyStoreConfig.getStoreMacAlgorithm()) - .build() - ); + if ("BCFKS".equals(keyStoreConfig.getKeyStoreType())) { + ks.load(new BCFKSLoadStoreParameter.Builder() + .withStoreEncryptionAlgorithm(keyStoreConfig.getStoreEncryptionAlgorithm()) + .withStorePBKDFConfig(keyStoreConfig.getStorePBKDFConfig()) + .withStoreMacAlgorithm(keyStoreConfig.getStoreMacAlgorithm()) + .build() + ); + } else { + ks.load(null, null); + } return ks; } From 958d6eb75ad8c1c1b2aa4e1ada5b4fb40528a09f Mon Sep 17 00:00:00 2001 From: Maxim Grischenko Date: Fri, 11 Oct 2019 15:01:13 +0200 Subject: [PATCH 192/255] bouncy castle provider shouldn't be from testcontainer --- .../impl/e2e/randomactions/framework/BaseRandomActions.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/datasafe-long-run-tests/datasafe-business-tests-random-actions/src/test/java/de/adorsys/datasafe/business/impl/e2e/randomactions/framework/BaseRandomActions.java b/datasafe-long-run-tests/datasafe-business-tests-random-actions/src/test/java/de/adorsys/datasafe/business/impl/e2e/randomactions/framework/BaseRandomActions.java index 1af3505be..60b917f16 100644 --- a/datasafe-long-run-tests/datasafe-business-tests-random-actions/src/test/java/de/adorsys/datasafe/business/impl/e2e/randomactions/framework/BaseRandomActions.java +++ b/datasafe-long-run-tests/datasafe-business-tests-random-actions/src/test/java/de/adorsys/datasafe/business/impl/e2e/randomactions/framework/BaseRandomActions.java @@ -16,12 +16,12 @@ import de.adorsys.datasafe.privatestore.api.PrivateSpaceService; import de.adorsys.datasafe.teststorage.WithStorageProvider; import lombok.SneakyThrows; +import org.bouncycastle.jce.provider.BouncyCastleProvider; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.params.provider.Arguments; import org.junit.jupiter.params.provider.ValueSource; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import org.testcontainers.shaded.org.bouncycastle.jce.provider.BouncyCastleProvider; import java.io.Reader; import java.nio.charset.StandardCharsets; @@ -292,4 +292,4 @@ private static Operation executionTaggedOperation(String execId, Operation opera private static String execUserId(String execId, String userId) { return execId + "--" + userId; } -} \ No newline at end of file +} From 9a31d53f59e74da628b6149863fe2386b0925b26 Mon Sep 17 00:00:00 2001 From: psp Date: Fri, 11 Oct 2019 16:15:11 +0200 Subject: [PATCH 193/255] DOC-279 KeyStore create for tests in special Factory --- .../business/impl/e2e/BaseE2ETest.java | 7 +- .../impl/e2e/BasicFunctionalityTest.java | 12 +- ...icFunctionalityWithPasswordChangeTest.java | 27 +-- .../impl/e2e/DatasafeServicesProvider.java | 2 +- .../business/impl/e2e/KeystoreE2ETest.java | 5 +- .../impl/e2e/MultiDFSFunctionalityTest.java | 11 +- .../impl/e2e/SchemeDelegationTest.java | 6 +- .../impl/e2e/SchemeDelegationWithDbTest.java | 6 +- .../impl/e2e/UserProfileWithUtf8Test.java | 6 +- .../java/de/adorsys/datasafe/cli/Cli.java | 12 +- .../datasafe/cli/config/DatasafeFactory.java | 2 +- .../keys/DocumentKeyStoreOperations.java | 2 +- .../keys/StorageKeyStoreOperations.java | 2 +- .../operations/ProfileUpdatingService.java | 2 +- .../config/DFSConfigWithStorageCreds.java | 2 +- .../impl/profile/config/DefaultDFSConfig.java | 3 +- .../impl/profile/config/MultiDFSConfig.java | 2 +- .../keys/DocumentKeyStoreOperationsImpl.java | 2 + .../keys/GenericKeystoreOperations.java | 4 +- .../keys/StorageKeyStoreOperationsImpl.java | 2 +- .../actions/ProfileUpdatingServiceImpl.java | 2 +- .../config/DFSConfigWithStorageCredsTest.java | 6 +- .../dfs/BucketAccessServiceImplTest.java | 4 +- .../StorageKeyStoreOperationsImplTest.java | 5 +- .../ProfileUpdatingServiceImplTest.java | 2 +- .../datasafe-encryption-api/pom.xml | 19 -- .../api/keystore/KeyStoreService.java | 1 + .../encrypiton/api/types/UserIDAuth.java | 2 +- .../api/types/keystore/KeyEntry.java | 2 + .../api/types/keystore/KeyStoreAuth.java | 2 + .../types/keystore/SecretKeyGenerator.java | 2 + .../impl/keystore/KeyStoreGenerator.java | 1 + .../impl/keystore/KeyStoreServiceImpl.java | 2 + .../impl/keystore/generator/KeyEntryData.java | 2 +- .../impl/keystore/generator/KeyPairData.java | 2 +- .../generator/KeyPairGeneratorImpl.java | 2 +- .../KeyStoreServiceImplBaseFunctions.java | 2 + .../keystore/generator/SecretKeyData.java | 2 +- .../generator/SecretKeyGeneratorImpl.java | 2 +- .../impl/keystore/types/KeyPairGenerator.java | 2 +- .../encrypiton/impl/KeyPairGeneratorTest.java | 5 +- .../CmsEncryptionServiceImplTest.java | 5 +- .../cmsencryption/SymetricEncryptionTest.java | 5 +- .../impl/keystore/KeyStoreServiceTest.java | 7 +- ...ymmetricPathEncryptionServiceImplTest.java | 5 +- .../datasafe-examples-business/pom.xml | 7 + ...OperationsTestWithDefaultDatasafeTest.java | 8 +- ...erationsTestWithVersionedDatasafeTest.java | 8 +- .../RuntimeOverrideOperationsTest.java | 6 +- .../pom.xml | 7 + .../CustomlyBuiltDatasafeServiceTest.java | 6 +- .../datasafe-examples-multidfs/pom.xml | 7 + .../MultiDfsWithCredentialsExampleTest.java | 7 +- .../datasafe-examples-versioned-s3/pom.xml | 7 + ...DefaultDatasafeOnVersionedStorageTest.java | 6 +- .../inbox/api/actions/ListInboxImplTest.java | 4 +- .../api/actions/ReadFromInboxImplTest.java | 4 +- .../api/actions/RemoveFromInboxImplTest.java | 4 +- .../RandomActionsOnDatasafeTest.java | 2 +- .../RandomActionsOnMultiBucketTest.java | 2 +- ...domActionsOnSimpleDatasafeAdapterTest.java | 2 +- .../framework/fixture/dto/TestUser.java | 4 +- .../framework/services/OperationExecutor.java | 4 +- .../api/PasswordClearingInputStream.java | 2 +- .../api/PasswordClearingOutputStream.java | 2 +- .../api/PasswordClearingStream.java | 2 +- .../datasafe-privatestore-impl/pom.xml | 8 + .../impl/actions/ReadFromPrivateImpl.java | 2 +- .../EncryptedResourceResolverImplTest.java | 4 +- .../impl/actions/ListPrivateImplTest.java | 4 +- .../impl/actions/ReadFromPrivateImplTest.java | 4 +- .../impl/actions/WriteToPrivateImplTest.java | 4 +- .../rest/impl/config/DatasafeConfig.java | 2 +- .../impl/controller/DocumentController.java | 9 +- .../rest/impl/controller/InboxController.java | 7 +- .../controller/ReadKeyPasswordHelper.java | 16 ++ .../rest/impl/controller/UserController.java | 22 +-- .../impl/controller/VersionController.java | 11 +- .../BaseTokenDatasafeEndpointTest.java | 4 +- .../impl/controller/UserControllerTest.java | 3 +- .../adapter/api/SimpleDatasafeService.java | 2 +- .../impl/SimpleDatasafeServiceImpl.java | 4 +- ...DFSRelativeProfileUpdatingServiceImpl.java | 2 +- .../simple/adapter/impl/CleanupDbTest.java | 6 +- .../impl/DFSRelativeToRootProfileTest.java | 4 +- .../impl/SimpleAdapterFeatureTest.java | 4 +- .../SimpleDatasafeAdapter043CompatTest.java | 4 +- .../impl/SimpleDatasafeAdapterTest.java | 13 +- ...ymmetricPathEncryptionServiceImplTest.java | 5 +- .../simple/adapter/spring/InjectionTest.java | 5 +- datasafe-simple-adapter/readme.md | 2 +- .../datasafe-storage-impl-fs/pom.xml | 32 --- .../impl/fs/FileSystemStorageServiceTest.java | 184 ------------------ .../test/resources/simplelogger.properties | 7 - datasafe-types-api/pom.xml | 25 +++ .../api/types}/BaseTypePasswordString.java | 2 +- .../types/api/types}/ReadKeyPassword.java | 11 +- .../types/api/types}/ReadStorePassword.java | 2 +- .../types/api/types}/ReadKeyPasswordTest.java | 27 +-- .../api/utils/ReadKeyPasswordTestFactory.java | 16 ++ 100 files changed, 319 insertions(+), 447 deletions(-) create mode 100644 datasafe-rest-impl/src/main/java/de/adorsys/datasafe/rest/impl/controller/ReadKeyPasswordHelper.java delete mode 100644 datasafe-storage/datasafe-storage-impl-fs/src/test/java/de/adorsys/datasafe/storage/impl/fs/FileSystemStorageServiceTest.java delete mode 100644 datasafe-storage/datasafe-storage-impl-fs/src/test/resources/simplelogger.properties rename {datasafe-encryption/datasafe-encryption-api/src/main/java/de/adorsys/datasafe/encrypiton/api/types/keystore => datasafe-types-api/src/main/java/de/adorsys/datasafe/types/api/types}/BaseTypePasswordString.java (97%) rename {datasafe-encryption/datasafe-encryption-api/src/main/java/de/adorsys/datasafe/encrypiton/api/types/keystore => datasafe-types-api/src/main/java/de/adorsys/datasafe/types/api/types}/ReadKeyPassword.java (70%) rename {datasafe-encryption/datasafe-encryption-api/src/main/java/de/adorsys/datasafe/encrypiton/api/types/keystore => datasafe-types-api/src/main/java/de/adorsys/datasafe/types/api/types}/ReadStorePassword.java (82%) rename {datasafe-encryption/datasafe-encryption-api/src/test/java/de/adorsys/datasafe/encrypiton/api/types/keystore => datasafe-types-api/src/test/java/de/adorsys/datasafe/types/api/types}/ReadKeyPasswordTest.java (57%) create mode 100644 datasafe-types-api/src/test/java/de/adorsys/datasafe/types/api/utils/ReadKeyPasswordTestFactory.java diff --git a/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/BaseE2ETest.java b/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/BaseE2ETest.java index 0af231079..f0238e0a7 100644 --- a/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/BaseE2ETest.java +++ b/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/BaseE2ETest.java @@ -10,7 +10,7 @@ import de.adorsys.datasafe.directory.api.profile.operations.ProfileUpdatingService; import de.adorsys.datasafe.encrypiton.api.types.UserID; import de.adorsys.datasafe.encrypiton.api.types.UserIDAuth; -import de.adorsys.datasafe.encrypiton.api.types.keystore.ReadKeyPassword; +import de.adorsys.datasafe.types.api.types.ReadKeyPassword; import de.adorsys.datasafe.inbox.api.actions.ListInbox; import de.adorsys.datasafe.inbox.api.actions.ReadFromInbox; import de.adorsys.datasafe.inbox.api.actions.RemoveFromInbox; @@ -30,6 +30,7 @@ import de.adorsys.datasafe.types.api.resource.PrivateResource; import de.adorsys.datasafe.types.api.resource.ResolvedResource; import de.adorsys.datasafe.types.api.utils.Obfuscate; +import de.adorsys.datasafe.types.api.utils.ReadKeyPasswordTestFactory; import lombok.RequiredArgsConstructor; import lombok.SneakyThrows; import lombok.extern.slf4j.Slf4j; @@ -206,7 +207,7 @@ protected void removeFromInbox(UserIDAuth inboxOwner, PrivateResource location) } protected UserIDAuth registerUser(String userName) { - return registerUser(userName, ReadKeyPassword.getForString("secure-password " + userName)); + return registerUser(userName, ReadKeyPasswordTestFactory.getForString("secure-password " + userName)); } protected UserIDAuth registerUser(String userName, ReadKeyPassword readKeyPassword) { @@ -221,7 +222,7 @@ protected UserIDAuth createJohnTestUser(int i) { return new UserIDAuth( userName, - ReadKeyPassword.getForString("secure-password " + userName.getValue()) + ReadKeyPasswordTestFactory.getForString("secure-password " + userName.getValue()) ); } diff --git a/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/BasicFunctionalityTest.java b/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/BasicFunctionalityTest.java index b259e086c..44c016113 100644 --- a/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/BasicFunctionalityTest.java +++ b/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/BasicFunctionalityTest.java @@ -3,8 +3,7 @@ import de.adorsys.datasafe.business.impl.service.DefaultDatasafeServices; import de.adorsys.datasafe.encrypiton.api.types.UserID; import de.adorsys.datasafe.encrypiton.api.types.UserIDAuth; -import de.adorsys.datasafe.encrypiton.api.types.keystore.ReadKeyPassword; -import de.adorsys.datasafe.privatestore.api.PasswordClearingStream; +import de.adorsys.datasafe.types.api.types.ReadKeyPassword; import de.adorsys.datasafe.storage.api.StorageService; import de.adorsys.datasafe.teststorage.WithStorageProvider; import de.adorsys.datasafe.types.api.actions.ListRequest; @@ -18,16 +17,9 @@ import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.MethodSource; import org.testcontainers.shaded.com.google.common.collect.ImmutableSet; -import org.testcontainers.shaded.org.apache.commons.io.IOUtils; import java.io.ByteArrayInputStream; -import java.io.InputStream; import java.io.OutputStream; -import java.net.URI; -import java.nio.charset.Charset; -import java.nio.file.Files; -import java.nio.file.Path; -import java.nio.file.Paths; import java.security.UnrecoverableKeyException; import java.util.Arrays; import java.util.List; @@ -151,7 +143,7 @@ void testDFSBasedProfileStorage(WithStorageProvider.StorageDescriptor descriptor @SneakyThrows @ParameterizedTest - @MethodSource("allStorages") + @MethodSource("fsOnly") void testUserIsRemovedWithFiles(WithStorageProvider.StorageDescriptor descriptor) { init(descriptor); UserID userJohn = new UserID("john"); diff --git a/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/BasicFunctionalityWithPasswordChangeTest.java b/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/BasicFunctionalityWithPasswordChangeTest.java index 6ce9188a2..aa65d6006 100644 --- a/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/BasicFunctionalityWithPasswordChangeTest.java +++ b/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/BasicFunctionalityWithPasswordChangeTest.java @@ -3,13 +3,14 @@ import de.adorsys.datasafe.business.impl.service.DefaultDatasafeServices; import de.adorsys.datasafe.encrypiton.api.types.UserID; import de.adorsys.datasafe.encrypiton.api.types.UserIDAuth; -import de.adorsys.datasafe.encrypiton.api.types.keystore.ReadKeyPassword; +import de.adorsys.datasafe.types.api.types.ReadKeyPassword; import de.adorsys.datasafe.teststorage.WithStorageProvider; import de.adorsys.datasafe.types.api.actions.ReadRequest; import de.adorsys.datasafe.types.api.actions.WriteRequest; import de.adorsys.datasafe.types.api.resource.AbsoluteLocation; import de.adorsys.datasafe.types.api.resource.ResolvedResource; import de.adorsys.datasafe.types.api.resource.Uri; +import de.adorsys.datasafe.types.api.utils.ReadKeyPasswordTestFactory; import lombok.SneakyThrows; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.MethodSource; @@ -37,14 +38,14 @@ void testUserIsRemovedWithFiles(WithStorageProvider.StorageDescriptor descriptor writeDataToPrivate(john, "root.txt", MESSAGE_ONE); writeDataToPrivate(john, "some/some.txt", MESSAGE_ONE); - john = checkUpdatedCredsWorkAndOldDont(john, ReadKeyPassword.getForString("Some other"), auth -> { + john = checkUpdatedCredsWorkAndOldDont(john, ReadKeyPasswordTestFactory.getForString("Some other"), auth -> { writeDataToPrivate(auth, "some/other/other.txt", MESSAGE_ONE); writeDataToPrivate(auth, "different/data.txt", MESSAGE_ONE); }); john = checkUpdatedCredsWorkAndOldDont( john, - ReadKeyPassword.getForString("Some another"), + ReadKeyPasswordTestFactory.getForString("Some another"), auth -> profileRemovalService.deregister(auth) ); @@ -67,7 +68,7 @@ void testMultipleRecipientsSharing(WithStorageProvider.StorageDescriptor descrip Stream.of(john, jane, jamie).forEach( it -> checkUpdatedCredsWorkAndOldDont( it, - ReadKeyPassword.getForString(UUID.randomUUID().toString()), + ReadKeyPasswordTestFactory.getForString(UUID.randomUUID().toString()), auth -> assertThat(readFromInbox.read(ReadRequest.forDefaultPrivate(auth, multiShareFile))) .hasContent(MESSAGE_ONE)) ); @@ -85,7 +86,7 @@ void testWriteToPrivateListPrivateReadPrivateAndSendToAndReadFromInbox( jane = checkUpdatedCredsWorkAndOldDont( jane, - ReadKeyPassword.getForString("Another passwd1"), + ReadKeyPasswordTestFactory.getForString("Another passwd1"), this::getFirstFileInPrivate ); @@ -93,7 +94,7 @@ void testWriteToPrivateListPrivateReadPrivateAndSendToAndReadFromInbox( jane = checkUpdatedCredsWorkAndOldDont( jane, - ReadKeyPassword.getForString("Another passwd2"), + ReadKeyPasswordTestFactory.getForString("Another passwd2"), auth -> readPrivateUsingPrivateKey(auth, privateJane.getResource().asPrivate()) ); @@ -105,7 +106,7 @@ void testWriteToPrivateListPrivateReadPrivateAndSendToAndReadFromInbox( john = checkUpdatedCredsWorkAndOldDont( john, - ReadKeyPassword.getForString("Another passwd4"), + ReadKeyPasswordTestFactory.getForString("Another passwd4"), auth -> readInboxUsingPrivateKey(auth, inboxJohn.getResource().asPrivate()) ); @@ -131,13 +132,13 @@ void listingValidation(WithStorageProvider.StorageDescriptor descriptor) { jane = checkUpdatedCredsWorkAndOldDont( jane, - ReadKeyPassword.getForString("Another passwd1"), + ReadKeyPasswordTestFactory.getForString("Another passwd1"), auth -> writeDataToPrivate(auth, "level1/level2/file", MESSAGE_ONE) ); jane = checkUpdatedCredsWorkAndOldDont( jane, - ReadKeyPassword.getForString("Another passwd2"), + ReadKeyPasswordTestFactory.getForString("Another passwd2"), auth -> { assertPrivateSpaceList(auth, "", "root.file", "level1/file", "level1/level2/file"); assertPrivateSpaceList(auth, "./", "root.file", "level1/file", "level1/level2/file"); @@ -147,7 +148,7 @@ void listingValidation(WithStorageProvider.StorageDescriptor descriptor) { jane = checkUpdatedCredsWorkAndOldDont( jane, - ReadKeyPassword.getForString("Another passwd3"), + ReadKeyPasswordTestFactory.getForString("Another passwd3"), auth -> { assertPrivateSpaceList(auth, "root.file", "root.file"); assertPrivateSpaceList(auth, "./root.file", "root.file"); @@ -156,7 +157,7 @@ void listingValidation(WithStorageProvider.StorageDescriptor descriptor) { jane = checkUpdatedCredsWorkAndOldDont( jane, - ReadKeyPassword.getForString("Another passwd4"), + ReadKeyPasswordTestFactory.getForString("Another passwd4"), auth -> { assertPrivateSpaceList(auth, "level1", "level1/file", "level1/level2/file"); assertPrivateSpaceList(auth, "level1/", "level1/file", "level1/level2/file"); @@ -165,7 +166,7 @@ void listingValidation(WithStorageProvider.StorageDescriptor descriptor) { jane = checkUpdatedCredsWorkAndOldDont( jane, - ReadKeyPassword.getForString("Another passwd5"), + ReadKeyPasswordTestFactory.getForString("Another passwd5"), auth -> { assertPrivateSpaceList(auth, "./level1", "level1/file", "level1/level2/file"); assertPrivateSpaceList(auth, "./level1/", "level1/file", "level1/level2/file"); @@ -174,7 +175,7 @@ void listingValidation(WithStorageProvider.StorageDescriptor descriptor) { jane = checkUpdatedCredsWorkAndOldDont( jane, - ReadKeyPassword.getForString("Another passwd6"), + ReadKeyPasswordTestFactory.getForString("Another passwd6"), auth -> { assertPrivateSpaceList(auth, "./level1/level2", "level1/level2/file"); assertPrivateSpaceList(auth, "./level1/level2/", "level1/level2/file"); diff --git a/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/DatasafeServicesProvider.java b/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/DatasafeServicesProvider.java index eecce0f83..7db231959 100644 --- a/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/DatasafeServicesProvider.java +++ b/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/DatasafeServicesProvider.java @@ -6,7 +6,7 @@ import de.adorsys.datasafe.business.impl.service.VersionedDatasafeServices; import de.adorsys.datasafe.directory.api.config.DFSConfig; import de.adorsys.datasafe.directory.impl.profile.config.DefaultDFSConfig; -import de.adorsys.datasafe.encrypiton.api.types.keystore.ReadStorePassword; +import de.adorsys.datasafe.types.api.types.ReadStorePassword; import de.adorsys.datasafe.storage.api.StorageService; import de.adorsys.datasafe.types.api.resource.Uri; import lombok.experimental.UtilityClass; diff --git a/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/KeystoreE2ETest.java b/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/KeystoreE2ETest.java index 42d3b8fb5..00ca317bc 100644 --- a/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/KeystoreE2ETest.java +++ b/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/KeystoreE2ETest.java @@ -2,13 +2,12 @@ import de.adorsys.datasafe.business.impl.service.DefaultDatasafeServices; import de.adorsys.datasafe.encrypiton.api.types.UserIDAuth; -import de.adorsys.datasafe.encrypiton.api.types.keystore.ReadKeyPassword; -import de.adorsys.datasafe.encrypiton.api.types.keystore.ReadStorePassword; import de.adorsys.datasafe.encrypiton.impl.keystore.DefaultPasswordBasedKeyConfig; import de.adorsys.datasafe.encrypiton.impl.keystore.KeyStoreServiceImpl; import de.adorsys.datasafe.storage.impl.fs.FileSystemStorageService; import de.adorsys.datasafe.types.api.resource.Uri; import de.adorsys.datasafe.types.api.shared.BaseMockitoTest; +import de.adorsys.datasafe.types.api.utils.ReadKeyPasswordTestFactory; import lombok.SneakyThrows; import org.bouncycastle.jce.provider.BouncyCastleProvider; import org.junit.jupiter.api.BeforeAll; @@ -54,7 +53,7 @@ void init(@TempDir Path rootPath) { @Test @SneakyThrows void testDefaultKeystoreHasProperKeys() { - UserIDAuth auth = new UserIDAuth("user", ReadKeyPassword.getForString("pass")); + UserIDAuth auth = new UserIDAuth("user", ReadKeyPasswordTestFactory.getForString("pass")); datasafeServices.userProfile().registerUsingDefaults(auth); URI keystorePath = datasafeServices.userProfile().privateProfile(auth) .getKeystore().location().asURI(); diff --git a/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/MultiDFSFunctionalityTest.java b/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/MultiDFSFunctionalityTest.java index bcfe8e40f..67bb66b66 100644 --- a/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/MultiDFSFunctionalityTest.java +++ b/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/MultiDFSFunctionalityTest.java @@ -15,8 +15,8 @@ import de.adorsys.datasafe.directory.impl.profile.dfs.BucketAccessServiceImplRuntimeDelegatable; import de.adorsys.datasafe.directory.impl.profile.dfs.RegexAccessServiceWithStorageCredentialsImpl; import de.adorsys.datasafe.encrypiton.api.types.UserIDAuth; -import de.adorsys.datasafe.encrypiton.api.types.keystore.ReadKeyPassword; -import de.adorsys.datasafe.encrypiton.api.types.keystore.ReadStorePassword; +import de.adorsys.datasafe.types.api.types.ReadKeyPassword; +import de.adorsys.datasafe.types.api.types.ReadStorePassword; import de.adorsys.datasafe.storage.api.RegexDelegatingStorage; import de.adorsys.datasafe.storage.api.StorageService; import de.adorsys.datasafe.storage.api.UriBasedAuthStorageService; @@ -30,6 +30,7 @@ import de.adorsys.datasafe.types.api.context.overrides.OverridesRegistry; import de.adorsys.datasafe.types.api.resource.*; import de.adorsys.datasafe.types.api.shared.BaseMockitoTest; +import de.adorsys.datasafe.types.api.utils.ReadKeyPasswordTestFactory; import lombok.SneakyThrows; import lombok.experimental.Delegate; import lombok.extern.slf4j.Slf4j; @@ -167,7 +168,7 @@ void initDatasafe() { @Test void testWriteToPrivateListPrivateReadPrivate() { - UserIDAuth john = new UserIDAuth("john", ReadKeyPassword.getForString("my-passwd")); + UserIDAuth john = new UserIDAuth("john", ReadKeyPasswordTestFactory.getForString("my-passwd")); registerUser(john); validateBasicOperationsAndContent(john); @@ -177,12 +178,12 @@ void testWriteToPrivateListPrivateReadPrivate() { @Test void testWriteToPrivateListPrivateReadPrivateWithPasswordChange() { - UserIDAuth john = new UserIDAuth("john", ReadKeyPassword.getForString("my-passwd")); + UserIDAuth john = new UserIDAuth("john", ReadKeyPasswordTestFactory.getForString("my-passwd")); registerUser(john); validateBasicOperationsAndContent(john); - ReadKeyPassword newPasswd = ReadKeyPassword.getForString("ANOTHER"); + ReadKeyPassword newPasswd = ReadKeyPasswordTestFactory.getForString("ANOTHER"); datasafeServices.userProfile().updateReadKeyPassword(john, newPasswd); UserIDAuth newJohn = new UserIDAuth("john", newPasswd); diff --git a/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/SchemeDelegationTest.java b/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/SchemeDelegationTest.java index 1a60486d3..42d5761d1 100644 --- a/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/SchemeDelegationTest.java +++ b/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/SchemeDelegationTest.java @@ -5,8 +5,7 @@ import de.adorsys.datasafe.directory.impl.profile.config.DefaultDFSConfig; import de.adorsys.datasafe.encrypiton.api.types.UserID; import de.adorsys.datasafe.encrypiton.api.types.UserIDAuth; -import de.adorsys.datasafe.encrypiton.api.types.keystore.ReadKeyPassword; -import de.adorsys.datasafe.encrypiton.api.types.keystore.ReadStorePassword; +import de.adorsys.datasafe.types.api.types.ReadStorePassword; import de.adorsys.datasafe.storage.api.SchemeDelegatingStorage; import de.adorsys.datasafe.storage.api.StorageService; import de.adorsys.datasafe.storage.impl.fs.FileSystemStorageService; @@ -15,6 +14,7 @@ import de.adorsys.datasafe.types.api.resource.AbsoluteLocation; import de.adorsys.datasafe.types.api.resource.BasePrivateResource; import de.adorsys.datasafe.types.api.resource.Uri; +import de.adorsys.datasafe.types.api.utils.ReadKeyPasswordTestFactory; import lombok.SneakyThrows; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; @@ -59,7 +59,7 @@ void initialize(@TempDir Path tempDir) { @Test @SneakyThrows void testProfileOnFsDataOnMinioWorks() { - UserIDAuth userJohn = new UserIDAuth("john", ReadKeyPassword.getForString("doe")); + UserIDAuth userJohn = new UserIDAuth("john", ReadKeyPasswordTestFactory.getForString("doe")); // John's profile will be saved to filesystem datasafeServices.userProfile().registerUsingDefaults(userJohn); diff --git a/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/SchemeDelegationWithDbTest.java b/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/SchemeDelegationWithDbTest.java index ffe2dbe67..808b35b18 100644 --- a/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/SchemeDelegationWithDbTest.java +++ b/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/SchemeDelegationWithDbTest.java @@ -7,8 +7,7 @@ import de.adorsys.datasafe.directory.impl.profile.config.DefaultDFSConfig; import de.adorsys.datasafe.encrypiton.api.types.UserID; import de.adorsys.datasafe.encrypiton.api.types.UserIDAuth; -import de.adorsys.datasafe.encrypiton.api.types.keystore.ReadKeyPassword; -import de.adorsys.datasafe.encrypiton.api.types.keystore.ReadStorePassword; +import de.adorsys.datasafe.types.api.types.ReadStorePassword; import de.adorsys.datasafe.storage.api.SchemeDelegatingStorage; import de.adorsys.datasafe.storage.api.StorageService; import de.adorsys.datasafe.storage.impl.db.DatabaseConnectionRegistry; @@ -20,6 +19,7 @@ import de.adorsys.datasafe.types.api.resource.AbsoluteLocation; import de.adorsys.datasafe.types.api.resource.BasePrivateResource; import de.adorsys.datasafe.types.api.resource.Uri; +import de.adorsys.datasafe.types.api.utils.ReadKeyPasswordTestFactory; import lombok.SneakyThrows; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; @@ -70,7 +70,7 @@ void initialize(@TempDir Path tempDir) { @Test @SneakyThrows void testProfileOnDbDataOnFsWorks() { - UserIDAuth userJohn = new UserIDAuth("john", ReadKeyPassword.getForString("doe")); + UserIDAuth userJohn = new UserIDAuth("john", ReadKeyPasswordTestFactory.getForString("doe")); // John's profile will be saved to Database datasafeServices.userProfile().registerUsingDefaults(userJohn); diff --git a/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/UserProfileWithUtf8Test.java b/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/UserProfileWithUtf8Test.java index 4eefa8382..e9f307426 100644 --- a/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/UserProfileWithUtf8Test.java +++ b/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/UserProfileWithUtf8Test.java @@ -5,8 +5,7 @@ import de.adorsys.datasafe.directory.impl.profile.config.DefaultDFSConfig; import de.adorsys.datasafe.encrypiton.api.types.UserID; import de.adorsys.datasafe.encrypiton.api.types.UserIDAuth; -import de.adorsys.datasafe.encrypiton.api.types.keystore.ReadKeyPassword; -import de.adorsys.datasafe.encrypiton.api.types.keystore.ReadStorePassword; +import de.adorsys.datasafe.types.api.types.ReadStorePassword; import de.adorsys.datasafe.storage.api.SchemeDelegatingStorage; import de.adorsys.datasafe.storage.api.StorageService; import de.adorsys.datasafe.storage.impl.fs.FileSystemStorageService; @@ -15,6 +14,7 @@ import de.adorsys.datasafe.types.api.resource.AbsoluteLocation; import de.adorsys.datasafe.types.api.resource.BasePrivateResource; import de.adorsys.datasafe.types.api.resource.Uri; +import de.adorsys.datasafe.types.api.utils.ReadKeyPasswordTestFactory; import lombok.SneakyThrows; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; @@ -59,7 +59,7 @@ void initialize(@TempDir Path tempDir) { @Test @SneakyThrows void testProfileOnFsDataOnMinioWorks() { - UserIDAuth userJohn = new UserIDAuth("john", ReadKeyPassword.getForString("doe")); + UserIDAuth userJohn = new UserIDAuth("john", ReadKeyPasswordTestFactory.getForString("doe")); // John's profile will be saved to filesystem datasafeServices.userProfile().registerUsingDefaults(userJohn); diff --git a/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/Cli.java b/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/Cli.java index 268c86432..0b9e6d829 100644 --- a/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/Cli.java +++ b/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/Cli.java @@ -9,8 +9,8 @@ import de.adorsys.datasafe.cli.config.DatasafeFactory; import de.adorsys.datasafe.cli.dto.Credentials; import de.adorsys.datasafe.encrypiton.api.types.UserIDAuth; -import de.adorsys.datasafe.encrypiton.api.types.keystore.ReadKeyPassword; -import de.adorsys.datasafe.encrypiton.api.types.keystore.ReadStorePassword; +import de.adorsys.datasafe.types.api.types.ReadKeyPassword; +import de.adorsys.datasafe.types.api.types.ReadStorePassword; import lombok.Getter; import lombok.RequiredArgsConstructor; import lombok.SneakyThrows; @@ -23,6 +23,7 @@ import java.nio.file.Path; import java.nio.file.Paths; import java.security.Security; +import java.util.function.Supplier; @Slf4j @CommandLine.Command( @@ -92,7 +93,12 @@ String getUsername() { } ReadKeyPassword getPassword() { - return ReadKeyPassword.getForString(credentials().getPassword()); + return new ReadKeyPassword(new Supplier() { + @Override + public char[] get() { + return credentials().getPassword().toCharArray(); + } + }); } ReadStorePassword getSystemPassword() { diff --git a/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/config/DatasafeFactory.java b/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/config/DatasafeFactory.java index cc0f7238b..0f00ef0c7 100644 --- a/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/config/DatasafeFactory.java +++ b/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/config/DatasafeFactory.java @@ -16,7 +16,7 @@ import de.adorsys.datasafe.directory.impl.profile.dfs.BucketAccessServiceImpl; import de.adorsys.datasafe.directory.impl.profile.dfs.BucketAccessServiceImplRuntimeDelegatable; import de.adorsys.datasafe.directory.impl.profile.dfs.RegexAccessServiceWithStorageCredentialsImpl; -import de.adorsys.datasafe.encrypiton.api.types.keystore.ReadStorePassword; +import de.adorsys.datasafe.types.api.types.ReadStorePassword; import de.adorsys.datasafe.storage.api.RegexDelegatingStorage; import de.adorsys.datasafe.storage.api.StorageService; import de.adorsys.datasafe.storage.api.UriBasedAuthStorageService; diff --git a/datasafe-directory/datasafe-directory-api/src/main/java/de/adorsys/datasafe/directory/api/profile/keys/DocumentKeyStoreOperations.java b/datasafe-directory/datasafe-directory-api/src/main/java/de/adorsys/datasafe/directory/api/profile/keys/DocumentKeyStoreOperations.java index 48e15a33c..c7fa71171 100644 --- a/datasafe-directory/datasafe-directory-api/src/main/java/de/adorsys/datasafe/directory/api/profile/keys/DocumentKeyStoreOperations.java +++ b/datasafe-directory/datasafe-directory-api/src/main/java/de/adorsys/datasafe/directory/api/profile/keys/DocumentKeyStoreOperations.java @@ -2,7 +2,7 @@ import de.adorsys.datasafe.encrypiton.api.types.UserIDAuth; import de.adorsys.datasafe.encrypiton.api.types.keystore.PublicKeyIDWithPublicKey; -import de.adorsys.datasafe.encrypiton.api.types.keystore.ReadKeyPassword; +import de.adorsys.datasafe.types.api.types.ReadKeyPassword; import java.security.Key; import java.util.List; diff --git a/datasafe-directory/datasafe-directory-api/src/main/java/de/adorsys/datasafe/directory/api/profile/keys/StorageKeyStoreOperations.java b/datasafe-directory/datasafe-directory-api/src/main/java/de/adorsys/datasafe/directory/api/profile/keys/StorageKeyStoreOperations.java index 68269680d..e81dd67c7 100644 --- a/datasafe-directory/datasafe-directory-api/src/main/java/de/adorsys/datasafe/directory/api/profile/keys/StorageKeyStoreOperations.java +++ b/datasafe-directory/datasafe-directory-api/src/main/java/de/adorsys/datasafe/directory/api/profile/keys/StorageKeyStoreOperations.java @@ -3,7 +3,7 @@ import de.adorsys.datasafe.directory.api.types.StorageCredentials; import de.adorsys.datasafe.types.api.resource.StorageIdentifier; import de.adorsys.datasafe.encrypiton.api.types.UserIDAuth; -import de.adorsys.datasafe.encrypiton.api.types.keystore.ReadKeyPassword; +import de.adorsys.datasafe.types.api.types.ReadKeyPassword; import java.util.Set; diff --git a/datasafe-directory/datasafe-directory-api/src/main/java/de/adorsys/datasafe/directory/api/profile/operations/ProfileUpdatingService.java b/datasafe-directory/datasafe-directory-api/src/main/java/de/adorsys/datasafe/directory/api/profile/operations/ProfileUpdatingService.java index 1e2e6ba12..090db9368 100644 --- a/datasafe-directory/datasafe-directory-api/src/main/java/de/adorsys/datasafe/directory/api/profile/operations/ProfileUpdatingService.java +++ b/datasafe-directory/datasafe-directory-api/src/main/java/de/adorsys/datasafe/directory/api/profile/operations/ProfileUpdatingService.java @@ -3,7 +3,7 @@ import de.adorsys.datasafe.directory.api.types.UserPrivateProfile; import de.adorsys.datasafe.directory.api.types.UserPublicProfile; import de.adorsys.datasafe.encrypiton.api.types.UserIDAuth; -import de.adorsys.datasafe.encrypiton.api.types.keystore.ReadKeyPassword; +import de.adorsys.datasafe.types.api.types.ReadKeyPassword; /** * Updates users' profile in a system. diff --git a/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/config/DFSConfigWithStorageCreds.java b/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/config/DFSConfigWithStorageCreds.java index 299cc5a78..71a2f81c2 100644 --- a/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/config/DFSConfigWithStorageCreds.java +++ b/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/config/DFSConfigWithStorageCreds.java @@ -2,7 +2,7 @@ import de.adorsys.datasafe.directory.api.types.CreateUserPrivateProfile; import de.adorsys.datasafe.encrypiton.api.types.UserIDAuth; -import de.adorsys.datasafe.encrypiton.api.types.keystore.ReadStorePassword; +import de.adorsys.datasafe.types.api.types.ReadStorePassword; import de.adorsys.datasafe.types.api.resource.Uri; import java.net.URI; diff --git a/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/config/DefaultDFSConfig.java b/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/config/DefaultDFSConfig.java index 697052f95..d849c961c 100644 --- a/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/config/DefaultDFSConfig.java +++ b/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/config/DefaultDFSConfig.java @@ -6,9 +6,8 @@ import de.adorsys.datasafe.encrypiton.api.types.UserID; import de.adorsys.datasafe.encrypiton.api.types.UserIDAuth; import de.adorsys.datasafe.encrypiton.api.types.keystore.KeyStoreAuth; -import de.adorsys.datasafe.encrypiton.api.types.keystore.ReadStorePassword; +import de.adorsys.datasafe.types.api.types.ReadStorePassword; import de.adorsys.datasafe.types.api.resource.*; -import lombok.RequiredArgsConstructor; import lombok.SneakyThrows; import lombok.extern.slf4j.Slf4j; diff --git a/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/config/MultiDFSConfig.java b/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/config/MultiDFSConfig.java index bc47ffe00..1c7c716d4 100644 --- a/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/config/MultiDFSConfig.java +++ b/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/config/MultiDFSConfig.java @@ -1,7 +1,7 @@ package de.adorsys.datasafe.directory.impl.profile.config; import de.adorsys.datasafe.encrypiton.api.types.UserID; -import de.adorsys.datasafe.encrypiton.api.types.keystore.ReadStorePassword; +import de.adorsys.datasafe.types.api.types.ReadStorePassword; import de.adorsys.datasafe.types.api.resource.AbsoluteLocation; import de.adorsys.datasafe.types.api.resource.BasePrivateResource; import de.adorsys.datasafe.types.api.resource.Uri; diff --git a/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/keys/DocumentKeyStoreOperationsImpl.java b/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/keys/DocumentKeyStoreOperationsImpl.java index b1c683aaa..ed444ef5e 100644 --- a/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/keys/DocumentKeyStoreOperationsImpl.java +++ b/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/keys/DocumentKeyStoreOperationsImpl.java @@ -14,6 +14,8 @@ import de.adorsys.datasafe.types.api.resource.PrivateResource; import de.adorsys.datasafe.types.api.resource.ResourceLocation; import de.adorsys.datasafe.types.api.resource.WithCallback; +import de.adorsys.datasafe.types.api.types.ReadKeyPassword; +import de.adorsys.datasafe.types.api.types.ReadStorePassword; import lombok.SneakyThrows; import lombok.extern.slf4j.Slf4j; diff --git a/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/keys/GenericKeystoreOperations.java b/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/keys/GenericKeystoreOperations.java index aff763c4c..efe869fc1 100644 --- a/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/keys/GenericKeystoreOperations.java +++ b/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/keys/GenericKeystoreOperations.java @@ -8,8 +8,8 @@ import de.adorsys.datasafe.encrypiton.api.types.keystore.KeyStoreAuth; import de.adorsys.datasafe.encrypiton.api.types.keystore.KeyStoreCreationConfig; import de.adorsys.datasafe.encrypiton.api.types.keystore.KeyStoreType; -import de.adorsys.datasafe.encrypiton.api.types.keystore.ReadKeyPassword; -import de.adorsys.datasafe.encrypiton.api.types.keystore.ReadStorePassword; +import de.adorsys.datasafe.types.api.types.ReadKeyPassword; +import de.adorsys.datasafe.types.api.types.ReadStorePassword; import de.adorsys.datasafe.storage.api.actions.StorageReadService; import de.adorsys.datasafe.storage.api.actions.StorageWriteService; import de.adorsys.datasafe.types.api.context.annotations.RuntimeDelegate; diff --git a/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/keys/StorageKeyStoreOperationsImpl.java b/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/keys/StorageKeyStoreOperationsImpl.java index a448b4864..feabde8ce 100644 --- a/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/keys/StorageKeyStoreOperationsImpl.java +++ b/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/keys/StorageKeyStoreOperationsImpl.java @@ -8,7 +8,7 @@ import de.adorsys.datasafe.encrypiton.api.keystore.KeyStoreService; import de.adorsys.datasafe.encrypiton.api.types.UserIDAuth; import de.adorsys.datasafe.encrypiton.api.types.keystore.KeyStoreAccess; -import de.adorsys.datasafe.encrypiton.api.types.keystore.ReadKeyPassword; +import de.adorsys.datasafe.types.api.types.ReadKeyPassword; import de.adorsys.datasafe.types.api.context.annotations.RuntimeDelegate; import de.adorsys.datasafe.types.api.resource.AbsoluteLocation; import de.adorsys.datasafe.types.api.resource.PrivateResource; diff --git a/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/operations/actions/ProfileUpdatingServiceImpl.java b/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/operations/actions/ProfileUpdatingServiceImpl.java index a5d71db06..0291ea5f8 100644 --- a/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/operations/actions/ProfileUpdatingServiceImpl.java +++ b/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/operations/actions/ProfileUpdatingServiceImpl.java @@ -7,7 +7,7 @@ import de.adorsys.datasafe.directory.api.types.UserPrivateProfile; import de.adorsys.datasafe.directory.api.types.UserPublicProfile; import de.adorsys.datasafe.encrypiton.api.types.UserIDAuth; -import de.adorsys.datasafe.encrypiton.api.types.keystore.ReadKeyPassword; +import de.adorsys.datasafe.types.api.types.ReadKeyPassword; import de.adorsys.datasafe.types.api.context.annotations.RuntimeDelegate; import lombok.SneakyThrows; import lombok.extern.slf4j.Slf4j; diff --git a/datasafe-directory/datasafe-directory-impl/src/test/java/de/adorsys/datasafe/directory/impl/profile/config/DFSConfigWithStorageCredsTest.java b/datasafe-directory/datasafe-directory-impl/src/test/java/de/adorsys/datasafe/directory/impl/profile/config/DFSConfigWithStorageCredsTest.java index bf6580fc7..6994fc226 100644 --- a/datasafe-directory/datasafe-directory-impl/src/test/java/de/adorsys/datasafe/directory/impl/profile/config/DFSConfigWithStorageCredsTest.java +++ b/datasafe-directory/datasafe-directory-impl/src/test/java/de/adorsys/datasafe/directory/impl/profile/config/DFSConfigWithStorageCredsTest.java @@ -2,10 +2,10 @@ import de.adorsys.datasafe.directory.api.types.CreateUserPrivateProfile; import de.adorsys.datasafe.encrypiton.api.types.UserIDAuth; -import de.adorsys.datasafe.encrypiton.api.types.keystore.ReadKeyPassword; -import de.adorsys.datasafe.encrypiton.api.types.keystore.ReadStorePassword; +import de.adorsys.datasafe.types.api.types.ReadStorePassword; import de.adorsys.datasafe.types.api.global.Version; import de.adorsys.datasafe.types.api.shared.BaseMockitoTest; +import de.adorsys.datasafe.types.api.utils.ReadKeyPasswordTestFactory; import org.junit.jupiter.api.Test; import static org.assertj.core.api.Assertions.assertThat; @@ -16,7 +16,7 @@ class DFSConfigWithStorageCredsTest extends BaseMockitoTest { @Test void defaultPrivateTemplate() { - UserIDAuth user = new UserIDAuth("", ReadKeyPassword.getForString("")); + UserIDAuth user = new UserIDAuth("", ReadKeyPasswordTestFactory.getForString("")); CreateUserPrivateProfile profile = tested.defaultPrivateTemplate(user); diff --git a/datasafe-directory/datasafe-directory-impl/src/test/java/de/adorsys/datasafe/directory/impl/profile/dfs/BucketAccessServiceImplTest.java b/datasafe-directory/datasafe-directory-impl/src/test/java/de/adorsys/datasafe/directory/impl/profile/dfs/BucketAccessServiceImplTest.java index 713e1569b..2aa1091de 100644 --- a/datasafe-directory/datasafe-directory-impl/src/test/java/de/adorsys/datasafe/directory/impl/profile/dfs/BucketAccessServiceImplTest.java +++ b/datasafe-directory/datasafe-directory-impl/src/test/java/de/adorsys/datasafe/directory/impl/profile/dfs/BucketAccessServiceImplTest.java @@ -2,10 +2,10 @@ import de.adorsys.datasafe.encrypiton.api.types.UserID; import de.adorsys.datasafe.encrypiton.api.types.UserIDAuth; -import de.adorsys.datasafe.encrypiton.api.types.keystore.ReadKeyPassword; import de.adorsys.datasafe.types.api.resource.BasePrivateResource; import de.adorsys.datasafe.types.api.resource.BasePublicResource; import de.adorsys.datasafe.types.api.shared.BaseMockitoTest; +import de.adorsys.datasafe.types.api.utils.ReadKeyPasswordTestFactory; import org.junit.jupiter.api.Test; import org.mockito.InjectMocks; @@ -15,7 +15,7 @@ class BucketAccessServiceImplTest extends BaseMockitoTest { private static final String ABSOLUTE_BUCKET = "s3://bucket"; - private UserIDAuth auth = new UserIDAuth(new UserID(""), ReadKeyPassword.getForString("")); + private UserIDAuth auth = new UserIDAuth(new UserID(""), ReadKeyPasswordTestFactory.getForString("")); @InjectMocks private BucketAccessServiceImpl bucketAccessService; diff --git a/datasafe-directory/datasafe-directory-impl/src/test/java/de/adorsys/datasafe/directory/impl/profile/keys/StorageKeyStoreOperationsImplTest.java b/datasafe-directory/datasafe-directory-impl/src/test/java/de/adorsys/datasafe/directory/impl/profile/keys/StorageKeyStoreOperationsImplTest.java index 2f5c62f29..9a3cdff6b 100644 --- a/datasafe-directory/datasafe-directory-impl/src/test/java/de/adorsys/datasafe/directory/impl/profile/keys/StorageKeyStoreOperationsImplTest.java +++ b/datasafe-directory/datasafe-directory-impl/src/test/java/de/adorsys/datasafe/directory/impl/profile/keys/StorageKeyStoreOperationsImplTest.java @@ -6,12 +6,13 @@ import de.adorsys.datasafe.directory.impl.profile.serde.GsonSerde; import de.adorsys.datasafe.encrypiton.api.keystore.KeyStoreService; import de.adorsys.datasafe.encrypiton.api.types.UserIDAuth; -import de.adorsys.datasafe.encrypiton.api.types.keystore.ReadKeyPassword; +import de.adorsys.datasafe.types.api.types.ReadKeyPassword; import de.adorsys.datasafe.types.api.resource.AbsoluteLocation; import de.adorsys.datasafe.types.api.resource.BasePrivateResource; import de.adorsys.datasafe.types.api.resource.PrivateResource; import de.adorsys.datasafe.types.api.resource.StorageIdentifier; import de.adorsys.datasafe.types.api.shared.BaseMockitoTest; +import de.adorsys.datasafe.types.api.utils.ReadKeyPasswordTestFactory; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.mockito.Answers; @@ -26,7 +27,7 @@ class StorageKeyStoreOperationsImplTest extends BaseMockitoTest { private static final String STORAGE_ID = "id"; - private static final ReadKeyPassword SECRET = ReadKeyPassword.getForString("secret"); + private static final ReadKeyPassword SECRET = ReadKeyPasswordTestFactory.getForString("secret"); private static final AbsoluteLocation STORAGE_KEYSTORE = BasePrivateResource.forAbsolutePrivate("file://path"); diff --git a/datasafe-directory/datasafe-directory-impl/src/test/java/de/adorsys/datasafe/directory/impl/profile/operations/actions/ProfileUpdatingServiceImplTest.java b/datasafe-directory/datasafe-directory-impl/src/test/java/de/adorsys/datasafe/directory/impl/profile/operations/actions/ProfileUpdatingServiceImplTest.java index 652f54009..4b0ad3f0b 100644 --- a/datasafe-directory/datasafe-directory-impl/src/test/java/de/adorsys/datasafe/directory/impl/profile/operations/actions/ProfileUpdatingServiceImplTest.java +++ b/datasafe-directory/datasafe-directory-impl/src/test/java/de/adorsys/datasafe/directory/impl/profile/operations/actions/ProfileUpdatingServiceImplTest.java @@ -6,7 +6,7 @@ import de.adorsys.datasafe.directory.api.types.UserPrivateProfile; import de.adorsys.datasafe.directory.api.types.UserPublicProfile; import de.adorsys.datasafe.encrypiton.api.types.UserIDAuth; -import de.adorsys.datasafe.encrypiton.api.types.keystore.ReadKeyPassword; +import de.adorsys.datasafe.types.api.types.ReadKeyPassword; import de.adorsys.datasafe.types.api.shared.BaseMockitoTest; import org.junit.jupiter.api.Test; import org.mockito.InjectMocks; diff --git a/datasafe-encryption/datasafe-encryption-api/pom.xml b/datasafe-encryption/datasafe-encryption-api/pom.xml index 8298daa5d..58889350c 100644 --- a/datasafe-encryption/datasafe-encryption-api/pom.xml +++ b/datasafe-encryption/datasafe-encryption-api/pom.xml @@ -14,25 +14,6 @@ datasafe-types-api ${project.version} - - org.slf4j - slf4j-api - - - org.slf4j - slf4j-simple - test - - - org.junit.jupiter - junit-jupiter-api - test - - - org.assertj - assertj-core - test - diff --git a/datasafe-encryption/datasafe-encryption-api/src/main/java/de/adorsys/datasafe/encrypiton/api/keystore/KeyStoreService.java b/datasafe-encryption/datasafe-encryption-api/src/main/java/de/adorsys/datasafe/encrypiton/api/keystore/KeyStoreService.java index 0b55e9638..0091755b5 100644 --- a/datasafe-encryption/datasafe-encryption-api/src/main/java/de/adorsys/datasafe/encrypiton/api/keystore/KeyStoreService.java +++ b/datasafe-encryption/datasafe-encryption-api/src/main/java/de/adorsys/datasafe/encrypiton/api/keystore/KeyStoreService.java @@ -1,6 +1,7 @@ package de.adorsys.datasafe.encrypiton.api.keystore; import de.adorsys.datasafe.encrypiton.api.types.keystore.*; +import de.adorsys.datasafe.types.api.types.ReadStorePassword; import javax.crypto.spec.SecretKeySpec; import java.security.KeyStore; diff --git a/datasafe-encryption/datasafe-encryption-api/src/main/java/de/adorsys/datasafe/encrypiton/api/types/UserIDAuth.java b/datasafe-encryption/datasafe-encryption-api/src/main/java/de/adorsys/datasafe/encrypiton/api/types/UserIDAuth.java index d9fcc9a93..93583ff4a 100644 --- a/datasafe-encryption/datasafe-encryption-api/src/main/java/de/adorsys/datasafe/encrypiton/api/types/UserIDAuth.java +++ b/datasafe-encryption/datasafe-encryption-api/src/main/java/de/adorsys/datasafe/encrypiton/api/types/UserIDAuth.java @@ -1,6 +1,6 @@ package de.adorsys.datasafe.encrypiton.api.types; -import de.adorsys.datasafe.encrypiton.api.types.keystore.ReadKeyPassword; +import de.adorsys.datasafe.types.api.types.ReadKeyPassword; import lombok.EqualsAndHashCode; import lombok.Getter; import lombok.RequiredArgsConstructor; diff --git a/datasafe-encryption/datasafe-encryption-api/src/main/java/de/adorsys/datasafe/encrypiton/api/types/keystore/KeyEntry.java b/datasafe-encryption/datasafe-encryption-api/src/main/java/de/adorsys/datasafe/encrypiton/api/types/keystore/KeyEntry.java index 2185ba00d..95da61ce1 100644 --- a/datasafe-encryption/datasafe-encryption-api/src/main/java/de/adorsys/datasafe/encrypiton/api/types/keystore/KeyEntry.java +++ b/datasafe-encryption/datasafe-encryption-api/src/main/java/de/adorsys/datasafe/encrypiton/api/types/keystore/KeyEntry.java @@ -1,5 +1,7 @@ package de.adorsys.datasafe.encrypiton.api.types.keystore; +import de.adorsys.datasafe.types.api.types.ReadKeyPassword; + /** * Wrapper for key entry within keystore. */ diff --git a/datasafe-encryption/datasafe-encryption-api/src/main/java/de/adorsys/datasafe/encrypiton/api/types/keystore/KeyStoreAuth.java b/datasafe-encryption/datasafe-encryption-api/src/main/java/de/adorsys/datasafe/encrypiton/api/types/keystore/KeyStoreAuth.java index 8884af204..463a34150 100644 --- a/datasafe-encryption/datasafe-encryption-api/src/main/java/de/adorsys/datasafe/encrypiton/api/types/keystore/KeyStoreAuth.java +++ b/datasafe-encryption/datasafe-encryption-api/src/main/java/de/adorsys/datasafe/encrypiton/api/types/keystore/KeyStoreAuth.java @@ -1,6 +1,8 @@ package de.adorsys.datasafe.encrypiton.api.types.keystore; import de.adorsys.datasafe.encrypiton.api.types.keystore.exceptions.KeyStoreAuthException; +import de.adorsys.datasafe.types.api.types.ReadKeyPassword; +import de.adorsys.datasafe.types.api.types.ReadStorePassword; /** * Authorization entity to read keystore or both keystore and key in it. diff --git a/datasafe-encryption/datasafe-encryption-api/src/main/java/de/adorsys/datasafe/encrypiton/api/types/keystore/SecretKeyGenerator.java b/datasafe-encryption/datasafe-encryption-api/src/main/java/de/adorsys/datasafe/encrypiton/api/types/keystore/SecretKeyGenerator.java index c9c41dfb1..8cc874253 100644 --- a/datasafe-encryption/datasafe-encryption-api/src/main/java/de/adorsys/datasafe/encrypiton/api/types/keystore/SecretKeyGenerator.java +++ b/datasafe-encryption/datasafe-encryption-api/src/main/java/de/adorsys/datasafe/encrypiton/api/types/keystore/SecretKeyGenerator.java @@ -1,6 +1,8 @@ package de.adorsys.datasafe.encrypiton.api.types.keystore; +import de.adorsys.datasafe.types.api.types.ReadKeyPassword; + /** * Generates random secret key entry. */ diff --git a/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/keystore/KeyStoreGenerator.java b/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/keystore/KeyStoreGenerator.java index 4d6df4970..5a1fcd940 100644 --- a/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/keystore/KeyStoreGenerator.java +++ b/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/keystore/KeyStoreGenerator.java @@ -6,6 +6,7 @@ import de.adorsys.datasafe.encrypiton.impl.keystore.generator.KeystoreBuilder; import de.adorsys.datasafe.encrypiton.impl.keystore.types.KeyPairEntry; import de.adorsys.datasafe.encrypiton.impl.keystore.types.KeyPairGenerator; +import de.adorsys.datasafe.types.api.types.ReadKeyPassword; import de.adorsys.datasafe.types.api.utils.Obfuscate; import lombok.Builder; import lombok.NonNull; diff --git a/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/keystore/KeyStoreServiceImpl.java b/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/keystore/KeyStoreServiceImpl.java index 57a2ec163..35c1e1a6c 100644 --- a/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/keystore/KeyStoreServiceImpl.java +++ b/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/keystore/KeyStoreServiceImpl.java @@ -6,6 +6,8 @@ import de.adorsys.datasafe.encrypiton.impl.keystore.generator.KeyStoreServiceImplBaseFunctions; import de.adorsys.datasafe.encrypiton.impl.keystore.types.PasswordBasedKeyConfig; import de.adorsys.datasafe.types.api.context.annotations.RuntimeDelegate; +import de.adorsys.datasafe.types.api.types.ReadKeyPassword; +import de.adorsys.datasafe.types.api.types.ReadStorePassword; import lombok.SneakyThrows; import lombok.extern.slf4j.Slf4j; diff --git a/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/keystore/generator/KeyEntryData.java b/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/keystore/generator/KeyEntryData.java index cee466edb..312981d78 100644 --- a/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/keystore/generator/KeyEntryData.java +++ b/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/keystore/generator/KeyEntryData.java @@ -1,7 +1,7 @@ package de.adorsys.datasafe.encrypiton.impl.keystore.generator; import de.adorsys.datasafe.encrypiton.api.types.keystore.KeyEntry; -import de.adorsys.datasafe.encrypiton.api.types.keystore.ReadKeyPassword; +import de.adorsys.datasafe.types.api.types.ReadKeyPassword; import lombok.AllArgsConstructor; import lombok.Getter; diff --git a/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/keystore/generator/KeyPairData.java b/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/keystore/generator/KeyPairData.java index 68dc53997..6995df4b2 100644 --- a/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/keystore/generator/KeyPairData.java +++ b/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/keystore/generator/KeyPairData.java @@ -1,6 +1,6 @@ package de.adorsys.datasafe.encrypiton.impl.keystore.generator; -import de.adorsys.datasafe.encrypiton.api.types.keystore.ReadKeyPassword; +import de.adorsys.datasafe.types.api.types.ReadKeyPassword; import de.adorsys.datasafe.encrypiton.impl.keystore.types.KeyPairEntry; import de.adorsys.datasafe.encrypiton.impl.keystore.types.SelfSignedKeyPairData; import lombok.Builder; diff --git a/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/keystore/generator/KeyPairGeneratorImpl.java b/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/keystore/generator/KeyPairGeneratorImpl.java index 43f8c5659..d7db80dc1 100644 --- a/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/keystore/generator/KeyPairGeneratorImpl.java +++ b/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/keystore/generator/KeyPairGeneratorImpl.java @@ -1,6 +1,6 @@ package de.adorsys.datasafe.encrypiton.impl.keystore.generator; -import de.adorsys.datasafe.encrypiton.api.types.keystore.ReadKeyPassword; +import de.adorsys.datasafe.types.api.types.ReadKeyPassword; import de.adorsys.datasafe.encrypiton.impl.keystore.types.KeyPairGenerator; import de.adorsys.datasafe.encrypiton.impl.keystore.types.SelfSignedKeyPairData; import org.bouncycastle.asn1.x500.X500Name; diff --git a/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/keystore/generator/KeyStoreServiceImplBaseFunctions.java b/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/keystore/generator/KeyStoreServiceImplBaseFunctions.java index a47c31675..61ef810b3 100644 --- a/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/keystore/generator/KeyStoreServiceImplBaseFunctions.java +++ b/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/keystore/generator/KeyStoreServiceImplBaseFunctions.java @@ -2,6 +2,8 @@ import de.adorsys.datasafe.encrypiton.api.types.keystore.*; import de.adorsys.datasafe.encrypiton.impl.keystore.types.KeyPairEntry; +import de.adorsys.datasafe.types.api.types.ReadKeyPassword; +import de.adorsys.datasafe.types.api.types.ReadStorePassword; import lombok.SneakyThrows; import org.bouncycastle.cert.X509CertificateHolder; diff --git a/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/keystore/generator/SecretKeyData.java b/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/keystore/generator/SecretKeyData.java index 2cd657144..07db999a0 100644 --- a/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/keystore/generator/SecretKeyData.java +++ b/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/keystore/generator/SecretKeyData.java @@ -1,6 +1,6 @@ package de.adorsys.datasafe.encrypiton.impl.keystore.generator; -import de.adorsys.datasafe.encrypiton.api.types.keystore.ReadKeyPassword; +import de.adorsys.datasafe.types.api.types.ReadKeyPassword; import de.adorsys.datasafe.encrypiton.api.types.keystore.SecretKeyEntry; import lombok.Builder; import lombok.Getter; diff --git a/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/keystore/generator/SecretKeyGeneratorImpl.java b/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/keystore/generator/SecretKeyGeneratorImpl.java index 15abee46a..6f0db726a 100644 --- a/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/keystore/generator/SecretKeyGeneratorImpl.java +++ b/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/keystore/generator/SecretKeyGeneratorImpl.java @@ -1,6 +1,6 @@ package de.adorsys.datasafe.encrypiton.impl.keystore.generator; -import de.adorsys.datasafe.encrypiton.api.types.keystore.ReadKeyPassword; +import de.adorsys.datasafe.types.api.types.ReadKeyPassword; import de.adorsys.datasafe.encrypiton.api.types.keystore.SecretKeyGenerator; import javax.crypto.SecretKey; diff --git a/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/keystore/types/KeyPairGenerator.java b/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/keystore/types/KeyPairGenerator.java index 2efe9ea04..7f059f0da 100644 --- a/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/keystore/types/KeyPairGenerator.java +++ b/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/keystore/types/KeyPairGenerator.java @@ -1,6 +1,6 @@ package de.adorsys.datasafe.encrypiton.impl.keystore.types; -import de.adorsys.datasafe.encrypiton.api.types.keystore.ReadKeyPassword; +import de.adorsys.datasafe.types.api.types.ReadKeyPassword; /** * Created by peter on 26.02.18 at 17:09. diff --git a/datasafe-encryption/datasafe-encryption-impl/src/test/java/de/adorsys/datasafe/encrypiton/impl/KeyPairGeneratorTest.java b/datasafe-encryption/datasafe-encryption-impl/src/test/java/de/adorsys/datasafe/encrypiton/impl/KeyPairGeneratorTest.java index 9d2bc1823..6cfb61e15 100644 --- a/datasafe-encryption/datasafe-encryption-impl/src/test/java/de/adorsys/datasafe/encrypiton/impl/KeyPairGeneratorTest.java +++ b/datasafe-encryption/datasafe-encryption-impl/src/test/java/de/adorsys/datasafe/encrypiton/impl/KeyPairGeneratorTest.java @@ -1,6 +1,7 @@ package de.adorsys.datasafe.encrypiton.impl; -import de.adorsys.datasafe.encrypiton.api.types.keystore.ReadKeyPassword; +import de.adorsys.datasafe.types.api.types.ReadKeyPassword; +import de.adorsys.datasafe.types.api.utils.ReadKeyPasswordTestFactory; import org.junit.jupiter.api.Test; import java.util.Date; @@ -11,7 +12,7 @@ class KeyPairGeneratorTest extends WithBouncyCastle { @Test void testKeyPairGenerationWithCA() { - ReadKeyPassword readKeyPassword = ReadKeyPassword.getForString("read"); + ReadKeyPassword readKeyPassword = ReadKeyPasswordTestFactory.getForString("read"); TestableKeyPairGeneratorImpl i = new TestableKeyPairGeneratorImpl("RSA", 2048, "SHA256withRSA", "enc"); i.setDayAfter(40); i.setWithCA(true); diff --git a/datasafe-encryption/datasafe-encryption-impl/src/test/java/de/adorsys/datasafe/encrypiton/impl/cmsencryption/CmsEncryptionServiceImplTest.java b/datasafe-encryption/datasafe-encryption-impl/src/test/java/de/adorsys/datasafe/encrypiton/impl/cmsencryption/CmsEncryptionServiceImplTest.java index 7f44d5638..d59e27a53 100644 --- a/datasafe-encryption/datasafe-encryption-impl/src/test/java/de/adorsys/datasafe/encrypiton/impl/cmsencryption/CmsEncryptionServiceImplTest.java +++ b/datasafe-encryption/datasafe-encryption-impl/src/test/java/de/adorsys/datasafe/encrypiton/impl/cmsencryption/CmsEncryptionServiceImplTest.java @@ -8,6 +8,9 @@ import de.adorsys.datasafe.encrypiton.impl.cmsencryption.exceptions.DecryptionException; import de.adorsys.datasafe.encrypiton.impl.keystore.DefaultPasswordBasedKeyConfig; import de.adorsys.datasafe.encrypiton.impl.keystore.KeyStoreServiceImpl; +import de.adorsys.datasafe.types.api.types.ReadKeyPassword; +import de.adorsys.datasafe.types.api.types.ReadStorePassword; +import de.adorsys.datasafe.types.api.utils.ReadKeyPasswordTestFactory; import lombok.SneakyThrows; import lombok.extern.slf4j.Slf4j; import org.assertj.core.util.Sets; @@ -198,7 +201,7 @@ void cmsStreamEnvelopeOneKeyPairFailTest() { } private static KeyStoreAccess getKeyStoreAccess(String label) { - ReadKeyPassword readKeyPassword = ReadKeyPassword.getForString(label); + ReadKeyPassword readKeyPassword = ReadKeyPasswordTestFactory.getForString(label); ReadStorePassword readStorePassword = new ReadStorePassword(label); KeyStoreAuth keyStoreAuth = new KeyStoreAuth(readStorePassword, readKeyPassword); diff --git a/datasafe-encryption/datasafe-encryption-impl/src/test/java/de/adorsys/datasafe/encrypiton/impl/cmsencryption/SymetricEncryptionTest.java b/datasafe-encryption/datasafe-encryption-impl/src/test/java/de/adorsys/datasafe/encrypiton/impl/cmsencryption/SymetricEncryptionTest.java index 806a30087..25170ce97 100644 --- a/datasafe-encryption/datasafe-encryption-impl/src/test/java/de/adorsys/datasafe/encrypiton/impl/cmsencryption/SymetricEncryptionTest.java +++ b/datasafe-encryption/datasafe-encryption-impl/src/test/java/de/adorsys/datasafe/encrypiton/impl/cmsencryption/SymetricEncryptionTest.java @@ -6,6 +6,9 @@ import de.adorsys.datasafe.encrypiton.impl.WithBouncyCastle; import de.adorsys.datasafe.encrypiton.impl.keystore.DefaultPasswordBasedKeyConfig; import de.adorsys.datasafe.encrypiton.impl.keystore.KeyStoreServiceImpl; +import de.adorsys.datasafe.types.api.types.ReadKeyPassword; +import de.adorsys.datasafe.types.api.types.ReadStorePassword; +import de.adorsys.datasafe.types.api.utils.ReadKeyPasswordTestFactory; import lombok.SneakyThrows; import lombok.extern.slf4j.Slf4j; import org.bouncycastle.cms.CMSException; @@ -32,7 +35,7 @@ class SymetricEncryptionTest extends WithBouncyCastle { private CMSEncryptionService cmsEncryptionService = new CMSEncryptionServiceImpl(new DefaultCMSEncryptionConfig()); private KeyStoreService keyStoreService = new KeyStoreServiceImpl(new DefaultPasswordBasedKeyConfig()); - private ReadKeyPassword readKeyPassword = ReadKeyPassword.getForString("readkeypassword"); + private ReadKeyPassword readKeyPassword = ReadKeyPasswordTestFactory.getForString("readkeypassword"); private ReadStorePassword readStorePassword = new ReadStorePassword("readstorepassword"); private KeyStoreAuth keyStoreAuth = new KeyStoreAuth(readStorePassword, readKeyPassword); private KeyStoreCreationConfig config = new KeyStoreCreationConfig(1, 1); diff --git a/datasafe-encryption/datasafe-encryption-impl/src/test/java/de/adorsys/datasafe/encrypiton/impl/keystore/KeyStoreServiceTest.java b/datasafe-encryption/datasafe-encryption-impl/src/test/java/de/adorsys/datasafe/encrypiton/impl/keystore/KeyStoreServiceTest.java index b3be0f03d..c470ab8ec 100644 --- a/datasafe-encryption/datasafe-encryption-impl/src/test/java/de/adorsys/datasafe/encrypiton/impl/keystore/KeyStoreServiceTest.java +++ b/datasafe-encryption/datasafe-encryption-impl/src/test/java/de/adorsys/datasafe/encrypiton/impl/keystore/KeyStoreServiceTest.java @@ -9,6 +9,9 @@ import de.adorsys.datasafe.encrypiton.impl.keystore.generator.KeyStoreServiceImplBaseFunctions; import de.adorsys.datasafe.encrypiton.impl.keystore.types.KeyPairEntry; import de.adorsys.datasafe.encrypiton.impl.keystore.types.KeyPairGenerator; +import de.adorsys.datasafe.types.api.types.ReadKeyPassword; +import de.adorsys.datasafe.types.api.types.ReadStorePassword; +import de.adorsys.datasafe.types.api.utils.ReadKeyPasswordTestFactory; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; @@ -31,7 +34,7 @@ class KeyStoreServiceTest extends WithBouncyCastle { @BeforeEach void setUp() { ReadStorePassword readStorePassword = new ReadStorePassword("keystorepass"); - ReadKeyPassword readKeyPassword = ReadKeyPassword.getForString("keypass"); + ReadKeyPassword readKeyPassword = ReadKeyPasswordTestFactory.getForString("keypass"); keyStoreAuth = new KeyStoreAuth(readStorePassword, readKeyPassword); } @@ -81,7 +84,7 @@ void getPublicKeys() { void getPrivateKey() throws Exception { KeyStore keyStore = KeyStoreServiceImplBaseFunctions.newKeyStore(KeyStoreType.DEFAULT); // UBER - ReadKeyPassword readKeyPassword = ReadKeyPassword.getForString("keypass"); + ReadKeyPassword readKeyPassword = ReadKeyPasswordTestFactory.getForString("keypass"); KeyStoreCreationConfigImpl keyStoreCreationConfig = new KeyStoreCreationConfigImpl(null); KeyPairGenerator encKeyPairGenerator = keyStoreCreationConfig.getEncKeyPairGenerator("KEYSTORE-ID-0"); String alias = "KEYSTORE-ID-0" + UUID.randomUUID().toString(); diff --git a/datasafe-encryption/datasafe-encryption-impl/src/test/java/de/adorsys/datasafe/encrypiton/impl/pathencryption/SymmetricPathEncryptionServiceImplTest.java b/datasafe-encryption/datasafe-encryption-impl/src/test/java/de/adorsys/datasafe/encrypiton/impl/pathencryption/SymmetricPathEncryptionServiceImplTest.java index 3ea09aead..724a79e25 100644 --- a/datasafe-encryption/datasafe-encryption-impl/src/test/java/de/adorsys/datasafe/encrypiton/impl/pathencryption/SymmetricPathEncryptionServiceImplTest.java +++ b/datasafe-encryption/datasafe-encryption-impl/src/test/java/de/adorsys/datasafe/encrypiton/impl/pathencryption/SymmetricPathEncryptionServiceImplTest.java @@ -7,6 +7,9 @@ import de.adorsys.datasafe.encrypiton.impl.keystore.DefaultPasswordBasedKeyConfig; import de.adorsys.datasafe.encrypiton.impl.keystore.KeyStoreServiceImpl; import de.adorsys.datasafe.types.api.resource.Uri; +import de.adorsys.datasafe.types.api.types.ReadKeyPassword; +import de.adorsys.datasafe.types.api.types.ReadStorePassword; +import de.adorsys.datasafe.types.api.utils.ReadKeyPasswordTestFactory; import lombok.extern.slf4j.Slf4j; import org.cryptomator.siv.SivMode; import org.junit.jupiter.api.Test; @@ -30,7 +33,7 @@ class SymmetricPathEncryptionServiceImplTest extends WithBouncyCastle { ); private KeyStoreService keyStoreService = new KeyStoreServiceImpl(new DefaultPasswordBasedKeyConfig()); - private ReadKeyPassword readKeyPassword = ReadKeyPassword.getForString("readkeypassword"); + private ReadKeyPassword readKeyPassword = ReadKeyPasswordTestFactory.getForString("readkeypassword"); private ReadStorePassword readStorePassword = new ReadStorePassword("readstorepassword"); private KeyStoreAuth keyStoreAuth = new KeyStoreAuth(readStorePassword, readKeyPassword); private KeyStoreCreationConfig config = new KeyStoreCreationConfig(0, 1); diff --git a/datasafe-examples/datasafe-examples-business/pom.xml b/datasafe-examples/datasafe-examples-business/pom.xml index e7d6528a1..6bec085db 100644 --- a/datasafe-examples/datasafe-examples-business/pom.xml +++ b/datasafe-examples/datasafe-examples-business/pom.xml @@ -47,6 +47,13 @@ mockito-core test + + de.adorsys + datasafe-types-api + ${project.version} + test-jar + test + diff --git a/datasafe-examples/datasafe-examples-business/src/test/java/de/adorsys/datasafe/examples/business/filesystem/BaseUserOperationsTestWithDefaultDatasafeTest.java b/datasafe-examples/datasafe-examples-business/src/test/java/de/adorsys/datasafe/examples/business/filesystem/BaseUserOperationsTestWithDefaultDatasafeTest.java index a76590859..77fb54f04 100644 --- a/datasafe-examples/datasafe-examples-business/src/test/java/de/adorsys/datasafe/examples/business/filesystem/BaseUserOperationsTestWithDefaultDatasafeTest.java +++ b/datasafe-examples/datasafe-examples-business/src/test/java/de/adorsys/datasafe/examples/business/filesystem/BaseUserOperationsTestWithDefaultDatasafeTest.java @@ -7,14 +7,14 @@ import de.adorsys.datasafe.directory.impl.profile.config.DefaultDFSConfig; import de.adorsys.datasafe.encrypiton.api.types.UserID; import de.adorsys.datasafe.encrypiton.api.types.UserIDAuth; -import de.adorsys.datasafe.encrypiton.api.types.keystore.ReadKeyPassword; -import de.adorsys.datasafe.encrypiton.api.types.keystore.ReadStorePassword; +import de.adorsys.datasafe.types.api.types.ReadStorePassword; import de.adorsys.datasafe.storage.impl.fs.FileSystemStorageService; import de.adorsys.datasafe.types.api.actions.ListRequest; import de.adorsys.datasafe.types.api.actions.ReadRequest; import de.adorsys.datasafe.types.api.actions.WriteRequest; import de.adorsys.datasafe.types.api.resource.AbsoluteLocation; import de.adorsys.datasafe.types.api.resource.ResolvedResource; +import de.adorsys.datasafe.types.api.utils.ReadKeyPasswordTestFactory; import lombok.SneakyThrows; import org.bouncycastle.jce.provider.BouncyCastleProvider; import org.junit.jupiter.api.BeforeEach; @@ -66,7 +66,7 @@ void registerUser() { IMPORTANT: For cases when user profile is stored on S3 without object locks, this requires some global synchronization due to eventual consistency or you need to supply globally unique username on registration */ - defaultDatasafeServices.userProfile().registerUsingDefaults(new UserIDAuth("user", ReadKeyPassword.getForString("passwrd"))); + defaultDatasafeServices.userProfile().registerUsingDefaults(new UserIDAuth("user", ReadKeyPasswordTestFactory.getForString("passwrd"))); // END_SNIPPET assertThat(defaultDatasafeServices.userProfile().userExists(new UserID("user"))); @@ -296,7 +296,7 @@ private void writeToPrivate(UserIDAuth user, String path, String fileContent) { } private UserIDAuth registerUser(String username) { - UserIDAuth creds = new UserIDAuth(username, ReadKeyPassword.getForString("passwrd" + username)); + UserIDAuth creds = new UserIDAuth(username, ReadKeyPasswordTestFactory.getForString("passwrd" + username)); defaultDatasafeServices.userProfile().registerUsingDefaults(creds); return creds; } diff --git a/datasafe-examples/datasafe-examples-business/src/test/java/de/adorsys/datasafe/examples/business/filesystem/BaseUserOperationsTestWithVersionedDatasafeTest.java b/datasafe-examples/datasafe-examples-business/src/test/java/de/adorsys/datasafe/examples/business/filesystem/BaseUserOperationsTestWithVersionedDatasafeTest.java index 9de9d5ea6..2b133940f 100644 --- a/datasafe-examples/datasafe-examples-business/src/test/java/de/adorsys/datasafe/examples/business/filesystem/BaseUserOperationsTestWithVersionedDatasafeTest.java +++ b/datasafe-examples/datasafe-examples-business/src/test/java/de/adorsys/datasafe/examples/business/filesystem/BaseUserOperationsTestWithVersionedDatasafeTest.java @@ -5,8 +5,7 @@ import de.adorsys.datasafe.directory.impl.profile.config.DefaultDFSConfig; import de.adorsys.datasafe.encrypiton.api.types.UserID; import de.adorsys.datasafe.encrypiton.api.types.UserIDAuth; -import de.adorsys.datasafe.encrypiton.api.types.keystore.ReadKeyPassword; -import de.adorsys.datasafe.encrypiton.api.types.keystore.ReadStorePassword; +import de.adorsys.datasafe.types.api.types.ReadStorePassword; import de.adorsys.datasafe.metainfo.version.impl.version.types.DFSVersion; import de.adorsys.datasafe.storage.impl.fs.FileSystemStorageService; import de.adorsys.datasafe.types.api.actions.ListRequest; @@ -16,6 +15,7 @@ import de.adorsys.datasafe.types.api.resource.PrivateResource; import de.adorsys.datasafe.types.api.resource.ResolvedResource; import de.adorsys.datasafe.types.api.resource.Versioned; +import de.adorsys.datasafe.types.api.utils.ReadKeyPasswordTestFactory; import lombok.SneakyThrows; import org.bouncycastle.jce.provider.BouncyCastleProvider; import org.junit.jupiter.api.BeforeEach; @@ -67,7 +67,7 @@ void registerUser() { IMPORTANT: For cases when user profile is stored on S3 without object locks, this requires some global synchronization due to eventual consistency or you need to supply globally unique username on registration */ - versionedServices.userProfile().registerUsingDefaults(new UserIDAuth("user", ReadKeyPassword.getForString("passwrd"))); + versionedServices.userProfile().registerUsingDefaults(new UserIDAuth("user", ReadKeyPasswordTestFactory.getForString("passwrd"))); // END_SNIPPET assertThat(versionedServices.userProfile().userExists(new UserID("user"))); @@ -167,7 +167,7 @@ void checkThatWeNeedToDownloadNewFile() { } private UserIDAuth registerUser(String username) { - UserIDAuth creds = new UserIDAuth(username, ReadKeyPassword.getForString("passwrd" + username)); + UserIDAuth creds = new UserIDAuth(username, ReadKeyPasswordTestFactory.getForString("passwrd" + username)); versionedServices.userProfile().registerUsingDefaults(creds); return creds; } diff --git a/datasafe-examples/datasafe-examples-business/src/test/java/de/adorsys/datasafe/examples/business/filesystem/RuntimeOverrideOperationsTest.java b/datasafe-examples/datasafe-examples-business/src/test/java/de/adorsys/datasafe/examples/business/filesystem/RuntimeOverrideOperationsTest.java index 119c07efa..8cef051d7 100644 --- a/datasafe-examples/datasafe-examples-business/src/test/java/de/adorsys/datasafe/examples/business/filesystem/RuntimeOverrideOperationsTest.java +++ b/datasafe-examples/datasafe-examples-business/src/test/java/de/adorsys/datasafe/examples/business/filesystem/RuntimeOverrideOperationsTest.java @@ -4,8 +4,7 @@ import de.adorsys.datasafe.business.impl.service.DefaultDatasafeServices; import de.adorsys.datasafe.directory.impl.profile.config.DefaultDFSConfig; import de.adorsys.datasafe.encrypiton.api.types.UserIDAuth; -import de.adorsys.datasafe.encrypiton.api.types.keystore.ReadKeyPassword; -import de.adorsys.datasafe.encrypiton.api.types.keystore.ReadStorePassword; +import de.adorsys.datasafe.types.api.types.ReadStorePassword; import de.adorsys.datasafe.encrypiton.impl.pathencryption.PathEncryptionImpl; import de.adorsys.datasafe.encrypiton.impl.pathencryption.PathEncryptionImplRuntimeDelegatable; import de.adorsys.datasafe.storage.impl.fs.FileSystemStorageService; @@ -13,6 +12,7 @@ import de.adorsys.datasafe.types.api.context.BaseOverridesRegistry; import de.adorsys.datasafe.types.api.context.overrides.OverridesRegistry; import de.adorsys.datasafe.types.api.resource.Uri; +import de.adorsys.datasafe.types.api.utils.ReadKeyPasswordTestFactory; import lombok.SneakyThrows; import org.bouncycastle.jce.provider.BouncyCastleProvider; import org.junit.jupiter.api.Test; @@ -47,7 +47,7 @@ void testPathEncryptionOverridden(@TempDir Path root) { .build(); // registering user - UserIDAuth user = new UserIDAuth("user", ReadKeyPassword.getForString("passwrd")); + UserIDAuth user = new UserIDAuth("user", ReadKeyPasswordTestFactory.getForString("passwrd")); datasafeServices.userProfile().registerUsingDefaults(user); // writing into user privatespace, note that with default implementation `file.txt` would be encrypted datasafeServices.privateService().write(WriteRequest.forDefaultPrivate(user, "file.txt")); diff --git a/datasafe-examples/datasafe-examples-customize-dagger/pom.xml b/datasafe-examples/datasafe-examples-customize-dagger/pom.xml index ab6ab0456..410cbacb0 100644 --- a/datasafe-examples/datasafe-examples-customize-dagger/pom.xml +++ b/datasafe-examples/datasafe-examples-customize-dagger/pom.xml @@ -53,6 +53,13 @@ mockito-core test + + de.adorsys + datasafe-types-api + ${project.version} + test-jar + test + diff --git a/datasafe-examples/datasafe-examples-customize-dagger/src/test/java/de/adorsys/datasafe/examples/business/filesystem/CustomlyBuiltDatasafeServiceTest.java b/datasafe-examples/datasafe-examples-customize-dagger/src/test/java/de/adorsys/datasafe/examples/business/filesystem/CustomlyBuiltDatasafeServiceTest.java index cf65d88c6..b1495d90f 100644 --- a/datasafe-examples/datasafe-examples-customize-dagger/src/test/java/de/adorsys/datasafe/examples/business/filesystem/CustomlyBuiltDatasafeServiceTest.java +++ b/datasafe-examples/datasafe-examples-customize-dagger/src/test/java/de/adorsys/datasafe/examples/business/filesystem/CustomlyBuiltDatasafeServiceTest.java @@ -2,10 +2,10 @@ import de.adorsys.datasafe.directory.impl.profile.config.DefaultDFSConfig; import de.adorsys.datasafe.encrypiton.api.types.UserIDAuth; -import de.adorsys.datasafe.encrypiton.api.types.keystore.ReadKeyPassword; -import de.adorsys.datasafe.encrypiton.api.types.keystore.ReadStorePassword; +import de.adorsys.datasafe.types.api.types.ReadStorePassword; import de.adorsys.datasafe.storage.impl.fs.FileSystemStorageService; import de.adorsys.datasafe.types.api.actions.WriteRequest; +import de.adorsys.datasafe.types.api.utils.ReadKeyPasswordTestFactory; import org.bouncycastle.jce.provider.BouncyCastleProvider; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.io.TempDir; @@ -33,7 +33,7 @@ void testPathEncryptionOverridden(@TempDir Path root) { .build(); // registering user - UserIDAuth user = new UserIDAuth("user", ReadKeyPassword.getForString("passwrd")); + UserIDAuth user = new UserIDAuth("user", ReadKeyPasswordTestFactory.getForString("passwrd")); datasafeServices.userProfile().registerUsingDefaults(user); // writing into user privatespace, note that with default implementation `file.txt` would be encrypted datasafeServices.privateService().write(WriteRequest.forDefaultPrivate(user, "file.txt")); diff --git a/datasafe-examples/datasafe-examples-multidfs/pom.xml b/datasafe-examples/datasafe-examples-multidfs/pom.xml index abd4b439c..9e72e65b7 100644 --- a/datasafe-examples/datasafe-examples-multidfs/pom.xml +++ b/datasafe-examples/datasafe-examples-multidfs/pom.xml @@ -52,6 +52,13 @@ mockito-core test + + de.adorsys + datasafe-types-api + ${project.version} + test-jar + test + diff --git a/datasafe-examples/datasafe-examples-multidfs/src/test/java/de/adorsys/datasafe/examples/business/s3/MultiDfsWithCredentialsExampleTest.java b/datasafe-examples/datasafe-examples-multidfs/src/test/java/de/adorsys/datasafe/examples/business/s3/MultiDfsWithCredentialsExampleTest.java index 99c0eb226..dd922cb26 100644 --- a/datasafe-examples/datasafe-examples-multidfs/src/test/java/de/adorsys/datasafe/examples/business/s3/MultiDfsWithCredentialsExampleTest.java +++ b/datasafe-examples/datasafe-examples-multidfs/src/test/java/de/adorsys/datasafe/examples/business/s3/MultiDfsWithCredentialsExampleTest.java @@ -12,8 +12,7 @@ import de.adorsys.datasafe.directory.impl.profile.dfs.BucketAccessServiceImplRuntimeDelegatable; import de.adorsys.datasafe.directory.impl.profile.dfs.RegexAccessServiceWithStorageCredentialsImpl; import de.adorsys.datasafe.encrypiton.api.types.UserIDAuth; -import de.adorsys.datasafe.encrypiton.api.types.keystore.ReadKeyPassword; -import de.adorsys.datasafe.encrypiton.api.types.keystore.ReadStorePassword; +import de.adorsys.datasafe.types.api.types.ReadStorePassword; import de.adorsys.datasafe.storage.api.RegexDelegatingStorage; import de.adorsys.datasafe.storage.api.StorageService; import de.adorsys.datasafe.storage.api.UriBasedAuthStorageService; @@ -27,6 +26,7 @@ import de.adorsys.datasafe.types.api.resource.AbsoluteLocation; import de.adorsys.datasafe.types.api.resource.BasePrivateResource; import de.adorsys.datasafe.types.api.resource.StorageIdentifier; +import de.adorsys.datasafe.types.api.utils.ReadKeyPasswordTestFactory; import lombok.SneakyThrows; import lombok.experimental.Delegate; import lombok.extern.slf4j.Slf4j; @@ -156,7 +156,8 @@ void testMultiUserStorageUserSetup() { // Depending on path of file - filesBucketOne or filesBucketTwo - requests will be routed to proper bucket. // I.e. path filesBucketOne/path/to/file will end up in `filesBucketOne` with key path/to/file // his profile and access credentials for `filesBucketOne` will be in `configBucket` - UserIDAuth john = new UserIDAuth("john", ReadKeyPassword.getForString("secret")); + UserIDAuth john = new UserIDAuth("john", + ReadKeyPasswordTestFactory.getForString("secret")); // Here, nothing expects John has own storage credentials: multiDfsDatasafe.userProfile().registerUsingDefaults(john); diff --git a/datasafe-examples/datasafe-examples-versioned-s3/pom.xml b/datasafe-examples/datasafe-examples-versioned-s3/pom.xml index a38db686b..c2d377585 100644 --- a/datasafe-examples/datasafe-examples-versioned-s3/pom.xml +++ b/datasafe-examples/datasafe-examples-versioned-s3/pom.xml @@ -52,6 +52,13 @@ mockito-core test + + de.adorsys + datasafe-types-api + ${project.version} + test-jar + test + diff --git a/datasafe-examples/datasafe-examples-versioned-s3/src/test/java/de/adorsys/datasafe/examples/business/s3/BaseUserOperationsWithDefaultDatasafeOnVersionedStorageTest.java b/datasafe-examples/datasafe-examples-versioned-s3/src/test/java/de/adorsys/datasafe/examples/business/s3/BaseUserOperationsWithDefaultDatasafeOnVersionedStorageTest.java index d84a74378..ed5ee76a7 100644 --- a/datasafe-examples/datasafe-examples-versioned-s3/src/test/java/de/adorsys/datasafe/examples/business/s3/BaseUserOperationsWithDefaultDatasafeOnVersionedStorageTest.java +++ b/datasafe-examples/datasafe-examples-versioned-s3/src/test/java/de/adorsys/datasafe/examples/business/s3/BaseUserOperationsWithDefaultDatasafeOnVersionedStorageTest.java @@ -12,8 +12,7 @@ import de.adorsys.datasafe.business.impl.service.DefaultDatasafeServices; import de.adorsys.datasafe.directory.impl.profile.config.DefaultDFSConfig; import de.adorsys.datasafe.encrypiton.api.types.UserIDAuth; -import de.adorsys.datasafe.encrypiton.api.types.keystore.ReadKeyPassword; -import de.adorsys.datasafe.encrypiton.api.types.keystore.ReadStorePassword; +import de.adorsys.datasafe.types.api.types.ReadStorePassword; import de.adorsys.datasafe.storage.impl.s3.S3StorageService; import de.adorsys.datasafe.types.api.actions.ListRequest; import de.adorsys.datasafe.types.api.actions.ReadRequest; @@ -22,6 +21,7 @@ import de.adorsys.datasafe.types.api.callback.PhysicalVersionCallback; import de.adorsys.datasafe.types.api.resource.StorageVersion; import de.adorsys.datasafe.types.api.utils.ExecutorServiceUtil; +import de.adorsys.datasafe.types.api.utils.ReadKeyPasswordTestFactory; import lombok.SneakyThrows; import lombok.extern.slf4j.Slf4j; import org.bouncycastle.jce.provider.BouncyCastleProvider; @@ -233,7 +233,7 @@ private String writeToPrivate(UserIDAuth user, String path, String fileContent) } private UserIDAuth registerUser(String username) { - UserIDAuth creds = new UserIDAuth(username, ReadKeyPassword.getForString("passwrd" + username)); + UserIDAuth creds = new UserIDAuth(username, ReadKeyPasswordTestFactory.getForString("passwrd" + username)); defaultDatasafeServices.userProfile().registerUsingDefaults(creds); return creds; } diff --git a/datasafe-inbox/datasafe-inbox-impl/src/test/java/de/adorsys/datasafe/inbox/api/actions/ListInboxImplTest.java b/datasafe-inbox/datasafe-inbox-impl/src/test/java/de/adorsys/datasafe/inbox/api/actions/ListInboxImplTest.java index d9ccccfa5..883f12ad5 100644 --- a/datasafe-inbox/datasafe-inbox-impl/src/test/java/de/adorsys/datasafe/inbox/api/actions/ListInboxImplTest.java +++ b/datasafe-inbox/datasafe-inbox-impl/src/test/java/de/adorsys/datasafe/inbox/api/actions/ListInboxImplTest.java @@ -6,12 +6,12 @@ import de.adorsys.datasafe.directory.api.types.UserPublicProfile; import de.adorsys.datasafe.encrypiton.api.types.UserID; import de.adorsys.datasafe.encrypiton.api.types.UserIDAuth; -import de.adorsys.datasafe.encrypiton.api.types.keystore.ReadKeyPassword; import de.adorsys.datasafe.inbox.impl.actions.ListInboxImpl; import de.adorsys.datasafe.storage.api.actions.StorageListService; import de.adorsys.datasafe.types.api.actions.ListRequest; import de.adorsys.datasafe.types.api.resource.*; import de.adorsys.datasafe.types.api.shared.BaseMockitoTest; +import de.adorsys.datasafe.types.api.utils.ReadKeyPasswordTestFactory; import org.junit.jupiter.api.Test; import org.mockito.InjectMocks; import org.mockito.Mock; @@ -29,7 +29,7 @@ class ListInboxImplTest extends BaseMockitoTest { private static final String PATH = "./"; private static final URI ABSOLUTE_PATH = URI.create("s3://absolute"); - private UserIDAuth auth = new UserIDAuth(new UserID(""), ReadKeyPassword.getForString("")); + private UserIDAuth auth = new UserIDAuth(new UserID(""), ReadKeyPasswordTestFactory.getForString("")); @Mock private PrivateKeyService privateKeyService; diff --git a/datasafe-inbox/datasafe-inbox-impl/src/test/java/de/adorsys/datasafe/inbox/api/actions/ReadFromInboxImplTest.java b/datasafe-inbox/datasafe-inbox-impl/src/test/java/de/adorsys/datasafe/inbox/api/actions/ReadFromInboxImplTest.java index 906789c73..b5de32d06 100644 --- a/datasafe-inbox/datasafe-inbox-impl/src/test/java/de/adorsys/datasafe/inbox/api/actions/ReadFromInboxImplTest.java +++ b/datasafe-inbox/datasafe-inbox-impl/src/test/java/de/adorsys/datasafe/inbox/api/actions/ReadFromInboxImplTest.java @@ -4,13 +4,13 @@ import de.adorsys.datasafe.encrypiton.api.document.EncryptedDocumentReadService; import de.adorsys.datasafe.encrypiton.api.types.UserID; import de.adorsys.datasafe.encrypiton.api.types.UserIDAuth; -import de.adorsys.datasafe.encrypiton.api.types.keystore.ReadKeyPassword; import de.adorsys.datasafe.inbox.impl.actions.ReadFromInboxImpl; import de.adorsys.datasafe.types.api.actions.ReadRequest; import de.adorsys.datasafe.types.api.resource.AbsoluteLocation; import de.adorsys.datasafe.types.api.resource.BasePrivateResource; import de.adorsys.datasafe.types.api.resource.PrivateResource; import de.adorsys.datasafe.types.api.shared.BaseMockitoTest; +import de.adorsys.datasafe.types.api.utils.ReadKeyPasswordTestFactory; import org.junit.jupiter.api.Test; import org.mockito.ArgumentCaptor; import org.mockito.Captor; @@ -28,7 +28,7 @@ class ReadFromInboxImplTest extends BaseMockitoTest { private static final String BYTES = "Hello"; private static final URI ABSOLUTE_PATH = URI.create("s3://absolute"); - private UserIDAuth auth = new UserIDAuth(new UserID(""), ReadKeyPassword.getForString("")); + private UserIDAuth auth = new UserIDAuth(new UserID(""), ReadKeyPasswordTestFactory.getForString("")); @Mock private ResourceResolver resolver; diff --git a/datasafe-inbox/datasafe-inbox-impl/src/test/java/de/adorsys/datasafe/inbox/api/actions/RemoveFromInboxImplTest.java b/datasafe-inbox/datasafe-inbox-impl/src/test/java/de/adorsys/datasafe/inbox/api/actions/RemoveFromInboxImplTest.java index 57282d6e4..08fb41b2e 100644 --- a/datasafe-inbox/datasafe-inbox-impl/src/test/java/de/adorsys/datasafe/inbox/api/actions/RemoveFromInboxImplTest.java +++ b/datasafe-inbox/datasafe-inbox-impl/src/test/java/de/adorsys/datasafe/inbox/api/actions/RemoveFromInboxImplTest.java @@ -4,12 +4,12 @@ import de.adorsys.datasafe.directory.api.resource.ResourceResolver; import de.adorsys.datasafe.encrypiton.api.types.UserID; import de.adorsys.datasafe.encrypiton.api.types.UserIDAuth; -import de.adorsys.datasafe.encrypiton.api.types.keystore.ReadKeyPassword; import de.adorsys.datasafe.inbox.impl.actions.RemoveFromInboxImpl; import de.adorsys.datasafe.storage.api.actions.StorageRemoveService; import de.adorsys.datasafe.types.api.actions.RemoveRequest; import de.adorsys.datasafe.types.api.resource.*; import de.adorsys.datasafe.types.api.shared.BaseMockitoTest; +import de.adorsys.datasafe.types.api.utils.ReadKeyPasswordTestFactory; import org.junit.jupiter.api.Test; import org.mockito.InjectMocks; import org.mockito.Mock; @@ -25,7 +25,7 @@ class RemoveFromInboxImplTest extends BaseMockitoTest { private static final String PATH = "./"; private static final URI ABSOLUTE_PATH = URI.create("s3://absolute"); - private UserIDAuth auth = new UserIDAuth(new UserID(""), ReadKeyPassword.getForString("")); + private UserIDAuth auth = new UserIDAuth(new UserID(""), ReadKeyPasswordTestFactory.getForString("")); @Mock private PrivateKeyService privateKeyService; diff --git a/datasafe-long-run-tests/datasafe-business-tests-random-actions/src/test/java/de/adorsys/datasafe/business/impl/e2e/randomactions/RandomActionsOnDatasafeTest.java b/datasafe-long-run-tests/datasafe-business-tests-random-actions/src/test/java/de/adorsys/datasafe/business/impl/e2e/randomactions/RandomActionsOnDatasafeTest.java index 34f5eb24e..494329efe 100644 --- a/datasafe-long-run-tests/datasafe-business-tests-random-actions/src/test/java/de/adorsys/datasafe/business/impl/e2e/randomactions/RandomActionsOnDatasafeTest.java +++ b/datasafe-long-run-tests/datasafe-business-tests-random-actions/src/test/java/de/adorsys/datasafe/business/impl/e2e/randomactions/RandomActionsOnDatasafeTest.java @@ -5,7 +5,7 @@ import de.adorsys.datasafe.business.impl.service.DaggerDefaultDatasafeServices; import de.adorsys.datasafe.business.impl.service.DefaultDatasafeServices; import de.adorsys.datasafe.directory.impl.profile.config.DefaultDFSConfig; -import de.adorsys.datasafe.encrypiton.api.types.keystore.ReadStorePassword; +import de.adorsys.datasafe.types.api.types.ReadStorePassword; import lombok.extern.slf4j.Slf4j; import org.junit.jupiter.api.condition.DisabledIfSystemProperty; import org.junit.jupiter.params.ParameterizedTest; diff --git a/datasafe-long-run-tests/datasafe-business-tests-random-actions/src/test/java/de/adorsys/datasafe/business/impl/e2e/randomactions/RandomActionsOnMultiBucketTest.java b/datasafe-long-run-tests/datasafe-business-tests-random-actions/src/test/java/de/adorsys/datasafe/business/impl/e2e/randomactions/RandomActionsOnMultiBucketTest.java index 318f6745c..5a016943b 100644 --- a/datasafe-long-run-tests/datasafe-business-tests-random-actions/src/test/java/de/adorsys/datasafe/business/impl/e2e/randomactions/RandomActionsOnMultiBucketTest.java +++ b/datasafe-long-run-tests/datasafe-business-tests-random-actions/src/test/java/de/adorsys/datasafe/business/impl/e2e/randomactions/RandomActionsOnMultiBucketTest.java @@ -5,7 +5,7 @@ import de.adorsys.datasafe.business.impl.service.DaggerDefaultDatasafeServices; import de.adorsys.datasafe.business.impl.service.DefaultDatasafeServices; import de.adorsys.datasafe.directory.impl.profile.config.DefaultDFSConfig; -import de.adorsys.datasafe.encrypiton.api.types.keystore.ReadStorePassword; +import de.adorsys.datasafe.types.api.types.ReadStorePassword; import de.adorsys.datasafe.storage.api.UserBasedDelegatingStorage; import lombok.extern.slf4j.Slf4j; import org.junit.jupiter.api.condition.EnabledIfSystemProperty; diff --git a/datasafe-long-run-tests/datasafe-business-tests-random-actions/src/test/java/de/adorsys/datasafe/business/impl/e2e/randomactions/RandomActionsOnSimpleDatasafeAdapterTest.java b/datasafe-long-run-tests/datasafe-business-tests-random-actions/src/test/java/de/adorsys/datasafe/business/impl/e2e/randomactions/RandomActionsOnSimpleDatasafeAdapterTest.java index c04fdedc0..a4687cad3 100644 --- a/datasafe-long-run-tests/datasafe-business-tests-random-actions/src/test/java/de/adorsys/datasafe/business/impl/e2e/randomactions/RandomActionsOnSimpleDatasafeAdapterTest.java +++ b/datasafe-long-run-tests/datasafe-business-tests-random-actions/src/test/java/de/adorsys/datasafe/business/impl/e2e/randomactions/RandomActionsOnSimpleDatasafeAdapterTest.java @@ -7,7 +7,7 @@ import de.adorsys.datasafe.directory.api.types.*; import de.adorsys.datasafe.encrypiton.api.types.UserID; import de.adorsys.datasafe.encrypiton.api.types.UserIDAuth; -import de.adorsys.datasafe.encrypiton.api.types.keystore.ReadKeyPassword; +import de.adorsys.datasafe.types.api.types.ReadKeyPassword; import de.adorsys.datasafe.inbox.api.InboxService; import de.adorsys.datasafe.privatestore.api.PasswordClearingInputStream; import de.adorsys.datasafe.privatestore.api.PasswordClearingOutputStream; diff --git a/datasafe-long-run-tests/datasafe-business-tests-random-actions/src/test/java/de/adorsys/datasafe/business/impl/e2e/randomactions/framework/fixture/dto/TestUser.java b/datasafe-long-run-tests/datasafe-business-tests-random-actions/src/test/java/de/adorsys/datasafe/business/impl/e2e/randomactions/framework/fixture/dto/TestUser.java index 9d89c6bcf..2fbcd7a60 100644 --- a/datasafe-long-run-tests/datasafe-business-tests-random-actions/src/test/java/de/adorsys/datasafe/business/impl/e2e/randomactions/framework/fixture/dto/TestUser.java +++ b/datasafe-long-run-tests/datasafe-business-tests-random-actions/src/test/java/de/adorsys/datasafe/business/impl/e2e/randomactions/framework/fixture/dto/TestUser.java @@ -2,7 +2,7 @@ import de.adorsys.datasafe.encrypiton.api.types.UserID; import de.adorsys.datasafe.encrypiton.api.types.UserIDAuth; -import de.adorsys.datasafe.encrypiton.api.types.keystore.ReadKeyPassword; +import de.adorsys.datasafe.types.api.utils.ReadKeyPasswordTestFactory; import lombok.Data; import lombok.EqualsAndHashCode; @@ -20,6 +20,6 @@ public class TestUser { public TestUser(String username, String password) { this.username = username; this.password = password; - this.auth = new UserIDAuth(new UserID(username), ReadKeyPassword.getForString(password)); + this.auth = new UserIDAuth(new UserID(username), ReadKeyPasswordTestFactory.getForString(password)); } } diff --git a/datasafe-long-run-tests/datasafe-business-tests-random-actions/src/test/java/de/adorsys/datasafe/business/impl/e2e/randomactions/framework/services/OperationExecutor.java b/datasafe-long-run-tests/datasafe-business-tests-random-actions/src/test/java/de/adorsys/datasafe/business/impl/e2e/randomactions/framework/services/OperationExecutor.java index 6c2f002c8..a63398f14 100644 --- a/datasafe-long-run-tests/datasafe-business-tests-random-actions/src/test/java/de/adorsys/datasafe/business/impl/e2e/randomactions/framework/services/OperationExecutor.java +++ b/datasafe-long-run-tests/datasafe-business-tests-random-actions/src/test/java/de/adorsys/datasafe/business/impl/e2e/randomactions/framework/services/OperationExecutor.java @@ -7,7 +7,6 @@ import de.adorsys.datasafe.directory.api.profile.operations.ProfileRegistrationService; import de.adorsys.datasafe.directory.impl.profile.exceptions.UserNotFoundException; import de.adorsys.datasafe.encrypiton.api.types.UserIDAuth; -import de.adorsys.datasafe.encrypiton.api.types.keystore.ReadKeyPassword; import de.adorsys.datasafe.inbox.api.InboxService; import de.adorsys.datasafe.privatestore.api.PrivateSpaceService; import de.adorsys.datasafe.types.api.actions.ListRequest; @@ -19,6 +18,7 @@ import de.adorsys.datasafe.types.api.resource.ResolvedResource; import de.adorsys.datasafe.types.api.resource.Uri; import de.adorsys.datasafe.types.api.shared.ContentGenerator; +import de.adorsys.datasafe.types.api.utils.ReadKeyPasswordTestFactory; import lombok.RequiredArgsConstructor; import lombok.SneakyThrows; import lombok.extern.slf4j.Slf4j; @@ -131,7 +131,7 @@ private Stream generateValidatingOperations(String execId, @SneakyThrows private void doCreate(Operation oper) { - UserIDAuth auth = new UserIDAuth(oper.getUserId(), ReadKeyPassword.getForString(oper.getUserId())); + UserIDAuth auth = new UserIDAuth(oper.getUserId(), ReadKeyPasswordTestFactory.getForString(oper.getUserId())); registrationService.registerUsingDefaults(auth); users.put(auth.getUserID().getValue(), new UserSpec(auth, new ContentGenerator(fileContentSize))); } diff --git a/datasafe-privatestore/datasafe-privatestore-api/src/main/java/de/adorsys/datasafe/privatestore/api/PasswordClearingInputStream.java b/datasafe-privatestore/datasafe-privatestore-api/src/main/java/de/adorsys/datasafe/privatestore/api/PasswordClearingInputStream.java index 979d12ebb..4a5e11f70 100644 --- a/datasafe-privatestore/datasafe-privatestore-api/src/main/java/de/adorsys/datasafe/privatestore/api/PasswordClearingInputStream.java +++ b/datasafe-privatestore/datasafe-privatestore-api/src/main/java/de/adorsys/datasafe/privatestore/api/PasswordClearingInputStream.java @@ -1,6 +1,6 @@ package de.adorsys.datasafe.privatestore.api; -import de.adorsys.datasafe.encrypiton.api.types.keystore.ReadKeyPassword; +import de.adorsys.datasafe.types.api.types.ReadKeyPassword; import de.adorsys.datasafe.types.api.context.annotations.RuntimeDelegate; import lombok.AllArgsConstructor; import lombok.SneakyThrows; diff --git a/datasafe-privatestore/datasafe-privatestore-api/src/main/java/de/adorsys/datasafe/privatestore/api/PasswordClearingOutputStream.java b/datasafe-privatestore/datasafe-privatestore-api/src/main/java/de/adorsys/datasafe/privatestore/api/PasswordClearingOutputStream.java index dab86cb17..5832d8ea2 100644 --- a/datasafe-privatestore/datasafe-privatestore-api/src/main/java/de/adorsys/datasafe/privatestore/api/PasswordClearingOutputStream.java +++ b/datasafe-privatestore/datasafe-privatestore-api/src/main/java/de/adorsys/datasafe/privatestore/api/PasswordClearingOutputStream.java @@ -1,6 +1,6 @@ package de.adorsys.datasafe.privatestore.api; -import de.adorsys.datasafe.encrypiton.api.types.keystore.ReadKeyPassword; +import de.adorsys.datasafe.types.api.types.ReadKeyPassword; import lombok.AllArgsConstructor; import lombok.SneakyThrows; import lombok.experimental.Delegate; diff --git a/datasafe-privatestore/datasafe-privatestore-api/src/main/java/de/adorsys/datasafe/privatestore/api/PasswordClearingStream.java b/datasafe-privatestore/datasafe-privatestore-api/src/main/java/de/adorsys/datasafe/privatestore/api/PasswordClearingStream.java index 941004422..94f3f5d23 100644 --- a/datasafe-privatestore/datasafe-privatestore-api/src/main/java/de/adorsys/datasafe/privatestore/api/PasswordClearingStream.java +++ b/datasafe-privatestore/datasafe-privatestore-api/src/main/java/de/adorsys/datasafe/privatestore/api/PasswordClearingStream.java @@ -1,6 +1,6 @@ package de.adorsys.datasafe.privatestore.api; -import de.adorsys.datasafe.encrypiton.api.types.keystore.ReadKeyPassword; +import de.adorsys.datasafe.types.api.types.ReadKeyPassword; import lombok.AllArgsConstructor; import lombok.SneakyThrows; import lombok.experimental.Delegate; diff --git a/datasafe-privatestore/datasafe-privatestore-impl/pom.xml b/datasafe-privatestore/datasafe-privatestore-impl/pom.xml index e5e3b0b37..e625bcb52 100644 --- a/datasafe-privatestore/datasafe-privatestore-impl/pom.xml +++ b/datasafe-privatestore/datasafe-privatestore-impl/pom.xml @@ -77,5 +77,13 @@ assertj-core test + + de.adorsys + datasafe-types-api + ${project.version} + test-jar + test + + diff --git a/datasafe-privatestore/datasafe-privatestore-impl/src/main/java/de/adorsys/datasafe/privatestore/impl/actions/ReadFromPrivateImpl.java b/datasafe-privatestore/datasafe-privatestore-impl/src/main/java/de/adorsys/datasafe/privatestore/impl/actions/ReadFromPrivateImpl.java index b88db138b..5d4fbae41 100644 --- a/datasafe-privatestore/datasafe-privatestore-impl/src/main/java/de/adorsys/datasafe/privatestore/impl/actions/ReadFromPrivateImpl.java +++ b/datasafe-privatestore/datasafe-privatestore-impl/src/main/java/de/adorsys/datasafe/privatestore/impl/actions/ReadFromPrivateImpl.java @@ -2,7 +2,7 @@ import de.adorsys.datasafe.encrypiton.api.document.EncryptedDocumentReadService; import de.adorsys.datasafe.encrypiton.api.types.UserIDAuth; -import de.adorsys.datasafe.encrypiton.api.types.keystore.ReadKeyPassword; +import de.adorsys.datasafe.types.api.types.ReadKeyPassword; import de.adorsys.datasafe.privatestore.api.actions.EncryptedResourceResolver; import de.adorsys.datasafe.privatestore.api.actions.ReadFromPrivate; import de.adorsys.datasafe.privatestore.api.PasswordClearingInputStream; diff --git a/datasafe-privatestore/datasafe-privatestore-impl/src/test/java/de/adorsys/datasafe/privatestore/impl/actions/EncryptedResourceResolverImplTest.java b/datasafe-privatestore/datasafe-privatestore-impl/src/test/java/de/adorsys/datasafe/privatestore/impl/actions/EncryptedResourceResolverImplTest.java index e18a448a9..af7b6eb03 100644 --- a/datasafe-privatestore/datasafe-privatestore-impl/src/test/java/de/adorsys/datasafe/privatestore/impl/actions/EncryptedResourceResolverImplTest.java +++ b/datasafe-privatestore/datasafe-privatestore-impl/src/test/java/de/adorsys/datasafe/privatestore/impl/actions/EncryptedResourceResolverImplTest.java @@ -5,13 +5,13 @@ import de.adorsys.datasafe.encrypiton.api.pathencryption.PathEncryption; import de.adorsys.datasafe.encrypiton.api.types.UserID; import de.adorsys.datasafe.encrypiton.api.types.UserIDAuth; -import de.adorsys.datasafe.encrypiton.api.types.keystore.ReadKeyPassword; import de.adorsys.datasafe.types.api.resource.AbsoluteLocation; import de.adorsys.datasafe.types.api.resource.BasePrivateResource; import de.adorsys.datasafe.types.api.resource.PrivateResource; import de.adorsys.datasafe.types.api.resource.StorageIdentifier; import de.adorsys.datasafe.types.api.resource.Uri; import de.adorsys.datasafe.types.api.shared.BaseMockitoTest; +import de.adorsys.datasafe.types.api.utils.ReadKeyPasswordTestFactory; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.mockito.ArgumentCaptor; @@ -36,7 +36,7 @@ class EncryptedResourceResolverImplTest extends BaseMockitoTest { private PrivateResource relative = BasePrivateResource.forPrivate(URI.create("./path")); private PrivateResource relativeEncrypted = BasePrivateResource.forPrivate(URI.create("./path/") .resolve(ENCRYPTED)); - private UserIDAuth auth = new UserIDAuth(new UserID(""), ReadKeyPassword.getForString("")); + private UserIDAuth auth = new UserIDAuth(new UserID(""), ReadKeyPasswordTestFactory.getForString("")); @Mock private BucketAccessService accessService; diff --git a/datasafe-privatestore/datasafe-privatestore-impl/src/test/java/de/adorsys/datasafe/privatestore/impl/actions/ListPrivateImplTest.java b/datasafe-privatestore/datasafe-privatestore-impl/src/test/java/de/adorsys/datasafe/privatestore/impl/actions/ListPrivateImplTest.java index bb6e60993..86a535402 100644 --- a/datasafe-privatestore/datasafe-privatestore-impl/src/test/java/de/adorsys/datasafe/privatestore/impl/actions/ListPrivateImplTest.java +++ b/datasafe-privatestore/datasafe-privatestore-impl/src/test/java/de/adorsys/datasafe/privatestore/impl/actions/ListPrivateImplTest.java @@ -2,12 +2,12 @@ import de.adorsys.datasafe.encrypiton.api.types.UserID; import de.adorsys.datasafe.encrypiton.api.types.UserIDAuth; -import de.adorsys.datasafe.encrypiton.api.types.keystore.ReadKeyPassword; import de.adorsys.datasafe.privatestore.api.actions.EncryptedResourceResolver; import de.adorsys.datasafe.storage.api.actions.StorageListService; import de.adorsys.datasafe.types.api.actions.ListRequest; import de.adorsys.datasafe.types.api.resource.*; import de.adorsys.datasafe.types.api.shared.BaseMockitoTest; +import de.adorsys.datasafe.types.api.utils.ReadKeyPasswordTestFactory; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.mockito.InjectMocks; @@ -24,7 +24,7 @@ class ListPrivateImplTest extends BaseMockitoTest { private static final String PATH = "./"; private static final URI ABSOLUTE_PATH = URI.create("s3://absolute"); - private UserIDAuth auth = new UserIDAuth(new UserID(""), ReadKeyPassword.getForString("")); + private UserIDAuth auth = new UserIDAuth(new UserID(""), ReadKeyPasswordTestFactory.getForString("")); @Mock private ResolvedResource resolvedResource; diff --git a/datasafe-privatestore/datasafe-privatestore-impl/src/test/java/de/adorsys/datasafe/privatestore/impl/actions/ReadFromPrivateImplTest.java b/datasafe-privatestore/datasafe-privatestore-impl/src/test/java/de/adorsys/datasafe/privatestore/impl/actions/ReadFromPrivateImplTest.java index bdfacb0f0..48344d2e9 100644 --- a/datasafe-privatestore/datasafe-privatestore-impl/src/test/java/de/adorsys/datasafe/privatestore/impl/actions/ReadFromPrivateImplTest.java +++ b/datasafe-privatestore/datasafe-privatestore-impl/src/test/java/de/adorsys/datasafe/privatestore/impl/actions/ReadFromPrivateImplTest.java @@ -3,13 +3,13 @@ import de.adorsys.datasafe.encrypiton.api.document.EncryptedDocumentReadService; import de.adorsys.datasafe.encrypiton.api.types.UserID; import de.adorsys.datasafe.encrypiton.api.types.UserIDAuth; -import de.adorsys.datasafe.encrypiton.api.types.keystore.ReadKeyPassword; import de.adorsys.datasafe.privatestore.api.actions.EncryptedResourceResolver; import de.adorsys.datasafe.types.api.actions.ReadRequest; import de.adorsys.datasafe.types.api.resource.AbsoluteLocation; import de.adorsys.datasafe.types.api.resource.BasePrivateResource; import de.adorsys.datasafe.types.api.resource.PrivateResource; import de.adorsys.datasafe.types.api.shared.BaseMockitoTest; +import de.adorsys.datasafe.types.api.utils.ReadKeyPasswordTestFactory; import org.junit.jupiter.api.Test; import org.mockito.ArgumentCaptor; import org.mockito.Captor; @@ -27,7 +27,7 @@ class ReadFromPrivateImplTest extends BaseMockitoTest { private static final String BYTES = "Hello"; private static final URI ABSOLUTE_PATH = URI.create("s3://absolute"); - private UserIDAuth auth = new UserIDAuth(new UserID(""), ReadKeyPassword.getForString("")); + private UserIDAuth auth = new UserIDAuth(new UserID(""), ReadKeyPasswordTestFactory.getForString("")); @Mock private EncryptedResourceResolver resolver; diff --git a/datasafe-privatestore/datasafe-privatestore-impl/src/test/java/de/adorsys/datasafe/privatestore/impl/actions/WriteToPrivateImplTest.java b/datasafe-privatestore/datasafe-privatestore-impl/src/test/java/de/adorsys/datasafe/privatestore/impl/actions/WriteToPrivateImplTest.java index ff21d74fd..5b48a6271 100644 --- a/datasafe-privatestore/datasafe-privatestore-impl/src/test/java/de/adorsys/datasafe/privatestore/impl/actions/WriteToPrivateImplTest.java +++ b/datasafe-privatestore/datasafe-privatestore-impl/src/test/java/de/adorsys/datasafe/privatestore/impl/actions/WriteToPrivateImplTest.java @@ -5,7 +5,6 @@ import de.adorsys.datasafe.encrypiton.api.types.UserID; import de.adorsys.datasafe.encrypiton.api.types.UserIDAuth; import de.adorsys.datasafe.encrypiton.api.types.keystore.KeyID; -import de.adorsys.datasafe.encrypiton.api.types.keystore.ReadKeyPassword; import de.adorsys.datasafe.encrypiton.api.types.keystore.SecretKeyIDWithKey; import de.adorsys.datasafe.privatestore.api.actions.EncryptedResourceResolver; import de.adorsys.datasafe.types.api.actions.WriteRequest; @@ -15,6 +14,7 @@ import de.adorsys.datasafe.types.api.resource.PrivateResource; import de.adorsys.datasafe.types.api.resource.WithCallback; import de.adorsys.datasafe.types.api.shared.BaseMockitoTest; +import de.adorsys.datasafe.types.api.utils.ReadKeyPasswordTestFactory; import lombok.SneakyThrows; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; @@ -36,7 +36,7 @@ class WriteToPrivateImplTest extends BaseMockitoTest { private static final String BYTES = "Hello"; private static final URI ABSOLUTE_PATH = URI.create("s3://absolute"); - private UserIDAuth auth = new UserIDAuth(new UserID(""), ReadKeyPassword.getForString("")); + private UserIDAuth auth = new UserIDAuth(new UserID(""), ReadKeyPasswordTestFactory.getForString("")); private SecretKeyIDWithKey secretKeyIDWithKey; diff --git a/datasafe-rest-impl/src/main/java/de/adorsys/datasafe/rest/impl/config/DatasafeConfig.java b/datasafe-rest-impl/src/main/java/de/adorsys/datasafe/rest/impl/config/DatasafeConfig.java index 19028df87..8decfdded 100644 --- a/datasafe-rest-impl/src/main/java/de/adorsys/datasafe/rest/impl/config/DatasafeConfig.java +++ b/datasafe-rest-impl/src/main/java/de/adorsys/datasafe/rest/impl/config/DatasafeConfig.java @@ -20,7 +20,7 @@ import de.adorsys.datasafe.directory.impl.profile.dfs.BucketAccessServiceImpl; import de.adorsys.datasafe.directory.impl.profile.dfs.BucketAccessServiceImplRuntimeDelegatable; import de.adorsys.datasafe.directory.impl.profile.dfs.RegexAccessServiceWithStorageCredentialsImpl; -import de.adorsys.datasafe.encrypiton.api.types.keystore.ReadStorePassword; +import de.adorsys.datasafe.types.api.types.ReadStorePassword; import de.adorsys.datasafe.storage.api.RegexDelegatingStorage; import de.adorsys.datasafe.storage.api.SchemeDelegatingStorage; import de.adorsys.datasafe.storage.api.StorageService; diff --git a/datasafe-rest-impl/src/main/java/de/adorsys/datasafe/rest/impl/controller/DocumentController.java b/datasafe-rest-impl/src/main/java/de/adorsys/datasafe/rest/impl/controller/DocumentController.java index 8df7bde3c..ebe7e647f 100644 --- a/datasafe-rest-impl/src/main/java/de/adorsys/datasafe/rest/impl/controller/DocumentController.java +++ b/datasafe-rest-impl/src/main/java/de/adorsys/datasafe/rest/impl/controller/DocumentController.java @@ -4,7 +4,6 @@ import de.adorsys.datasafe.business.impl.service.DefaultDatasafeServices; import de.adorsys.datasafe.encrypiton.api.types.UserID; import de.adorsys.datasafe.encrypiton.api.types.UserIDAuth; -import de.adorsys.datasafe.encrypiton.api.types.keystore.ReadKeyPassword; import de.adorsys.datasafe.rest.impl.exceptions.UnauthorizedException; import de.adorsys.datasafe.types.api.actions.ListRequest; import de.adorsys.datasafe.types.api.actions.ReadRequest; @@ -67,7 +66,7 @@ public void readDocument(@RequestHeader String user, @RequestHeader(defaultValue = StorageIdentifier.DEFAULT_ID) String storageId, @PathVariable String path, HttpServletResponse response) { - UserIDAuth userIDAuth = new UserIDAuth(new UserID(user), ReadKeyPassword.getForString(password)); + UserIDAuth userIDAuth = new UserIDAuth(new UserID(user), ReadKeyPasswordHelper.getForString(password)); ReadRequest request = ReadRequest.forPrivate(userIDAuth, new StorageIdentifier(storageId), path); // this is needed for swagger, produces is just a directive: @@ -94,7 +93,7 @@ public void writeDocument(@RequestHeader String user, @RequestHeader(defaultValue = StorageIdentifier.DEFAULT_ID) String storageId, @PathVariable String path, @RequestParam("file") MultipartFile file) { - UserIDAuth userIDAuth = new UserIDAuth(new UserID(user), ReadKeyPassword.getForString(password)); + UserIDAuth userIDAuth = new UserIDAuth(new UserID(user), ReadKeyPasswordHelper.getForString(password)); WriteRequest request = WriteRequest.forPrivate(userIDAuth, new StorageIdentifier(storageId), path); try (OutputStream os = datasafeService.privateService().write(request); @@ -118,7 +117,7 @@ public List listDocuments(@RequestHeader String user, @RequestHeader(defaultValue = StorageIdentifier.DEFAULT_ID) String storageId, @ApiParam(defaultValue = ".") @PathVariable(required = false) String path) { - UserIDAuth userIDAuth = new UserIDAuth(new UserID(user), ReadKeyPassword.getForString(password)); + UserIDAuth userIDAuth = new UserIDAuth(new UserID(user), ReadKeyPasswordHelper.getForString(password)); path = Optional.ofNullable(path) .map(it -> it.replaceAll("^\\.$", "")) .orElse("./"); @@ -146,7 +145,7 @@ public void removeDocument(@RequestHeader String user, @RequestHeader String password, @RequestHeader(defaultValue = StorageIdentifier.DEFAULT_ID) String storageId, @PathVariable String path) { - UserIDAuth userIDAuth = new UserIDAuth(new UserID(user), ReadKeyPassword.getForString(password)); + UserIDAuth userIDAuth = new UserIDAuth(new UserID(user), ReadKeyPasswordHelper.getForString(password)); RemoveRequest request = RemoveRequest.forPrivate(userIDAuth, new StorageIdentifier(storageId), path); datasafeService.privateService().remove(request); diff --git a/datasafe-rest-impl/src/main/java/de/adorsys/datasafe/rest/impl/controller/InboxController.java b/datasafe-rest-impl/src/main/java/de/adorsys/datasafe/rest/impl/controller/InboxController.java index fb553a083..55b6cc0cb 100644 --- a/datasafe-rest-impl/src/main/java/de/adorsys/datasafe/rest/impl/controller/InboxController.java +++ b/datasafe-rest-impl/src/main/java/de/adorsys/datasafe/rest/impl/controller/InboxController.java @@ -4,7 +4,6 @@ import de.adorsys.datasafe.business.impl.service.DefaultDatasafeServices; import de.adorsys.datasafe.encrypiton.api.types.UserID; import de.adorsys.datasafe.encrypiton.api.types.UserIDAuth; -import de.adorsys.datasafe.encrypiton.api.types.keystore.ReadKeyPassword; import de.adorsys.datasafe.rest.impl.exceptions.UnauthorizedException; import de.adorsys.datasafe.types.api.actions.ListRequest; import de.adorsys.datasafe.types.api.actions.ReadRequest; @@ -77,7 +76,7 @@ public void readFromInbox(@RequestHeader String user, @RequestHeader String password, @PathVariable String path, HttpServletResponse response) { - UserIDAuth userIDAuth = new UserIDAuth(new UserID(user), ReadKeyPassword.getForString(password)); + UserIDAuth userIDAuth = new UserIDAuth(new UserID(user), ReadKeyPasswordHelper.getForString(password)); PrivateResource resource = BasePrivateResource.forPrivate(path); // this is needed for swagger, produces is just a directive: response.addHeader(CONTENT_TYPE, APPLICATION_OCTET_STREAM_VALUE); @@ -100,7 +99,7 @@ public void readFromInbox(@RequestHeader String user, public void deleteFromInbox(@RequestHeader String user, @RequestHeader String password, @PathVariable String path) { - UserIDAuth userIDAuth = new UserIDAuth(new UserID(user), ReadKeyPassword.getForString(password)); + UserIDAuth userIDAuth = new UserIDAuth(new UserID(user), ReadKeyPasswordHelper.getForString(password)); PrivateResource resource = BasePrivateResource.forPrivate(path); RemoveRequest request = RemoveRequest.forPrivate(userIDAuth, resource); dataSafeService.inboxService().remove(request); @@ -120,7 +119,7 @@ public List listInbox(@RequestHeader String user, @RequestHeader String password, @ApiParam(defaultValue = ".") @PathVariable(required = false) String path) { - UserIDAuth userIDAuth = new UserIDAuth(new UserID(user), ReadKeyPassword.getForString(password)); + UserIDAuth userIDAuth = new UserIDAuth(new UserID(user), ReadKeyPasswordHelper.getForString(password)); path = Optional.ofNullable(path) .map(it -> it.replaceAll("^\\.$", "")) .orElse("./"); diff --git a/datasafe-rest-impl/src/main/java/de/adorsys/datasafe/rest/impl/controller/ReadKeyPasswordHelper.java b/datasafe-rest-impl/src/main/java/de/adorsys/datasafe/rest/impl/controller/ReadKeyPasswordHelper.java new file mode 100644 index 000000000..c0eae5298 --- /dev/null +++ b/datasafe-rest-impl/src/main/java/de/adorsys/datasafe/rest/impl/controller/ReadKeyPasswordHelper.java @@ -0,0 +1,16 @@ +package de.adorsys.datasafe.rest.impl.controller; + +import de.adorsys.datasafe.types.api.types.ReadKeyPassword; + +import java.util.function.Supplier; + +public class ReadKeyPasswordHelper { + public static ReadKeyPassword getForString(String a) { + return new ReadKeyPassword(new Supplier() { + @Override + public char[] get() { + return a.toCharArray(); + } + }); + } +} diff --git a/datasafe-rest-impl/src/main/java/de/adorsys/datasafe/rest/impl/controller/UserController.java b/datasafe-rest-impl/src/main/java/de/adorsys/datasafe/rest/impl/controller/UserController.java index 434a7bb19..f3c04fc8b 100644 --- a/datasafe-rest-impl/src/main/java/de/adorsys/datasafe/rest/impl/controller/UserController.java +++ b/datasafe-rest-impl/src/main/java/de/adorsys/datasafe/rest/impl/controller/UserController.java @@ -4,7 +4,7 @@ import de.adorsys.datasafe.directory.api.types.StorageCredentials; import de.adorsys.datasafe.encrypiton.api.types.UserID; import de.adorsys.datasafe.encrypiton.api.types.UserIDAuth; -import de.adorsys.datasafe.encrypiton.api.types.keystore.ReadKeyPassword; +import de.adorsys.datasafe.types.api.types.ReadKeyPassword; import de.adorsys.datasafe.rest.impl.config.DatasafeProperties; import de.adorsys.datasafe.rest.impl.dto.NewPasswordDTO; import de.adorsys.datasafe.rest.impl.dto.StorageCredsDTO; @@ -62,7 +62,7 @@ public class UserController { @ApiResponse(code = 400, message = "User already exists") }) public void createUser(@Validated @RequestBody UserDTO userDTO) { - ReadKeyPassword readKeyPassword = ReadKeyPassword.getForString(userDTO.getPassword()); + ReadKeyPassword readKeyPassword = ReadKeyPasswordHelper.getForString(userDTO.getPassword()); UserIDAuth auth = new UserIDAuth(new UserID(userDTO.getUserName()), readKeyPassword); if (dataSafeService.userProfile().userExists(auth.getUserID())) { throw new UserExistsException("user '" + auth.getUserID().getValue() + "' already exists"); @@ -75,16 +75,16 @@ public void createUser(@Validated @RequestBody UserDTO userDTO) { public void changePassword(@RequestHeader String user, @RequestHeader String password, @Validated @RequestBody NewPasswordDTO newPassword) { - ReadKeyPassword readKeyPassword = ReadKeyPassword.getForString(password); + ReadKeyPassword readKeyPassword = ReadKeyPasswordHelper.getForString(password); UserIDAuth auth = new UserIDAuth(new UserID(user), readKeyPassword); - dataSafeService.userProfile().updateReadKeyPassword(auth, ReadKeyPassword.getForString(newPassword.getNewPassword())); + dataSafeService.userProfile().updateReadKeyPassword(auth, ReadKeyPasswordHelper.getForString(newPassword.getNewPassword())); } @GetMapping("/publicProfile") @ApiOperation("Reads users' public profile") public UserPublicProfileDTO getPublicProfile(@RequestHeader String user, @RequestHeader String password) { - ReadKeyPassword readKeyPassword = ReadKeyPassword.getForString(password); + ReadKeyPassword readKeyPassword = ReadKeyPasswordHelper.getForString(password); UserIDAuth auth = new UserIDAuth(new UserID(user), readKeyPassword); return UserPublicProfileDTO.from(dataSafeService.userProfile().publicProfile(auth.getUserID())); } @@ -93,7 +93,7 @@ public UserPublicProfileDTO getPublicProfile(@RequestHeader String user, @ApiOperation("Reads users' private profile") public UserPrivateProfileDTO getPrivateProfile(@RequestHeader String user, @RequestHeader String password) { - ReadKeyPassword readKeyPassword = ReadKeyPassword.getForString(password); + ReadKeyPassword readKeyPassword = ReadKeyPasswordHelper.getForString(password); UserIDAuth auth = new UserIDAuth(new UserID(user), readKeyPassword); return UserPrivateProfileDTO.from(dataSafeService.userProfile().privateProfile(auth)); } @@ -103,7 +103,7 @@ public UserPrivateProfileDTO getPrivateProfile(@RequestHeader String user, public void updatePublicProfile(@RequestHeader String user, @RequestHeader String password, @Validated @RequestBody UserPublicProfileDTO profileDto) { - ReadKeyPassword readKeyPassword = ReadKeyPassword.getForString(password); + ReadKeyPassword readKeyPassword = ReadKeyPasswordHelper.getForString(password); UserIDAuth auth = new UserIDAuth(new UserID(user), readKeyPassword); dataSafeService.userProfile().updatePublicProfile(auth, profileDto.toProfile()); } @@ -113,7 +113,7 @@ public void updatePublicProfile(@RequestHeader String user, public void updatePrivateProfile(@RequestHeader String user, @RequestHeader String password, @Validated @RequestBody UserPrivateProfileDTO profileDto) { - ReadKeyPassword readKeyPassword = ReadKeyPassword.getForString(password); + ReadKeyPassword readKeyPassword = ReadKeyPasswordHelper.getForString(password); UserIDAuth auth = new UserIDAuth(new UserID(user), readKeyPassword); dataSafeService.userProfile().updatePrivateProfile(auth, profileDto.toProfile()); } @@ -123,7 +123,7 @@ public void updatePrivateProfile(@RequestHeader String user, public void addStorageCredentials(@RequestHeader String user, @RequestHeader String password, @Validated @RequestBody StorageCredsDTO creds) { - ReadKeyPassword readKeyPassword = ReadKeyPassword.getForString(password); + ReadKeyPassword readKeyPassword = ReadKeyPasswordHelper.getForString(password); UserIDAuth auth = new UserIDAuth(new UserID(user), readKeyPassword); dataSafeService.userProfile().registerStorageCredentials( auth, @@ -137,7 +137,7 @@ public void addStorageCredentials(@RequestHeader String user, public void removeStorageCredentials(@RequestHeader String user, @RequestHeader String password, @RequestHeader String storageId) { - ReadKeyPassword readKeyPassword = ReadKeyPassword.getForString(password); + ReadKeyPassword readKeyPassword = ReadKeyPasswordHelper.getForString(password); UserIDAuth auth = new UserIDAuth(new UserID(user), readKeyPassword); dataSafeService.userProfile().deregisterStorageCredentials(auth, new StorageIdentifier(storageId)); } @@ -156,7 +156,7 @@ public void removeStorageCredentials(@RequestHeader String user, }) public void deleteUser(@RequestHeader String user, @RequestHeader String password) { - UserIDAuth auth = new UserIDAuth(new UserID(user), ReadKeyPassword.getForString(password)); + UserIDAuth auth = new UserIDAuth(new UserID(user), ReadKeyPasswordHelper.getForString(password)); if (!dataSafeService.userProfile().userExists(auth.getUserID())) { throw new UserDoesNotExistsException("user '" + auth.getUserID().getValue() + "' does not exists"); } diff --git a/datasafe-rest-impl/src/main/java/de/adorsys/datasafe/rest/impl/controller/VersionController.java b/datasafe-rest-impl/src/main/java/de/adorsys/datasafe/rest/impl/controller/VersionController.java index 216b64261..02872dd44 100644 --- a/datasafe-rest-impl/src/main/java/de/adorsys/datasafe/rest/impl/controller/VersionController.java +++ b/datasafe-rest-impl/src/main/java/de/adorsys/datasafe/rest/impl/controller/VersionController.java @@ -4,7 +4,6 @@ import de.adorsys.datasafe.business.impl.service.VersionedDatasafeServices; import de.adorsys.datasafe.encrypiton.api.types.UserID; import de.adorsys.datasafe.encrypiton.api.types.UserIDAuth; -import de.adorsys.datasafe.encrypiton.api.types.keystore.ReadKeyPassword; import de.adorsys.datasafe.metainfo.version.impl.version.types.DFSVersion; import de.adorsys.datasafe.rest.impl.exceptions.UnauthorizedException; import de.adorsys.datasafe.types.api.actions.ListRequest; @@ -51,7 +50,7 @@ public List listVersionedDocuments(@RequestHeader String user, @RequestHeader String password, @RequestHeader(defaultValue = StorageIdentifier.DEFAULT_ID) String storageId, @PathVariable(required = false) String path) { - UserIDAuth userIDAuth = new UserIDAuth(new UserID(user), ReadKeyPassword.getForString(password)); + UserIDAuth userIDAuth = new UserIDAuth(new UserID(user), ReadKeyPasswordHelper.getForString(password)); path = Optional.ofNullable(path).orElse("./"); try { List documentList = versionedDatasafeServices.latestPrivate().listWithDetails( @@ -81,7 +80,7 @@ public void readVersionedDocument(@RequestHeader String user, @RequestHeader(defaultValue = StorageIdentifier.DEFAULT_ID) String storageId, @PathVariable String path, HttpServletResponse response) { - UserIDAuth userIDAuth = new UserIDAuth(new UserID(user), ReadKeyPassword.getForString(password)); + UserIDAuth userIDAuth = new UserIDAuth(new UserID(user), ReadKeyPasswordHelper.getForString(password)); ReadRequest request = ReadRequest.forPrivate(userIDAuth, new StorageIdentifier(storageId), path); // this is needed for swagger, produces is just a directive: @@ -108,7 +107,7 @@ public void writeVersionedDocument(@RequestHeader String user, @RequestHeader(defaultValue = StorageIdentifier.DEFAULT_ID) String storageId, @PathVariable String path, @RequestParam("file") MultipartFile file) { - UserIDAuth userIDAuth = new UserIDAuth(new UserID(user), ReadKeyPassword.getForString(password)); + UserIDAuth userIDAuth = new UserIDAuth(new UserID(user), ReadKeyPasswordHelper.getForString(password)); WriteRequest request = WriteRequest.forPrivate(userIDAuth, new StorageIdentifier(storageId), path); try (OutputStream os = versionedDatasafeServices.latestPrivate().write(request); @@ -130,7 +129,7 @@ public void deleteVersionedDocument(@RequestHeader String user, @RequestHeader String password, @RequestHeader(defaultValue = StorageIdentifier.DEFAULT_ID) String storageId, @PathVariable String path) { - UserIDAuth userIDAuth = new UserIDAuth(new UserID(user), ReadKeyPassword.getForString(password)); + UserIDAuth userIDAuth = new UserIDAuth(new UserID(user), ReadKeyPasswordHelper.getForString(password)); RemoveRequest request = RemoveRequest.forPrivate(userIDAuth, new StorageIdentifier(storageId), path); versionedDatasafeServices.latestPrivate().remove(request); @@ -151,7 +150,7 @@ public List versionsOf(@RequestHeader String user, @RequestHeader(defaultValue = StorageIdentifier.DEFAULT_ID) String storageId, @ApiParam(defaultValue = ".") @PathVariable(required = false) String path) { - UserIDAuth userIDAuth = new UserIDAuth(new UserID(user), ReadKeyPassword.getForString(password)); + UserIDAuth userIDAuth = new UserIDAuth(new UserID(user), ReadKeyPasswordHelper.getForString(password)); path = Optional.ofNullable(path) .map(it -> it.replaceAll("^\\.$", "")) .orElse("./"); diff --git a/datasafe-rest-impl/src/test/java/de/adorsys/datasafe/rest/impl/controller/BaseTokenDatasafeEndpointTest.java b/datasafe-rest-impl/src/test/java/de/adorsys/datasafe/rest/impl/controller/BaseTokenDatasafeEndpointTest.java index b31035443..2800a5c25 100644 --- a/datasafe-rest-impl/src/test/java/de/adorsys/datasafe/rest/impl/controller/BaseTokenDatasafeEndpointTest.java +++ b/datasafe-rest-impl/src/test/java/de/adorsys/datasafe/rest/impl/controller/BaseTokenDatasafeEndpointTest.java @@ -1,6 +1,6 @@ package de.adorsys.datasafe.rest.impl.controller; -import de.adorsys.datasafe.encrypiton.api.types.keystore.ReadKeyPassword; +import de.adorsys.datasafe.types.api.types.ReadKeyPassword; import de.adorsys.datasafe.rest.impl.dto.UserDTO; import de.adorsys.datasafe.rest.impl.security.SecurityConstants; import de.adorsys.datasafe.rest.impl.security.SecurityProperties; @@ -15,7 +15,7 @@ public abstract class BaseTokenDatasafeEndpointTest extends BaseDatasafeEndpoint static final String PASSWORD_DESCRIPTION = "datasafe user's password"; static final String TEST_USER = "test"; - static final ReadKeyPassword TEST_PASS = ReadKeyPassword.getForString("test"); + static final ReadKeyPassword TEST_PASS = ReadKeyPasswordHelper.getForString("test"); String token; private SecurityProperties securityProperties; diff --git a/datasafe-rest-impl/src/test/java/de/adorsys/datasafe/rest/impl/controller/UserControllerTest.java b/datasafe-rest-impl/src/test/java/de/adorsys/datasafe/rest/impl/controller/UserControllerTest.java index c5f8afa74..66e1cf947 100644 --- a/datasafe-rest-impl/src/test/java/de/adorsys/datasafe/rest/impl/controller/UserControllerTest.java +++ b/datasafe-rest-impl/src/test/java/de/adorsys/datasafe/rest/impl/controller/UserControllerTest.java @@ -8,7 +8,6 @@ import de.adorsys.datasafe.directory.impl.profile.operations.DFSBasedProfileStorageImpl; import de.adorsys.datasafe.encrypiton.api.types.UserID; import de.adorsys.datasafe.encrypiton.api.types.UserIDAuth; -import de.adorsys.datasafe.encrypiton.api.types.keystore.ReadKeyPassword; import de.adorsys.datasafe.rest.impl.dto.UserDTO; import de.adorsys.datasafe.types.api.resource.StorageIdentifier; import lombok.SneakyThrows; @@ -93,7 +92,7 @@ void changePasswordTest() { verify(userProfile).updateReadKeyPassword( eq(new UserIDAuth(TEST_USER, TEST_PASS)), - eq(ReadKeyPassword.getForString(newPassword)) + eq(ReadKeyPasswordHelper.getForString(newPassword)) ); } diff --git a/datasafe-simple-adapter/datasafe-simple-adapter-api/src/main/java/de/adorsys/datasafe/simple/adapter/api/SimpleDatasafeService.java b/datasafe-simple-adapter/datasafe-simple-adapter-api/src/main/java/de/adorsys/datasafe/simple/adapter/api/SimpleDatasafeService.java index a4cf815cb..eba0b177e 100644 --- a/datasafe-simple-adapter/datasafe-simple-adapter-api/src/main/java/de/adorsys/datasafe/simple/adapter/api/SimpleDatasafeService.java +++ b/datasafe-simple-adapter/datasafe-simple-adapter-api/src/main/java/de/adorsys/datasafe/simple/adapter/api/SimpleDatasafeService.java @@ -2,7 +2,7 @@ import de.adorsys.datasafe.encrypiton.api.types.UserID; import de.adorsys.datasafe.encrypiton.api.types.UserIDAuth; -import de.adorsys.datasafe.encrypiton.api.types.keystore.ReadKeyPassword; +import de.adorsys.datasafe.types.api.types.ReadKeyPassword; import de.adorsys.datasafe.simple.adapter.api.types.*; import java.io.OutputStream; diff --git a/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/main/java/de/adorsys/datasafe/simple/adapter/impl/SimpleDatasafeServiceImpl.java b/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/main/java/de/adorsys/datasafe/simple/adapter/impl/SimpleDatasafeServiceImpl.java index 283ce5fdc..06945cfc6 100644 --- a/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/main/java/de/adorsys/datasafe/simple/adapter/impl/SimpleDatasafeServiceImpl.java +++ b/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/main/java/de/adorsys/datasafe/simple/adapter/impl/SimpleDatasafeServiceImpl.java @@ -12,8 +12,8 @@ import de.adorsys.datasafe.directory.impl.profile.config.DefaultDFSConfig; import de.adorsys.datasafe.encrypiton.api.types.UserID; import de.adorsys.datasafe.encrypiton.api.types.UserIDAuth; -import de.adorsys.datasafe.encrypiton.api.types.keystore.ReadKeyPassword; -import de.adorsys.datasafe.encrypiton.api.types.keystore.ReadStorePassword; +import de.adorsys.datasafe.types.api.types.ReadKeyPassword; +import de.adorsys.datasafe.types.api.types.ReadStorePassword; import de.adorsys.datasafe.simple.adapter.api.SimpleDatasafeService; import de.adorsys.datasafe.simple.adapter.api.exceptions.SimpleAdapterException; import de.adorsys.datasafe.simple.adapter.api.types.*; diff --git a/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/main/java/de/adorsys/datasafe/simple/adapter/impl/profile/DFSRelativeProfileUpdatingServiceImpl.java b/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/main/java/de/adorsys/datasafe/simple/adapter/impl/profile/DFSRelativeProfileUpdatingServiceImpl.java index 90e999b16..b2ac79db0 100644 --- a/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/main/java/de/adorsys/datasafe/simple/adapter/impl/profile/DFSRelativeProfileUpdatingServiceImpl.java +++ b/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/main/java/de/adorsys/datasafe/simple/adapter/impl/profile/DFSRelativeProfileUpdatingServiceImpl.java @@ -8,7 +8,7 @@ import de.adorsys.datasafe.directory.api.types.UserPublicProfile; import de.adorsys.datasafe.directory.impl.profile.operations.actions.ProfileUpdatingServiceImpl; import de.adorsys.datasafe.encrypiton.api.types.UserIDAuth; -import de.adorsys.datasafe.encrypiton.api.types.keystore.ReadKeyPassword; +import de.adorsys.datasafe.types.api.types.ReadKeyPassword; import javax.inject.Inject; diff --git a/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/test/java/de/adorsys/datasafe/simple/adapter/impl/CleanupDbTest.java b/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/test/java/de/adorsys/datasafe/simple/adapter/impl/CleanupDbTest.java index 941caee86..0ae72ba75 100644 --- a/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/test/java/de/adorsys/datasafe/simple/adapter/impl/CleanupDbTest.java +++ b/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/test/java/de/adorsys/datasafe/simple/adapter/impl/CleanupDbTest.java @@ -1,7 +1,6 @@ package de.adorsys.datasafe.simple.adapter.impl; import de.adorsys.datasafe.encrypiton.api.types.UserIDAuth; -import de.adorsys.datasafe.encrypiton.api.types.keystore.ReadKeyPassword; import de.adorsys.datasafe.simple.adapter.api.SimpleDatasafeService; import de.adorsys.datasafe.simple.adapter.api.types.DFSCredentials; import de.adorsys.datasafe.simple.adapter.api.types.DSDocument; @@ -9,6 +8,7 @@ import de.adorsys.datasafe.simple.adapter.api.types.DocumentFQN; import de.adorsys.datasafe.teststorage.WithStorageProvider; import de.adorsys.datasafe.types.api.resource.BasePrivateResource; +import de.adorsys.datasafe.types.api.utils.ReadKeyPasswordTestFactory; import org.bouncycastle.jce.provider.BouncyCastleProvider; import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.params.ParameterizedTest; @@ -45,8 +45,8 @@ void cleanupDb(WithStorageProvider.StorageDescriptor descriptor) { String content = "content of document"; String path = "a/b/c.txt"; - UserIDAuth user1 = new UserIDAuth("uzr", ReadKeyPassword.getForString("user")); - UserIDAuth user2 = new UserIDAuth("other", ReadKeyPassword.getForString("user")); + UserIDAuth user1 = new UserIDAuth("uzr", ReadKeyPasswordTestFactory.getForString("user")); + UserIDAuth user2 = new UserIDAuth("other", ReadKeyPasswordTestFactory.getForString("user")); simpleDatasafeService.createUser(user1); simpleDatasafeService.createUser(user2); diff --git a/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/test/java/de/adorsys/datasafe/simple/adapter/impl/DFSRelativeToRootProfileTest.java b/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/test/java/de/adorsys/datasafe/simple/adapter/impl/DFSRelativeToRootProfileTest.java index 16c8e6bd7..d24f9b7ff 100644 --- a/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/test/java/de/adorsys/datasafe/simple/adapter/impl/DFSRelativeToRootProfileTest.java +++ b/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/test/java/de/adorsys/datasafe/simple/adapter/impl/DFSRelativeToRootProfileTest.java @@ -2,7 +2,6 @@ import de.adorsys.datasafe.encrypiton.api.types.UserID; import de.adorsys.datasafe.encrypiton.api.types.UserIDAuth; -import de.adorsys.datasafe.encrypiton.api.types.keystore.ReadKeyPassword; import de.adorsys.datasafe.simple.adapter.api.SimpleDatasafeService; import de.adorsys.datasafe.simple.adapter.api.types.DFSCredentials; import de.adorsys.datasafe.simple.adapter.api.types.DSDocument; @@ -10,6 +9,7 @@ import de.adorsys.datasafe.simple.adapter.api.types.DocumentFQN; import de.adorsys.datasafe.teststorage.WithStorageProvider; import de.adorsys.datasafe.types.api.resource.BasePrivateResource; +import de.adorsys.datasafe.types.api.utils.ReadKeyPasswordTestFactory; import lombok.SneakyThrows; import org.bouncycastle.jce.provider.BouncyCastleProvider; import org.junit.jupiter.api.BeforeEach; @@ -36,7 +36,7 @@ void createDatasafeAdapter(StorageDescriptor descriptor) { simpleDatasafeService = null != credentials ? new SimpleDatasafeServiceImpl(credentials) : new SimpleDatasafeServiceImpl(); - userIDAuth = new UserIDAuth(new UserID("peter"), ReadKeyPassword.getForString("password")); + userIDAuth = new UserIDAuth(new UserID("peter"), ReadKeyPasswordTestFactory.getForString("password")); simpleDatasafeService.createUser(userIDAuth); } diff --git a/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/test/java/de/adorsys/datasafe/simple/adapter/impl/SimpleAdapterFeatureTest.java b/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/test/java/de/adorsys/datasafe/simple/adapter/impl/SimpleAdapterFeatureTest.java index d53eaef75..b4d2e7921 100644 --- a/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/test/java/de/adorsys/datasafe/simple/adapter/impl/SimpleAdapterFeatureTest.java +++ b/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/test/java/de/adorsys/datasafe/simple/adapter/impl/SimpleAdapterFeatureTest.java @@ -2,7 +2,6 @@ import de.adorsys.datasafe.encrypiton.api.types.UserID; import de.adorsys.datasafe.encrypiton.api.types.UserIDAuth; -import de.adorsys.datasafe.encrypiton.api.types.keystore.ReadKeyPassword; import de.adorsys.datasafe.simple.adapter.api.types.*; import de.adorsys.datasafe.simple.adapter.impl.cmsencryption.SwitchableCmsEncryptionImpl; import de.adorsys.datasafe.simple.adapter.impl.pathencryption.SwitchablePathEncryptionImpl; @@ -10,6 +9,7 @@ import de.adorsys.datasafe.types.api.resource.BasePrivateResource; import de.adorsys.datasafe.types.api.resource.PrivateResource; import de.adorsys.datasafe.types.api.resource.ResolvedResource; +import de.adorsys.datasafe.types.api.utils.ReadKeyPasswordTestFactory; import lombok.SneakyThrows; import lombok.extern.slf4j.Slf4j; import org.jetbrains.annotations.Nullable; @@ -32,7 +32,7 @@ @Slf4j class SimpleAdapterFeatureTest extends WithBouncyCastle { - private UserIDAuth userIDAuth = new UserIDAuth(new UserID("peter"), ReadKeyPassword.getForString("password")); + private UserIDAuth userIDAuth = new UserIDAuth(new UserID("peter"), ReadKeyPasswordTestFactory.getForString("password")); private String content = "content of document"; private String path = "a/b/c.txt"; private DSDocument document = new DSDocument(new DocumentFQN(path), new DocumentContent(content.getBytes())); diff --git a/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/test/java/de/adorsys/datasafe/simple/adapter/impl/SimpleDatasafeAdapter043CompatTest.java b/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/test/java/de/adorsys/datasafe/simple/adapter/impl/SimpleDatasafeAdapter043CompatTest.java index d3fce8944..9f1a00543 100644 --- a/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/test/java/de/adorsys/datasafe/simple/adapter/impl/SimpleDatasafeAdapter043CompatTest.java +++ b/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/test/java/de/adorsys/datasafe/simple/adapter/impl/SimpleDatasafeAdapter043CompatTest.java @@ -2,10 +2,10 @@ import de.adorsys.datasafe.encrypiton.api.types.UserID; import de.adorsys.datasafe.encrypiton.api.types.UserIDAuth; -import de.adorsys.datasafe.encrypiton.api.types.keystore.ReadKeyPassword; import de.adorsys.datasafe.simple.adapter.api.types.*; import de.adorsys.datasafe.types.api.shared.Dirs; import de.adorsys.datasafe.types.api.shared.Resources; +import de.adorsys.datasafe.types.api.utils.ReadKeyPasswordTestFactory; import lombok.SneakyThrows; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; @@ -21,7 +21,7 @@ */ class SimpleDatasafeAdapter043CompatTest extends WithBouncyCastle { - private UserIDAuth userIDAuth = new UserIDAuth(new UserID("peter"), ReadKeyPassword.getForString("password")); + private UserIDAuth userIDAuth = new UserIDAuth(new UserID("peter"), ReadKeyPasswordTestFactory.getForString("password")); private SimpleDatasafeServiceImpl simpleDatasafeService; private Path dfsRoot; diff --git a/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/test/java/de/adorsys/datasafe/simple/adapter/impl/SimpleDatasafeAdapterTest.java b/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/test/java/de/adorsys/datasafe/simple/adapter/impl/SimpleDatasafeAdapterTest.java index a9bde133d..97637d97d 100644 --- a/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/test/java/de/adorsys/datasafe/simple/adapter/impl/SimpleDatasafeAdapterTest.java +++ b/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/test/java/de/adorsys/datasafe/simple/adapter/impl/SimpleDatasafeAdapterTest.java @@ -3,12 +3,13 @@ import com.amazonaws.services.s3.model.AmazonS3Exception; import de.adorsys.datasafe.encrypiton.api.types.UserID; import de.adorsys.datasafe.encrypiton.api.types.UserIDAuth; -import de.adorsys.datasafe.encrypiton.api.types.keystore.ReadKeyPassword; +import de.adorsys.datasafe.types.api.types.ReadKeyPassword; import de.adorsys.datasafe.simple.adapter.api.SimpleDatasafeService; import de.adorsys.datasafe.simple.adapter.api.types.*; import de.adorsys.datasafe.storage.impl.fs.FileSystemStorageService; import de.adorsys.datasafe.teststorage.WithStorageProvider; import de.adorsys.datasafe.types.api.resource.BasePrivateResource; +import de.adorsys.datasafe.types.api.utils.ReadKeyPasswordTestFactory; import lombok.SneakyThrows; import lombok.extern.slf4j.Slf4j; import org.bouncycastle.jce.provider.BouncyCastleProvider; @@ -57,7 +58,7 @@ void mystart() { } else { simpleDatasafeService = new SimpleDatasafeServiceImpl(); } - userIDAuth = new UserIDAuth(new UserID("peter"), ReadKeyPassword.getForString("password")); + userIDAuth = new UserIDAuth(new UserID("peter"), ReadKeyPasswordTestFactory.getForString("password")); simpleDatasafeService.createUser(userIDAuth); } @@ -113,7 +114,7 @@ void writeAndReadFileWithPasswordChange(WithStorageProvider.StorageDescriptor de String path = "a/b/c.txt"; DSDocument document = new DSDocument(new DocumentFQN(path), new DocumentContent(content.getBytes())); simpleDatasafeService.storeDocument(userIDAuth, document); - ReadKeyPassword newPassword = ReadKeyPassword.getForString("AAAAAAHHH!"); + ReadKeyPassword newPassword = ReadKeyPasswordTestFactory.getForString("AAAAAAHHH!"); simpleDatasafeService.changeKeystorePassword(userIDAuth, newPassword); assertThrows( @@ -227,7 +228,7 @@ void writeAndReadFilesAsStream(WithStorageProvider.StorageDescriptor descriptor) void testTwoUsers(WithStorageProvider.StorageDescriptor descriptor) { myinit(descriptor); mystart(); - UserIDAuth userIDAuth2 = new UserIDAuth(new UserID("peter2"), ReadKeyPassword.getForString("password2")); + UserIDAuth userIDAuth2 = new UserIDAuth(new UserID("peter2"), ReadKeyPasswordTestFactory.getForString("password2")); simpleDatasafeService.createUser(userIDAuth2); String content = "content of document"; @@ -238,10 +239,10 @@ void testTwoUsers(WithStorageProvider.StorageDescriptor descriptor) { simpleDatasafeService.storeDocument(userIDAuth2, document); // tiny checks, that the password is important - UserIDAuth wrongPasswordUser1 = new UserIDAuth(userIDAuth.getUserID(), ReadKeyPassword.getForString(UUID.randomUUID().toString())); + UserIDAuth wrongPasswordUser1 = new UserIDAuth(userIDAuth.getUserID(), ReadKeyPasswordTestFactory.getForString(UUID.randomUUID().toString())); assertThrows(UnrecoverableKeyException.class, () -> simpleDatasafeService.readDocument(wrongPasswordUser1, new DocumentFQN(path))); - UserIDAuth wrongPasswordUser2 = new UserIDAuth(userIDAuth2.getUserID(), ReadKeyPassword.getForString(UUID.randomUUID().toString())); + UserIDAuth wrongPasswordUser2 = new UserIDAuth(userIDAuth2.getUserID(), ReadKeyPasswordTestFactory.getForString(UUID.randomUUID().toString())); assertThrows(UnrecoverableKeyException.class, () -> simpleDatasafeService.readDocument(wrongPasswordUser2, new DocumentFQN(path))); // now read the docs with the correct password diff --git a/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/test/java/de/adorsys/datasafe/simple/adapter/impl/legacy/LegacySymmetricPathEncryptionServiceImplTest.java b/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/test/java/de/adorsys/datasafe/simple/adapter/impl/legacy/LegacySymmetricPathEncryptionServiceImplTest.java index 02b676f80..ce830486f 100644 --- a/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/test/java/de/adorsys/datasafe/simple/adapter/impl/legacy/LegacySymmetricPathEncryptionServiceImplTest.java +++ b/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/test/java/de/adorsys/datasafe/simple/adapter/impl/legacy/LegacySymmetricPathEncryptionServiceImplTest.java @@ -10,6 +10,9 @@ import de.adorsys.datasafe.simple.adapter.impl.legacy.pathencryption.LegacyPathEncryptor; import de.adorsys.datasafe.simple.adapter.impl.legacy.pathencryption.LegacySymmetricPathEncryptionServiceImpl; import de.adorsys.datasafe.types.api.resource.Uri; +import de.adorsys.datasafe.types.api.types.ReadKeyPassword; +import de.adorsys.datasafe.types.api.types.ReadStorePassword; +import de.adorsys.datasafe.types.api.utils.ReadKeyPasswordTestFactory; import lombok.extern.slf4j.Slf4j; import org.junit.jupiter.api.Test; @@ -32,7 +35,7 @@ class LegacySymmetricPathEncryptionServiceImplTest extends WithBouncyCastle { ); private KeyStoreService keyStoreService = new KeyStoreServiceImpl(new DefaultPasswordBasedKeyConfig()); - private ReadKeyPassword readKeyPassword = ReadKeyPassword.getForString("readkeypassword"); + private ReadKeyPassword readKeyPassword = ReadKeyPasswordTestFactory.getForString("readkeypassword"); private ReadStorePassword readStorePassword = new ReadStorePassword("readstorepassword"); private KeyStoreAuth keyStoreAuth = new KeyStoreAuth(readStorePassword, readKeyPassword); private KeyStoreCreationConfig config = new KeyStoreCreationConfig(0, 1); diff --git a/datasafe-simple-adapter/datasafe-simple-adapter-spring/src/test/java/de/adorsys/datasafe/simple/adapter/spring/InjectionTest.java b/datasafe-simple-adapter/datasafe-simple-adapter-spring/src/test/java/de/adorsys/datasafe/simple/adapter/spring/InjectionTest.java index bf53a68d2..61f9a4ec3 100644 --- a/datasafe-simple-adapter/datasafe-simple-adapter-spring/src/test/java/de/adorsys/datasafe/simple/adapter/spring/InjectionTest.java +++ b/datasafe-simple-adapter/datasafe-simple-adapter-spring/src/test/java/de/adorsys/datasafe/simple/adapter/spring/InjectionTest.java @@ -2,10 +2,11 @@ import de.adorsys.datasafe.encrypiton.api.types.UserID; import de.adorsys.datasafe.encrypiton.api.types.UserIDAuth; -import de.adorsys.datasafe.encrypiton.api.types.keystore.ReadKeyPassword; +import de.adorsys.datasafe.types.api.types.ReadKeyPassword; import de.adorsys.datasafe.simple.adapter.api.SimpleDatasafeService; import de.adorsys.datasafe.simple.adapter.spring.annotations.UseDatasafeSpringConfiguration; import de.adorsys.datasafe.teststorage.WithStorageProvider; +import de.adorsys.datasafe.types.api.utils.ReadKeyPasswordTestFactory; import org.junit.jupiter.api.extension.ExtendWith; import org.springframework.boot.SpringBootConfiguration; import org.springframework.boot.test.context.SpringBootTest; @@ -24,7 +25,7 @@ public class InjectionTest extends WithStorageProvider { public void testCreateUser(SimpleDatasafeService datasafeService) { assertThat(datasafeService).isNotNull(); UserID userid = new UserID("peter"); - ReadKeyPassword password = ReadKeyPassword.getForString("password"); + ReadKeyPassword password = ReadKeyPasswordTestFactory.getForString("password"); UserIDAuth userIDAuth = new UserIDAuth(userid, password); assertThat(datasafeService.userExists(userid)).isFalse(); datasafeService.createUser(userIDAuth); diff --git a/datasafe-simple-adapter/readme.md b/datasafe-simple-adapter/readme.md index 1c5d1fa34..29dce8864 100644 --- a/datasafe-simple-adapter/readme.md +++ b/datasafe-simple-adapter/readme.md @@ -17,7 +17,7 @@ import de.adorsys.datasafe.simple.adapter.api.SimpleDatasafeService; # parameter classes of service methods import de.adorsys.datasafe.encrypiton.api.types.UserID; import de.adorsys.datasafe.encrypiton.api.types.UserIDAuth; -import de.adorsys.datasafe.encrypiton.api.types.keystore.ReadKeyPassword; +import de.adorsys.datasafe.types.api.types.ReadKeyPassword; import de.adorsys.datasafe.simple.adapter.api.types.DSDocument; import de.adorsys.datasafe.simple.adapter.api.types.DocumentDirectoryFQN; import de.adorsys.datasafe.simple.adapter.api.types.DocumentFQN; diff --git a/datasafe-storage/datasafe-storage-impl-fs/pom.xml b/datasafe-storage/datasafe-storage-impl-fs/pom.xml index 5d893e3c8..c25016673 100644 --- a/datasafe-storage/datasafe-storage-impl-fs/pom.xml +++ b/datasafe-storage/datasafe-storage-impl-fs/pom.xml @@ -35,38 +35,6 @@ org.projectlombok lombok - - - de.adorsys - datasafe-types-api - ${project.version} - test-jar - test - - - - commons-io - commons-io - ${commons.io.version} - test - - - org.slf4j - slf4j-simple - ${slf4j-simple.version} - test - - - - org.junit.jupiter - junit-jupiter-api - test - - - org.assertj - assertj-core - test - org.mockito mockito-core diff --git a/datasafe-storage/datasafe-storage-impl-fs/src/test/java/de/adorsys/datasafe/storage/impl/fs/FileSystemStorageServiceTest.java b/datasafe-storage/datasafe-storage-impl-fs/src/test/java/de/adorsys/datasafe/storage/impl/fs/FileSystemStorageServiceTest.java deleted file mode 100644 index 05c75ebf8..000000000 --- a/datasafe-storage/datasafe-storage-impl-fs/src/test/java/de/adorsys/datasafe/storage/impl/fs/FileSystemStorageServiceTest.java +++ /dev/null @@ -1,184 +0,0 @@ -package de.adorsys.datasafe.storage.impl.fs; - -import de.adorsys.datasafe.types.api.resource.*; -import de.adorsys.datasafe.types.api.shared.BaseMockitoTest; -import lombok.SneakyThrows; -import lombok.extern.slf4j.Slf4j; -import org.apache.commons.io.IOUtils; -import org.junit.jupiter.api.BeforeEach; -import org.junit.jupiter.api.Test; -import org.junit.jupiter.api.io.TempDir; - -import java.io.InputStream; -import java.io.OutputStream; -import java.io.StringWriter; -import java.nio.charset.StandardCharsets; -import java.nio.file.*; -import java.util.UUID; -import java.util.stream.Collectors; - -import static org.assertj.core.api.Assertions.assertThat; -import static org.assertj.core.api.Assertions.assertThatThrownBy; -import static org.junit.jupiter.api.Assertions.assertThrows; - -@Slf4j -class FileSystemStorageServiceTest extends BaseMockitoTest { - - private static final String FILE = "file"; - private static final String MESSAGE = "hello"; - - private FileSystemStorageService storageService; - private AbsoluteLocation root; - private AbsoluteLocation fileWithMsg; - private Path storageDir; - - @BeforeEach - void prepare(@TempDir Path dir) { - this.storageService = new FileSystemStorageService(new Uri(dir.toUri())); - this.storageDir = dir; - this.root = new AbsoluteLocation<>(BasePrivateResource.forPrivate(dir.toUri())); - this.fileWithMsg = new AbsoluteLocation<>( - BasePrivateResource.forPrivate(storageDir.toUri().resolve(FILE)) - ); - } - - @Test - void objectExists() { - createFileWithMessage(); - assertThat(storageService.objectExists(storageService.list(root).findFirst().get())).isTrue(); - } - - @Test - void listEmpty() { - Path nonExistingFile = storageDir.resolve(UUID.randomUUID().toString()); - AbsoluteLocation nonExistingFileLocation = new AbsoluteLocation<>(BasePrivateResource.forPrivate(nonExistingFile.toUri())); - assertThat(storageService.list(nonExistingFileLocation).collect(Collectors.toList())).isEmpty(); - } - - @SneakyThrows - @Test - void resolveWithMkDirs() { - Path nonExistingFolder = storageDir.resolve(UUID.randomUUID().toString()); - Path newFile = nonExistingFolder.resolve(UUID.randomUUID().toString()); - AbsoluteLocation newFileLocation = new AbsoluteLocation<>(BasePrivateResource.forPrivate(newFile.toUri())); - - try (OutputStream os = storageService.write(WithCallback.noCallback(newFileLocation))) { - os.write(MESSAGE.getBytes()); - } - assertThat(storageService.objectExists(newFileLocation)).isTrue(); - } - - @SneakyThrows - @Test - void writeWithException() { - Path realRoot = Paths.get("/"); - Path beforeRoot = realRoot.resolve(".."); - AbsoluteLocation newFileLocation = new AbsoluteLocation<>(BasePrivateResource.forPrivate(beforeRoot.toUri())); - - assertThatThrownBy(() -> { - try (OutputStream os = storageService.write(WithCallback.noCallback(newFileLocation))) { - os.write(MESSAGE.getBytes()); - } - }); - } - - @SneakyThrows - @Test - void readWithException() { - Path beforeRoot = Paths.get("..").resolve(UUID.randomUUID().toString()); - AbsoluteLocation newFileLocation = new AbsoluteLocation<>(BasePrivateResource.forPrivate(beforeRoot.toUri())); - - assertThatThrownBy(() -> { - try (InputStream is = storageService.read(newFileLocation)) { - StringWriter writer = new StringWriter(); - String encoding = StandardCharsets.UTF_8.name(); - IOUtils.copy(is, writer, encoding); - log.warn("found: " + writer.toString()); - } - }); - } - - @SneakyThrows - @Test - void listDotFilesToo() { - Path dotFile = storageDir.resolve(".dotfile"); - AbsoluteLocation newFileLocation = new AbsoluteLocation<>(BasePrivateResource.forPrivate(dotFile.toUri())); - - assertThat(storageService.list(root).collect(Collectors.toList())).isEmpty(); - try (OutputStream os = storageService.write(WithCallback.noCallback(newFileLocation))) { - os.write(MESSAGE.getBytes()); - } - assertThat(storageService.list(root).collect(Collectors.toList())).isNotEmpty(); - } - - @Test - void list() { - createFileWithMessage(); - - assertThat(storageService.list(root)) - .hasSize(1) - .extracting(AbsoluteLocation::location) - .asString().contains(FILE); - } - - @Test - void listOnNonExisting() { - assertThat(storageService.list(root)).isEmpty(); - } - - @Test - void read() { - createFileWithMessage(); - - assertThat(storageService.read(fileWithMsg)).hasContent(MESSAGE); - } - - @Test - @SneakyThrows - void write() { - try (OutputStream os = storageService.write(WithCallback.noCallback(fileWithMsg))) { - os.write(MESSAGE.getBytes()); - } - - assertThat(storageService.read(fileWithMsg)).hasContent(MESSAGE); - } - - @Test - @SneakyThrows - void removeRemovesOnlyFile() { - createFileWithMessage("in/some.txt", true); - createFileWithMessage("in/some_other.txt", false); - - storageService.remove(BasePrivateResource.forAbsolutePrivate(storageDir.toUri().resolve("in/some_other.txt"))); - - assertThat(Files.walk(storageDir.resolve("in/some.txt"))).hasSize(1); - assertThrows(NoSuchFileException.class, () -> Files.walk(storageDir.resolve("in/some_other.txt"))); - } - - @Test - @SneakyThrows - void removeRecurses() { - createFileWithMessage("in/some.txt", true); - createFileWithMessage("in/deeper/some.txt", true); - createFileWithMessage("in/deeper/some_other.txt", false); - createFileWithMessage("in/deeper/and_deeper/some_other.txt", true); - - storageService.remove(BasePrivateResource.forAbsolutePrivate(storageDir.toUri().resolve("in"))); - - assertThat(Files.walk(storageDir)).containsOnly(storageDir); - } - - @SneakyThrows - private void createFileWithMessage() { - createFileWithMessage(FILE, false); - } - - @SneakyThrows - private void createFileWithMessage(String path, boolean mkDirs) { - Path resolved = storageDir.resolve(path); - if (mkDirs) { - resolved.getParent().toFile().mkdirs(); - } - Files.write(resolved, MESSAGE.getBytes(), StandardOpenOption.CREATE); - } -} diff --git a/datasafe-storage/datasafe-storage-impl-fs/src/test/resources/simplelogger.properties b/datasafe-storage/datasafe-storage-impl-fs/src/test/resources/simplelogger.properties deleted file mode 100644 index 4ef696449..000000000 --- a/datasafe-storage/datasafe-storage-impl-fs/src/test/resources/simplelogger.properties +++ /dev/null @@ -1,7 +0,0 @@ -org.slf4j.simpleLogger.defaultLogLevel: info - -org.slf4j.simpleLogger.dateTimeFormat=HH:mm:ss.SSS -org.slf4j.simpleLogger.showDateTime=true -org.slf4j.simpleLogger.showThreadName=true - -org.slf4j.simpleLogger.logFile=System.out diff --git a/datasafe-types-api/pom.xml b/datasafe-types-api/pom.xml index 33eb62f1e..41b45c09b 100644 --- a/datasafe-types-api/pom.xml +++ b/datasafe-types-api/pom.xml @@ -44,6 +44,31 @@ guava test + + org.slf4j + slf4j-api + ${slf4j-simple.version} + + + org.slf4j + slf4j-simple + ${slf4j-simple.version} + test + + + org.junit.jupiter + junit-jupiter-api + ${jupiter.version} + test + + + org.assertj + assertj-core + ${assertj.version} + test + + + diff --git a/datasafe-encryption/datasafe-encryption-api/src/main/java/de/adorsys/datasafe/encrypiton/api/types/keystore/BaseTypePasswordString.java b/datasafe-types-api/src/main/java/de/adorsys/datasafe/types/api/types/BaseTypePasswordString.java similarity index 97% rename from datasafe-encryption/datasafe-encryption-api/src/main/java/de/adorsys/datasafe/encrypiton/api/types/keystore/BaseTypePasswordString.java rename to datasafe-types-api/src/main/java/de/adorsys/datasafe/types/api/types/BaseTypePasswordString.java index 389c12108..098ef2271 100644 --- a/datasafe-encryption/datasafe-encryption-api/src/main/java/de/adorsys/datasafe/encrypiton/api/types/keystore/BaseTypePasswordString.java +++ b/datasafe-types-api/src/main/java/de/adorsys/datasafe/types/api/types/BaseTypePasswordString.java @@ -1,4 +1,4 @@ -package de.adorsys.datasafe.encrypiton.api.types.keystore; +package de.adorsys.datasafe.types.api.types; import lombok.*; import lombok.extern.slf4j.Slf4j; diff --git a/datasafe-encryption/datasafe-encryption-api/src/main/java/de/adorsys/datasafe/encrypiton/api/types/keystore/ReadKeyPassword.java b/datasafe-types-api/src/main/java/de/adorsys/datasafe/types/api/types/ReadKeyPassword.java similarity index 70% rename from datasafe-encryption/datasafe-encryption-api/src/main/java/de/adorsys/datasafe/encrypiton/api/types/keystore/ReadKeyPassword.java rename to datasafe-types-api/src/main/java/de/adorsys/datasafe/types/api/types/ReadKeyPassword.java index ed2a720f0..8425c4dbd 100644 --- a/datasafe-encryption/datasafe-encryption-api/src/main/java/de/adorsys/datasafe/encrypiton/api/types/keystore/ReadKeyPassword.java +++ b/datasafe-types-api/src/main/java/de/adorsys/datasafe/types/api/types/ReadKeyPassword.java @@ -1,4 +1,4 @@ -package de.adorsys.datasafe.encrypiton.api.types.keystore; +package de.adorsys.datasafe.types.api.types; import java.util.function.Supplier; @@ -26,13 +26,4 @@ public ReadKeyPassword(Supplier readKeyPassword) { public ReadKeyPassword(char[] readKeyPassword) { super(readKeyPassword); } - - public static ReadKeyPassword getForString(String a) { - return new ReadKeyPassword(new Supplier() { - @Override - public char[] get() { - return a.toCharArray(); - } - }); - } } diff --git a/datasafe-encryption/datasafe-encryption-api/src/main/java/de/adorsys/datasafe/encrypiton/api/types/keystore/ReadStorePassword.java b/datasafe-types-api/src/main/java/de/adorsys/datasafe/types/api/types/ReadStorePassword.java similarity index 82% rename from datasafe-encryption/datasafe-encryption-api/src/main/java/de/adorsys/datasafe/encrypiton/api/types/keystore/ReadStorePassword.java rename to datasafe-types-api/src/main/java/de/adorsys/datasafe/types/api/types/ReadStorePassword.java index c721bb8a7..496f42c94 100644 --- a/datasafe-encryption/datasafe-encryption-api/src/main/java/de/adorsys/datasafe/encrypiton/api/types/keystore/ReadStorePassword.java +++ b/datasafe-types-api/src/main/java/de/adorsys/datasafe/types/api/types/ReadStorePassword.java @@ -1,4 +1,4 @@ -package de.adorsys.datasafe.encrypiton.api.types.keystore; +package de.adorsys.datasafe.types.api.types; /** * Wrapper for keystore serialization/deserialization password as well as password for reading public keys. diff --git a/datasafe-encryption/datasafe-encryption-api/src/test/java/de/adorsys/datasafe/encrypiton/api/types/keystore/ReadKeyPasswordTest.java b/datasafe-types-api/src/test/java/de/adorsys/datasafe/types/api/types/ReadKeyPasswordTest.java similarity index 57% rename from datasafe-encryption/datasafe-encryption-api/src/test/java/de/adorsys/datasafe/encrypiton/api/types/keystore/ReadKeyPasswordTest.java rename to datasafe-types-api/src/test/java/de/adorsys/datasafe/types/api/types/ReadKeyPasswordTest.java index c803faf06..ab44be682 100644 --- a/datasafe-encryption/datasafe-encryption-api/src/test/java/de/adorsys/datasafe/encrypiton/api/types/keystore/ReadKeyPasswordTest.java +++ b/datasafe-types-api/src/test/java/de/adorsys/datasafe/types/api/types/ReadKeyPasswordTest.java @@ -1,11 +1,12 @@ -package de.adorsys.datasafe.encrypiton.api.types.keystore; +package de.adorsys.datasafe.types.api.types; +import de.adorsys.datasafe.types.api.utils.ReadKeyPasswordTestFactory; +import org.assertj.core.api.Assertions; import org.junit.jupiter.api.Test; import java.util.Arrays; import java.util.function.Supplier; -import static org.assertj.core.api.Assertions.assertThat; public class ReadKeyPasswordTest { String passwordString = "a password that should be nullyfied"; @@ -15,10 +16,10 @@ public void testClearanceForUnsupplied() { char[] copyOfPassword = Arrays.copyOf(password, password.length); ReadKeyPassword readKeyPassword = new ReadKeyPassword(password); - assertThat(Arrays.equals(password, copyOfPassword)).isTrue(); + Assertions.assertThat(Arrays.equals(password, copyOfPassword)).isTrue(); readKeyPassword.clear(); - assertThat(Arrays.equals(password, copyOfPassword)).isFalse(); - assertThat(Arrays.equals(readKeyPassword.getValue(), copyOfPassword)).isFalse(); + Assertions.assertThat(Arrays.equals(password, copyOfPassword)).isFalse(); + Assertions.assertThat(Arrays.equals(readKeyPassword.getValue(), copyOfPassword)).isFalse(); } @@ -33,10 +34,10 @@ public char[] get() { return password; } }); - assertThat(Arrays.equals(password, copyOfPassword)).isTrue(); + Assertions.assertThat(Arrays.equals(password, copyOfPassword)).isTrue(); readKeyPassword.clear(); - assertThat(Arrays.equals(password, copyOfPassword)).isTrue(); - assertThat(Arrays.equals(readKeyPassword.getValue(), copyOfPassword)).isTrue(); + Assertions.assertThat(Arrays.equals(password, copyOfPassword)).isTrue(); + Assertions.assertThat(Arrays.equals(readKeyPassword.getValue(), copyOfPassword)).isTrue(); } @@ -46,23 +47,23 @@ public void testWithDeprecatedConstructor() { String passwordString = "that is the password"; char[] copyOfPassword = Arrays.copyOf(passwordString.toCharArray(), passwordString.toCharArray().length); - ReadKeyPassword readKeyPassword = ReadKeyPassword.getForString(passwordString); + ReadKeyPassword readKeyPassword = ReadKeyPasswordTestFactory.getForString(passwordString); ReadKeyPassword readKeyPasswordBackup = new ReadKeyPassword(new Supplier() { @Override public char[] get() { return readKeyPassword.getValue(); } }); - assertThat(Arrays.equals(passwordString.toCharArray(), copyOfPassword)).isTrue(); + Assertions.assertThat(Arrays.equals(passwordString.toCharArray(), copyOfPassword)).isTrue(); readKeyPassword.clear(); - assertThat(Arrays.equals(passwordString.toCharArray(), copyOfPassword)).isTrue(); - assertThat(Arrays.equals(readKeyPassword.getValue(), copyOfPassword)).isTrue(); + Assertions.assertThat(Arrays.equals(passwordString.toCharArray(), copyOfPassword)).isTrue(); + Assertions.assertThat(Arrays.equals(readKeyPassword.getValue(), copyOfPassword)).isTrue(); } @Test public void overwriteString() { String s = "peter"; s.toCharArray()[0] = 'P'; - assertThat(s.equals("Peter")).isFalse(); + Assertions.assertThat(s.equals("Peter")).isFalse(); } } diff --git a/datasafe-types-api/src/test/java/de/adorsys/datasafe/types/api/utils/ReadKeyPasswordTestFactory.java b/datasafe-types-api/src/test/java/de/adorsys/datasafe/types/api/utils/ReadKeyPasswordTestFactory.java new file mode 100644 index 000000000..7a80692f1 --- /dev/null +++ b/datasafe-types-api/src/test/java/de/adorsys/datasafe/types/api/utils/ReadKeyPasswordTestFactory.java @@ -0,0 +1,16 @@ +package de.adorsys.datasafe.types.api.utils; + +import de.adorsys.datasafe.types.api.types.ReadKeyPassword; + +import java.util.function.Supplier; + +public class ReadKeyPasswordTestFactory { + public static ReadKeyPassword getForString(String a) { + return new ReadKeyPassword(new Supplier() { + @Override + public char[] get() { + return a.toCharArray(); + } + }); + } +} From 9e35580fcf445f6fd3f54d47114abaa98d44e654 Mon Sep 17 00:00:00 2001 From: Valentyn Berezin Date: Fri, 11 Oct 2019 17:25:59 +0300 Subject: [PATCH 194/255] DOC-277. Trying to fix CLI --- datasafe-cli/pom.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/datasafe-cli/pom.xml b/datasafe-cli/pom.xml index d1566e716..336652111 100644 --- a/datasafe-cli/pom.xml +++ b/datasafe-cli/pom.xml @@ -166,6 +166,7 @@ --initialize-at-build-time=org.apache.http.pool.ConnPoolControl --initialize-at-run-time=org.bouncycastle.crypto.prng.SP800SecureRandom + --initialize-at-run-time=org.bouncycastle.crypto.CryptoServicesRegistrar --initialize-at-run-time=org.bouncycastle.jcajce.provider.drbg.DRBG$Default --initialize-at-run-time=org.bouncycastle.jcajce.provider.drbg.DRBG$NonceAndIV From 89c823da93496aa67eb77b1fb2f95221e46525da Mon Sep 17 00:00:00 2001 From: Maxim Grischenko Date: Fri, 11 Oct 2019 18:24:30 +0200 Subject: [PATCH 195/255] keystore creation config in impl & POJO --- .../impl/keystore/DefaultKeyStoreModule.java | 2 +- .../keys/DocumentKeyStoreOperationsImpl.java | 12 +----- .../keys/GenericKeystoreOperations.java | 15 ++----- .../datasafe-encryption-api/pom.xml | 4 -- .../api/keystore/KeyStoreService.java | 4 -- .../keystore/KeyStoreCreationConfig.java | 31 -------------- .../impl/keystore/KeyStoreCreationConfig.java | 41 +++++++++++++++++++ .../impl/keystore/KeyStoreServiceImpl.java | 6 +-- .../KeyStoreServiceImplBaseFunctions.java | 16 ++++++-- .../keystore/generator/KeystoreBuilder.java | 2 +- .../CmsEncryptionServiceImplTest.java | 2 +- .../cmsencryption/SymetricEncryptionTest.java | 4 +- .../keystore/KeyStoreCreationConfigTest.java | 30 -------------- .../impl/keystore/KeyStoreServiceTest.java | 12 +++--- ...ymmetricPathEncryptionServiceImplTest.java | 2 +- .../pom.xml | 1 + datasafe-rest-impl/docker-compose.yml | 18 ++++++++ .../rest/impl/config/DatasafeConfig.java | 12 +----- .../rest/impl/config/KeystoreProperties.java | 1 + .../src/main/resources/application.properties | 1 + .../adapter/impl/LegacyDatasafeService.java | 2 +- .../impl/SimpleDatasafeServiceImpl.java | 6 +-- ...ymmetricPathEncryptionServiceImplTest.java | 2 +- 23 files changed, 99 insertions(+), 127 deletions(-) delete mode 100644 datasafe-encryption/datasafe-encryption-api/src/main/java/de/adorsys/datasafe/encrypiton/api/types/keystore/KeyStoreCreationConfig.java create mode 100644 datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/keystore/KeyStoreCreationConfig.java delete mode 100644 datasafe-encryption/datasafe-encryption-impl/src/test/java/de/adorsys/datasafe/encrypiton/impl/keystore/KeyStoreCreationConfigTest.java create mode 100644 datasafe-rest-impl/docker-compose.yml diff --git a/datasafe-business/src/main/java/de/adorsys/datasafe/business/impl/keystore/DefaultKeyStoreModule.java b/datasafe-business/src/main/java/de/adorsys/datasafe/business/impl/keystore/DefaultKeyStoreModule.java index 7ad38f61f..c57a08763 100644 --- a/datasafe-business/src/main/java/de/adorsys/datasafe/business/impl/keystore/DefaultKeyStoreModule.java +++ b/datasafe-business/src/main/java/de/adorsys/datasafe/business/impl/keystore/DefaultKeyStoreModule.java @@ -8,7 +8,7 @@ import de.adorsys.datasafe.encrypiton.impl.keystore.DefaultPasswordBasedKeyConfigRuntimeDelegatable; import de.adorsys.datasafe.encrypiton.impl.keystore.KeyStoreServiceImplRuntimeDelegatable; import de.adorsys.datasafe.encrypiton.impl.keystore.PublicKeySerdeImplRuntimeDelegatable; -import de.adorsys.datasafe.encrypiton.api.types.keystore.KeyStoreCreationConfig; +import de.adorsys.datasafe.encrypiton.impl.keystore.KeyStoreCreationConfig; import de.adorsys.datasafe.encrypiton.impl.keystore.types.PasswordBasedKeyConfig; /** diff --git a/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/keys/DocumentKeyStoreOperationsImpl.java b/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/keys/DocumentKeyStoreOperationsImpl.java index 13b28b0cf..a5696ba93 100644 --- a/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/keys/DocumentKeyStoreOperationsImpl.java +++ b/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/keys/DocumentKeyStoreOperationsImpl.java @@ -22,7 +22,6 @@ import java.security.Key; import java.security.KeyStore; import java.util.List; -import java.util.Optional; import java.util.Set; /** @@ -39,14 +38,12 @@ public class DocumentKeyStoreOperationsImpl implements DocumentKeyStoreOperation private final StorageWriteService writeService; private final KeyStoreCache keystoreCache; private final KeyStoreService keyStoreService; - private final Optional keyStoreCreationConfig; @Inject public DocumentKeyStoreOperationsImpl(GenericKeystoreOperations genericOper, DFSConfig dfsConfig, BucketAccessService access, ProfileRetrievalService profile, StorageWriteService writeService, KeyStoreCache keystoreCache, - KeyStoreService keyStoreService, - Optional keyStoreCreationConfig) { + KeyStoreService keyStoreService) { this.genericOper = genericOper; this.dfsConfig = dfsConfig; this.access = access; @@ -54,7 +51,6 @@ public DocumentKeyStoreOperationsImpl(GenericKeystoreOperations genericOper, DFS this.writeService = writeService; this.keystoreCache = keystoreCache; this.keyStoreService = keyStoreService; - this.keyStoreCreationConfig = keyStoreCreationConfig; } /** @@ -79,11 +75,7 @@ public Set readAliases(UserIDAuth forUser) { @SneakyThrows public List createAndWriteKeyStore(UserIDAuth forUser) { KeyStoreAuth auth = keystoreAuth(forUser, forUser.getReadKeyPassword()); - KeyStore keystoreBlob = keyStoreService.createKeyStore( - auth, - keyStoreCreationConfig.orElse(KeyStoreCreationConfig.DEFAULT), - new KeyCreationConfig(1, 1) - ); + KeyStore keystoreBlob = keyStoreService.createKeyStore(auth, new KeyCreationConfig(1, 1)); writeKeystore(forUser.getUserID(), auth, keystoreLocationWithAccess(forUser), keystoreBlob); return keyStoreService.getPublicKeys(new KeyStoreAccess(keystoreBlob, auth)); diff --git a/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/keys/GenericKeystoreOperations.java b/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/keys/GenericKeystoreOperations.java index f84f8e028..b705b9890 100644 --- a/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/keys/GenericKeystoreOperations.java +++ b/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/keys/GenericKeystoreOperations.java @@ -5,9 +5,8 @@ import de.adorsys.datasafe.encrypiton.api.keystore.KeyStoreService; import de.adorsys.datasafe.encrypiton.api.types.UserID; import de.adorsys.datasafe.encrypiton.api.types.UserIDAuth; -import de.adorsys.datasafe.encrypiton.api.types.keystore.KeyStoreAuth; import de.adorsys.datasafe.encrypiton.api.types.keystore.KeyCreationConfig; -import de.adorsys.datasafe.encrypiton.api.types.keystore.KeyStoreCreationConfig; +import de.adorsys.datasafe.encrypiton.api.types.keystore.KeyStoreAuth; import de.adorsys.datasafe.encrypiton.api.types.keystore.ReadKeyPassword; import de.adorsys.datasafe.encrypiton.api.types.keystore.ReadStorePassword; import de.adorsys.datasafe.storage.api.actions.StorageReadService; @@ -26,7 +25,6 @@ import java.security.UnrecoverableKeyException; import java.util.Enumeration; import java.util.HashSet; -import java.util.Optional; import java.util.Set; import java.util.function.Supplier; @@ -42,27 +40,20 @@ public class GenericKeystoreOperations { private final StorageReadService readService; private final KeyStoreCache keystoreCache; private final KeyStoreService keyStoreService; - private final Optional keyStoreCreationConfig; @Inject public GenericKeystoreOperations(DFSConfig dfsConfig, StorageWriteService writeService, StorageReadService readService, KeyStoreCache keystoreCache, - KeyStoreService keyStoreService, - Optional keyStoreCreationConfig) { + KeyStoreService keyStoreService) { this.dfsConfig = dfsConfig; this.writeService = writeService; this.readService = readService; this.keystoreCache = keystoreCache; this.keyStoreService = keyStoreService; - this.keyStoreCreationConfig = keyStoreCreationConfig; } public KeyStore createEmptyKeystore(UserIDAuth auth) { - return keyStoreService - .createKeyStore(keystoreAuth(auth), - keyStoreCreationConfig.orElse(KeyStoreCreationConfig.DEFAULT), - new KeyCreationConfig(0, 0) - ); + return keyStoreService.createKeyStore(keystoreAuth(auth), new KeyCreationConfig(0, 0)); } /** diff --git a/datasafe-encryption/datasafe-encryption-api/pom.xml b/datasafe-encryption/datasafe-encryption-api/pom.xml index 5f2335562..e86de2087 100644 --- a/datasafe-encryption/datasafe-encryption-api/pom.xml +++ b/datasafe-encryption/datasafe-encryption-api/pom.xml @@ -14,10 +14,6 @@ datasafe-types-api ${project.version} - - org.bouncycastle - bcprov-jdk15on - diff --git a/datasafe-encryption/datasafe-encryption-api/src/main/java/de/adorsys/datasafe/encrypiton/api/keystore/KeyStoreService.java b/datasafe-encryption/datasafe-encryption-api/src/main/java/de/adorsys/datasafe/encrypiton/api/keystore/KeyStoreService.java index bb093ed7d..92495fcd7 100644 --- a/datasafe-encryption/datasafe-encryption-api/src/main/java/de/adorsys/datasafe/encrypiton/api/keystore/KeyStoreService.java +++ b/datasafe-encryption/datasafe-encryption-api/src/main/java/de/adorsys/datasafe/encrypiton/api/keystore/KeyStoreService.java @@ -19,24 +19,20 @@ public interface KeyStoreService { /** * Creates keystore. * @param keyStoreAuth Keys for opening keystore and reading key from it - * @param keyStoreCreationConfig Keystore type, example: PKCS or PKCS12 or JKS * @param config Keystore will be pre-populated with keys according to it * @return Built keystore that is ready to use */ KeyStore createKeyStore(KeyStoreAuth keyStoreAuth, - KeyStoreCreationConfig keyStoreCreationConfig, KeyCreationConfig config); /** * Creates keystore that has additional secret keys in it. * @param keyStoreAuth Keys for opening keystore and reading key from it - * @param keyStoreCreationConfig Keystore type, example: PKCS12 or UBER or JKS * @param config Keystore will be pre-populated with keys according to it * @param secretKeys Secret keys to store in keystore, if value is empty - key will be generated * @return Built keystore that is ready to use */ KeyStore createKeyStore(KeyStoreAuth keyStoreAuth, - KeyStoreCreationConfig keyStoreCreationConfig, KeyCreationConfig config, Map> secretKeys); diff --git a/datasafe-encryption/datasafe-encryption-api/src/main/java/de/adorsys/datasafe/encrypiton/api/types/keystore/KeyStoreCreationConfig.java b/datasafe-encryption/datasafe-encryption-api/src/main/java/de/adorsys/datasafe/encrypiton/api/types/keystore/KeyStoreCreationConfig.java deleted file mode 100644 index b14b3aae5..000000000 --- a/datasafe-encryption/datasafe-encryption-api/src/main/java/de/adorsys/datasafe/encrypiton/api/types/keystore/KeyStoreCreationConfig.java +++ /dev/null @@ -1,31 +0,0 @@ -package de.adorsys.datasafe.encrypiton.api.types.keystore; - -import lombok.Builder; -import lombok.Getter; -import org.bouncycastle.crypto.util.PBKDF2Config; -import org.bouncycastle.jcajce.BCFKSLoadStoreParameter; - -import static org.bouncycastle.crypto.util.PBKDF2Config.PRF_SHA512; - -/** - * Wrapper for keystore config. - */ -@Builder(toBuilder = true) -@Getter -public class KeyStoreCreationConfig { - public static KeyStoreCreationConfig DEFAULT = getDefaultConfig(); - - private String keyStoreType; - private BCFKSLoadStoreParameter.EncryptionAlgorithm storeEncryptionAlgorithm; - private PBKDF2Config storePBKDFConfig; - private BCFKSLoadStoreParameter.MacAlgorithm storeMacAlgorithm; - - private static KeyStoreCreationConfig getDefaultConfig() { - return KeyStoreCreationConfig.builder() - .keyStoreType("BCFKS") - .storeEncryptionAlgorithm(BCFKSLoadStoreParameter.EncryptionAlgorithm.AES256_KWP) - .storePBKDFConfig(new PBKDF2Config.Builder().withPRF(PRF_SHA512).build()) - .storeMacAlgorithm(BCFKSLoadStoreParameter.MacAlgorithm.HmacSHA3_512) - .build(); - } -} diff --git a/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/keystore/KeyStoreCreationConfig.java b/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/keystore/KeyStoreCreationConfig.java new file mode 100644 index 000000000..46b08f1db --- /dev/null +++ b/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/keystore/KeyStoreCreationConfig.java @@ -0,0 +1,41 @@ +package de.adorsys.datasafe.encrypiton.impl.keystore; + +/** + * Wrapper for keystore config. + */ +public class KeyStoreCreationConfig { + public static KeyStoreCreationConfig DEFAULT = getDefaultConfig(); + + private String keyStoreType; + private String storeEncryptionAlgorithm; + private String storePBKDFConfig; + private String storeMacAlgorithm; + + public KeyStoreCreationConfig(String keyStoreType, String storeEncryptionAlgorithm, + String storePBKDFConfig, String storeMacAlgorithm) { + this.keyStoreType = keyStoreType; + this.storeEncryptionAlgorithm = storeEncryptionAlgorithm; + this.storePBKDFConfig = storePBKDFConfig; + this.storeMacAlgorithm = storeMacAlgorithm; + } + + private static KeyStoreCreationConfig getDefaultConfig() { + return new KeyStoreCreationConfig("BCFKS", "AES256_KWP", "PRF_SHA512", "HmacSHA3_512"); + } + + public String getKeyStoreType() { + return keyStoreType; + } + + public String getStoreEncryptionAlgorithm() { + return storeEncryptionAlgorithm; + } + + public String getStorePBKDFConfig() { + return storePBKDFConfig; + } + + public String getStoreMacAlgorithm() { + return storeMacAlgorithm; + } +} diff --git a/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/keystore/KeyStoreServiceImpl.java b/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/keystore/KeyStoreServiceImpl.java index db2bf84b0..16fe227a8 100644 --- a/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/keystore/KeyStoreServiceImpl.java +++ b/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/keystore/KeyStoreServiceImpl.java @@ -4,7 +4,6 @@ import de.adorsys.datasafe.encrypiton.api.keystore.KeyStoreService; import de.adorsys.datasafe.encrypiton.api.types.keystore.*; import de.adorsys.datasafe.encrypiton.impl.keystore.generator.KeyStoreServiceImplBaseFunctions; -import de.adorsys.datasafe.encrypiton.api.types.keystore.KeyStoreCreationConfig; import de.adorsys.datasafe.encrypiton.impl.keystore.types.PasswordBasedKeyConfig; import de.adorsys.datasafe.types.api.context.annotations.RuntimeDelegate; import lombok.SneakyThrows; @@ -39,12 +38,10 @@ public KeyStoreServiceImpl(PasswordBasedKeyConfig passwordBasedKeyConfig, @Override public KeyStore createKeyStore(KeyStoreAuth keyStoreAuth, - KeyStoreCreationConfig keyStoreCreationConfig, KeyCreationConfig config) { return createKeyStore( keyStoreAuth, - keyStoreCreationConfig, config, ImmutableMap.of( new KeyID(PATH_KEY_ID_PREFIX + UUID.randomUUID().toString()), Optional.empty(), @@ -56,7 +53,6 @@ public KeyStore createKeyStore(KeyStoreAuth keyStoreAuth, @Override public KeyStore createKeyStore(KeyStoreAuth keyStoreAuth, - KeyStoreCreationConfig keyStoreCreationConfig, KeyCreationConfig config, Map> secretKeys) { @@ -69,7 +65,7 @@ public KeyStore createKeyStore(KeyStoreAuth keyStoreAuth, log.debug("keystoreid = {}", serverKeyPairAliasPrefix); KeyStoreGenerator keyStoreGenerator = KeyStoreGenerator.builder() .keyCreationConfig(config) - .keyStoreCreationConfig(keyStoreCreationConfig) + .keyStoreCreationConfig(keyStoreCreationConfig.orElse(KeyStoreCreationConfig.DEFAULT)) .serverKeyPairAliasPrefix(serverKeyPairAliasPrefix) .readKeyPassword(keyStoreAuth.getReadKeyPassword()) .secretKeys(secretKeys) diff --git a/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/keystore/generator/KeyStoreServiceImplBaseFunctions.java b/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/keystore/generator/KeyStoreServiceImplBaseFunctions.java index 73385b100..79cd08abd 100644 --- a/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/keystore/generator/KeyStoreServiceImplBaseFunctions.java +++ b/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/keystore/generator/KeyStoreServiceImplBaseFunctions.java @@ -1,9 +1,15 @@ package de.adorsys.datasafe.encrypiton.impl.keystore.generator; -import de.adorsys.datasafe.encrypiton.api.types.keystore.*; +import de.adorsys.datasafe.encrypiton.api.types.keystore.KeyEntry; +import de.adorsys.datasafe.encrypiton.api.types.keystore.ReadKeyPassword; +import de.adorsys.datasafe.encrypiton.api.types.keystore.ReadStorePassword; +import de.adorsys.datasafe.encrypiton.api.types.keystore.SecretKeyEntry; +import de.adorsys.datasafe.encrypiton.impl.keystore.KeyStoreCreationConfig; import de.adorsys.datasafe.encrypiton.impl.keystore.types.KeyPairEntry; import lombok.SneakyThrows; +import org.bouncycastle.asn1.x509.AlgorithmIdentifier; import org.bouncycastle.cert.X509CertificateHolder; +import org.bouncycastle.crypto.util.PBKDF2Config; import org.bouncycastle.jcajce.BCFKSLoadStoreParameter; import java.io.ByteArrayInputStream; @@ -38,10 +44,12 @@ public static KeyStore newKeyStore(KeyStoreCreationConfig keyStoreConfig) { if (keyStoreConfig == null) keyStoreConfig = KeyStoreCreationConfig.DEFAULT; KeyStore ks = KeyStore.getInstance(keyStoreConfig.getKeyStoreType()); if ("BCFKS".equals(keyStoreConfig.getKeyStoreType())) { + AlgorithmIdentifier prf = (AlgorithmIdentifier) PBKDF2Config.class.getDeclaredField(keyStoreConfig.getStorePBKDFConfig()).get(PBKDF2Config.class); + ks.load(new BCFKSLoadStoreParameter.Builder() - .withStoreEncryptionAlgorithm(keyStoreConfig.getStoreEncryptionAlgorithm()) - .withStorePBKDFConfig(keyStoreConfig.getStorePBKDFConfig()) - .withStoreMacAlgorithm(keyStoreConfig.getStoreMacAlgorithm()) + .withStoreEncryptionAlgorithm(BCFKSLoadStoreParameter.EncryptionAlgorithm.valueOf(keyStoreConfig.getStoreEncryptionAlgorithm())) + .withStorePBKDFConfig(new PBKDF2Config.Builder().withPRF(prf).build()) + .withStoreMacAlgorithm(BCFKSLoadStoreParameter.MacAlgorithm.valueOf(keyStoreConfig.getStoreMacAlgorithm())) .build() ); } else { diff --git a/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/keystore/generator/KeystoreBuilder.java b/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/keystore/generator/KeystoreBuilder.java index 6403f7a4d..aa4894498 100644 --- a/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/keystore/generator/KeystoreBuilder.java +++ b/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/keystore/generator/KeystoreBuilder.java @@ -1,7 +1,7 @@ package de.adorsys.datasafe.encrypiton.impl.keystore.generator; import de.adorsys.datasafe.encrypiton.api.types.keystore.KeyEntry; -import de.adorsys.datasafe.encrypiton.api.types.keystore.KeyStoreCreationConfig; +import de.adorsys.datasafe.encrypiton.impl.keystore.KeyStoreCreationConfig; import java.security.KeyStore; import java.util.HashMap; diff --git a/datasafe-encryption/datasafe-encryption-impl/src/test/java/de/adorsys/datasafe/encrypiton/impl/cmsencryption/CmsEncryptionServiceImplTest.java b/datasafe-encryption/datasafe-encryption-impl/src/test/java/de/adorsys/datasafe/encrypiton/impl/cmsencryption/CmsEncryptionServiceImplTest.java index 3aa9e6233..318fff518 100644 --- a/datasafe-encryption/datasafe-encryption-impl/src/test/java/de/adorsys/datasafe/encrypiton/impl/cmsencryption/CmsEncryptionServiceImplTest.java +++ b/datasafe-encryption/datasafe-encryption-impl/src/test/java/de/adorsys/datasafe/encrypiton/impl/cmsencryption/CmsEncryptionServiceImplTest.java @@ -204,7 +204,7 @@ private static KeyStoreAccess getKeyStoreAccess(String label) { KeyStoreAuth keyStoreAuth = new KeyStoreAuth(readStorePassword, readKeyPassword); KeyCreationConfig config = new KeyCreationConfig(1, 1); - KeyStore keyStore = keyStoreService.createKeyStore(keyStoreAuth, KeyStoreCreationConfig.DEFAULT, config); + KeyStore keyStore = keyStoreService.createKeyStore(keyStoreAuth, config); return new KeyStoreAccess(keyStore, keyStoreAuth); } diff --git a/datasafe-encryption/datasafe-encryption-impl/src/test/java/de/adorsys/datasafe/encrypiton/impl/cmsencryption/SymetricEncryptionTest.java b/datasafe-encryption/datasafe-encryption-impl/src/test/java/de/adorsys/datasafe/encrypiton/impl/cmsencryption/SymetricEncryptionTest.java index ba13237d6..5acfbadcf 100644 --- a/datasafe-encryption/datasafe-encryption-impl/src/test/java/de/adorsys/datasafe/encrypiton/impl/cmsencryption/SymetricEncryptionTest.java +++ b/datasafe-encryption/datasafe-encryption-impl/src/test/java/de/adorsys/datasafe/encrypiton/impl/cmsencryption/SymetricEncryptionTest.java @@ -37,7 +37,7 @@ class SymetricEncryptionTest extends WithBouncyCastle { private ReadStorePassword readStorePassword = new ReadStorePassword("readstorepassword"); private KeyStoreAuth keyStoreAuth = new KeyStoreAuth(readStorePassword, readKeyPassword); private KeyCreationConfig config = new KeyCreationConfig(1, 1); - private KeyStore keyStore = keyStoreService.createKeyStore(keyStoreAuth, null, config); + private KeyStore keyStore = keyStoreService.createKeyStore(keyStoreAuth, config); private KeyStoreAccess keyStoreAccess = new KeyStoreAccess(keyStore, keyStoreAuth); @Test @@ -65,7 +65,7 @@ void symetricStreamEncryptAndDecryptTest() { @SneakyThrows void symetricNegativeStreamEncryptAndDecryptTest() { // This is the keystore we use to encrypt, it has SYMM_KEY_ID and PATH_KEY_ID symm. keys. - keyStoreService.createKeyStore(keyStoreAuth, null, config); + keyStoreService.createKeyStore(keyStoreAuth, config); SecretKey realSecretKey = keyStoreService.getSecretKey(keyStoreAccess, keyIdByPrefix(DOCUMENT_KEY_ID_PREFIX)); ByteArrayOutputStream outputStream = new ByteArrayOutputStream(); // Test consist in encrypting with real secret key, but use fake secretKeyId - PATH_KEY_ID diff --git a/datasafe-encryption/datasafe-encryption-impl/src/test/java/de/adorsys/datasafe/encrypiton/impl/keystore/KeyStoreCreationConfigTest.java b/datasafe-encryption/datasafe-encryption-impl/src/test/java/de/adorsys/datasafe/encrypiton/impl/keystore/KeyStoreCreationConfigTest.java deleted file mode 100644 index 870ea4537..000000000 --- a/datasafe-encryption/datasafe-encryption-impl/src/test/java/de/adorsys/datasafe/encrypiton/impl/keystore/KeyStoreCreationConfigTest.java +++ /dev/null @@ -1,30 +0,0 @@ -package de.adorsys.datasafe.encrypiton.impl.keystore; - -import de.adorsys.datasafe.types.api.shared.BaseMockitoTest; - -class KeyStoreTypeTest extends BaseMockitoTest { - -// @Test -// void typeBySystemEnv() { -// String value = this.getClass().getSimpleName() + UUID.randomUUID().toString(); -// System.setProperty("SERVER_KEYSTORE_TYPE", value); -// Assertions.assertEquals(value, TestableKeyStoreType.getStaticDefaultKeyStoreType().getValue()); -// System.clearProperty("SERVER_KEYSTORE_TYPE"); -// TestableKeyStoreType.resetType(); -// } -// -// public static class TestableKeyStoreType extends KeyStoreType { -// -// public TestableKeyStoreType(String value) { -// super(value); -// } -// -// static KeyStoreType getStaticDefaultKeyStoreType() { -// return KeyStoreType.getDefaultKeyStoreType(); -// } -// -// static void resetType() { -// DEFAULT = getStaticDefaultKeyStoreType(); -// } -// } -} diff --git a/datasafe-encryption/datasafe-encryption-impl/src/test/java/de/adorsys/datasafe/encrypiton/impl/keystore/KeyStoreServiceTest.java b/datasafe-encryption/datasafe-encryption-impl/src/test/java/de/adorsys/datasafe/encrypiton/impl/keystore/KeyStoreServiceTest.java index aad9189ea..28833d667 100644 --- a/datasafe-encryption/datasafe-encryption-impl/src/test/java/de/adorsys/datasafe/encrypiton/impl/keystore/KeyStoreServiceTest.java +++ b/datasafe-encryption/datasafe-encryption-impl/src/test/java/de/adorsys/datasafe/encrypiton/impl/keystore/KeyStoreServiceTest.java @@ -39,7 +39,7 @@ void setUp() { @Test void createKeyStore() throws Exception { KeyCreationConfig config = new KeyCreationConfig(0, 1); - KeyStore keyStore = keyStoreService.createKeyStore(keyStoreAuth, null, config); + KeyStore keyStore = keyStoreService.createKeyStore(keyStoreAuth, config); Assertions.assertNotNull(keyStore); @@ -53,7 +53,7 @@ void createKeyStore() throws Exception { @Test void createKeyStoreEmptyConfig() throws Exception { - KeyStore keyStore = keyStoreService.createKeyStore(keyStoreAuth, null, null); + KeyStore keyStore = keyStoreService.createKeyStore(keyStoreAuth, null); Assertions.assertNotNull(keyStore); List list = Collections.list(keyStore.aliases()); // One additional secret key being generated for path encryption and one for private doc encryption. @@ -65,13 +65,13 @@ void createKeyStoreException() { KeyCreationConfig config = new KeyCreationConfig(0, 0); Assertions.assertThrows(KeyStoreConfigException.class, () -> - keyStoreService.createKeyStore(keyStoreAuth, null, config, Collections.emptyMap()) + keyStoreService.createKeyStore(keyStoreAuth, config, Collections.emptyMap()) ); } @Test void getPublicKeys() { - KeyStore keyStore = keyStoreService.createKeyStore(keyStoreAuth, null, null); + KeyStore keyStore = keyStoreService.createKeyStore(keyStoreAuth, null); KeyStoreAccess keyStoreAccess = new KeyStoreAccess(keyStore, keyStoreAuth); List publicKeys = keyStoreService.getPublicKeys(keyStoreAccess); @@ -100,7 +100,7 @@ void getPrivateKey() throws Exception { @Test void getPrivateKeyException() throws Exception { - KeyStore keyStore = keyStoreService.createKeyStore(keyStoreAuth, null, null); + KeyStore keyStore = keyStoreService.createKeyStore(keyStoreAuth, null); KeyStoreAccess keyStoreAccess = new KeyStoreAccess(keyStore, keyStoreAuth); List list = Collections.list(keyStore.aliases()); Assertions.assertThrows(ClassCastException.class, () -> { @@ -113,7 +113,7 @@ void getPrivateKeyException() throws Exception { @Test void getSecretKey() { KeyCreationConfig config = new KeyCreationConfig(0, 1); - KeyStore keyStore = keyStoreService.createKeyStore(keyStoreAuth, null, config); + KeyStore keyStore = keyStoreService.createKeyStore(keyStoreAuth, config); KeyStoreAccess keyStoreAccess = new KeyStoreAccess(keyStore, keyStoreAuth); KeyID keyID = KeystoreUtil.keyIdByPrefix(keyStore, DOCUMENT_KEY_ID_PREFIX); diff --git a/datasafe-encryption/datasafe-encryption-impl/src/test/java/de/adorsys/datasafe/encrypiton/impl/pathencryption/SymmetricPathEncryptionServiceImplTest.java b/datasafe-encryption/datasafe-encryption-impl/src/test/java/de/adorsys/datasafe/encrypiton/impl/pathencryption/SymmetricPathEncryptionServiceImplTest.java index 6fcf61ada..56acce873 100644 --- a/datasafe-encryption/datasafe-encryption-impl/src/test/java/de/adorsys/datasafe/encrypiton/impl/pathencryption/SymmetricPathEncryptionServiceImplTest.java +++ b/datasafe-encryption/datasafe-encryption-impl/src/test/java/de/adorsys/datasafe/encrypiton/impl/pathencryption/SymmetricPathEncryptionServiceImplTest.java @@ -35,7 +35,7 @@ class SymmetricPathEncryptionServiceImplTest extends WithBouncyCastle { private ReadStorePassword readStorePassword = new ReadStorePassword("readstorepassword"); private KeyStoreAuth keyStoreAuth = new KeyStoreAuth(readStorePassword, readKeyPassword); private KeyCreationConfig config = new KeyCreationConfig(0, 1); - private KeyStore keyStore = keyStoreService.createKeyStore(keyStoreAuth, null, config); + private KeyStore keyStore = keyStoreService.createKeyStore(keyStoreAuth, config); private KeyStoreAccess keyStoreAccess = new KeyStoreAccess(keyStore, keyStoreAuth); @Test diff --git a/datasafe-long-run-tests/datasafe-business-tests-random-actions/pom.xml b/datasafe-long-run-tests/datasafe-business-tests-random-actions/pom.xml index 99a2ce38b..cf8aa441f 100644 --- a/datasafe-long-run-tests/datasafe-business-tests-random-actions/pom.xml +++ b/datasafe-long-run-tests/datasafe-business-tests-random-actions/pom.xml @@ -175,6 +175,7 @@ org.kie:kie-api org.kie:kie-internal com.amazonaws + org.bouncycastle diff --git a/datasafe-rest-impl/docker-compose.yml b/datasafe-rest-impl/docker-compose.yml new file mode 100644 index 000000000..838c605fb --- /dev/null +++ b/datasafe-rest-impl/docker-compose.yml @@ -0,0 +1,18 @@ +version: '3.3' +services: + db: + image: mysql:5.7 + restart: always + environment: + MYSQL_DATABASE: 'test_db' + MYSQL_USER: 'test' + MYSQL_PASSWORD: 'test' + MYSQL_ROOT_PASSWORD: 'password' + ports: + - '3306:3306' + expose: + - '3306' + volumes: + - my-db:/var/lib/mysql +volumes: + my-db: diff --git a/datasafe-rest-impl/src/main/java/de/adorsys/datasafe/rest/impl/config/DatasafeConfig.java b/datasafe-rest-impl/src/main/java/de/adorsys/datasafe/rest/impl/config/DatasafeConfig.java index 32da6207f..81860aba9 100644 --- a/datasafe-rest-impl/src/main/java/de/adorsys/datasafe/rest/impl/config/DatasafeConfig.java +++ b/datasafe-rest-impl/src/main/java/de/adorsys/datasafe/rest/impl/config/DatasafeConfig.java @@ -20,7 +20,7 @@ import de.adorsys.datasafe.directory.impl.profile.dfs.BucketAccessServiceImpl; import de.adorsys.datasafe.directory.impl.profile.dfs.BucketAccessServiceImplRuntimeDelegatable; import de.adorsys.datasafe.directory.impl.profile.dfs.RegexAccessServiceWithStorageCredentialsImpl; -import de.adorsys.datasafe.encrypiton.api.types.keystore.KeyStoreCreationConfig; +import de.adorsys.datasafe.encrypiton.impl.keystore.KeyStoreCreationConfig; import de.adorsys.datasafe.storage.api.RegexDelegatingStorage; import de.adorsys.datasafe.storage.api.SchemeDelegatingStorage; import de.adorsys.datasafe.storage.api.StorageService; @@ -37,9 +37,6 @@ import lombok.SneakyThrows; import lombok.experimental.Delegate; import lombok.extern.slf4j.Slf4j; -import org.bouncycastle.asn1.x509.AlgorithmIdentifier; -import org.bouncycastle.crypto.util.PBKDF2Config; -import org.bouncycastle.jcajce.BCFKSLoadStoreParameter; import org.bouncycastle.jce.provider.BouncyCastleProvider; import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean; import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; @@ -258,12 +255,7 @@ AmazonS3 s3(DatasafeProperties properties) { @Bean @SneakyThrows KeyStoreCreationConfig keystoreConfig(KeystoreProperties kp) { - AlgorithmIdentifier prf = (AlgorithmIdentifier) PBKDF2Config.class.getDeclaredField(kp.getPrfAlgorithm()).get(PBKDF2Config.class); - return KeyStoreCreationConfig.builder() - .storeEncryptionAlgorithm(BCFKSLoadStoreParameter.EncryptionAlgorithm.valueOf(kp.getEncAlgorithm())) - .storePBKDFConfig(new PBKDF2Config.Builder().withPRF(prf).build()) - .storeMacAlgorithm(BCFKSLoadStoreParameter.MacAlgorithm.valueOf(kp.getMacAlgorithm())) - .build(); + return new KeyStoreCreationConfig(kp.getType(), kp.getEncAlgorithm(), kp.getPrfAlgorithm(), kp.getMacAlgorithm()); } private static class WithAccessCredentials extends BucketAccessServiceImpl { diff --git a/datasafe-rest-impl/src/main/java/de/adorsys/datasafe/rest/impl/config/KeystoreProperties.java b/datasafe-rest-impl/src/main/java/de/adorsys/datasafe/rest/impl/config/KeystoreProperties.java index c9d5d8c5d..3569daad6 100644 --- a/datasafe-rest-impl/src/main/java/de/adorsys/datasafe/rest/impl/config/KeystoreProperties.java +++ b/datasafe-rest-impl/src/main/java/de/adorsys/datasafe/rest/impl/config/KeystoreProperties.java @@ -6,6 +6,7 @@ @ConfigurationProperties(prefix = "keystore") @Data public class KeystoreProperties { + private String type; private String encAlgorithm; private String prfAlgorithm; private String macAlgorithm; diff --git a/datasafe-rest-impl/src/main/resources/application.properties b/datasafe-rest-impl/src/main/resources/application.properties index 9401396db..aa47db44d 100644 --- a/datasafe-rest-impl/src/main/resources/application.properties +++ b/datasafe-rest-impl/src/main/resources/application.properties @@ -31,6 +31,7 @@ datasafe.dbPassword=${MYSQL_PASSWORD} spring.liquibase.enabled=false +keystore.type=BCFKS keystore.encAlgorithm=AES256_KWP keystore.prfAlgorithm=PRF_SHA512 keystore.macAlgorithm=HmacSHA3_512 diff --git a/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/main/java/de/adorsys/datasafe/simple/adapter/impl/LegacyDatasafeService.java b/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/main/java/de/adorsys/datasafe/simple/adapter/impl/LegacyDatasafeService.java index 7e3135cbe..bf6cd2c98 100644 --- a/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/main/java/de/adorsys/datasafe/simple/adapter/impl/LegacyDatasafeService.java +++ b/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/main/java/de/adorsys/datasafe/simple/adapter/impl/LegacyDatasafeService.java @@ -9,7 +9,7 @@ import de.adorsys.datasafe.business.impl.service.DefaultDatasafeServices; import de.adorsys.datasafe.business.impl.storage.DefaultStorageModule; import de.adorsys.datasafe.directory.api.config.DFSConfig; -import de.adorsys.datasafe.encrypiton.api.types.keystore.KeyStoreCreationConfig; +import de.adorsys.datasafe.encrypiton.impl.keystore.KeyStoreCreationConfig; import de.adorsys.datasafe.simple.adapter.impl.cmsencryption.SwitchableCMSEncryptionModule; import de.adorsys.datasafe.simple.adapter.impl.pathencryption.LegacyCredentialsModule; import de.adorsys.datasafe.simple.adapter.impl.pathencryption.LegacyPathEncryptionModule; diff --git a/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/main/java/de/adorsys/datasafe/simple/adapter/impl/SimpleDatasafeServiceImpl.java b/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/main/java/de/adorsys/datasafe/simple/adapter/impl/SimpleDatasafeServiceImpl.java index 9ad2f8fcf..3451bf4f2 100644 --- a/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/main/java/de/adorsys/datasafe/simple/adapter/impl/SimpleDatasafeServiceImpl.java +++ b/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/main/java/de/adorsys/datasafe/simple/adapter/impl/SimpleDatasafeServiceImpl.java @@ -12,7 +12,7 @@ import de.adorsys.datasafe.directory.impl.profile.config.DefaultDFSConfig; import de.adorsys.datasafe.encrypiton.api.types.UserID; import de.adorsys.datasafe.encrypiton.api.types.UserIDAuth; -import de.adorsys.datasafe.encrypiton.api.types.keystore.KeyStoreCreationConfig; +import de.adorsys.datasafe.encrypiton.impl.keystore.KeyStoreCreationConfig; import de.adorsys.datasafe.encrypiton.api.types.keystore.ReadKeyPassword; import de.adorsys.datasafe.encrypiton.api.types.keystore.ReadStorePassword; import de.adorsys.datasafe.simple.adapter.api.SimpleDatasafeService; @@ -69,7 +69,7 @@ public SimpleDatasafeServiceImpl(DFSCredentials dfsCredentials) { storageService = new FileSystemStorageService(FileSystems.getDefault().getPath(filesystemDFSCredentials.getRoot())); customlyBuiltDatasafeServices = DaggerLegacyDatasafeService.builder() .config(new DefaultDFSConfig(systemRoot, universalReadStorePassword.getValue())) - .keyStoreConfig(KeyStoreCreationConfig.builder().keyStoreType("UBER").build()) + .keyStoreConfig(new KeyStoreCreationConfig("UBER", "", "", "")) .storage(getStorageService()) .build(); @@ -134,7 +134,7 @@ public SimpleDatasafeServiceImpl(DFSCredentials dfsCredentials) { customlyBuiltDatasafeServices = DaggerLegacyDatasafeService.builder() .config(new DefaultDFSConfig(systemRoot, universalReadStorePassword.getValue())) - .keyStoreConfig(KeyStoreCreationConfig.builder().keyStoreType("UBER").build()) + .keyStoreConfig(new KeyStoreCreationConfig("UBER", "", "", "")) .storage(getStorageService()) .build(); diff --git a/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/test/java/de/adorsys/datasafe/simple/adapter/impl/legacy/LegacySymmetricPathEncryptionServiceImplTest.java b/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/test/java/de/adorsys/datasafe/simple/adapter/impl/legacy/LegacySymmetricPathEncryptionServiceImplTest.java index 99efb825a..3f472aac4 100644 --- a/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/test/java/de/adorsys/datasafe/simple/adapter/impl/legacy/LegacySymmetricPathEncryptionServiceImplTest.java +++ b/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/test/java/de/adorsys/datasafe/simple/adapter/impl/legacy/LegacySymmetricPathEncryptionServiceImplTest.java @@ -37,7 +37,7 @@ class LegacySymmetricPathEncryptionServiceImplTest extends WithBouncyCastle { private ReadStorePassword readStorePassword = new ReadStorePassword("readstorepassword"); private KeyStoreAuth keyStoreAuth = new KeyStoreAuth(readStorePassword, readKeyPassword); private KeyCreationConfig config = new KeyCreationConfig(0, 1); - private KeyStore keyStore = keyStoreService.createKeyStore(keyStoreAuth, KeyStoreCreationConfig.DEFAULT, config); + private KeyStore keyStore = keyStoreService.createKeyStore(keyStoreAuth, config); private KeyStoreAccess keyStoreAccess = new KeyStoreAccess(keyStore, keyStoreAuth); @Test From e937ccc34b1664098eb2f3e8462a87df9391213d Mon Sep 17 00:00:00 2001 From: psp Date: Sat, 12 Oct 2019 18:58:23 +0200 Subject: [PATCH 196/255] DOC-279 cant read any file, but dont know why --- .../impl/e2e/BasicFunctionalityTest.java | 30 ++++++++++++++++--- 1 file changed, 26 insertions(+), 4 deletions(-) diff --git a/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/BasicFunctionalityTest.java b/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/BasicFunctionalityTest.java index 3f63fbacc..f8490abaa 100644 --- a/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/BasicFunctionalityTest.java +++ b/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/BasicFunctionalityTest.java @@ -1,5 +1,6 @@ package de.adorsys.datasafe.business.impl.e2e; +import com.google.common.io.ByteStreams; import de.adorsys.datasafe.business.impl.service.DefaultDatasafeServices; import de.adorsys.datasafe.encrypiton.api.types.UserID; import de.adorsys.datasafe.encrypiton.api.types.UserIDAuth; @@ -12,6 +13,7 @@ import de.adorsys.datasafe.types.api.actions.WriteRequest; import de.adorsys.datasafe.types.api.global.Version; import de.adorsys.datasafe.types.api.resource.*; +import de.adorsys.datasafe.types.api.utils.ReadKeyPasswordTestFactory; import lombok.SneakyThrows; import lombok.extern.slf4j.Slf4j; import org.junit.jupiter.params.ParameterizedTest; @@ -30,6 +32,7 @@ import java.util.stream.Stream; import static de.adorsys.datasafe.business.impl.e2e.Const.*; +import static java.nio.charset.StandardCharsets.UTF_8; import static org.assertj.core.api.Assertions.assertThat; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertThrows; @@ -45,6 +48,16 @@ class BasicFunctionalityTest extends BaseE2ETest { private StorageService storage; private Uri location; + + /** + * + * Hi Valentyn, + * I cant get it to run. But this has nothing to do with the new ReadKeyPassword. + * Even if I uncomment line 70, the reading always fails and I dont know why. + * I am doing it like I am doing it in the SimpleDatasafeAdapter. Here seems to be + * something really creepy. + * + */ @SneakyThrows @ParameterizedTest @MethodSource("fsOnly") @@ -57,6 +70,7 @@ void testDFSPasswordClearance(WithStorageProvider.StorageDescriptor descriptor) char[] password = passwordString.toCharArray(); char[] copyOfPassword = Arrays.copyOf(password, password.length); ReadKeyPassword readKeyPassword = new ReadKeyPassword(password); + // readKeyPassword = ReadKeyPasswordTestFactory.getForString(passwordString); john = registerUser(userJohn.getValue(), readKeyPassword); @@ -64,27 +78,35 @@ void testDFSPasswordClearance(WithStorageProvider.StorageDescriptor descriptor) assertThat(profileRetrievalService.privateProfile(john).getAppVersion()).isEqualTo(Version.current()); assertThat(profileRetrievalService.publicProfile(john.getUserID()).getAppVersion()).isEqualTo(Version.current()); + String filename = "root.txt"; + String content = "affe"; /** * Test clearance after write of file */ log.info("1. write file"); assertThat(Arrays.equals(password, copyOfPassword)).isTrue(); - writeDataToPrivate(john, "root.txt", MESSAGE_ONE); + try (OutputStream os = writeToPrivate + .write(WriteRequest.forDefaultPrivate(john, filename))) { + os.write(content.getBytes()); + } assertThat(Arrays.equals(password, copyOfPassword)).isFalse(); /** * Test clearance after read of file */ // recover password -/* System.arraycopy(copyOfPassword, 0, password, 0, copyOfPassword.length); log.info("password recovered"); log.info("2. read file"); - try (InputStream is = readFromPrivate.read(ReadRequest.forDefaultPrivate(john, "root.txt"))) { + /* + try (InputStream is = readFromPrivate + .read(ReadRequest.forDefaultPrivate(john, filename))) { } assertThat(Arrays.equals(password, copyOfPassword)).isFalse(); -*/ + */ + + /** * Test clearance after list of files */ From 92cbaa5d6b72050fae328960fcb19169aa8a9e35 Mon Sep 17 00:00:00 2001 From: Maxim Grischenko Date: Mon, 14 Oct 2019 08:39:51 +0200 Subject: [PATCH 197/255] vulerability fix compress version --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 1b03a17a9..dacc3d19f 100644 --- a/pom.xml +++ b/pom.xml @@ -94,7 +94,7 @@ 3.12.2 2.25.1 2.22.1 - 1.18 + 1.19 UTF-8 false 1.8 From b1901f0a313612d96d16a68f36f68b167b7704f1 Mon Sep 17 00:00:00 2001 From: psp Date: Mon, 14 Oct 2019 11:11:23 +0200 Subject: [PATCH 198/255] DOC-279 fix read test --- .../business/impl/e2e/BasicFunctionalityTest.java | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/BasicFunctionalityTest.java b/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/BasicFunctionalityTest.java index f8490abaa..565ee4cb9 100644 --- a/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/BasicFunctionalityTest.java +++ b/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/BasicFunctionalityTest.java @@ -51,11 +51,9 @@ class BasicFunctionalityTest extends BaseE2ETest { /** * - * Hi Valentyn, - * I cant get it to run. But this has nothing to do with the new ReadKeyPassword. - * Even if I uncomment line 70, the reading always fails and I dont know why. - * I am doing it like I am doing it in the SimpleDatasafeAdapter. Here seems to be - * something really creepy. + * In this test, password is provided as char[]. + * This means after every operation, the password in cleared. + * This is tested for read/write/list/remove * */ @SneakyThrows @@ -70,8 +68,6 @@ void testDFSPasswordClearance(WithStorageProvider.StorageDescriptor descriptor) char[] password = passwordString.toCharArray(); char[] copyOfPassword = Arrays.copyOf(password, password.length); ReadKeyPassword readKeyPassword = new ReadKeyPassword(password); - // readKeyPassword = ReadKeyPasswordTestFactory.getForString(passwordString); - john = registerUser(userJohn.getValue(), readKeyPassword); assertThat(profileRetrievalService.userExists(userJohn)).isTrue(); @@ -99,12 +95,11 @@ void testDFSPasswordClearance(WithStorageProvider.StorageDescriptor descriptor) System.arraycopy(copyOfPassword, 0, password, 0, copyOfPassword.length); log.info("password recovered"); log.info("2. read file"); - /* try (InputStream is = readFromPrivate .read(ReadRequest.forDefaultPrivate(john, filename))) { + assertThat(is).hasContent(content); } assertThat(Arrays.equals(password, copyOfPassword)).isFalse(); - */ /** @@ -130,7 +125,7 @@ void testDFSPasswordClearance(WithStorageProvider.StorageDescriptor descriptor) System.arraycopy(copyOfPassword, 0, password, 0, copyOfPassword.length); log.info("password recovered"); log.info("4. remove file"); - removeFromPrivate.remove(RemoveRequest.forDefaultPrivate(john, new Uri("root.txt"))); + removeFromPrivate.remove(RemoveRequest.forDefaultPrivate(john, new Uri(filename))); assertThat(Arrays.equals(password, copyOfPassword)).isFalse(); From f606399d71b646d827b23346aa64e5c5222553a3 Mon Sep 17 00:00:00 2001 From: psp Date: Mon, 14 Oct 2019 12:34:15 +0200 Subject: [PATCH 199/255] DOC-279 --- .../impl/e2e/BasicFunctionalityTest.java | 9 +++- datasafe-types-api/pom.xml | 5 ++ .../api/types/BaseTypePasswordString.java | 53 ++++++++++--------- .../BaseTypePasswordStringException.java | 8 +++ .../types/api/types/ReadStorePassword.java | 9 +++- .../datasafe/types/api/utils/Obfuscate.java | 36 +++++++++++++ .../types/api/types/ReadKeyPasswordTest.java | 11 ++++ .../types/api/utils/ObfuscateTest.java | 21 ++++++++ 8 files changed, 125 insertions(+), 27 deletions(-) create mode 100644 datasafe-types-api/src/main/java/de/adorsys/datasafe/types/api/types/BaseTypePasswordStringException.java diff --git a/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/BasicFunctionalityTest.java b/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/BasicFunctionalityTest.java index 565ee4cb9..3d7d38aa4 100644 --- a/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/BasicFunctionalityTest.java +++ b/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/BasicFunctionalityTest.java @@ -4,6 +4,7 @@ import de.adorsys.datasafe.business.impl.service.DefaultDatasafeServices; import de.adorsys.datasafe.encrypiton.api.types.UserID; import de.adorsys.datasafe.encrypiton.api.types.UserIDAuth; +import de.adorsys.datasafe.types.api.types.BaseTypePasswordStringException; import de.adorsys.datasafe.types.api.types.ReadKeyPassword; import de.adorsys.datasafe.storage.api.StorageService; import de.adorsys.datasafe.teststorage.WithStorageProvider; @@ -93,6 +94,7 @@ void testDFSPasswordClearance(WithStorageProvider.StorageDescriptor descriptor) */ // recover password System.arraycopy(copyOfPassword, 0, password, 0, copyOfPassword.length); + john = new UserIDAuth(john.getUserID(), new ReadKeyPassword(password)); log.info("password recovered"); log.info("2. read file"); try (InputStream is = readFromPrivate @@ -107,6 +109,7 @@ void testDFSPasswordClearance(WithStorageProvider.StorageDescriptor descriptor) */ // recover password System.arraycopy(copyOfPassword, 0, password, 0, copyOfPassword.length); + john = new UserIDAuth(john.getUserID(), new ReadKeyPassword(password)); log.info("password recovered"); log.info("3. list files"); try (Stream> list = listPrivate.list(ListRequest.forDefaultPrivate(john, new Uri("/")))) { @@ -123,18 +126,22 @@ void testDFSPasswordClearance(WithStorageProvider.StorageDescriptor descriptor) */ // recover password System.arraycopy(copyOfPassword, 0, password, 0, copyOfPassword.length); + john = new UserIDAuth(john.getUserID(), new ReadKeyPassword(password)); log.info("password recovered"); log.info("4. remove file"); removeFromPrivate.remove(RemoveRequest.forDefaultPrivate(john, new Uri(filename))); assertThat(Arrays.equals(password, copyOfPassword)).isFalse(); + assertThrows(BaseTypePasswordStringException.class, () -> john.getReadKeyPassword().getValue()); /** * Test clearance after removal of user */ - assertThrows(UnrecoverableKeyException.class, () -> profileRemovalService.deregister(john)); +// profileRemovalService.deregister(john); +// assertThrows(UnrecoverableKeyException.class, () -> profileRemovalService.deregister(john)); // recover password System.arraycopy(copyOfPassword, 0, password, 0, copyOfPassword.length); + john = new UserIDAuth(john.getUserID(), new ReadKeyPassword(password)); log.info("password recovered"); log.info("5. remove user"); profileRemovalService.deregister(john); diff --git a/datasafe-types-api/pom.xml b/datasafe-types-api/pom.xml index 41b45c09b..7b388940d 100644 --- a/datasafe-types-api/pom.xml +++ b/datasafe-types-api/pom.xml @@ -67,6 +67,11 @@ ${assertj.version} test + + org.junit.jupiter + junit-jupiter-api + test + diff --git a/datasafe-types-api/src/main/java/de/adorsys/datasafe/types/api/types/BaseTypePasswordString.java b/datasafe-types-api/src/main/java/de/adorsys/datasafe/types/api/types/BaseTypePasswordString.java index 098ef2271..06f06fd8e 100644 --- a/datasafe-types-api/src/main/java/de/adorsys/datasafe/types/api/types/BaseTypePasswordString.java +++ b/datasafe-types-api/src/main/java/de/adorsys/datasafe/types/api/types/BaseTypePasswordString.java @@ -1,33 +1,26 @@ package de.adorsys.datasafe.types.api.types; -import lombok.*; +import de.adorsys.datasafe.types.api.utils.Obfuscate; +import lombok.EqualsAndHashCode; +import lombok.RequiredArgsConstructor; +import lombok.ToString; import lombok.extern.slf4j.Slf4j; import java.util.Arrays; +import java.util.concurrent.atomic.AtomicBoolean; import java.util.function.Supplier; /** * Wrapper for password sensitive data. */ @Slf4j -@Getter @RequiredArgsConstructor @EqualsAndHashCode @ToString public class BaseTypePasswordString { private char[] value; - private boolean toBeCleared = true; - - /** - * - * @param value string stays in memory - * until gc is called. - * please user other constructor. - */ - protected BaseTypePasswordString(String value) { - this.value = value.toCharArray(); - toBeCleared = false; - } + private AtomicBoolean toBeCleared = new AtomicBoolean(true); + private AtomicBoolean cleared = new AtomicBoolean(false); /** * ATTENTION @@ -40,7 +33,8 @@ protected BaseTypePasswordString(String value) { */ public BaseTypePasswordString(char[] value) { this.value = value; - toBeCleared = true; + toBeCleared.set(true); + cleared.set(false); } /** @@ -50,26 +44,35 @@ public BaseTypePasswordString(char[] value) { */ public BaseTypePasswordString(Supplier value) { this.value = value.get(); - toBeCleared = false; + toBeCleared.set(false); + cleared.set(false); } /** - * Hi Valentyn, dont understand synchronized in this context. - * Java synchronized is too expensive, as there may run several threads - * all using a password. synchronizing with user not possible as - * user is not known here. So how should I synchronize ? + * clears the char array */ public void clear() { - if (toBeCleared) { - log.warn("CLEAR PASSWORD {}", this.getClass().getSimpleName()); - Arrays.fill(value, '0'); + synchronized (value) { + if (toBeCleared.get()) { + cleared.set(true); + log.debug("CLEAR PASSWORD {}", this.getClass().getSimpleName()); + Arrays.fill(value, '0'); + } + } + } + + public char[] getValue() { + synchronized (value) { + if (cleared.get()) { + throw new BaseTypePasswordStringException("Password was cleared before and must not be reused"); + } + return value; } } @Override public String toString() { - return "BaseTypePasswordString{-not-supported-yet}"; - // return "BaseTypePasswordString{" + Obfuscate.secureSensitive(getValue()) + "}"; + return "BaseTypePasswordString{" + Obfuscate.secureSensitiveChar(getValue()) + "}"; } } diff --git a/datasafe-types-api/src/main/java/de/adorsys/datasafe/types/api/types/BaseTypePasswordStringException.java b/datasafe-types-api/src/main/java/de/adorsys/datasafe/types/api/types/BaseTypePasswordStringException.java new file mode 100644 index 000000000..91ec89c38 --- /dev/null +++ b/datasafe-types-api/src/main/java/de/adorsys/datasafe/types/api/types/BaseTypePasswordStringException.java @@ -0,0 +1,8 @@ +package de.adorsys.datasafe.types.api.types; + + +public class BaseTypePasswordStringException extends RuntimeException { + public BaseTypePasswordStringException(String message) { + super(message); + } +} diff --git a/datasafe-types-api/src/main/java/de/adorsys/datasafe/types/api/types/ReadStorePassword.java b/datasafe-types-api/src/main/java/de/adorsys/datasafe/types/api/types/ReadStorePassword.java index 496f42c94..8dd1f0718 100644 --- a/datasafe-types-api/src/main/java/de/adorsys/datasafe/types/api/types/ReadStorePassword.java +++ b/datasafe-types-api/src/main/java/de/adorsys/datasafe/types/api/types/ReadStorePassword.java @@ -1,11 +1,18 @@ package de.adorsys.datasafe.types.api.types; +import java.util.function.Supplier; + /** * Wrapper for keystore serialization/deserialization password as well as password for reading public keys. */ public class ReadStorePassword extends BaseTypePasswordString { public ReadStorePassword(String readStorePassword) { - super(readStorePassword); + super(new Supplier() { + @Override + public char[] get() { + return readStorePassword.toCharArray(); + } + }); } } diff --git a/datasafe-types-api/src/main/java/de/adorsys/datasafe/types/api/utils/Obfuscate.java b/datasafe-types-api/src/main/java/de/adorsys/datasafe/types/api/utils/Obfuscate.java index 4402f6d5c..32cd11c74 100644 --- a/datasafe-types-api/src/main/java/de/adorsys/datasafe/types/api/utils/Obfuscate.java +++ b/datasafe-types-api/src/main/java/de/adorsys/datasafe/types/api/utils/Obfuscate.java @@ -3,6 +3,7 @@ import lombok.SneakyThrows; import lombok.experimental.UtilityClass; +import java.nio.charset.Charset; import java.nio.charset.StandardCharsets; import java.security.MessageDigest; import java.util.Base64; @@ -73,6 +74,32 @@ public static String secure(String value) { return computeSha(value); } + /** + * Method has slightly other name as secureSensitive, + * because is call sometimes with null and thus can not + * be clearly assigned. + * + * By default, protects highly sensitive data, but allows to log it using SECURE_SENSITIVE property. + * @param value Its toString() result will get encrypted. + * @return Secured string value that is safe to log. + * + */ + public static String secureSensitiveChar(char[] value) { + if (value == null) { + return null; + } + + if (isDisabled(secureLogs) && isDisabled(secureSensitive)) { + return new String(value); + } + + if ("hash".equalsIgnoreCase(secureSensitive)) { + return "hash:" + computeShaChar(value).substring(0, 4); + } + + return "****"; + } + /** * By default, protects highly sensitive data, but allows to log it using SECURE_SENSITIVE property. * @param value Its toString() result will get encrypted. @@ -100,6 +127,15 @@ private static String computeSha(String s) { return encoder.encodeToString(hash); } + private static String computeShaChar(char[] s) { + byte[] originalBytes = new byte[s.length]; + for (int i = 0; i < s.length; i++) { + originalBytes[i] = (byte) s[i]; + } + byte[] hash = getDigest().digest(originalBytes); + return encoder.encodeToString(hash); + } + private static boolean isDisabled(String value) { return "0".equals(value) || "false".equalsIgnoreCase(value) diff --git a/datasafe-types-api/src/test/java/de/adorsys/datasafe/types/api/types/ReadKeyPasswordTest.java b/datasafe-types-api/src/test/java/de/adorsys/datasafe/types/api/types/ReadKeyPasswordTest.java index ab44be682..79b856bea 100644 --- a/datasafe-types-api/src/test/java/de/adorsys/datasafe/types/api/types/ReadKeyPasswordTest.java +++ b/datasafe-types-api/src/test/java/de/adorsys/datasafe/types/api/types/ReadKeyPasswordTest.java @@ -7,6 +7,8 @@ import java.util.Arrays; import java.util.function.Supplier; +import static org.junit.jupiter.api.Assertions.assertThrows; + public class ReadKeyPasswordTest { String passwordString = "a password that should be nullyfied"; @@ -66,4 +68,13 @@ public void overwriteString() { s.toCharArray()[0] = 'P'; Assertions.assertThat(s.equals("Peter")).isFalse(); } + + + @Test + public void useOnceOnly() { + ReadKeyPassword readKeyPassword = new ReadKeyPassword("peter".toCharArray()); + readKeyPassword.clear(); + assertThrows(BaseTypePasswordStringException.class, () -> readKeyPassword.getValue()); + } + } diff --git a/datasafe-types-api/src/test/java/de/adorsys/datasafe/types/api/utils/ObfuscateTest.java b/datasafe-types-api/src/test/java/de/adorsys/datasafe/types/api/utils/ObfuscateTest.java index 77a7911ad..80ab089b8 100644 --- a/datasafe-types-api/src/test/java/de/adorsys/datasafe/types/api/utils/ObfuscateTest.java +++ b/datasafe-types-api/src/test/java/de/adorsys/datasafe/types/api/utils/ObfuscateTest.java @@ -1,6 +1,10 @@ package de.adorsys.datasafe.types.api.utils; +import com.sun.xml.internal.ws.policy.AssertionSet; import de.adorsys.datasafe.types.api.resource.Uri; +import de.adorsys.datasafe.types.api.types.ReadKeyPassword; +import de.adorsys.datasafe.types.api.types.ReadKeyPasswordTest; +import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; import static org.assertj.core.api.Assertions.assertThat; @@ -121,4 +125,21 @@ void hidingSecretEmpty() { Obfuscate.secureSensitive = ""; assertThat(Obfuscate.secureSensitive(TEST_STRING)).isEqualTo("****"); } + + @Test + void obfuscateCharOn() { + ReadKeyPassword readKeyPassword = ReadKeyPasswordTestFactory.getForString(TEST_STRING); + Obfuscate.secureSensitive = ""; + Assertions.assertTrue(readKeyPassword.toString().contains("****")); + Assertions.assertFalse(readKeyPassword.toString().contains(TEST_STRING)); + } + + @Test + void obfuscateCharOFF() { + ReadKeyPassword readKeyPassword = ReadKeyPasswordTestFactory.getForString(TEST_STRING); + Obfuscate.secureSensitive = "OFF"; + Obfuscate.secureLogs = "OFF"; + Assertions.assertFalse(readKeyPassword.toString().contains("****")); + Assertions.assertTrue(readKeyPassword.toString().contains(TEST_STRING)); + } } From da6844ec715249426ec2f6d28c16d5022c70fd19 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan-Otto=20Kr=C3=B6pke?= Date: Mon, 14 Oct 2019 13:20:08 +0200 Subject: [PATCH 200/255] Encrypt travis env as requested --- .travis.yml | 15 +++++++++++++++ .travis/sign.gpg.enc | Bin 0 -> 6608 bytes 2 files changed, 15 insertions(+) create mode 100644 .travis/sign.gpg.enc diff --git a/.travis.yml b/.travis.yml index ba47eae9a..11c1918d5 100644 --- a/.travis.yml +++ b/.travis.yml @@ -11,6 +11,18 @@ env: # This is a convenience variable for shortening download commands - GRAVIS="https://raw.githubusercontent.com/DanySK/Gravis-CI/master/" - JDK="graalvm@19.2.0" + # DOCKERHUB_USER + - secure: "VfQm2li2nQueRUtyVnV+BDaIjp27ydXltWsoYIZha0MdkItAnhdmQSvICKjD1PCr4kI17o1lPnUPhX1khBUWpQftPFCAcD1bbeAW0AHRVtF2fWL460R+o3C93jqlqKYczo7DWr4nKaMQ0HDZEGa1QcMuyeQA1S4CGdPmrkHk3N5PAflFF1myrCUSCzqV8+lp0w4CxCdScVYGYlQwahdLHrLNZbCo/Nxiex5XrOYrqLTaU98EoxmKlZaR4klg2/pJENgZ6NbZb8JfFaPkEYsmF5z4w2Cf5mp9PPJLnBuKLO/zhKTXpjz2hjhGpncEqFTHrxIpoY/jFrewB5t09a9lykpFHlXpvujZq1S7xNzOBTj9X6TnU4oyK1oteb6CW9A+hpyJVPPMQ2JrrkKzTaEQpel5q45unthStdvAVvl/BjrjVpzffbnaLXKomTzKjuW7VW3Q5mVIRD7UBVAn2izszaN2Lp05JKKxk+aYAsvywCL/bopI/nsugZz9mOhTFq7uf2Cvj6Ku6Hmzh/7fp/0no0tLr251a9nN7yoe2xbwL/524lnyQd2lHcwWfleCbwPFoZUtg+qBUXqf0EiRp6xj7fnl3kK/crXWcsWyrru33EgbRjuRzZVA2ShGVs9Yb8cKalXHouZ2deWwhxuk+Kb5BR8DM3PY9ThUZSU6tv4V0RY=" + # DOCKERHUB_PASS + - secure: "wvFxLpbykOGuiuqqRUhsR/A9ErCSRO5GzRGxj/9wjehl6jQOQTAmN3Dtk3uO9cS/RfXjLpPZcJ4IVQ9QbEd/HCfJ46CzRfyMwCb8vP2N/wUiSqsun/0ev4lviOfI0j0vciKuB8VeWg5/ASfjznfehPcexOgOfbG61Apv7KS76SsfNLEiGFbszrq8tD1bVsdpT9CT+SiqpI1PCv1PIvQaC0CBkjCGNKbTGc1H4Hrd+OzVMP8qT/BkuSNxtvZABaRFht5+aF47X6M3PsqbOCHe1kiMkk5OHtQ0CRMJM/gP4xsQcR6bk5QTYmJZF7qD1tSXRzL8Yo3UbgBW3xz/eftDPCmbRRHBCPICjHle2w3jowgtOlkNtyeJJbz6yWSL1+ZOljuFHTiXIkXE+EAW/4CMroWH4EuzWo/2XeZCmkRmZe0dTxaMhrFLwXq0SJG/CaOP3mNSf04bNd/voga/zdD3jBMGPebEbwqoYvdXE/4sj6f0THznjvroT4AyrDvHkrBA78X3eeK/JPVyRtpbLsybVLoaxWha4rDgS4Dk5K/9uQqRJJruiSGZeBxLhA4yw+8M+KqIh7CV4gy1DZZspiZ5ST3AyY8K7OSMp7948awhy9xSJW7Hue7CoHBrDaJ59LEs4rE8JTU/HmcOLU+JA/J9hqOHEzFvyj4OFdb0h6gShoo=" + # GPG_OWNERTRUST + - secure: "n9KkPGeKC7+ZxJQ58eyi8LGPJPZt+kWg2uYr0CpBda9qiVlGsh+CkTi89P2KB0/ZZl3uOpESPkZK/Xx4avfIwt3FW5/Mm6dxOofkJOGmAvLniwnKkvXoVGWAUM+4izNTyoGKBZdJy9CThy18DVCLREeY5sADfbRXVriNQwMXJotKMOAuiuumfBL/J748Ky+upDTgPcaTKHqrfzBUuBnpKT6v7jpStNhz5V/DpQxOpj+UXh5KQFZqrSSaLLRsfqNWYEPNF4879eZHkLrMuwuzQRHgeWH6TAq4dAbnAHezpuOxkkdzn1IKAa42fj/yOVlSu7VceN1i2UiO0n2cFczzUyOZR0xDMZOjkbvxWPoy5DXgvwqegIUO4m7hAabqWACWdZNCRAbcM/gcf1roKzizlZcafHe0xdVyvlMEfPJxGuxh1HKbN6DO2YHT/fnxWn/VHMUa/l01vfObqsD9oba934Mhx5Hum+pddy2/jExGLQptZorjuGhz5KZbwSWQnPsVvoyyUEcR4olPsWMyh8gyHbUxsjVU73v3AqAKO2XVq8QxQFBSite+1qQMT0mdPIpSQ+6m4E7UJioTvXG+E4CWFpFaeBS5wNqkd4fgG2kFibxNiTYQbIzbCJvntzlnNb7RuRjveUW7G401JZ0sUSnzEPAHOUDI40wilOg2gJdrbvo=" + # GPG_PASSPHRASE + - secure: "JZ82Y6sOmIUvfl9nS+z2HdYEVf9mFenur3gCB7pD4USVvGHoA4KjX//eLjLv5drAoqKJL6WDXuzzLYip+m9RTO4dR8RUxatZj7vPusuMBgwTV+1+HpyhHgaSS6ZF2ZXS0okbjjtHf+i6xb9nAF6pMtHWDZ8Oq9wzGGjK+5gSvWwKhiD1sQgf8xqGJxRnSqpSu49SohvqAPKDyoxJgqiOTmj/i9eL+ksRlRl53rMSrPSufsugvmZbVOoGVVApYfUXqjKRrayXYMEWhbS7YwmayGQzkOFkCQXPZigrmpeZTcoqODiNkX0H3/OASiLWDbKJ5zkhqj//7MvvG6P1fe/OIQtpvBKEI3DktPVtH5PsYbTzzuy9xaz/D2OOz3JOJfSqYAukBg9sPN7J89rWN5EXzAj4o5Mhzhnh5ct5htLmc+clm+yrU0ksZoM7DsxVfx0mY+LsqOF9difKS2plLfg/QLjkJ+Ubtf+J+DH+b1INPPzgSJyqQaIo/tqfgyxVHORnkRXPeEZCp0aiDgF84jOKJLYd2B27CMr9XmYuCdoLgjbBiAWGyKCJE+aj39XuS7e8sfX0ZEM67c+keJM9SUo3CsOQHQNDb+ytTvIJnxpAk7PE8+j4+KpY0Wo7Ut2qOf6cAcEBx4nU5y8l/nqic/ix8r1YIuDOu/rEBQ/SobhMiW0=" + # SONATYPE_USERNAME + - secure: "Wbz/yQlH37OylRBeEFBAreX1vtqaOFOVHGLb0ajGPXpJrgds+g72DvXpCXuomGQSKW398hRfCbsBWIQn682+KYQfubsMcnQyP8JcRzA/0UcjUTKD/AKDPP05luDuaffNL8iRI8rJbFOHim+GXHPz4yoKUNpeb3RONWZotPTgkCTEDrSiKi/OV46/vqADpacPefx7Gkg0UfpRYJSgifgbVaRELLkrwMnHnYVa4MIPLH7K8ah2e5hbTd/FpqQAhsUtf+TvMG90hUk3V53NFdpgxZhRpY/jKrBLyQqz7CcIHNc/l4QyoXm6RL0bsw4zSwamU+QcBqU+V9QWROAwYLu1zYm1Xv/7MzDumVuuoJy659a5I5Klt9y8u9NT8YS6Fx+3skRk/YlG2NwEBcDgU1qHS+AXNNSSaUCw1S/ujfkAmf928R0gOsDz/CJdZzOTGH4TU+grxI/jnLw5evEu78SrhB8vIczjgF/k2rP8J+KGZp6WrOix/pR4ICemAuq7XiV8cbcWErQ+r5vkydmKids35eQYbUBK+xxlNX8q6knGmhBAwN54JOIqYTQjU99c1mJ9fBTcCL8Y9fcYA2Xf9mOzEixubDMx4YMX79jAtaK0LV2GbwzeICeSt0JRkNUo/SddnFiH4i1CGwHqPVgGg7mVUnww9fsH4RTlStt2zqgv7Hs=" + # SONATYPE_PASSWORD + - secure: "oebfC3waGcAT2EHktIW/eBAyO95/lQmwWH++3ilrmufiXcsUOv7Ud5qZMsElyzYIdbQ5GUlThQEh4NHgyyCvM5V25urqpl5MsnVmRxBpJ4LWEaKpk5o8z/2nw5Ws97MiNvpVkKDSqI9tId+2G7EHb/be5294GgSSbcCpHMN/tPGSRMtLm09cU54nKAVxuUAYtxEBgZypJnORHM5Q+kgjTONdmtjgDPiRZhgWciSa2NgrDjMfOx6S6q15l7hHNqRXhWZox118wGDMEvdu/EdPzPsxXOOzvWRTQJSk3TBlWMMxompjd8JtLaoIyBRGiO8y70L6PyPwXpSpuvKg7evmXa5usHdiTm4Rvpq9Y8waDgyxWuV/TES2QRj620pKq/z+BovRhKcgOHNprEDcR1eDJtJ27FQXSosZTK4LQuOYq6zntKKztQtfIHa1wa5peIts1EFRiVwRi0KrP0UwewBkb8aYHbkkj2t6jgNJZB4HGBxBKcwgloHoZmVqhL12MULnB3QWx48nPVhhqXqDXX2qMvg/G2nLgdnKkzkbBWOIssG0wMs6+QSVFInWZ5/VflSxlZ3hAuqX+Dbily1qzFzBST7d2WohUlZDp+8pZ7IjeTcSHbVvS7RHj+FMpn1KxF+RwB79R6yit9LcKbB+rytFwvjP9swFrrpRN8DkGrhHpMo=" ### This section represents primary build actions before_install: @@ -29,6 +41,9 @@ script: # make frontend available for REST-docker - cd frontend/datasafe-ui && ng build --deploy-url /static/ --base-href /static/ && mv dist ../../datasafe-rest-impl/target/dist && cd ../.. +before_deploy: + - openssl aes-256-cbc -K $encrypted_f1acb3064675_key -iv $encrypted_f1acb3064675_iv -in .travis/sign.gpg.enc -out .travis/sign.gpg -d + deploy: - provider: script skip_cleanup: true diff --git a/.travis/sign.gpg.enc b/.travis/sign.gpg.enc new file mode 100644 index 0000000000000000000000000000000000000000..2324723e84a7f01bc04bc507f5b5e8a52334707a GIT binary patch literal 6608 zcmV;>887B#+|%c%n*sn15(~7gSF=z^0TgX@5&M&C+EAg|p0ZGOE=ae=s0GGtXp^WS zEw4Z=>Gr>R@9{V54m0?|$90R9#v)tgr%?2&#YcAxhTa{I?*aF#YdsN$q5sk`8ej6n zHd=82fv>|Y{Ch8?;OBf|E@H*v#6NP$%|qRNS!MnfJdWO|OrL@L)LVT2JUc~rctpO; z6o!skgYyL_^n7XT(8gLCzXhH6Iwq9H8?9O2*0r7ZWDmG(^+8a4Pa`-)D{%jC#&Cx6r!4Xl+lW>K4Jn`Wvmg!-7Qj@o|f$oY<9t)W$u`GZXxI>V5%)H^8-JWc4mEXWKl>4V zD>2RLZW0`2?dDtbw}s0k6@!wxTy|2_OuTt;88-rJ9rFxpqodlP6dzl3#STBO|FSrb z=JC>*@VYApqo=r?IOlhPKoW+lJW$YPDA+b&3CwuO*!dg@0YRTiXpt2XUdA$79WNt@ z6M8g&4;laj`H>5zjH@CUE4@eDNW1f~tCW|p_HaFw!$Vti(qsLVBwRWx;Tj#pCaTOZ z5FM8Tb4Lk%DEp6d^+D|F$W!;`!g;tsCSeF_dy zUo>EVRNc1M(slk=5F)VLP~ml-`~=pMYzo}AZE5w`03SPLoLm+Ke-Wl6-1tOOV~y1z zgsDxJ>*8xM5BJd)9jCRP)6h`kGk#f+6;Ry6tw}GgIR7r-Yc5;gn^?hT=2z5SB!`^- z=ou|PTrhmA(?CYkL2v{LJ^nt?{^|)hiAom7h~jwM0f;X8QlnpP>)(HLxwbyb>}(_k zSbskaJIUr~IN;W2NTSdAjoVVlJPFFcvchq&(5DD~G znX~iBG&g7Cne8O^XeO6QM3Vu%vgZ8d*zOfB2svi_TDy%lQV`;IvOgP7>`XG30#XdD z(rYmTC>%J%nKEb&?N;;3K7I>AV8RQG5`!VAUj{eEmCY}!=tY%JXnKajxMtssdWNE$7!QF5#p68?<9!In!o{QNAkqDUGHeIBccuR;Lg0LF?mrsd z1=6(-8=$y6dz>v36*Sg!@84r8=+1sZ*DuecI--|C1h(+yrNB?;2uQNi+L}|YcyuYz zuu_OgVyp<4WZyRccw8Vovi&uE=*<=eKr#a@Du{p^YYfgd_;fOl{DLv~n}^E~w?Jf} zY!M}RDcrFyW|_EA92{yfcyPN-(0z_up`ZJ69=YOHcPp5D(oTH7a=Q`{(T&NYTwkj= zH6MRx9Wce0{tep0sX6xea{r;%bOX41!`khPSYQaM-AE6umFE}+6+$smDp>su&;R1L zx(y9Hex6B6xz-4rL~62#P4`8j$#EQ9jL`fjcyD3`ej13t(=GL)`#&k zEo_soiRx_7808v8K>f>Iu%@C4@ODPdV=1K?R}f`&63nt|>Le^j5`Rl&NFj_XzeG%L zbeqt7X$_no_|NuBy?<6s<&_bgB0`RNX41I_5 z#C_hn`Z~p)c@^vDOZ<$p?Vh40pF5<1OKDXl&>zQXZd7*w=|X&4l5Dkk1qVK>~HOI4F6l z|4@jl4v>dkrtUR8bo*W7k_418+ihogJ-oFOF;!mh z%5ajb0zZ%)HBENf!gi#eQjvBgl#K_{<#y|~LvbftcH#0sh$o~ZNP!xl@b%K5M zJenG> zr6d9z*Ru`KpyF#YiYgi-s}IF!o3fsnX`{D^UF%!yD}6XQw(JnFif0QpSU9lfZ2PjT zvAdjV+xgm*=fYIxwmlM$rnsCIh|M}G!}9YSZFqK}>fFdjTb$Ig{#cD=(TL!p;;2gf zh*HStzQPPt#vc^HiG&SLGUTA4(To+6bYaSz1fI#sAVu=#hiZ~HC977eR9}% z#+cjB$#hOK_?utfvT0$E4@w^~)Bf<_EKrwrM0V3Vi$lSFSV)rZX_VNCL%TcDyB+2k zBlBfun(}^LMkt`z*p|eC5zXd!=f&5K5VaWO%TBC0~p!t7I`VDiFY3^E6W#N1N|e z0`TO%eAHDh*yzu2eoPfMQ+pG&tDKmUNwaGlEDaVQ1*-)q?Now?TKod%g$r72{)>-# zln2L0*I&t$uWi@B;u*J_!tw2gn`qbD@w{u_adqi`^S2=+TWSaE{fEe%vE|Up z4N`^@mY7F3^xE8#5spr@lR{|8Ef%c7We5K%;CJC!BdM2BTj;yxfXfYWGM}5n=NX*z zD7Bda{e9XO-GW0_Y?etmz}lPXmKD8*Smtkey36iui1yQxC~q^c(@Y0*oRb@K3MEom zi%|<)tc%rlgcLe{`+|wh%AL3b6p6IyAa_GV%H4#mS2Lv>`;@S~gxC^5MJ(mUB_?Xd zK7dwpZ>m; zTkN@Ewk)_N!N%tH2+{+S9%a%B906uSMsmTc1YX6Eq_Vd1Y9kg##vPdKa?bdTi){Li zvrX->9wS=$QM2WXvFF@~JKNvlv54-oL`T(vpja)FAilG-}YRT&p*-fds7ZnW+k5-n}o!|ow z*K{pz>>!MVk41}B{7XGi_?d+51uuiQ(3&~&9I&?6!!eLklir#Uk$664Fm5v4{N3Z#+ajj+c`WC zw4AZicH{UUH=J~V#L$Q5!Gn4E&8T#qi|l%RP_G^)`Mm%xxd5zpD<6%c@2S9)@yiIj zOZIGEcZ6}YeZdh>j3ysTIf!lD&XO`SVnyf6)@wNgbWqh>Mct*l60h2v@$QIZ$4aKS zv&l}AK#BC#kAtm3%zwbsFUfXrEXUI_Zr9rWy@WG%ff}Vp4T4W9De4dtF<_N@X~axG z#T6_kK#Y}dDhWHh`^Ls?D+~Tft@Z#9nznu!@OD_7pWG7-T{d=hGB-$1(wEvH~~1e)*gdz0UH!xdgI{3I_(>M!M0EVM?~4kGIS%xQ8F>aP!lYKhnnyKpmM6<_3nP_R}=;c>E95aP`C81RotH@rsx|NA4xAJ9G>V)fXE~f zg{;TJM~D|CVqmX1StSa$YIcej`?L4YOX-8k-M?YAEPyR|a~v`YO37XXYv|3>;fE{PTMqF=7*fd|b^ zw7{e#9b090KQs)e8k@ppA#`G3>{O%lNP*WNa_0G1(4cV9t=6~X#k6)Vh)|3w)2IT63eFOB}Uqj;$u1-AFxuhd?%%S zmcoSz#HsnNO3DjtjvSbx)XssUy+^d#k<26|bg8Tl&5$|HK3(KhnFPUst56WEVK3`O zYwB(v+gq}55}0v}jG#vqR{-X`I-{)xB?DS+zb!rBTV9Y7Fh} zgY>ViL8rNtIK=_S#%vk?Y!0$6aS=On^Pen9A*rv1DkC*;oUn^r%Rcg1MOSksg%bjB z{RAc!Yf)`CPb=QR<6dzb95UsotV~$#8`{-V??TP^tQVE`cvUmxA&4ZtZJ^a&>YHKW=q9F{$M~25neWmSj-4%d(zw|T+Ipn^@w^){30;l+KPc3NUTzV{r z)G!!USCG~uBS)EfB>0kv4J2AZ98Eeb9J=(ff=~IM06*eI=3Dyo{vOQ=2)_5Zn0D36 zxapEFWLxl==qPc@s}@EnBlOnwRJ`Ce+b;VePZK5U79m+1WZ$;#yrgDgm!~|$$+xwq ztE84+FoSMf=CC{FRNkH!H0jAd*ay+lG;bPQqD^)-dpI#kkn%#6KoQ%a)a=|3M?4Ki zab0TU&Gd-kZWCWVauk1`sZuMh(6;U6BENPuD3Jbs_*`|?xI*rey;H0aJGX`?CYL?X z_}J%aBoe38d?f^%S;zNX!i1%e%4GtEz`SAg;z_YVw9M1q zaY+HZEwmtiu5QLh0f+>Nx-Ddk?HmiT_!9(UEHYBGOupWu|GncfDf^SxM5Jv1H1wZ+ z^#xLiCz#y29ETshLIzsjM%J_&J#^1#Y6$owf^rze6HOavjl1U~!NT=_lcp3$JHd`y zYU6uI{DdJVOU2^CWFt=xB@QhcS^{hEzaWd-;ozCYnofk*r@uM6uR?$p62xlcBCwei z^8-lM90~_peP*I{Mm(ricty5_TQlr&7P_2W^VVk9@uD)oesVJ`wpH^a*jXvv$1X+b zb@L-pHGkl=U*Cb3bg@ZfJlamsO)m3w3h5?suI;Ha$(DWVD7EIRWVsD#x|E9A|u z%`}9BNgJN>EcyOKh5~o@Jx#5@Rb4eAtTHItvaq2dX(|B+L5MViIfbH5!_v_fXPk;< z=rV=miF*T7IfG~Zj1D(z$a$35Hm=x3QWck$uY5V|>P@dT6*G%c0eS)sId&LYgt4_K zhGGtJyd$STjves~F)TR0fkUEq8J?cB+lx~Q_jY6!NF$w5E&APtZgRu+g{&L|zgp2w zYTK>RgV<{ltgZIyMUu;0(5VNwpng8#NxEk3k44pdif;0S=8f|k6}(K4v^IaC#J@s< zMS39~>q)sa-NhmE!W*E3E0gCi4Qc4Wd+RFjE2&G2g@P3X*5hlM>9#bjl%ARdYADM1PSOmv>U81ANKC?eNYC{HhzZ7R=~K!$Adg&B_E(1U&4 z4So}Mr6Nku8+H>6T?9afN(jQZWzrFuuL=HU0Jb)rzp zF|qD9ARzB7x0Y<98)nO7EId~%HaKX(xcA?CqWW8MUBE4+@y6!HtbnS8^WMSdP=rVr zb4wtnD7M)f91+(M(x0BxKJd!NTj`s2TqT#!Zkyxh37XNxyMS+>YgsY4V%R;6k|dY( z^CJv`y8aY}tl0@p{f*zImIn?uKu~WPHX>q{15C3cc77K{`Byb%e_zcbO)1d#{$(W0 z`H;J|u@~D+Q2mUaGRLo|f)#NAo**RbmWC;{_M<>Tdo=a+wwjp;My|kOwU2FgZWMiP z@{ZVx)7MX1?9xqTUI}(0(w+cRz5;&j=p4AOucDqbG6^7Rw!YRoR?4!V@`M$=KT#RD zFMS3h1dSgatdWF6W#20ly&DAM8y^Ux`VJ5IB^sd5WAzn{Wk|`GT0SSnPv$_iLyNw} zIeZu2C6D+pcwkW1Pm0J?n{>AQqZP<;L4r?J816ZIk&rfxcr#wk#btsf82q<<%?UA8 zV&>frE&%#)2Y)>x%iVxM1p0VfULw1987Zo@RDWimi9dW4-a5zNX>La)f3~)EqA08j z>vL?UUksR`V=G149i_!v%dHeYJPKdC=u$-ph~beY#IIPrFX_z{#pZY>hm3IIvO7y% O@`|Z+C*51tYdJlMaK^j< literal 0 HcmV?d00001 From 231a8d9c783f3be8f543c0911c62123707c386a3 Mon Sep 17 00:00:00 2001 From: psp Date: Mon, 14 Oct 2019 13:39:39 +0200 Subject: [PATCH 201/255] DOC-279 fixed BaseTypePasswordStringException --- .../datasafe/business/impl/e2e/BasicFunctionalityTest.java | 3 +-- .../datasafe/types/api/types/BaseTypePasswordString.java | 2 ++ .../types/api/types/BaseTypePasswordStringException.java | 4 +++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/BasicFunctionalityTest.java b/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/BasicFunctionalityTest.java index 3d7d38aa4..f4ff48a02 100644 --- a/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/BasicFunctionalityTest.java +++ b/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/BasicFunctionalityTest.java @@ -137,8 +137,7 @@ void testDFSPasswordClearance(WithStorageProvider.StorageDescriptor descriptor) /** * Test clearance after removal of user */ -// profileRemovalService.deregister(john); -// assertThrows(UnrecoverableKeyException.class, () -> profileRemovalService.deregister(john)); + assertThrows(UnrecoverableKeyException.class, () -> profileRemovalService.deregister(john)); // recover password System.arraycopy(copyOfPassword, 0, password, 0, copyOfPassword.length); john = new UserIDAuth(john.getUserID(), new ReadKeyPassword(password)); diff --git a/datasafe-types-api/src/main/java/de/adorsys/datasafe/types/api/types/BaseTypePasswordString.java b/datasafe-types-api/src/main/java/de/adorsys/datasafe/types/api/types/BaseTypePasswordString.java index 06f06fd8e..0f939b961 100644 --- a/datasafe-types-api/src/main/java/de/adorsys/datasafe/types/api/types/BaseTypePasswordString.java +++ b/datasafe-types-api/src/main/java/de/adorsys/datasafe/types/api/types/BaseTypePasswordString.java @@ -3,6 +3,7 @@ import de.adorsys.datasafe.types.api.utils.Obfuscate; import lombok.EqualsAndHashCode; import lombok.RequiredArgsConstructor; +import lombok.SneakyThrows; import lombok.ToString; import lombok.extern.slf4j.Slf4j; @@ -62,6 +63,7 @@ public void clear() { } } + @SneakyThrows public char[] getValue() { synchronized (value) { if (cleared.get()) { diff --git a/datasafe-types-api/src/main/java/de/adorsys/datasafe/types/api/types/BaseTypePasswordStringException.java b/datasafe-types-api/src/main/java/de/adorsys/datasafe/types/api/types/BaseTypePasswordStringException.java index 91ec89c38..f8ecf1192 100644 --- a/datasafe-types-api/src/main/java/de/adorsys/datasafe/types/api/types/BaseTypePasswordStringException.java +++ b/datasafe-types-api/src/main/java/de/adorsys/datasafe/types/api/types/BaseTypePasswordStringException.java @@ -1,7 +1,9 @@ package de.adorsys.datasafe.types.api.types; -public class BaseTypePasswordStringException extends RuntimeException { +import java.security.UnrecoverableKeyException; + +public class BaseTypePasswordStringException extends UnrecoverableKeyException { public BaseTypePasswordStringException(String message) { super(message); } From 4f9c8cb2074d2018129ff8b4156bf4ffc37b903a Mon Sep 17 00:00:00 2001 From: Maxim Grischenko Date: Tue, 15 Oct 2019 09:42:41 +0200 Subject: [PATCH 202/255] try fix native-image build --- datasafe-cli/pom.xml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/datasafe-cli/pom.xml b/datasafe-cli/pom.xml index 336652111..ef8142628 100644 --- a/datasafe-cli/pom.xml +++ b/datasafe-cli/pom.xml @@ -166,9 +166,10 @@ --initialize-at-build-time=org.apache.http.pool.ConnPoolControl --initialize-at-run-time=org.bouncycastle.crypto.prng.SP800SecureRandom - --initialize-at-run-time=org.bouncycastle.crypto.CryptoServicesRegistrar --initialize-at-run-time=org.bouncycastle.jcajce.provider.drbg.DRBG$Default --initialize-at-run-time=org.bouncycastle.jcajce.provider.drbg.DRBG$NonceAndIV + + --delay-class-initialization-at-runtime=sun.security.provider.NativePRNG From 8b7cba106a0d5452dbc86e5d756dad179e5b59fc Mon Sep 17 00:00:00 2001 From: Maxim Grischenko Date: Tue, 15 Oct 2019 14:12:55 +0200 Subject: [PATCH 203/255] cli build fix --- datasafe-cli/pom.xml | 2 - .../datasafe-cli/reflect-config.json | 54 +++++++++++++++---- 2 files changed, 45 insertions(+), 11 deletions(-) diff --git a/datasafe-cli/pom.xml b/datasafe-cli/pom.xml index ef8142628..d1566e716 100644 --- a/datasafe-cli/pom.xml +++ b/datasafe-cli/pom.xml @@ -168,8 +168,6 @@ --initialize-at-run-time=org.bouncycastle.crypto.prng.SP800SecureRandom --initialize-at-run-time=org.bouncycastle.jcajce.provider.drbg.DRBG$Default --initialize-at-run-time=org.bouncycastle.jcajce.provider.drbg.DRBG$NonceAndIV - - --delay-class-initialization-at-runtime=sun.security.provider.NativePRNG diff --git a/datasafe-cli/src/main/resources/META-INF/native-image/de.adorsys/datasafe-cli/reflect-config.json b/datasafe-cli/src/main/resources/META-INF/native-image/de.adorsys/datasafe-cli/reflect-config.json index e78025fdf..cc86a94f7 100644 --- a/datasafe-cli/src/main/resources/META-INF/native-image/de.adorsys/datasafe-cli/reflect-config.json +++ b/datasafe-cli/src/main/resources/META-INF/native-image/de.adorsys/datasafe-cli/reflect-config.json @@ -432,6 +432,15 @@ } ] }, + { + "name": "org.bouncycastle.jcajce.provider.asymmetric.EdEC$Mappings", + "methods": [ + { + "name": "", + "parameterTypes": [] + } + ] + }, { "name": "org.bouncycastle.jcajce.provider.asymmetric.ElGamal$Mappings", "methods": [ @@ -499,6 +508,15 @@ } ] }, + { + "name": "org.bouncycastle.jcajce.provider.digest.Blake2s$Mappings", + "methods": [ + { + "name": "", + "parameterTypes": [] + } + ] + }, { "name": "org.bouncycastle.jcajce.provider.digest.DSTU7564$Mappings", "methods": [ @@ -823,6 +841,15 @@ } ] }, + { + "name": "org.bouncycastle.jcajce.provider.symmetric.GOST3412_2015$Mappings", + "methods": [ + { + "name": "", + "parameterTypes": [] + } + ] + }, { "name": "org.bouncycastle.jcajce.provider.symmetric.Grain128$Mappings", "methods": [ @@ -958,6 +985,15 @@ } ] }, + { + "name": "org.bouncycastle.jcajce.provider.symmetric.SCRYPT$Mappings", + "methods": [ + { + "name": "", + "parameterTypes": [] + } + ] + }, { "name": "org.bouncycastle.jcajce.provider.symmetric.SEED$Mappings", "methods": [ @@ -1093,6 +1129,15 @@ } ] }, + { + "name": "org.bouncycastle.jcajce.provider.symmetric.Zuc$Mappings", + "methods": [ + { + "name": "", + "parameterTypes": [] + } + ] + }, { "name": "java.security.AlgorithmParameterGeneratorSpi", "methods": [ @@ -1123,15 +1168,6 @@ } ] }, - { - "name": "sun.security.provider.SecureRandom", - "methods": [ - { - "name": "", - "parameterTypes": [] - } - ] - }, { "name": "sun.security.provider.Sun", "methods": [ From f6909388f61c82798f95a110310bf738ac573709 Mon Sep 17 00:00:00 2001 From: Valentyn Berezin Date: Wed, 16 Oct 2019 19:53:31 +0300 Subject: [PATCH 204/255] DOC-277. Initial attempt --- datasafe-cli/pom.xml | 8 +- .../java/de/adorsys/datasafe/cli/CliOld.java | 94 ++++ .../datasafe/cli/hacks/HackSecureRandom.java | 10 + .../adorsys/datasafe/cli/hacks/MyFactory.java | 42 ++ ...eOnMissingServiceTypeInKnownProviders.java | 2 +- .../GraalCompileFixRegistrar.java | 42 ++ .../datasafe-cli/reflect-config.json | 7 +- .../datasafe-cli/resource-config.json | 453 ++++++------------ .../bash/basic_functionality_test_minio.sh | 2 +- 9 files changed, 335 insertions(+), 325 deletions(-) create mode 100644 datasafe-cli/src/main/java/de/adorsys/datasafe/cli/CliOld.java create mode 100644 datasafe-cli/src/main/java/de/adorsys/datasafe/cli/hacks/HackSecureRandom.java create mode 100644 datasafe-cli/src/main/java/de/adorsys/datasafe/cli/hacks/MyFactory.java rename datasafe-cli/src/main/java/de/adorsys/datasafe/cli/hacks/{ => graalfeature}/GraalCompileFixNpeOnMissingServiceTypeInKnownProviders.java (98%) create mode 100644 datasafe-cli/src/main/java/de/adorsys/datasafe/cli/hacks/graalfeature/GraalCompileFixRegistrar.java diff --git a/datasafe-cli/pom.xml b/datasafe-cli/pom.xml index d1566e716..9b717352f 100644 --- a/datasafe-cli/pom.xml +++ b/datasafe-cli/pom.xml @@ -11,7 +11,7 @@ datasafe-cli - de.adorsys.datasafe.cli.Cli + de.adorsys.datasafe.cli.CliOld @@ -78,7 +78,7 @@ ${maven.jar.plugin} - de.adorsys.datasafe.cli.hacks + de.adorsys.datasafe.cli.hacks.graalfeature @@ -156,7 +156,7 @@ --no-server --no-fallback --enable-all-security-services - --features=de.adorsys.datasafe.cli.hacks.GraalCompileFixNpeOnMissingServiceTypeInKnownProviders + --features=de.adorsys.datasafe.cli.hacks.graalfeature.GraalCompileFixNpeOnMissingServiceTypeInKnownProviders,de.adorsys.datasafe.cli.hacks.graalfeature.GraalCompileFixRegistrar --initialize-at-build-time=org.apache.http.conn.routing.HttpRoute --initialize-at-build-time=org.apache.http.conn.HttpClientConnectionManager @@ -164,6 +164,8 @@ --initialize-at-build-time=org.apache.http.conn.ConnectionRequest --initialize-at-build-time=org.apache.http.protocol.HttpContext --initialize-at-build-time=org.apache.http.pool.ConnPoolControl + --initialize-at-build-time=de.adorsys.datasafe.cli.hacks.HackSecureRandom + --initialize-at-build-time=de.adorsys.datasafe.cli.hacks.HackSecureRandom$NoopSecureRandom --initialize-at-run-time=org.bouncycastle.crypto.prng.SP800SecureRandom --initialize-at-run-time=org.bouncycastle.jcajce.provider.drbg.DRBG$Default diff --git a/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/CliOld.java b/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/CliOld.java new file mode 100644 index 000000000..c49bb306e --- /dev/null +++ b/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/CliOld.java @@ -0,0 +1,94 @@ +package de.adorsys.datasafe.cli; + +import com.google.common.collect.ImmutableSet; +import com.google.common.io.ByteStreams; +import de.adorsys.datasafe.business.impl.service.DaggerDefaultDatasafeServices; +import de.adorsys.datasafe.business.impl.service.DefaultDatasafeServices; +import de.adorsys.datasafe.directory.impl.profile.config.DefaultDFSConfig; +import de.adorsys.datasafe.encrypiton.api.types.UserIDAuth; +import de.adorsys.datasafe.storage.impl.fs.FileSystemStorageService; +import de.adorsys.datasafe.types.api.actions.ListRequest; +import de.adorsys.datasafe.types.api.actions.ReadRequest; +import de.adorsys.datasafe.types.api.actions.WriteRequest; +import lombok.SneakyThrows; +import org.bouncycastle.jce.provider.BouncyCastleProvider; + +import java.io.OutputStream; +import java.nio.file.Files; +import java.nio.file.Path; +import java.nio.file.Paths; +import java.security.Security; +import java.time.LocalDateTime; + +public class CliOld { + + @SneakyThrows + public static void main(String[] args) { + Path root = Paths.get("/home/valb3r/temp/datasafe-tst/" + LocalDateTime.now().toString() + "/"); + Files.createDirectories(root); + + Security.addProvider(new BouncyCastleProvider()); + // To register provider you need to: + /* + Share the JCE provider JAR file to java-home/jre/lib/ext/. + Stop the Application Server. + If the Application Server is not stopped and then restarted later in this process, the JCE provider will not be recognized by the Application Server. + Edit the java-home/jre/lib/security/java.security properties file in any text editor. Add the JCE provider you’ve just downloaded to this file. + The java.security file contains detailed instructions for adding this provider. Basically, you need to add a line of the following format in a location with similar properties: + security.provider.n=provider-class-name + */ + + // this will create all Datasafe files and user documents under + DefaultDatasafeServices datasafe = datasafeServices(root, "PAZZWORT"); + + UserIDAuth user = new UserIDAuth("me", "mememe"); + UserIDAuth userRecipient = new UserIDAuth("recipient", "RRRE!!"); + + datasafe.userProfile().registerUsingDefaults(user); + datasafe.userProfile().registerUsingDefaults(userRecipient); + + try (OutputStream os = + datasafe.privateService().write(WriteRequest.forDefaultPrivate(user, "my-file")) + ) { + os.write("Hello from Datasafe".getBytes()); + } + + + long sz = datasafe.privateService().list(ListRequest.forDefaultPrivate(user, "./")).count(); + System.out.println("User has " + sz + " files"); + + System.out.println(new String( + ByteStreams.toByteArray( + datasafe.privateService().read(ReadRequest.forDefaultPrivate(user, "my-file")) + ) + )); + + try (OutputStream os = + datasafe.inboxService().write(WriteRequest.forDefaultPublic( + ImmutableSet.of(user.getUserID(), userRecipient.getUserID()), "hello-recipient")) + ) { + os.write("Hello from INBOX!".getBytes()); + } + + long szInb = datasafe.inboxService().list(ListRequest.forDefaultPrivate(user, "./")).count(); + System.out.println("User has " + szInb + " files in INBOX"); + + System.out.println(new String( + ByteStreams.toByteArray( + datasafe.inboxService().read(ReadRequest.forDefaultPrivate(user, "hello-recipient")) + ) + )); + } + + private static DefaultDatasafeServices datasafeServices(Path fsRoot, String systemPassword) { + DefaultDatasafeServices multiDfsDatasafe = DaggerDefaultDatasafeServices + .builder() + .config(new DefaultDFSConfig(fsRoot.toUri().toASCIIString(), systemPassword)) + .storage( + new FileSystemStorageService(fsRoot) + ) + .build(); + return multiDfsDatasafe; + } +} + diff --git a/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/hacks/HackSecureRandom.java b/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/hacks/HackSecureRandom.java new file mode 100644 index 000000000..0634f802f --- /dev/null +++ b/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/hacks/HackSecureRandom.java @@ -0,0 +1,10 @@ +package de.adorsys.datasafe.cli.hacks; + +import java.security.SecureRandom; + +public class HackSecureRandom extends SecureRandom { + + public HackSecureRandom() { + super(MyFactory.spi(), MyFactory.provider()); + } +} diff --git a/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/hacks/MyFactory.java b/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/hacks/MyFactory.java new file mode 100644 index 000000000..73219bc33 --- /dev/null +++ b/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/hacks/MyFactory.java @@ -0,0 +1,42 @@ +package de.adorsys.datasafe.cli.hacks; + +import lombok.SneakyThrows; +import org.bouncycastle.util.test.FixedSecureRandom; + +import java.lang.reflect.Field; +import java.security.Provider; +import java.security.SecureRandom; +import java.security.SecureRandomSpi; + +public class MyFactory { + private static final SecureRandom RANDOM = init(); + + @SneakyThrows + static SecureRandomSpi spi() { + System.out.println("SPI ?!!!"); + Field field = SecureRandom.class.getDeclaredField("secureRandomSpi"); + field.setAccessible(true); + return (SecureRandomSpi) field.get(RANDOM); + } + + static Provider provider() { + System.out.println("PROVIDER ?!!!"); + return RANDOM.getProvider(); + } + + static SecureRandom init() { + if ("ZUMBA".equals(System.getProperty("RUMBA"))) { + System.out.println("Should not see it!"); + return new FixedSecureRandom(new byte[] {1, 2, 3, 4, 5, 6, 7, 8, 8}); + } else { + System.out.println("Correct one!"); + return new SecureRandom(); + } + } + + private static class NoopSecureRandom extends SecureRandom { + public NoopSecureRandom() { + super(null, null); + } + } +} diff --git a/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/hacks/GraalCompileFixNpeOnMissingServiceTypeInKnownProviders.java b/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/hacks/graalfeature/GraalCompileFixNpeOnMissingServiceTypeInKnownProviders.java similarity index 98% rename from datasafe-cli/src/main/java/de/adorsys/datasafe/cli/hacks/GraalCompileFixNpeOnMissingServiceTypeInKnownProviders.java rename to datasafe-cli/src/main/java/de/adorsys/datasafe/cli/hacks/graalfeature/GraalCompileFixNpeOnMissingServiceTypeInKnownProviders.java index e90c26a79..96152628e 100644 --- a/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/hacks/GraalCompileFixNpeOnMissingServiceTypeInKnownProviders.java +++ b/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/hacks/graalfeature/GraalCompileFixNpeOnMissingServiceTypeInKnownProviders.java @@ -1,4 +1,4 @@ -package de.adorsys.datasafe.cli.hacks; +package de.adorsys.datasafe.cli.hacks.graalfeature; import com.oracle.svm.core.annotate.AutomaticFeature; import lombok.RequiredArgsConstructor; diff --git a/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/hacks/graalfeature/GraalCompileFixRegistrar.java b/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/hacks/graalfeature/GraalCompileFixRegistrar.java new file mode 100644 index 000000000..a74d3fcbd --- /dev/null +++ b/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/hacks/graalfeature/GraalCompileFixRegistrar.java @@ -0,0 +1,42 @@ +package de.adorsys.datasafe.cli.hacks.graalfeature; + +import com.oracle.svm.core.annotate.AutomaticFeature; +import de.adorsys.datasafe.cli.hacks.HackSecureRandom; +import org.graalvm.nativeimage.hosted.Feature; + +import java.security.Provider; +import java.security.SecureRandom; +import java.util.concurrent.atomic.AtomicReference; + +/** + * This class fixes NPE exception in Graal-compilator - when it tries to get non-existing engines from + * {@link Provider} + *

+ * Additionally can log access to null service types using property PROVIDER_ACCESS_LOGGER, + * so you can add necessary fields to extra_engines.hack. (This will break build later, so you will need + * to remove this property when you detected all nulls in Provider). + *

+ * Override string example: + * X509Store=false,null + */ +@AutomaticFeature +public class GraalCompileFixRegistrar implements Feature { + + private static final String PROVIDER_ACCESS_LOGGER = "PROVIDER_ACCESS_LOGGER"; + private static final AtomicReference random = new AtomicReference(); + + @Override + public void duringSetup(DuringSetupAccess access) { + System.setProperty("RUMBA", "ZUMBA"); + + access.registerObjectReplacer(orig -> { + if (orig instanceof SecureRandom) { + System.out.println("??? !!"); + random.compareAndSet(null, new HackSecureRandom()); + return random.get(); + } + + return orig; + }); + } +} diff --git a/datasafe-cli/src/main/resources/META-INF/native-image/de.adorsys/datasafe-cli/reflect-config.json b/datasafe-cli/src/main/resources/META-INF/native-image/de.adorsys/datasafe-cli/reflect-config.json index cc86a94f7..a73178323 100644 --- a/datasafe-cli/src/main/resources/META-INF/native-image/de.adorsys/datasafe-cli/reflect-config.json +++ b/datasafe-cli/src/main/resources/META-INF/native-image/de.adorsys/datasafe-cli/reflect-config.json @@ -284,13 +284,10 @@ "allDeclaredFields": true }, { - "name": "java.lang.String" - }, - { - "name": "java.lang.Thread", + "name": "java.util.ArrayList", "methods": [ { - "name": "getContextClassLoader", + "name": "", "parameterTypes": [] } ] diff --git a/datasafe-cli/src/main/resources/META-INF/native-image/de.adorsys/datasafe-cli/resource-config.json b/datasafe-cli/src/main/resources/META-INF/native-image/de.adorsys/datasafe-cli/resource-config.json index 59874070c..e49fd82dc 100644 --- a/datasafe-cli/src/main/resources/META-INF/native-image/de.adorsys/datasafe-cli/resource-config.json +++ b/datasafe-cli/src/main/resources/META-INF/native-image/de.adorsys/datasafe-cli/resource-config.json @@ -31,10 +31,10 @@ "pattern": "lib/aws-java-sdk-s3-1.11.538.jar" }, { - "pattern": "lib/bcpkix-jdk15on-1.58.jar" + "pattern": "lib/bcpkix-jdk15on-1.63.jar" }, { - "pattern": "lib/bcprov-jdk15on-1.58.jar" + "pattern": "lib/bcprov-jdk15on-1.63.jar" }, { "pattern": "lib/checker-qual-2.5.2.jar" @@ -52,49 +52,49 @@ "pattern": "lib/dagger-2.17.jar" }, { - "pattern": "lib/datasafe-business.jar" + "pattern": "lib/datasafe-business-0.6.3-SNAPSHOT.jar" }, { - "pattern": "lib/datasafe-directory-api.jar" + "pattern": "lib/datasafe-directory-api-0.6.3-SNAPSHOT.jar" }, { - "pattern": "lib/datasafe-directory-impl.jar" + "pattern": "lib/datasafe-directory-impl-0.6.3-SNAPSHOT.jar" }, { - "pattern": "lib/datasafe-encryption-api.jar" + "pattern": "lib/datasafe-encryption-api-0.6.3-SNAPSHOT.jar" }, { - "pattern": "lib/datasafe-encryption-impl.jar" + "pattern": "lib/datasafe-encryption-impl-0.6.3-SNAPSHOT.jar" }, { - "pattern": "lib/datasafe-inbox-api.jar" + "pattern": "lib/datasafe-inbox-api-0.6.3-SNAPSHOT.jar" }, { - "pattern": "lib/datasafe-inbox-impl.jar" + "pattern": "lib/datasafe-inbox-impl-0.6.3-SNAPSHOT.jar" }, { - "pattern": "lib/datasafe-metainfo-version-api.jar" + "pattern": "lib/datasafe-metainfo-version-api-0.6.3-SNAPSHOT.jar" }, { - "pattern": "lib/datasafe-metainfo-version-impl.jar" + "pattern": "lib/datasafe-metainfo-version-impl-0.6.3-SNAPSHOT.jar" }, { - "pattern": "lib/datasafe-privatestore-api.jar" + "pattern": "lib/datasafe-privatestore-api-0.6.3-SNAPSHOT.jar" }, { - "pattern": "lib/datasafe-privatestore-impl.jar" + "pattern": "lib/datasafe-privatestore-impl-0.6.3-SNAPSHOT.jar" }, { - "pattern": "lib/datasafe-storage-api.jar" + "pattern": "lib/datasafe-storage-api-0.6.3-SNAPSHOT.jar" }, { - "pattern": "lib/datasafe-storage-impl-fs.jar" + "pattern": "lib/datasafe-storage-impl-fs-0.6.3-SNAPSHOT.jar" }, { - "pattern": "lib/datasafe-storage-impl-s3.jar" + "pattern": "lib/datasafe-storage-impl-s3-0.6.3-SNAPSHOT.jar" }, { - "pattern": "lib/datasafe-types-api.jar" + "pattern": "lib/datasafe-types-api-0.6.3-SNAPSHOT.jar" }, { "pattern": "lib/error_prone_annotations-2.2.0.jar" @@ -151,16 +151,16 @@ "pattern": "lib/lombok-1.18.6.jar" }, { - "pattern": "lib/slf4j-api-1.7.25.jar" + "pattern": "lib/picocli-4.0.3.jar" }, { - "pattern": "lib/slf4j-simple-1.7.25.jar" + "pattern": "lib/siv-mode-1.3.1.jar" }, { - "pattern": "mozilla/public-suffix-list.txt" + "pattern": "lib/slf4j-api-1.7.25.jar" }, { - "pattern": "org/apache/http/client/version.properties" + "pattern": "lib/slf4j-simple-1.7.25.jar" }, { "pattern": "org/bouncycastle/asn1/ASN1ApplicationSpecific.class" @@ -186,6 +186,9 @@ { "pattern": "org/bouncycastle/asn1/ASN1Exception.class" }, + { + "pattern": "org/bouncycastle/asn1/ASN1External.class" + }, { "pattern": "org/bouncycastle/asn1/ASN1GeneralizedTime.class" }, @@ -216,9 +219,6 @@ { "pattern": "org/bouncycastle/asn1/ASN1OctetStringParser.class" }, - { - "pattern": "org/bouncycastle/asn1/ASN1OutputStream$ImplicitOutputStream.class" - }, { "pattern": "org/bouncycastle/asn1/ASN1OutputStream.class" }, @@ -228,6 +228,9 @@ { "pattern": "org/bouncycastle/asn1/ASN1Primitive.class" }, + { + "pattern": "org/bouncycastle/asn1/ASN1Sequence$1.class" + }, { "pattern": "org/bouncycastle/asn1/ASN1Sequence.class" }, @@ -270,9 +273,6 @@ { "pattern": "org/bouncycastle/asn1/BEROctetStringParser.class" }, - { - "pattern": "org/bouncycastle/asn1/BEROutputStream.class" - }, { "pattern": "org/bouncycastle/asn1/BERSequence.class" }, @@ -297,21 +297,12 @@ { "pattern": "org/bouncycastle/asn1/ConstructedOctetStream.class" }, - { - "pattern": "org/bouncycastle/asn1/DERApplicationSpecific.class" - }, { "pattern": "org/bouncycastle/asn1/DERBMPString.class" }, { "pattern": "org/bouncycastle/asn1/DERBitString.class" }, - { - "pattern": "org/bouncycastle/asn1/DERExternal.class" - }, - { - "pattern": "org/bouncycastle/asn1/DERFactory.class" - }, { "pattern": "org/bouncycastle/asn1/DERGeneralString.class" }, @@ -375,21 +366,39 @@ { "pattern": "org/bouncycastle/asn1/DERVisibleString.class" }, + { + "pattern": "org/bouncycastle/asn1/DLApplicationSpecific.class" + }, { "pattern": "org/bouncycastle/asn1/DLBitString.class" }, + { + "pattern": "org/bouncycastle/asn1/DLExternal.class" + }, + { + "pattern": "org/bouncycastle/asn1/DLFactory.class" + }, { "pattern": "org/bouncycastle/asn1/DLOutputStream.class" }, { "pattern": "org/bouncycastle/asn1/DLSequence.class" }, + { + "pattern": "org/bouncycastle/asn1/DLSequenceParser.class" + }, { "pattern": "org/bouncycastle/asn1/DLSet.class" }, + { + "pattern": "org/bouncycastle/asn1/DLSetParser.class" + }, { "pattern": "org/bouncycastle/asn1/DLTaggedObject.class" }, + { + "pattern": "org/bouncycastle/asn1/DateUtil.class" + }, { "pattern": "org/bouncycastle/asn1/DefiniteLengthInputStream.class" }, @@ -456,6 +465,9 @@ { "pattern": "org/bouncycastle/asn1/eac/EACObjectIdentifiers.class" }, + { + "pattern": "org/bouncycastle/asn1/edec/EdECObjectIdentifiers.class" + }, { "pattern": "org/bouncycastle/asn1/gm/GMObjectIdentifiers.class" }, @@ -465,6 +477,9 @@ { "pattern": "org/bouncycastle/asn1/iana/IANAObjectIdentifiers.class" }, + { + "pattern": "org/bouncycastle/asn1/iso/ISOIECObjectIdentifiers.class" + }, { "pattern": "org/bouncycastle/asn1/kisa/KISAObjectIdentifiers.class" }, @@ -568,250 +583,94 @@ "pattern": "org/bouncycastle/asn1/x509/X509ObjectIdentifiers.class" }, { - "pattern": "org/bouncycastle/asn1/x9/X9ObjectIdentifiers.class" - }, - { - "pattern": "org/bouncycastle/cert/CertException.class" - }, - { - "pattern": "org/bouncycastle/cert/CertIOException.class" - }, - { - "pattern": "org/bouncycastle/cert/CertRuntimeException.class" - }, - { - "pattern": "org/bouncycastle/cert/CertUtils.class" - }, - { - "pattern": "org/bouncycastle/cert/X509CRLHolder.class" - }, - { - "pattern": "org/bouncycastle/cert/X509CertificateHolder.class" - }, - { - "pattern": "org/bouncycastle/cert/X509ExtensionUtils.class" - }, - { - "pattern": "org/bouncycastle/cert/X509v3CertificateBuilder.class" - }, - { - "pattern": "org/bouncycastle/cert/jcajce/CertHelper.class" - }, - { - "pattern": "org/bouncycastle/cert/jcajce/DefaultCertHelper.class" - }, - { - "pattern": "org/bouncycastle/cert/jcajce/JcaX509CertificateConverter$ExCertificateException.class" - }, - { - "pattern": "org/bouncycastle/cert/jcajce/JcaX509CertificateConverter$ExCertificateParsingException.class" - }, - { - "pattern": "org/bouncycastle/cert/jcajce/JcaX509CertificateConverter.class" - }, - { - "pattern": "org/bouncycastle/cert/jcajce/JcaX509CertificateHolder.class" - }, - { - "pattern": "org/bouncycastle/cert/jcajce/JcaX509ExtensionUtils$SHA1DigestCalculator.class" - }, - { - "pattern": "org/bouncycastle/cert/jcajce/JcaX509ExtensionUtils.class" - }, - { - "pattern": "org/bouncycastle/cert/jcajce/JcaX509v3CertificateBuilder.class" - }, - { - "pattern": "org/bouncycastle/cert/jcajce/NamedCertHelper.class" - }, - { - "pattern": "org/bouncycastle/cert/jcajce/ProviderCertHelper.class" - }, - { - "pattern": "org/bouncycastle/cert/selector/X509CertificateHolderSelector.class" - }, - { - "pattern": "org/bouncycastle/cms/CMSAlgorithm.class" - }, - { - "pattern": "org/bouncycastle/cms/CMSContentInfoParser.class" - }, - { - "pattern": "org/bouncycastle/cms/CMSEnvelopedDataParser.class" - }, - { - "pattern": "org/bouncycastle/cms/CMSEnvelopedDataStreamGenerator$CmsEnvelopedDataOutputStream.class" - }, - { - "pattern": "org/bouncycastle/cms/CMSEnvelopedDataStreamGenerator.class" - }, - { - "pattern": "org/bouncycastle/cms/CMSEnvelopedGenerator.class" - }, - { - "pattern": "org/bouncycastle/cms/CMSEnvelopedHelper$CMSEnvelopedSecureReadable.class" - }, - { - "pattern": "org/bouncycastle/cms/CMSEnvelopedHelper.class" - }, - { - "pattern": "org/bouncycastle/cms/CMSException.class" - }, - { - "pattern": "org/bouncycastle/cms/CMSProcessable.class" - }, - { - "pattern": "org/bouncycastle/cms/CMSProcessableInputStream.class" - }, - { - "pattern": "org/bouncycastle/cms/CMSReadable.class" - }, - { - "pattern": "org/bouncycastle/cms/CMSSecureReadable.class" - }, - { - "pattern": "org/bouncycastle/cms/CMSTypedStream$FullReaderStream.class" - }, - { - "pattern": "org/bouncycastle/cms/CMSTypedStream.class" - }, - { - "pattern": "org/bouncycastle/cms/CMSUtils.class" - }, - { - "pattern": "org/bouncycastle/cms/KEKRecipient.class" - }, - { - "pattern": "org/bouncycastle/cms/KEKRecipientId.class" - }, - { - "pattern": "org/bouncycastle/cms/KEKRecipientInfoGenerator.class" - }, - { - "pattern": "org/bouncycastle/cms/KEKRecipientInformation.class" - }, - { - "pattern": "org/bouncycastle/cms/KeyTransRecipient.class" - }, - { - "pattern": "org/bouncycastle/cms/KeyTransRecipientId.class" - }, - { - "pattern": "org/bouncycastle/cms/KeyTransRecipientInfoGenerator.class" - }, - { - "pattern": "org/bouncycastle/cms/KeyTransRecipientInformation.class" - }, - { - "pattern": "org/bouncycastle/cms/NullOutputStream.class" - }, - { - "pattern": "org/bouncycastle/cms/PasswordRecipient$PRF.class" - }, - { - "pattern": "org/bouncycastle/cms/Recipient.class" - }, - { - "pattern": "org/bouncycastle/cms/RecipientId.class" - }, - { - "pattern": "org/bouncycastle/cms/RecipientInfoGenerator.class" - }, - { - "pattern": "org/bouncycastle/cms/RecipientInformation.class" - }, - { - "pattern": "org/bouncycastle/cms/RecipientInformationStore.class" + "pattern": "org/bouncycastle/asn1/x9/X9ECParameters.class" }, { - "pattern": "org/bouncycastle/cms/RecipientOperator.class" + "pattern": "org/bouncycastle/asn1/x9/X9ObjectIdentifiers.class" }, { - "pattern": "org/bouncycastle/cms/jcajce/CMSUtils.class" + "pattern": "org/bouncycastle/crypto/CipherParameters.class" }, { - "pattern": "org/bouncycastle/cms/jcajce/DefaultJcaJceExtHelper.class" + "pattern": "org/bouncycastle/crypto/CryptoServicesPermission.class" }, { - "pattern": "org/bouncycastle/cms/jcajce/EnvelopedDataHelper$1.class" + "pattern": "org/bouncycastle/crypto/CryptoServicesRegistrar$Property.class" }, { - "pattern": "org/bouncycastle/cms/jcajce/EnvelopedDataHelper$JCECallback.class" + "pattern": "org/bouncycastle/crypto/CryptoServicesRegistrar.class" }, { - "pattern": "org/bouncycastle/cms/jcajce/EnvelopedDataHelper.class" + "pattern": "org/bouncycastle/crypto/Digest.class" }, { - "pattern": "org/bouncycastle/cms/jcajce/JcaJceExtHelper.class" + "pattern": "org/bouncycastle/crypto/io/CipherIOException.class" }, { - "pattern": "org/bouncycastle/cms/jcajce/JceCMSContentEncryptorBuilder$CMSOutputEncryptor.class" + "pattern": "org/bouncycastle/crypto/io/InvalidCipherTextIOException.class" }, { - "pattern": "org/bouncycastle/cms/jcajce/JceCMSContentEncryptorBuilder.class" + "pattern": "org/bouncycastle/crypto/params/AsymmetricKeyParameter.class" }, { - "pattern": "org/bouncycastle/cms/jcajce/JceKEKEnvelopedRecipient$1.class" + "pattern": "org/bouncycastle/crypto/params/DHParameters.class" }, { - "pattern": "org/bouncycastle/cms/jcajce/JceKEKEnvelopedRecipient.class" + "pattern": "org/bouncycastle/crypto/params/DHValidationParameters.class" }, { - "pattern": "org/bouncycastle/cms/jcajce/JceKEKRecipient.class" + "pattern": "org/bouncycastle/crypto/params/DSAKeyParameters.class" }, { - "pattern": "org/bouncycastle/cms/jcajce/JceKEKRecipientInfoGenerator.class" + "pattern": "org/bouncycastle/crypto/params/DSAParameters.class" }, { - "pattern": "org/bouncycastle/cms/jcajce/JceKeyTransEnvelopedRecipient$1.class" + "pattern": "org/bouncycastle/crypto/params/DSAPrivateKeyParameters.class" }, { - "pattern": "org/bouncycastle/cms/jcajce/JceKeyTransEnvelopedRecipient.class" + "pattern": "org/bouncycastle/crypto/params/DSAPublicKeyParameters.class" }, { - "pattern": "org/bouncycastle/cms/jcajce/JceKeyTransRecipient.class" + "pattern": "org/bouncycastle/crypto/params/DSAValidationParameters.class" }, { - "pattern": "org/bouncycastle/cms/jcajce/JceKeyTransRecipientInfoGenerator.class" + "pattern": "org/bouncycastle/crypto/params/ECKeyParameters.class" }, { - "pattern": "org/bouncycastle/cms/jcajce/ProviderJcaJceExtHelper.class" + "pattern": "org/bouncycastle/crypto/params/ECPublicKeyParameters.class" }, { - "pattern": "org/bouncycastle/crypto/CipherParameters.class" + "pattern": "org/bouncycastle/crypto/params/Ed25519PrivateKeyParameters.class" }, { - "pattern": "org/bouncycastle/crypto/Digest.class" + "pattern": "org/bouncycastle/crypto/params/Ed25519PublicKeyParameters.class" }, { - "pattern": "org/bouncycastle/crypto/io/CipherIOException.class" - }, - { - "pattern": "org/bouncycastle/crypto/io/InvalidCipherTextIOException.class" + "pattern": "org/bouncycastle/crypto/params/RSAKeyParameters.class" }, { - "pattern": "org/bouncycastle/crypto/params/AsymmetricKeyParameter.class" + "pattern": "org/bouncycastle/crypto/params/RSAPrivateCrtKeyParameters.class" }, { - "pattern": "org/bouncycastle/crypto/params/DSAKeyParameters.class" + "pattern": "org/bouncycastle/crypto/prng/SP800SecureRandom.class" }, { - "pattern": "org/bouncycastle/crypto/params/DSAPrivateKeyParameters.class" + "pattern": "org/bouncycastle/jcajce/io/CipherInputStream.class" }, { - "pattern": "org/bouncycastle/crypto/params/DSAPublicKeyParameters.class" + "pattern": "org/bouncycastle/jcajce/io/CipherOutputStream.class" }, { - "pattern": "org/bouncycastle/crypto/params/RSAKeyParameters.class" + "pattern": "org/bouncycastle/jcajce/io/DigestUpdatingOutputStream.class" }, { - "pattern": "org/bouncycastle/crypto/params/RSAPrivateCrtKeyParameters.class" + "pattern": "org/bouncycastle/jcajce/io/MacUpdatingOutputStream.class" }, { - "pattern": "org/bouncycastle/crypto/prng/SP800SecureRandom.class" + "pattern": "org/bouncycastle/jcajce/io/OutputStreamFactory.class" }, { - "pattern": "org/bouncycastle/jcajce/io/CipherInputStream.class" + "pattern": "org/bouncycastle/jcajce/io/SignatureUpdatingOutputStream.class" }, { "pattern": "org/bouncycastle/jcajce/provider/asymmetric/DH$Mappings.class" @@ -834,6 +693,9 @@ { "pattern": "org/bouncycastle/jcajce/provider/asymmetric/ECGOST$Mappings.class" }, + { + "pattern": "org/bouncycastle/jcajce/provider/asymmetric/EdEC$Mappings.class" + }, { "pattern": "org/bouncycastle/jcajce/provider/asymmetric/ElGamal$Mappings.class" }, @@ -885,6 +747,21 @@ { "pattern": "org/bouncycastle/jcajce/provider/asymmetric/ecgost12/KeyFactorySpi.class" }, + { + "pattern": "org/bouncycastle/jcajce/provider/asymmetric/edec/KeyFactorySpi$ED25519.class" + }, + { + "pattern": "org/bouncycastle/jcajce/provider/asymmetric/edec/KeyFactorySpi$ED448.class" + }, + { + "pattern": "org/bouncycastle/jcajce/provider/asymmetric/edec/KeyFactorySpi$X25519.class" + }, + { + "pattern": "org/bouncycastle/jcajce/provider/asymmetric/edec/KeyFactorySpi$X448.class" + }, + { + "pattern": "org/bouncycastle/jcajce/provider/asymmetric/edec/KeyFactorySpi.class" + }, { "pattern": "org/bouncycastle/jcajce/provider/asymmetric/elgamal/KeyFactorySpi.class" }, @@ -918,6 +795,9 @@ { "pattern": "org/bouncycastle/jcajce/provider/digest/Blake2b$Mappings.class" }, + { + "pattern": "org/bouncycastle/jcajce/provider/digest/Blake2s$Mappings.class" + }, { "pattern": "org/bouncycastle/jcajce/provider/digest/DSTU7564$Mappings.class" }, @@ -990,6 +870,9 @@ { "pattern": "org/bouncycastle/jcajce/provider/drbg/DRBG$Mappings.class" }, + { + "pattern": "org/bouncycastle/jcajce/provider/drbg/DRBG$URLSeededSecureRandom.class" + }, { "pattern": "org/bouncycastle/jcajce/provider/drbg/DRBG.class" }, @@ -1038,6 +921,9 @@ { "pattern": "org/bouncycastle/jcajce/provider/symmetric/GOST28147$Mappings.class" }, + { + "pattern": "org/bouncycastle/jcajce/provider/symmetric/GOST3412_2015$Mappings.class" + }, { "pattern": "org/bouncycastle/jcajce/provider/symmetric/Grain128$Mappings.class" }, @@ -1083,6 +969,9 @@ { "pattern": "org/bouncycastle/jcajce/provider/symmetric/Rijndael$Mappings.class" }, + { + "pattern": "org/bouncycastle/jcajce/provider/symmetric/SCRYPT$Mappings.class" + }, { "pattern": "org/bouncycastle/jcajce/provider/symmetric/SEED$Mappings.class" }, @@ -1131,6 +1020,9 @@ { "pattern": "org/bouncycastle/jcajce/provider/symmetric/XTEA$Mappings.class" }, + { + "pattern": "org/bouncycastle/jcajce/provider/symmetric/Zuc$Mappings.class" + }, { "pattern": "org/bouncycastle/jcajce/provider/symmetric/util/ClassUtil.class" }, @@ -1143,9 +1035,15 @@ { "pattern": "org/bouncycastle/jcajce/provider/util/AsymmetricKeyInfoConverter.class" }, + { + "pattern": "org/bouncycastle/jcajce/spec/DHDomainParameterSpec.class" + }, { "pattern": "org/bouncycastle/jcajce/util/AlgorithmParametersUtils.class" }, + { + "pattern": "org/bouncycastle/jcajce/util/AnnotatedPrivateKey.class" + }, { "pattern": "org/bouncycastle/jcajce/util/DefaultJcaJceHelper.class" }, @@ -1161,96 +1059,6 @@ { "pattern": "org/bouncycastle/jce/provider/BouncyCastleProviderConfiguration.class" }, - { - "pattern": "org/bouncycastle/operator/AsymmetricKeyUnwrapper.class" - }, - { - "pattern": "org/bouncycastle/operator/AsymmetricKeyWrapper.class" - }, - { - "pattern": "org/bouncycastle/operator/ContentSigner.class" - }, - { - "pattern": "org/bouncycastle/operator/DefaultSecretKeySizeProvider.class" - }, - { - "pattern": "org/bouncycastle/operator/DefaultSignatureAlgorithmIdentifierFinder.class" - }, - { - "pattern": "org/bouncycastle/operator/DigestCalculator.class" - }, - { - "pattern": "org/bouncycastle/operator/GenericKey.class" - }, - { - "pattern": "org/bouncycastle/operator/InputDecryptor.class" - }, - { - "pattern": "org/bouncycastle/operator/KeyUnwrapper.class" - }, - { - "pattern": "org/bouncycastle/operator/KeyWrapper.class" - }, - { - "pattern": "org/bouncycastle/operator/OperatorCreationException.class" - }, - { - "pattern": "org/bouncycastle/operator/OperatorException.class" - }, - { - "pattern": "org/bouncycastle/operator/OperatorStreamException.class" - }, - { - "pattern": "org/bouncycastle/operator/OutputEncryptor.class" - }, - { - "pattern": "org/bouncycastle/operator/RuntimeOperatorException.class" - }, - { - "pattern": "org/bouncycastle/operator/SecretKeySizeProvider.class" - }, - { - "pattern": "org/bouncycastle/operator/SignatureAlgorithmIdentifierFinder.class" - }, - { - "pattern": "org/bouncycastle/operator/SymmetricKeyUnwrapper.class" - }, - { - "pattern": "org/bouncycastle/operator/SymmetricKeyWrapper.class" - }, - { - "pattern": "org/bouncycastle/operator/jcajce/JcaContentSignerBuilder$1.class" - }, - { - "pattern": "org/bouncycastle/operator/jcajce/JcaContentSignerBuilder$SignatureOutputStream.class" - }, - { - "pattern": "org/bouncycastle/operator/jcajce/JcaContentSignerBuilder.class" - }, - { - "pattern": "org/bouncycastle/operator/jcajce/JceAsymmetricKeyUnwrapper.class" - }, - { - "pattern": "org/bouncycastle/operator/jcajce/JceAsymmetricKeyWrapper.class" - }, - { - "pattern": "org/bouncycastle/operator/jcajce/JceGenericKey.class" - }, - { - "pattern": "org/bouncycastle/operator/jcajce/JceSymmetricKeyUnwrapper.class" - }, - { - "pattern": "org/bouncycastle/operator/jcajce/JceSymmetricKeyWrapper.class" - }, - { - "pattern": "org/bouncycastle/operator/jcajce/OperatorHelper$OpCertificateException.class" - }, - { - "pattern": "org/bouncycastle/operator/jcajce/OperatorHelper.class" - }, - { - "pattern": "org/bouncycastle/operator/jcajce/OperatorUtils.class" - }, { "pattern": "org/bouncycastle/pqc/asn1/PQCObjectIdentifiers.class" }, @@ -1263,6 +1071,9 @@ { "pattern": "org/bouncycastle/pqc/jcajce/provider/newhope/NHKeyFactorySpi.class" }, + { + "pattern": "org/bouncycastle/pqc/jcajce/provider/qtesla/QTESLAKeyFactorySpi.class" + }, { "pattern": "org/bouncycastle/pqc/jcajce/provider/rainbow/RainbowKeyFactorySpi.class" }, @@ -1305,6 +1116,21 @@ { "pattern": "org/bouncycastle/util/Strings.class" }, + { + "pattern": "org/bouncycastle/util/encoders/DecoderException.class" + }, + { + "pattern": "org/bouncycastle/util/encoders/Encoder.class" + }, + { + "pattern": "org/bouncycastle/util/encoders/EncoderException.class" + }, + { + "pattern": "org/bouncycastle/util/encoders/Hex.class" + }, + { + "pattern": "org/bouncycastle/util/encoders/HexEncoder.class" + }, { "pattern": "org/bouncycastle/util/io/StreamOverflowException.class" }, @@ -1317,9 +1143,6 @@ { "pattern": "org/bouncycastle/util/io/TeeOutputStream.class" }, - { - "pattern": "org/joda/time/tz/data/.+" - }, { "pattern": "org/slf4j/impl/StaticLoggerBinder.class" } diff --git a/datasafe-cli/src/test/bash/basic_functionality_test_minio.sh b/datasafe-cli/src/test/bash/basic_functionality_test_minio.sh index ec369104a..373462825 100755 --- a/datasafe-cli/src/test/bash/basic_functionality_test_minio.sh +++ b/datasafe-cli/src/test/bash/basic_functionality_test_minio.sh @@ -5,7 +5,7 @@ if [[ -z "$1" ]] ; then exit 1 fi -# Docker not available on MacOS, allow to pass +# Docker not available on TravisCI-provided MacOS, allow to pass if ! [ -x "$(command -v docker)" ]; then echo 'Error: docker is not installed. Will exit with code 0 not to fail pipeline' exit 0 From d7afc507edc77ea7b76a9c45dcb5bea07c73aa73 Mon Sep 17 00:00:00 2001 From: Valentyn Berezin Date: Wed, 16 Oct 2019 20:03:59 +0300 Subject: [PATCH 205/255] DOC-277. Update BC, change API provider --- datasafe-cli/pom.xml | 2 +- pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/datasafe-cli/pom.xml b/datasafe-cli/pom.xml index 9b717352f..d04082e7f 100644 --- a/datasafe-cli/pom.xml +++ b/datasafe-cli/pom.xml @@ -11,7 +11,7 @@ datasafe-cli - de.adorsys.datasafe.cli.CliOld + de.adorsys.datasafe.cli.Cli diff --git a/pom.xml b/pom.xml index 2cf63f1ac..1bb0f59ef 100644 --- a/pom.xml +++ b/pom.xml @@ -84,7 +84,7 @@ 3.1.1 1.18.6 3.5 - 1.63 + 1.64 2.8.5 2.17 27.0.1-jre From c4abd8818ddeead43be0201d8ce488d3db02a4c8 Mon Sep 17 00:00:00 2001 From: Valentyn Berezin Date: Thu, 17 Oct 2019 11:44:10 +0300 Subject: [PATCH 206/255] DOC-277. Fixed reflection config --- .../de.adorsys/datasafe-cli/reflect-config.json | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/datasafe-cli/src/main/resources/META-INF/native-image/de.adorsys/datasafe-cli/reflect-config.json b/datasafe-cli/src/main/resources/META-INF/native-image/de.adorsys/datasafe-cli/reflect-config.json index a73178323..e8f8448ee 100644 --- a/datasafe-cli/src/main/resources/META-INF/native-image/de.adorsys/datasafe-cli/reflect-config.json +++ b/datasafe-cli/src/main/resources/META-INF/native-image/de.adorsys/datasafe-cli/reflect-config.json @@ -143,7 +143,12 @@ }, { "name": "de.adorsys.datasafe.types.api.global.Version", - "allDeclaredFields": true + "allDeclaredFields": true, + "fields": [ + { + "name": "id", + "allowWrite": true + } }, { "name": "de.adorsys.datasafe.directory.api.types.StorageCredentials", @@ -1165,6 +1170,15 @@ } ] }, + { + "name": "sun.security.provider.SecureRandom", + "methods": [ + { + "name": "", + "parameterTypes": [] + } + ] + }, { "name": "sun.security.provider.Sun", "methods": [ From 41313db790c952f78ccee120bf8a28684ed052ff Mon Sep 17 00:00:00 2001 From: Valentyn Berezin Date: Thu, 17 Oct 2019 11:55:11 +0300 Subject: [PATCH 207/255] DOC-277. Fixed reflection config --- .../de.adorsys/datasafe-cli/reflect-config.json | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/datasafe-cli/src/main/resources/META-INF/native-image/de.adorsys/datasafe-cli/reflect-config.json b/datasafe-cli/src/main/resources/META-INF/native-image/de.adorsys/datasafe-cli/reflect-config.json index e8f8448ee..a5b44228e 100644 --- a/datasafe-cli/src/main/resources/META-INF/native-image/de.adorsys/datasafe-cli/reflect-config.json +++ b/datasafe-cli/src/main/resources/META-INF/native-image/de.adorsys/datasafe-cli/reflect-config.json @@ -145,10 +145,11 @@ "name": "de.adorsys.datasafe.types.api.global.Version", "allDeclaredFields": true, "fields": [ - { - "name": "id", - "allowWrite": true - } + { + "name": "id", + "allowWrite": true + } + ] }, { "name": "de.adorsys.datasafe.directory.api.types.StorageCredentials", From ce4b66d5503b146aee745f8b422d90616f13b173 Mon Sep 17 00:00:00 2001 From: Valentyn Berezin Date: Thu, 17 Oct 2019 12:08:57 +0300 Subject: [PATCH 208/255] DOC-277. Use BouncyCastle 1.63 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 1bb0f59ef..2cf63f1ac 100644 --- a/pom.xml +++ b/pom.xml @@ -84,7 +84,7 @@ 3.1.1 1.18.6 3.5 - 1.64 + 1.63 2.8.5 2.17 27.0.1-jre From ce3d2f7a31177b00c9fe2bb92b65a22df0cc91cf Mon Sep 17 00:00:00 2001 From: Valentyn Berezin Date: Thu, 17 Oct 2019 13:09:59 +0300 Subject: [PATCH 209/255] DOC-277. Change provider JAR --- ...l_custom_jdk_and_add_security_providers.sh | 3 +- datasafe-cli/pom.xml | 4 +- .../datasafe/cli/hacks/HackSecureRandom.java | 10 - .../adorsys/datasafe/cli/hacks/MyFactory.java | 42 --- .../GraalCompileFixRegistrar.java | 42 --- .../datasafe-cli/resource-config.json | 355 +++++++++++++++++- 6 files changed, 341 insertions(+), 115 deletions(-) delete mode 100644 datasafe-cli/src/main/java/de/adorsys/datasafe/cli/hacks/HackSecureRandom.java delete mode 100644 datasafe-cli/src/main/java/de/adorsys/datasafe/cli/hacks/MyFactory.java delete mode 100644 datasafe-cli/src/main/java/de/adorsys/datasafe/cli/hacks/graalfeature/GraalCompileFixRegistrar.java diff --git a/.travis/install_custom_jdk_and_add_security_providers.sh b/.travis/install_custom_jdk_and_add_security_providers.sh index eef9ed43e..e58fbc32e 100755 --- a/.travis/install_custom_jdk_and_add_security_providers.sh +++ b/.travis/install_custom_jdk_and_add_security_providers.sh @@ -17,7 +17,8 @@ cd "$REPO_ROOT" || exit 1 BC_VERSION=`grep ".*" pom.xml | cut -d">" -f2 | cut -d"<" -f1` # 2.2 Download BC jars needed -curl "https://repo1.maven.org/maven2/org/bouncycastle/bcprov-jdk15on/${BC_VERSION}/bcprov-jdk15on-${BC_VERSION}.jar" \ +# We need special provider JAR (https://www.bouncycastle.org/latest_releases.html): +curl "https://www.bouncycastle.org/download/bcprov-ext-jdk15to18-${BC_VERSION//\./}.jar" \ --output "$JAVA_HOME/jre/lib/ext/bcprov-jdk15on-${BC_VERSION}.jar" curl "https://repo1.maven.org/maven2/org/bouncycastle/bctls-jdk15on/${BC_VERSION}/bctls-jdk15on-${BC_VERSION}.jar" \ diff --git a/datasafe-cli/pom.xml b/datasafe-cli/pom.xml index d04082e7f..3648b825a 100644 --- a/datasafe-cli/pom.xml +++ b/datasafe-cli/pom.xml @@ -156,7 +156,7 @@ --no-server --no-fallback --enable-all-security-services - --features=de.adorsys.datasafe.cli.hacks.graalfeature.GraalCompileFixNpeOnMissingServiceTypeInKnownProviders,de.adorsys.datasafe.cli.hacks.graalfeature.GraalCompileFixRegistrar + --features=de.adorsys.datasafe.cli.hacks.GraalCompileFixNpeOnMissingServiceTypeInKnownProviders --initialize-at-build-time=org.apache.http.conn.routing.HttpRoute --initialize-at-build-time=org.apache.http.conn.HttpClientConnectionManager @@ -164,8 +164,6 @@ --initialize-at-build-time=org.apache.http.conn.ConnectionRequest --initialize-at-build-time=org.apache.http.protocol.HttpContext --initialize-at-build-time=org.apache.http.pool.ConnPoolControl - --initialize-at-build-time=de.adorsys.datasafe.cli.hacks.HackSecureRandom - --initialize-at-build-time=de.adorsys.datasafe.cli.hacks.HackSecureRandom$NoopSecureRandom --initialize-at-run-time=org.bouncycastle.crypto.prng.SP800SecureRandom --initialize-at-run-time=org.bouncycastle.jcajce.provider.drbg.DRBG$Default diff --git a/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/hacks/HackSecureRandom.java b/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/hacks/HackSecureRandom.java deleted file mode 100644 index 0634f802f..000000000 --- a/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/hacks/HackSecureRandom.java +++ /dev/null @@ -1,10 +0,0 @@ -package de.adorsys.datasafe.cli.hacks; - -import java.security.SecureRandom; - -public class HackSecureRandom extends SecureRandom { - - public HackSecureRandom() { - super(MyFactory.spi(), MyFactory.provider()); - } -} diff --git a/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/hacks/MyFactory.java b/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/hacks/MyFactory.java deleted file mode 100644 index 73219bc33..000000000 --- a/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/hacks/MyFactory.java +++ /dev/null @@ -1,42 +0,0 @@ -package de.adorsys.datasafe.cli.hacks; - -import lombok.SneakyThrows; -import org.bouncycastle.util.test.FixedSecureRandom; - -import java.lang.reflect.Field; -import java.security.Provider; -import java.security.SecureRandom; -import java.security.SecureRandomSpi; - -public class MyFactory { - private static final SecureRandom RANDOM = init(); - - @SneakyThrows - static SecureRandomSpi spi() { - System.out.println("SPI ?!!!"); - Field field = SecureRandom.class.getDeclaredField("secureRandomSpi"); - field.setAccessible(true); - return (SecureRandomSpi) field.get(RANDOM); - } - - static Provider provider() { - System.out.println("PROVIDER ?!!!"); - return RANDOM.getProvider(); - } - - static SecureRandom init() { - if ("ZUMBA".equals(System.getProperty("RUMBA"))) { - System.out.println("Should not see it!"); - return new FixedSecureRandom(new byte[] {1, 2, 3, 4, 5, 6, 7, 8, 8}); - } else { - System.out.println("Correct one!"); - return new SecureRandom(); - } - } - - private static class NoopSecureRandom extends SecureRandom { - public NoopSecureRandom() { - super(null, null); - } - } -} diff --git a/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/hacks/graalfeature/GraalCompileFixRegistrar.java b/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/hacks/graalfeature/GraalCompileFixRegistrar.java deleted file mode 100644 index a74d3fcbd..000000000 --- a/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/hacks/graalfeature/GraalCompileFixRegistrar.java +++ /dev/null @@ -1,42 +0,0 @@ -package de.adorsys.datasafe.cli.hacks.graalfeature; - -import com.oracle.svm.core.annotate.AutomaticFeature; -import de.adorsys.datasafe.cli.hacks.HackSecureRandom; -import org.graalvm.nativeimage.hosted.Feature; - -import java.security.Provider; -import java.security.SecureRandom; -import java.util.concurrent.atomic.AtomicReference; - -/** - * This class fixes NPE exception in Graal-compilator - when it tries to get non-existing engines from - * {@link Provider} - *

- * Additionally can log access to null service types using property PROVIDER_ACCESS_LOGGER, - * so you can add necessary fields to extra_engines.hack. (This will break build later, so you will need - * to remove this property when you detected all nulls in Provider). - *

- * Override string example: - * X509Store=false,null - */ -@AutomaticFeature -public class GraalCompileFixRegistrar implements Feature { - - private static final String PROVIDER_ACCESS_LOGGER = "PROVIDER_ACCESS_LOGGER"; - private static final AtomicReference random = new AtomicReference(); - - @Override - public void duringSetup(DuringSetupAccess access) { - System.setProperty("RUMBA", "ZUMBA"); - - access.registerObjectReplacer(orig -> { - if (orig instanceof SecureRandom) { - System.out.println("??? !!"); - random.compareAndSet(null, new HackSecureRandom()); - return random.get(); - } - - return orig; - }); - } -} diff --git a/datasafe-cli/src/main/resources/META-INF/native-image/de.adorsys/datasafe-cli/resource-config.json b/datasafe-cli/src/main/resources/META-INF/native-image/de.adorsys/datasafe-cli/resource-config.json index e49fd82dc..d8a326c80 100644 --- a/datasafe-cli/src/main/resources/META-INF/native-image/de.adorsys/datasafe-cli/resource-config.json +++ b/datasafe-cli/src/main/resources/META-INF/native-image/de.adorsys/datasafe-cli/resource-config.json @@ -31,10 +31,10 @@ "pattern": "lib/aws-java-sdk-s3-1.11.538.jar" }, { - "pattern": "lib/bcpkix-jdk15on-1.63.jar" + "pattern": "lib/bcpkix-jdk15on-1.64.jar" }, { - "pattern": "lib/bcprov-jdk15on-1.63.jar" + "pattern": "lib/bcprov-jdk15on-1.64.jar" }, { "pattern": "lib/checker-qual-2.5.2.jar" @@ -52,49 +52,49 @@ "pattern": "lib/dagger-2.17.jar" }, { - "pattern": "lib/datasafe-business-0.6.3-SNAPSHOT.jar" + "pattern": "lib/datasafe-business.jar" }, { - "pattern": "lib/datasafe-directory-api-0.6.3-SNAPSHOT.jar" + "pattern": "lib/datasafe-directory-api.jar" }, { - "pattern": "lib/datasafe-directory-impl-0.6.3-SNAPSHOT.jar" + "pattern": "lib/datasafe-directory-impl.jar" }, { - "pattern": "lib/datasafe-encryption-api-0.6.3-SNAPSHOT.jar" + "pattern": "lib/datasafe-encryption-api.jar" }, { - "pattern": "lib/datasafe-encryption-impl-0.6.3-SNAPSHOT.jar" + "pattern": "lib/datasafe-encryption-impl.jar" }, { - "pattern": "lib/datasafe-inbox-api-0.6.3-SNAPSHOT.jar" + "pattern": "lib/datasafe-inbox-api.jar" }, { - "pattern": "lib/datasafe-inbox-impl-0.6.3-SNAPSHOT.jar" + "pattern": "lib/datasafe-inbox-impl.jar" }, { - "pattern": "lib/datasafe-metainfo-version-api-0.6.3-SNAPSHOT.jar" + "pattern": "lib/datasafe-metainfo-version-api.jar" }, { - "pattern": "lib/datasafe-metainfo-version-impl-0.6.3-SNAPSHOT.jar" + "pattern": "lib/datasafe-metainfo-version-impl.jar" }, { - "pattern": "lib/datasafe-privatestore-api-0.6.3-SNAPSHOT.jar" + "pattern": "lib/datasafe-privatestore-api.jar" }, { - "pattern": "lib/datasafe-privatestore-impl-0.6.3-SNAPSHOT.jar" + "pattern": "lib/datasafe-privatestore-impl.jar" }, { - "pattern": "lib/datasafe-storage-api-0.6.3-SNAPSHOT.jar" + "pattern": "lib/datasafe-storage-api.jar" }, { - "pattern": "lib/datasafe-storage-impl-fs-0.6.3-SNAPSHOT.jar" + "pattern": "lib/datasafe-storage-impl-fs.jar" }, { - "pattern": "lib/datasafe-storage-impl-s3-0.6.3-SNAPSHOT.jar" + "pattern": "lib/datasafe-storage-impl-s3.jar" }, { - "pattern": "lib/datasafe-types-api-0.6.3-SNAPSHOT.jar" + "pattern": "lib/datasafe-types-api.jar" }, { "pattern": "lib/error_prone_annotations-2.2.0.jar" @@ -162,6 +162,12 @@ { "pattern": "lib/slf4j-simple-1.7.25.jar" }, + { + "pattern": "mozilla/public-suffix-list.txt" + }, + { + "pattern": "org/apache/http/client/version.properties" + }, { "pattern": "org/bouncycastle/asn1/ASN1ApplicationSpecific.class" }, @@ -219,6 +225,9 @@ { "pattern": "org/bouncycastle/asn1/ASN1OctetStringParser.class" }, + { + "pattern": "org/bouncycastle/asn1/ASN1OutputStream$ImplicitOutputStream.class" + }, { "pattern": "org/bouncycastle/asn1/ASN1OutputStream.class" }, @@ -273,6 +282,9 @@ { "pattern": "org/bouncycastle/asn1/BEROctetStringParser.class" }, + { + "pattern": "org/bouncycastle/asn1/BEROutputStream.class" + }, { "pattern": "org/bouncycastle/asn1/BERSequence.class" }, @@ -297,12 +309,21 @@ { "pattern": "org/bouncycastle/asn1/ConstructedOctetStream.class" }, + { + "pattern": "org/bouncycastle/asn1/DERApplicationSpecific.class" + }, { "pattern": "org/bouncycastle/asn1/DERBMPString.class" }, { "pattern": "org/bouncycastle/asn1/DERBitString.class" }, + { + "pattern": "org/bouncycastle/asn1/DERExternal.class" + }, + { + "pattern": "org/bouncycastle/asn1/DERFactory.class" + }, { "pattern": "org/bouncycastle/asn1/DERGeneralString.class" }, @@ -588,6 +609,213 @@ { "pattern": "org/bouncycastle/asn1/x9/X9ObjectIdentifiers.class" }, + { + "pattern": "org/bouncycastle/cert/CertException.class" + }, + { + "pattern": "org/bouncycastle/cert/CertIOException.class" + }, + { + "pattern": "org/bouncycastle/cert/CertRuntimeException.class" + }, + { + "pattern": "org/bouncycastle/cert/CertUtils.class" + }, + { + "pattern": "org/bouncycastle/cert/X509CRLHolder.class" + }, + { + "pattern": "org/bouncycastle/cert/X509CertificateHolder.class" + }, + { + "pattern": "org/bouncycastle/cert/X509ExtensionUtils.class" + }, + { + "pattern": "org/bouncycastle/cert/X509v3CertificateBuilder.class" + }, + { + "pattern": "org/bouncycastle/cert/jcajce/CertHelper.class" + }, + { + "pattern": "org/bouncycastle/cert/jcajce/DefaultCertHelper.class" + }, + { + "pattern": "org/bouncycastle/cert/jcajce/JcaX509CertificateConverter$ExCertificateException.class" + }, + { + "pattern": "org/bouncycastle/cert/jcajce/JcaX509CertificateConverter$ExCertificateParsingException.class" + }, + { + "pattern": "org/bouncycastle/cert/jcajce/JcaX509CertificateConverter.class" + }, + { + "pattern": "org/bouncycastle/cert/jcajce/JcaX509CertificateHolder.class" + }, + { + "pattern": "org/bouncycastle/cert/jcajce/JcaX509ExtensionUtils$SHA1DigestCalculator.class" + }, + { + "pattern": "org/bouncycastle/cert/jcajce/JcaX509ExtensionUtils.class" + }, + { + "pattern": "org/bouncycastle/cert/jcajce/JcaX509v3CertificateBuilder.class" + }, + { + "pattern": "org/bouncycastle/cert/jcajce/NamedCertHelper.class" + }, + { + "pattern": "org/bouncycastle/cert/jcajce/ProviderCertHelper.class" + }, + { + "pattern": "org/bouncycastle/cert/selector/X509CertificateHolderSelector.class" + }, + { + "pattern": "org/bouncycastle/cms/CMSAlgorithm.class" + }, + { + "pattern": "org/bouncycastle/cms/CMSContentInfoParser.class" + }, + { + "pattern": "org/bouncycastle/cms/CMSEnvelopedDataParser.class" + }, + { + "pattern": "org/bouncycastle/cms/CMSEnvelopedDataStreamGenerator$CmsEnvelopedDataOutputStream.class" + }, + { + "pattern": "org/bouncycastle/cms/CMSEnvelopedDataStreamGenerator.class" + }, + { + "pattern": "org/bouncycastle/cms/CMSEnvelopedGenerator.class" + }, + { + "pattern": "org/bouncycastle/cms/CMSEnvelopedHelper$CMSEnvelopedSecureReadable.class" + }, + { + "pattern": "org/bouncycastle/cms/CMSEnvelopedHelper.class" + }, + { + "pattern": "org/bouncycastle/cms/CMSException.class" + }, + { + "pattern": "org/bouncycastle/cms/CMSProcessable.class" + }, + { + "pattern": "org/bouncycastle/cms/CMSProcessableInputStream.class" + }, + { + "pattern": "org/bouncycastle/cms/CMSReadable.class" + }, + { + "pattern": "org/bouncycastle/cms/CMSSecureReadable.class" + }, + { + "pattern": "org/bouncycastle/cms/CMSTypedStream$FullReaderStream.class" + }, + { + "pattern": "org/bouncycastle/cms/CMSTypedStream.class" + }, + { + "pattern": "org/bouncycastle/cms/CMSUtils.class" + }, + { + "pattern": "org/bouncycastle/cms/KEKRecipient.class" + }, + { + "pattern": "org/bouncycastle/cms/KEKRecipientId.class" + }, + { + "pattern": "org/bouncycastle/cms/KEKRecipientInfoGenerator.class" + }, + { + "pattern": "org/bouncycastle/cms/KEKRecipientInformation.class" + }, + { + "pattern": "org/bouncycastle/cms/KeyTransRecipient.class" + }, + { + "pattern": "org/bouncycastle/cms/KeyTransRecipientId.class" + }, + { + "pattern": "org/bouncycastle/cms/KeyTransRecipientInfoGenerator.class" + }, + { + "pattern": "org/bouncycastle/cms/KeyTransRecipientInformation.class" + }, + { + "pattern": "org/bouncycastle/cms/NullOutputStream.class" + }, + { + "pattern": "org/bouncycastle/cms/PasswordRecipient$PRF.class" + }, + { + "pattern": "org/bouncycastle/cms/Recipient.class" + }, + { + "pattern": "org/bouncycastle/cms/RecipientId.class" + }, + { + "pattern": "org/bouncycastle/cms/RecipientInfoGenerator.class" + }, + { + "pattern": "org/bouncycastle/cms/RecipientInformation.class" + }, + { + "pattern": "org/bouncycastle/cms/RecipientInformationStore.class" + }, + { + "pattern": "org/bouncycastle/cms/RecipientOperator.class" + }, + { + "pattern": "org/bouncycastle/cms/jcajce/CMSUtils.class" + }, + { + "pattern": "org/bouncycastle/cms/jcajce/DefaultJcaJceExtHelper.class" + }, + { + "pattern": "org/bouncycastle/cms/jcajce/EnvelopedDataHelper$1.class" + }, + { + "pattern": "org/bouncycastle/cms/jcajce/EnvelopedDataHelper$JCECallback.class" + }, + { + "pattern": "org/bouncycastle/cms/jcajce/EnvelopedDataHelper.class" + }, + { + "pattern": "org/bouncycastle/cms/jcajce/JcaJceExtHelper.class" + }, + { + "pattern": "org/bouncycastle/cms/jcajce/JceCMSContentEncryptorBuilder$CMSOutputEncryptor.class" + }, + { + "pattern": "org/bouncycastle/cms/jcajce/JceCMSContentEncryptorBuilder.class" + }, + { + "pattern": "org/bouncycastle/cms/jcajce/JceKEKEnvelopedRecipient$1.class" + }, + { + "pattern": "org/bouncycastle/cms/jcajce/JceKEKEnvelopedRecipient.class" + }, + { + "pattern": "org/bouncycastle/cms/jcajce/JceKEKRecipient.class" + }, + { + "pattern": "org/bouncycastle/cms/jcajce/JceKEKRecipientInfoGenerator.class" + }, + { + "pattern": "org/bouncycastle/cms/jcajce/JceKeyTransEnvelopedRecipient$1.class" + }, + { + "pattern": "org/bouncycastle/cms/jcajce/JceKeyTransEnvelopedRecipient.class" + }, + { + "pattern": "org/bouncycastle/cms/jcajce/JceKeyTransRecipient.class" + }, + { + "pattern": "org/bouncycastle/cms/jcajce/JceKeyTransRecipientInfoGenerator.class" + }, + { + "pattern": "org/bouncycastle/cms/jcajce/ProviderJcaJceExtHelper.class" + }, { "pattern": "org/bouncycastle/crypto/CipherParameters.class" }, @@ -1059,6 +1287,96 @@ { "pattern": "org/bouncycastle/jce/provider/BouncyCastleProviderConfiguration.class" }, + { + "pattern": "org/bouncycastle/operator/AsymmetricKeyUnwrapper.class" + }, + { + "pattern": "org/bouncycastle/operator/AsymmetricKeyWrapper.class" + }, + { + "pattern": "org/bouncycastle/operator/ContentSigner.class" + }, + { + "pattern": "org/bouncycastle/operator/DefaultSecretKeySizeProvider.class" + }, + { + "pattern": "org/bouncycastle/operator/DefaultSignatureAlgorithmIdentifierFinder.class" + }, + { + "pattern": "org/bouncycastle/operator/DigestCalculator.class" + }, + { + "pattern": "org/bouncycastle/operator/GenericKey.class" + }, + { + "pattern": "org/bouncycastle/operator/InputDecryptor.class" + }, + { + "pattern": "org/bouncycastle/operator/KeyUnwrapper.class" + }, + { + "pattern": "org/bouncycastle/operator/KeyWrapper.class" + }, + { + "pattern": "org/bouncycastle/operator/OperatorCreationException.class" + }, + { + "pattern": "org/bouncycastle/operator/OperatorException.class" + }, + { + "pattern": "org/bouncycastle/operator/OperatorStreamException.class" + }, + { + "pattern": "org/bouncycastle/operator/OutputEncryptor.class" + }, + { + "pattern": "org/bouncycastle/operator/RuntimeOperatorException.class" + }, + { + "pattern": "org/bouncycastle/operator/SecretKeySizeProvider.class" + }, + { + "pattern": "org/bouncycastle/operator/SignatureAlgorithmIdentifierFinder.class" + }, + { + "pattern": "org/bouncycastle/operator/SymmetricKeyUnwrapper.class" + }, + { + "pattern": "org/bouncycastle/operator/SymmetricKeyWrapper.class" + }, + { + "pattern": "org/bouncycastle/operator/jcajce/JcaContentSignerBuilder$1.class" + }, + { + "pattern": "org/bouncycastle/operator/jcajce/JcaContentSignerBuilder$SignatureOutputStream.class" + }, + { + "pattern": "org/bouncycastle/operator/jcajce/JcaContentSignerBuilder.class" + }, + { + "pattern": "org/bouncycastle/operator/jcajce/JceAsymmetricKeyUnwrapper.class" + }, + { + "pattern": "org/bouncycastle/operator/jcajce/JceAsymmetricKeyWrapper.class" + }, + { + "pattern": "org/bouncycastle/operator/jcajce/JceGenericKey.class" + }, + { + "pattern": "org/bouncycastle/operator/jcajce/JceSymmetricKeyUnwrapper.class" + }, + { + "pattern": "org/bouncycastle/operator/jcajce/JceSymmetricKeyWrapper.class" + }, + { + "pattern": "org/bouncycastle/operator/jcajce/OperatorHelper$OpCertificateException.class" + }, + { + "pattern": "org/bouncycastle/operator/jcajce/OperatorHelper.class" + }, + { + "pattern": "org/bouncycastle/operator/jcajce/OperatorUtils.class" + }, { "pattern": "org/bouncycastle/pqc/asn1/PQCObjectIdentifiers.class" }, @@ -1143,6 +1461,9 @@ { "pattern": "org/bouncycastle/util/io/TeeOutputStream.class" }, + { + "pattern": "org/joda/time/tz/data/.+" + }, { "pattern": "org/slf4j/impl/StaticLoggerBinder.class" } From 28d0c8ff6ff83aa802850c0d3cb542891957bc09 Mon Sep 17 00:00:00 2001 From: Valentyn Berezin Date: Thu, 17 Oct 2019 13:11:41 +0300 Subject: [PATCH 210/255] DOC-277. Change provider JAR --- .travis/install_custom_jdk_and_add_security_providers.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis/install_custom_jdk_and_add_security_providers.sh b/.travis/install_custom_jdk_and_add_security_providers.sh index e58fbc32e..a0850305f 100755 --- a/.travis/install_custom_jdk_and_add_security_providers.sh +++ b/.travis/install_custom_jdk_and_add_security_providers.sh @@ -18,10 +18,10 @@ BC_VERSION=`grep ".*" pom.xml | c # 2.2 Download BC jars needed # We need special provider JAR (https://www.bouncycastle.org/latest_releases.html): -curl "https://www.bouncycastle.org/download/bcprov-ext-jdk15to18-${BC_VERSION//\./}.jar" \ +curl -L "https://www.bouncycastle.org/download/bcprov-ext-jdk15to18-${BC_VERSION//\./}.jar" \ --output "$JAVA_HOME/jre/lib/ext/bcprov-jdk15on-${BC_VERSION}.jar" -curl "https://repo1.maven.org/maven2/org/bouncycastle/bctls-jdk15on/${BC_VERSION}/bctls-jdk15on-${BC_VERSION}.jar" \ +curl -L "https://repo1.maven.org/maven2/org/bouncycastle/bctls-jdk15on/${BC_VERSION}/bctls-jdk15on-${BC_VERSION}.jar" \ --output "$JAVA_HOME/jre/lib/ext/bctls-jdk15on-${BC_VERSION}.jar" # Windows does not have Graal Updater (gu) tool, so we install native-image manually From 0506c03fb3929c80d818e053e4f91d5808395d7d Mon Sep 17 00:00:00 2001 From: Valentyn Berezin Date: Thu, 17 Oct 2019 13:20:26 +0300 Subject: [PATCH 211/255] DOC-277. Move back fix --- .../GraalCompileFixNpeOnMissingServiceTypeInKnownProviders.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename datasafe-cli/src/main/java/de/adorsys/datasafe/cli/hacks/{graalfeature => }/GraalCompileFixNpeOnMissingServiceTypeInKnownProviders.java (98%) diff --git a/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/hacks/graalfeature/GraalCompileFixNpeOnMissingServiceTypeInKnownProviders.java b/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/hacks/GraalCompileFixNpeOnMissingServiceTypeInKnownProviders.java similarity index 98% rename from datasafe-cli/src/main/java/de/adorsys/datasafe/cli/hacks/graalfeature/GraalCompileFixNpeOnMissingServiceTypeInKnownProviders.java rename to datasafe-cli/src/main/java/de/adorsys/datasafe/cli/hacks/GraalCompileFixNpeOnMissingServiceTypeInKnownProviders.java index 96152628e..e90c26a79 100644 --- a/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/hacks/graalfeature/GraalCompileFixNpeOnMissingServiceTypeInKnownProviders.java +++ b/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/hacks/GraalCompileFixNpeOnMissingServiceTypeInKnownProviders.java @@ -1,4 +1,4 @@ -package de.adorsys.datasafe.cli.hacks.graalfeature; +package de.adorsys.datasafe.cli.hacks; import com.oracle.svm.core.annotate.AutomaticFeature; import lombok.RequiredArgsConstructor; From 4483d277d0017e4bfe0629109824c2b362161b63 Mon Sep 17 00:00:00 2001 From: Valentyn Berezin Date: Thu, 17 Oct 2019 13:41:06 +0300 Subject: [PATCH 212/255] DOC-277. Bump to 1.64 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 2cf63f1ac..1bb0f59ef 100644 --- a/pom.xml +++ b/pom.xml @@ -84,7 +84,7 @@ 3.1.1 1.18.6 3.5 - 1.63 + 1.64 2.8.5 2.17 27.0.1-jre From e5132556c42ce844ef9a4d539dbf64729063c11f Mon Sep 17 00:00:00 2001 From: Valentyn Berezin Date: Thu, 17 Oct 2019 13:43:07 +0300 Subject: [PATCH 213/255] DOC-277. Fix JAR name --- .travis/install_custom_jdk_and_add_security_providers.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis/install_custom_jdk_and_add_security_providers.sh b/.travis/install_custom_jdk_and_add_security_providers.sh index a0850305f..b54b246c8 100755 --- a/.travis/install_custom_jdk_and_add_security_providers.sh +++ b/.travis/install_custom_jdk_and_add_security_providers.sh @@ -19,7 +19,7 @@ BC_VERSION=`grep ".*" pom.xml | c # 2.2 Download BC jars needed # We need special provider JAR (https://www.bouncycastle.org/latest_releases.html): curl -L "https://www.bouncycastle.org/download/bcprov-ext-jdk15to18-${BC_VERSION//\./}.jar" \ - --output "$JAVA_HOME/jre/lib/ext/bcprov-jdk15on-${BC_VERSION}.jar" + --output "$JAVA_HOME/jre/lib/ext/bcprov-ext-jdk15to18-${BC_VERSION//\./}.jar" curl -L "https://repo1.maven.org/maven2/org/bouncycastle/bctls-jdk15on/${BC_VERSION}/bctls-jdk15on-${BC_VERSION}.jar" \ --output "$JAVA_HOME/jre/lib/ext/bctls-jdk15on-${BC_VERSION}.jar" From ee1d7940e027f4a8869dc769e6c3c1ad08339063 Mon Sep 17 00:00:00 2001 From: Valentyn Berezin Date: Thu, 17 Oct 2019 20:44:49 +0300 Subject: [PATCH 214/255] DOC-277. Final set of CLI fixes --- datasafe-cli/pom.xml | 3 +- .../java/de/adorsys/datasafe/cli/Cli.java | 16 ++++ .../java/de/adorsys/datasafe/cli/CliOld.java | 94 ------------------- .../datasafe/cli/config/DatasafeFactory.java | 10 +- .../datasafe/cli/hacks/NoOpRandom.java | 10 ++ .../GraalCompileFixCryptoRegistrar.java | 38 ++++++++ ...eOnMissingServiceTypeInKnownProviders.java | 2 +- .../datasafe-cli/reflect-config.json | 14 ++- 8 files changed, 81 insertions(+), 106 deletions(-) delete mode 100644 datasafe-cli/src/main/java/de/adorsys/datasafe/cli/CliOld.java create mode 100644 datasafe-cli/src/main/java/de/adorsys/datasafe/cli/hacks/NoOpRandom.java create mode 100644 datasafe-cli/src/main/java/de/adorsys/datasafe/cli/hacks/graalfeature/GraalCompileFixCryptoRegistrar.java rename datasafe-cli/src/main/java/de/adorsys/datasafe/cli/hacks/{ => graalfeature}/GraalCompileFixNpeOnMissingServiceTypeInKnownProviders.java (98%) diff --git a/datasafe-cli/pom.xml b/datasafe-cli/pom.xml index 3648b825a..6f0b0a9d6 100644 --- a/datasafe-cli/pom.xml +++ b/datasafe-cli/pom.xml @@ -156,7 +156,8 @@ --no-server --no-fallback --enable-all-security-services - --features=de.adorsys.datasafe.cli.hacks.GraalCompileFixNpeOnMissingServiceTypeInKnownProviders + --features=de.adorsys.datasafe.cli.hacks.graalfeature.GraalCompileFixNpeOnMissingServiceTypeInKnownProviders,de.adorsys.datasafe.cli.hacks.graalfeature.GraalCompileFixCryptoRegistrar + --initialize-at-build-time=de.adorsys.datasafe.cli.hacks.NoOpRandom --initialize-at-build-time=org.apache.http.conn.routing.HttpRoute --initialize-at-build-time=org.apache.http.conn.HttpClientConnectionManager diff --git a/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/Cli.java b/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/Cli.java index 29c0f7399..58c87b8d1 100644 --- a/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/Cli.java +++ b/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/Cli.java @@ -13,10 +13,13 @@ import lombok.RequiredArgsConstructor; import lombok.SneakyThrows; import lombok.extern.slf4j.Slf4j; +import org.bouncycastle.crypto.CryptoServicesRegistrar; import org.bouncycastle.jce.provider.BouncyCastleProvider; import picocli.CommandLine; import java.io.Reader; +import java.lang.reflect.Field; +import java.lang.reflect.Modifier; import java.nio.file.Files; import java.nio.file.Path; import java.nio.file.Paths; @@ -47,6 +50,8 @@ public class Cli implements Runnable { @SneakyThrows public static void main(String[] args) { + // Restoring correct SecureRandom implementation + reInitializeRandomAgain(); // Only needed when running using JRE, unnecessary for CLI: Security.addProvider(new BouncyCastleProvider()); // silencing AWS SDK: @@ -108,4 +113,15 @@ private Credentials credentials() { } } } + + @SneakyThrows + private static void reInitializeRandomAgain() { + Field secureRandom = CryptoServicesRegistrar.class.getDeclaredField("defaultSecureRandom"); + secureRandom.setAccessible(true); + Field modifiersField = Field.class.getDeclaredField("modifiers"); + modifiersField.setAccessible(true); + modifiersField.setInt(secureRandom, secureRandom.getModifiers() & ~Modifier.FINAL); + + secureRandom.set(CryptoServicesRegistrar.class, null); + } } diff --git a/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/CliOld.java b/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/CliOld.java deleted file mode 100644 index c49bb306e..000000000 --- a/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/CliOld.java +++ /dev/null @@ -1,94 +0,0 @@ -package de.adorsys.datasafe.cli; - -import com.google.common.collect.ImmutableSet; -import com.google.common.io.ByteStreams; -import de.adorsys.datasafe.business.impl.service.DaggerDefaultDatasafeServices; -import de.adorsys.datasafe.business.impl.service.DefaultDatasafeServices; -import de.adorsys.datasafe.directory.impl.profile.config.DefaultDFSConfig; -import de.adorsys.datasafe.encrypiton.api.types.UserIDAuth; -import de.adorsys.datasafe.storage.impl.fs.FileSystemStorageService; -import de.adorsys.datasafe.types.api.actions.ListRequest; -import de.adorsys.datasafe.types.api.actions.ReadRequest; -import de.adorsys.datasafe.types.api.actions.WriteRequest; -import lombok.SneakyThrows; -import org.bouncycastle.jce.provider.BouncyCastleProvider; - -import java.io.OutputStream; -import java.nio.file.Files; -import java.nio.file.Path; -import java.nio.file.Paths; -import java.security.Security; -import java.time.LocalDateTime; - -public class CliOld { - - @SneakyThrows - public static void main(String[] args) { - Path root = Paths.get("/home/valb3r/temp/datasafe-tst/" + LocalDateTime.now().toString() + "/"); - Files.createDirectories(root); - - Security.addProvider(new BouncyCastleProvider()); - // To register provider you need to: - /* - Share the JCE provider JAR file to java-home/jre/lib/ext/. - Stop the Application Server. - If the Application Server is not stopped and then restarted later in this process, the JCE provider will not be recognized by the Application Server. - Edit the java-home/jre/lib/security/java.security properties file in any text editor. Add the JCE provider you’ve just downloaded to this file. - The java.security file contains detailed instructions for adding this provider. Basically, you need to add a line of the following format in a location with similar properties: - security.provider.n=provider-class-name - */ - - // this will create all Datasafe files and user documents under - DefaultDatasafeServices datasafe = datasafeServices(root, "PAZZWORT"); - - UserIDAuth user = new UserIDAuth("me", "mememe"); - UserIDAuth userRecipient = new UserIDAuth("recipient", "RRRE!!"); - - datasafe.userProfile().registerUsingDefaults(user); - datasafe.userProfile().registerUsingDefaults(userRecipient); - - try (OutputStream os = - datasafe.privateService().write(WriteRequest.forDefaultPrivate(user, "my-file")) - ) { - os.write("Hello from Datasafe".getBytes()); - } - - - long sz = datasafe.privateService().list(ListRequest.forDefaultPrivate(user, "./")).count(); - System.out.println("User has " + sz + " files"); - - System.out.println(new String( - ByteStreams.toByteArray( - datasafe.privateService().read(ReadRequest.forDefaultPrivate(user, "my-file")) - ) - )); - - try (OutputStream os = - datasafe.inboxService().write(WriteRequest.forDefaultPublic( - ImmutableSet.of(user.getUserID(), userRecipient.getUserID()), "hello-recipient")) - ) { - os.write("Hello from INBOX!".getBytes()); - } - - long szInb = datasafe.inboxService().list(ListRequest.forDefaultPrivate(user, "./")).count(); - System.out.println("User has " + szInb + " files in INBOX"); - - System.out.println(new String( - ByteStreams.toByteArray( - datasafe.inboxService().read(ReadRequest.forDefaultPrivate(user, "hello-recipient")) - ) - )); - } - - private static DefaultDatasafeServices datasafeServices(Path fsRoot, String systemPassword) { - DefaultDatasafeServices multiDfsDatasafe = DaggerDefaultDatasafeServices - .builder() - .config(new DefaultDFSConfig(fsRoot.toUri().toASCIIString(), systemPassword)) - .storage( - new FileSystemStorageService(fsRoot) - ) - .build(); - return multiDfsDatasafe; - } -} - diff --git a/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/config/DatasafeFactory.java b/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/config/DatasafeFactory.java index 49aaa6ba3..5482f2218 100644 --- a/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/config/DatasafeFactory.java +++ b/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/config/DatasafeFactory.java @@ -115,11 +115,11 @@ private static S3StorageService getStorageService(String accessKey, String secre ) .enablePathStyleAccess(); - AwsClientBuilder.EndpointConfiguration endpoint = new AwsClientBuilder.EndpointConfiguration( - url, - region - ); - amazonS3ClientBuilder.withEndpointConfiguration(endpoint); + AwsClientBuilder.EndpointConfiguration endpoint = new AwsClientBuilder.EndpointConfiguration( + url, + region + ); + amazonS3ClientBuilder.withEndpointConfiguration(endpoint); if (! url.toLowerCase().startsWith("https")) { log.info("Creating S3 client without https"); diff --git a/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/hacks/NoOpRandom.java b/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/hacks/NoOpRandom.java new file mode 100644 index 000000000..2f1d758f5 --- /dev/null +++ b/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/hacks/NoOpRandom.java @@ -0,0 +1,10 @@ +package de.adorsys.datasafe.cli.hacks; + +import java.security.SecureRandom; + +public class NoOpRandom extends SecureRandom { + + public NoOpRandom() { + super(null, null); + } +} diff --git a/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/hacks/graalfeature/GraalCompileFixCryptoRegistrar.java b/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/hacks/graalfeature/GraalCompileFixCryptoRegistrar.java new file mode 100644 index 000000000..803692222 --- /dev/null +++ b/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/hacks/graalfeature/GraalCompileFixCryptoRegistrar.java @@ -0,0 +1,38 @@ +package de.adorsys.datasafe.cli.hacks.graalfeature; + +import com.oracle.svm.core.annotate.AutomaticFeature; +import de.adorsys.datasafe.cli.hacks.NoOpRandom; +import lombok.SneakyThrows; +import org.bouncycastle.crypto.CryptoServicesRegistrar; +import org.graalvm.nativeimage.hosted.Feature; + +import java.lang.reflect.Field; +import java.lang.reflect.Modifier; +import java.security.Provider; + +/** + * This class fixes NPE exception in Graal-compilator - when it tries to get non-existing engines from + * {@link Provider} + *

+ * Additionally can log access to null service types using property PROVIDER_ACCESS_LOGGER, + * so you can add necessary fields to extra_engines.hack. (This will break build later, so you will need + * to remove this property when you detected all nulls in Provider). + *

+ * Override string example: + * X509Store=false,null + */ +@AutomaticFeature +public class GraalCompileFixCryptoRegistrar implements Feature { + + @Override + @SneakyThrows + public void afterRegistration(AfterRegistrationAccess access) { + Field secureRandom = CryptoServicesRegistrar.class.getDeclaredField("defaultSecureRandom"); + secureRandom.setAccessible(true); + Field modifiersField = Field.class.getDeclaredField("modifiers"); + modifiersField.setAccessible(true); + modifiersField.setInt(secureRandom, secureRandom.getModifiers() & ~Modifier.FINAL); + + secureRandom.set(CryptoServicesRegistrar.class, new NoOpRandom()); + } +} diff --git a/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/hacks/GraalCompileFixNpeOnMissingServiceTypeInKnownProviders.java b/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/hacks/graalfeature/GraalCompileFixNpeOnMissingServiceTypeInKnownProviders.java similarity index 98% rename from datasafe-cli/src/main/java/de/adorsys/datasafe/cli/hacks/GraalCompileFixNpeOnMissingServiceTypeInKnownProviders.java rename to datasafe-cli/src/main/java/de/adorsys/datasafe/cli/hacks/graalfeature/GraalCompileFixNpeOnMissingServiceTypeInKnownProviders.java index e90c26a79..96152628e 100644 --- a/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/hacks/GraalCompileFixNpeOnMissingServiceTypeInKnownProviders.java +++ b/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/hacks/graalfeature/GraalCompileFixNpeOnMissingServiceTypeInKnownProviders.java @@ -1,4 +1,4 @@ -package de.adorsys.datasafe.cli.hacks; +package de.adorsys.datasafe.cli.hacks.graalfeature; import com.oracle.svm.core.annotate.AutomaticFeature; import lombok.RequiredArgsConstructor; diff --git a/datasafe-cli/src/main/resources/META-INF/native-image/de.adorsys/datasafe-cli/reflect-config.json b/datasafe-cli/src/main/resources/META-INF/native-image/de.adorsys/datasafe-cli/reflect-config.json index a5b44228e..7ce158e44 100644 --- a/datasafe-cli/src/main/resources/META-INF/native-image/de.adorsys/datasafe-cli/reflect-config.json +++ b/datasafe-cli/src/main/resources/META-INF/native-image/de.adorsys/datasafe-cli/reflect-config.json @@ -145,11 +145,11 @@ "name": "de.adorsys.datasafe.types.api.global.Version", "allDeclaredFields": true, "fields": [ - { - "name": "id", - "allowWrite": true - } - ] + { + "name": "id", + "allowWrite": true + } + ] }, { "name": "de.adorsys.datasafe.directory.api.types.StorageCredentials", @@ -435,6 +435,10 @@ } ] }, + { + "name": "org.bouncycastle.crypto.util.PBKDF2Config", + "allDeclaredFields": true + }, { "name": "org.bouncycastle.jcajce.provider.asymmetric.EdEC$Mappings", "methods": [ From e8baa716765fc1a83a0735c8c03907444f8f7349 Mon Sep 17 00:00:00 2001 From: Valentyn Berezin Date: Thu, 17 Oct 2019 20:53:00 +0300 Subject: [PATCH 215/255] DOC-277. Added comments and exception throwing --- .../datasafe/cli/hacks/NoOpRandom.java | 151 ++++++++++++++++++ .../GraalCompileFixCryptoRegistrar.java | 17 +- 2 files changed, 158 insertions(+), 10 deletions(-) diff --git a/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/hacks/NoOpRandom.java b/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/hacks/NoOpRandom.java index 2f1d758f5..363dae731 100644 --- a/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/hacks/NoOpRandom.java +++ b/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/hacks/NoOpRandom.java @@ -1,10 +1,161 @@ package de.adorsys.datasafe.cli.hacks; import java.security.SecureRandom; +import java.util.stream.DoubleStream; +import java.util.stream.IntStream; +import java.util.stream.LongStream; +/** + * This class substitutes SecureRandom during CLI generation, it should be overridden during runtime. + */ public class NoOpRandom extends SecureRandom { public NoOpRandom() { super(null, null); } + + @Override + public String getAlgorithm() { + throw new IllegalStateException("Not implemented"); + } + + @Override + public synchronized void setSeed(byte[] seed) { + throw new IllegalStateException("Not implemented"); + } + + @Override + public void setSeed(long seed) { + throw new IllegalStateException("Not implemented"); + } + + @Override + public void nextBytes(byte[] bytes) { + throw new IllegalStateException("Not implemented"); + } + + @Override + public byte[] generateSeed(int numBytes) { + throw new IllegalStateException("Not implemented"); + } + + @Override + public int nextInt() { + throw new IllegalStateException("Not implemented"); + } + + @Override + public int nextInt(int bound) { + throw new IllegalStateException("Not implemented"); + } + + @Override + public long nextLong() { + throw new IllegalStateException("Not implemented"); + } + + @Override + public boolean nextBoolean() { + throw new IllegalStateException("Not implemented"); + } + + @Override + public float nextFloat() { + throw new IllegalStateException("Not implemented"); + } + + @Override + public double nextDouble() { + throw new IllegalStateException("Not implemented"); + } + + @Override + public synchronized double nextGaussian() { + throw new IllegalStateException("Not implemented"); + } + + @Override + public IntStream ints(long streamSize) { + throw new IllegalStateException("Not implemented"); + } + + @Override + public IntStream ints() { + throw new IllegalStateException("Not implemented"); + } + + @Override + public IntStream ints(long streamSize, int randomNumberOrigin, int randomNumberBound) { + throw new IllegalStateException("Not implemented"); + } + + @Override + public IntStream ints(int randomNumberOrigin, int randomNumberBound) { + throw new IllegalStateException("Not implemented"); + } + + @Override + public LongStream longs(long streamSize) { + throw new IllegalStateException("Not implemented"); + } + + @Override + public LongStream longs() { + throw new IllegalStateException("Not implemented"); + } + + @Override + public LongStream longs(long streamSize, long randomNumberOrigin, long randomNumberBound) { + throw new IllegalStateException("Not implemented"); + } + + @Override + public LongStream longs(long randomNumberOrigin, long randomNumberBound) { + throw new IllegalStateException("Not implemented"); + } + + @Override + public DoubleStream doubles(long streamSize) { + throw new IllegalStateException("Not implemented"); + } + + @Override + public DoubleStream doubles() { + throw new IllegalStateException("Not implemented"); + } + + @Override + public DoubleStream doubles(long streamSize, double randomNumberOrigin, double randomNumberBound) { + throw new IllegalStateException("Not implemented"); + } + + @Override + public DoubleStream doubles(double randomNumberOrigin, double randomNumberBound) { + throw new IllegalStateException("Not implemented"); + } + + @Override + public int hashCode() { + throw new IllegalStateException("Not implemented"); + } + + @Override + public boolean equals(Object obj) { + throw new IllegalStateException("Not implemented"); + } + + @Override + protected Object clone() throws CloneNotSupportedException { + throw new IllegalStateException("Not implemented"); + } + + @Override + public String toString() { + throw new IllegalStateException("Not implemented"); + } + + @Override + protected void finalize() throws Throwable { + throw new IllegalStateException("Not implemented"); + } } diff --git a/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/hacks/graalfeature/GraalCompileFixCryptoRegistrar.java b/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/hacks/graalfeature/GraalCompileFixCryptoRegistrar.java index 803692222..55acb12b2 100644 --- a/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/hacks/graalfeature/GraalCompileFixCryptoRegistrar.java +++ b/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/hacks/graalfeature/GraalCompileFixCryptoRegistrar.java @@ -8,18 +8,15 @@ import java.lang.reflect.Field; import java.lang.reflect.Modifier; -import java.security.Provider; +import java.security.SecureRandom; /** - * This class fixes NPE exception in Graal-compilator - when it tries to get non-existing engines from - * {@link Provider} - *

- * Additionally can log access to null service types using property PROVIDER_ACCESS_LOGGER, - * so you can add necessary fields to extra_engines.hack. (This will break build later, so you will need - * to remove this property when you detected all nulls in Provider). - *

- * Override string example: - * X509Store=false,null + * Bouncy Castle attempts to access SecureRandom in {@link CryptoServicesRegistrar} class, during CLI + * generation. Because it is not allowed to have NativePRNG in image heap this breaks compilation. + * We fix this by setting {@code CryptoServicesRegistrar#defaultSecureRandom} to {@link NoOpRandom} that + * is simply stub class. Then, in runtime in main() CLI simply sets {@code defaultSecureRandom} to null + * before doing any useful work and such trick forces CryptoServicesRegistrar to get correct {@link SecureRandom} + * implementation, because when it is null BC initializes the field. */ @AutomaticFeature public class GraalCompileFixCryptoRegistrar implements Feature { From 6ef115db4fd0de062e848f97a548fd487314d487 Mon Sep 17 00:00:00 2001 From: Valentyn Berezin Date: Thu, 17 Oct 2019 20:54:02 +0300 Subject: [PATCH 216/255] DOC-277. Added comments and exception throwing --- datasafe-cli/src/main/java/de/adorsys/datasafe/cli/Cli.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/Cli.java b/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/Cli.java index 58c87b8d1..7d5253eb5 100644 --- a/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/Cli.java +++ b/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/Cli.java @@ -8,6 +8,7 @@ import de.adorsys.datasafe.cli.commands.profile.Profile; import de.adorsys.datasafe.cli.config.DatasafeFactory; import de.adorsys.datasafe.cli.dto.Credentials; +import de.adorsys.datasafe.cli.hacks.graalfeature.GraalCompileFixNpeOnMissingServiceTypeInKnownProviders; import de.adorsys.datasafe.encrypiton.api.types.UserIDAuth; import lombok.Getter; import lombok.RequiredArgsConstructor; @@ -114,6 +115,9 @@ private Credentials credentials() { } } + /** + * See {@link GraalCompileFixNpeOnMissingServiceTypeInKnownProviders} for details. + */ @SneakyThrows private static void reInitializeRandomAgain() { Field secureRandom = CryptoServicesRegistrar.class.getDeclaredField("defaultSecureRandom"); From ff126f266f2197b81351f19394e8f8ba447cb8db Mon Sep 17 00:00:00 2001 From: Valentyn Berezin Date: Thu, 17 Oct 2019 20:54:26 +0300 Subject: [PATCH 217/255] DOC-277. Added comments --- datasafe-cli/src/main/java/de/adorsys/datasafe/cli/Cli.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/Cli.java b/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/Cli.java index 7d5253eb5..0cc71ee9a 100644 --- a/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/Cli.java +++ b/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/Cli.java @@ -8,7 +8,6 @@ import de.adorsys.datasafe.cli.commands.profile.Profile; import de.adorsys.datasafe.cli.config.DatasafeFactory; import de.adorsys.datasafe.cli.dto.Credentials; -import de.adorsys.datasafe.cli.hacks.graalfeature.GraalCompileFixNpeOnMissingServiceTypeInKnownProviders; import de.adorsys.datasafe.encrypiton.api.types.UserIDAuth; import lombok.Getter; import lombok.RequiredArgsConstructor; @@ -116,7 +115,7 @@ private Credentials credentials() { } /** - * See {@link GraalCompileFixNpeOnMissingServiceTypeInKnownProviders} for details. + * See {@link de.adorsys.datasafe.cli.hacks.graalfeature.GraalCompileFixCryptoRegistrar} for details. */ @SneakyThrows private static void reInitializeRandomAgain() { From 748449b42c1c6911bbc8f5feab2ec4e11e6e7d1c Mon Sep 17 00:00:00 2001 From: Valentyn Berezin Date: Thu, 17 Oct 2019 20:59:50 +0300 Subject: [PATCH 218/255] DOC-277. Reconcile with develop branch --- .../install_custom_jdk_and_add_security_providers.sh | 7 +++---- .../de.adorsys/datasafe-cli/reflect-config.json | 12 ++++++++++++ 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/.travis/install_custom_jdk_and_add_security_providers.sh b/.travis/install_custom_jdk_and_add_security_providers.sh index b54b246c8..eef9ed43e 100755 --- a/.travis/install_custom_jdk_and_add_security_providers.sh +++ b/.travis/install_custom_jdk_and_add_security_providers.sh @@ -17,11 +17,10 @@ cd "$REPO_ROOT" || exit 1 BC_VERSION=`grep ".*" pom.xml | cut -d">" -f2 | cut -d"<" -f1` # 2.2 Download BC jars needed -# We need special provider JAR (https://www.bouncycastle.org/latest_releases.html): -curl -L "https://www.bouncycastle.org/download/bcprov-ext-jdk15to18-${BC_VERSION//\./}.jar" \ - --output "$JAVA_HOME/jre/lib/ext/bcprov-ext-jdk15to18-${BC_VERSION//\./}.jar" +curl "https://repo1.maven.org/maven2/org/bouncycastle/bcprov-jdk15on/${BC_VERSION}/bcprov-jdk15on-${BC_VERSION}.jar" \ + --output "$JAVA_HOME/jre/lib/ext/bcprov-jdk15on-${BC_VERSION}.jar" -curl -L "https://repo1.maven.org/maven2/org/bouncycastle/bctls-jdk15on/${BC_VERSION}/bctls-jdk15on-${BC_VERSION}.jar" \ +curl "https://repo1.maven.org/maven2/org/bouncycastle/bctls-jdk15on/${BC_VERSION}/bctls-jdk15on-${BC_VERSION}.jar" \ --output "$JAVA_HOME/jre/lib/ext/bctls-jdk15on-${BC_VERSION}.jar" # Windows does not have Graal Updater (gu) tool, so we install native-image manually diff --git a/datasafe-cli/src/main/resources/META-INF/native-image/de.adorsys/datasafe-cli/reflect-config.json b/datasafe-cli/src/main/resources/META-INF/native-image/de.adorsys/datasafe-cli/reflect-config.json index 7ce158e44..80f9109a8 100644 --- a/datasafe-cli/src/main/resources/META-INF/native-image/de.adorsys/datasafe-cli/reflect-config.json +++ b/datasafe-cli/src/main/resources/META-INF/native-image/de.adorsys/datasafe-cli/reflect-config.json @@ -298,6 +298,18 @@ } ] }, + { + "name": "java.lang.String" + }, + { + "name": "java.lang.Thread", + "methods": [ + { + "name": "getContextClassLoader", + "parameterTypes": [] + } + ] + }, { "name": "java.text.DateFormatSymbols", "methods": [ From adc6868d1b9f4632264b710d648717b399011836 Mon Sep 17 00:00:00 2001 From: Valentyn Berezin Date: Thu, 17 Oct 2019 21:02:05 +0300 Subject: [PATCH 219/255] DOC-277. Restore NoOpRandom --- .../datasafe/cli/hacks/NoOpRandom.java | 150 +----------------- 1 file changed, 1 insertion(+), 149 deletions(-) diff --git a/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/hacks/NoOpRandom.java b/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/hacks/NoOpRandom.java index 363dae731..6d145ab12 100644 --- a/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/hacks/NoOpRandom.java +++ b/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/hacks/NoOpRandom.java @@ -1,161 +1,13 @@ package de.adorsys.datasafe.cli.hacks; import java.security.SecureRandom; -import java.util.stream.DoubleStream; -import java.util.stream.IntStream; -import java.util.stream.LongStream; /** * This class substitutes SecureRandom during CLI generation, it should be overridden during runtime. */ public class NoOpRandom extends SecureRandom { - + public NoOpRandom() { super(null, null); } - - @Override - public String getAlgorithm() { - throw new IllegalStateException("Not implemented"); - } - - @Override - public synchronized void setSeed(byte[] seed) { - throw new IllegalStateException("Not implemented"); - } - - @Override - public void setSeed(long seed) { - throw new IllegalStateException("Not implemented"); - } - - @Override - public void nextBytes(byte[] bytes) { - throw new IllegalStateException("Not implemented"); - } - - @Override - public byte[] generateSeed(int numBytes) { - throw new IllegalStateException("Not implemented"); - } - - @Override - public int nextInt() { - throw new IllegalStateException("Not implemented"); - } - - @Override - public int nextInt(int bound) { - throw new IllegalStateException("Not implemented"); - } - - @Override - public long nextLong() { - throw new IllegalStateException("Not implemented"); - } - - @Override - public boolean nextBoolean() { - throw new IllegalStateException("Not implemented"); - } - - @Override - public float nextFloat() { - throw new IllegalStateException("Not implemented"); - } - - @Override - public double nextDouble() { - throw new IllegalStateException("Not implemented"); - } - - @Override - public synchronized double nextGaussian() { - throw new IllegalStateException("Not implemented"); - } - - @Override - public IntStream ints(long streamSize) { - throw new IllegalStateException("Not implemented"); - } - - @Override - public IntStream ints() { - throw new IllegalStateException("Not implemented"); - } - - @Override - public IntStream ints(long streamSize, int randomNumberOrigin, int randomNumberBound) { - throw new IllegalStateException("Not implemented"); - } - - @Override - public IntStream ints(int randomNumberOrigin, int randomNumberBound) { - throw new IllegalStateException("Not implemented"); - } - - @Override - public LongStream longs(long streamSize) { - throw new IllegalStateException("Not implemented"); - } - - @Override - public LongStream longs() { - throw new IllegalStateException("Not implemented"); - } - - @Override - public LongStream longs(long streamSize, long randomNumberOrigin, long randomNumberBound) { - throw new IllegalStateException("Not implemented"); - } - - @Override - public LongStream longs(long randomNumberOrigin, long randomNumberBound) { - throw new IllegalStateException("Not implemented"); - } - - @Override - public DoubleStream doubles(long streamSize) { - throw new IllegalStateException("Not implemented"); - } - - @Override - public DoubleStream doubles() { - throw new IllegalStateException("Not implemented"); - } - - @Override - public DoubleStream doubles(long streamSize, double randomNumberOrigin, double randomNumberBound) { - throw new IllegalStateException("Not implemented"); - } - - @Override - public DoubleStream doubles(double randomNumberOrigin, double randomNumberBound) { - throw new IllegalStateException("Not implemented"); - } - - @Override - public int hashCode() { - throw new IllegalStateException("Not implemented"); - } - - @Override - public boolean equals(Object obj) { - throw new IllegalStateException("Not implemented"); - } - - @Override - protected Object clone() throws CloneNotSupportedException { - throw new IllegalStateException("Not implemented"); - } - - @Override - public String toString() { - throw new IllegalStateException("Not implemented"); - } - - @Override - protected void finalize() throws Throwable { - throw new IllegalStateException("Not implemented"); - } } From 37891b89ef09063fd99dab9f0847f4e536348dfa Mon Sep 17 00:00:00 2001 From: Valentyn Berezin Date: Fri, 18 Oct 2019 12:29:13 +0300 Subject: [PATCH 220/255] DOC-277. Exposing scrypt in addition to pbkdf2 --- .../impl/keystore/DefaultKeyStoreModule.java | 13 ++- .../datasafe/cli/hacks/NoOpRandom.java | 2 +- .../api/types/keystore/KeyStoreConfig.java | 60 +++++++++++ .../api/types/keystore/pbkdf/PBKDF2.java | 30 ++++++ .../api/types/keystore/pbkdf/Scrypt.java | 31 ++++++ .../impl/keystore/KeyStoreCreationConfig.java | 41 -------- .../impl/keystore/KeyStoreGenerator.java | 8 +- .../impl/keystore/KeyStoreServiceImpl.java | 8 +- .../KeyStoreServiceImplBaseFunctions.java | 84 ++++++++++++---- .../keystore/generator/KeystoreBuilder.java | 6 +- .../impl/keystore/KeyStoreServiceTest.java | 2 +- .../rest/impl/config/DatasafeConfig.java | 36 ++++++- .../rest/impl/config/KeystoreProperties.java | 99 ++++++++++++++++++- .../src/main/resources/application.properties | 9 +- .../adapter/impl/LegacyDatasafeService.java | 4 +- .../impl/SimpleDatasafeServiceImpl.java | 6 +- 16 files changed, 347 insertions(+), 92 deletions(-) create mode 100644 datasafe-encryption/datasafe-encryption-api/src/main/java/de/adorsys/datasafe/encrypiton/api/types/keystore/KeyStoreConfig.java create mode 100644 datasafe-encryption/datasafe-encryption-api/src/main/java/de/adorsys/datasafe/encrypiton/api/types/keystore/pbkdf/PBKDF2.java create mode 100644 datasafe-encryption/datasafe-encryption-api/src/main/java/de/adorsys/datasafe/encrypiton/api/types/keystore/pbkdf/Scrypt.java delete mode 100644 datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/keystore/KeyStoreCreationConfig.java diff --git a/datasafe-business/src/main/java/de/adorsys/datasafe/business/impl/keystore/DefaultKeyStoreModule.java b/datasafe-business/src/main/java/de/adorsys/datasafe/business/impl/keystore/DefaultKeyStoreModule.java index c57a08763..7f0bc047b 100644 --- a/datasafe-business/src/main/java/de/adorsys/datasafe/business/impl/keystore/DefaultKeyStoreModule.java +++ b/datasafe-business/src/main/java/de/adorsys/datasafe/business/impl/keystore/DefaultKeyStoreModule.java @@ -8,7 +8,7 @@ import de.adorsys.datasafe.encrypiton.impl.keystore.DefaultPasswordBasedKeyConfigRuntimeDelegatable; import de.adorsys.datasafe.encrypiton.impl.keystore.KeyStoreServiceImplRuntimeDelegatable; import de.adorsys.datasafe.encrypiton.impl.keystore.PublicKeySerdeImplRuntimeDelegatable; -import de.adorsys.datasafe.encrypiton.impl.keystore.KeyStoreCreationConfig; +import de.adorsys.datasafe.encrypiton.api.types.keystore.KeyStoreConfig; import de.adorsys.datasafe.encrypiton.impl.keystore.types.PasswordBasedKeyConfig; /** @@ -24,15 +24,22 @@ public abstract class DefaultKeyStoreModule { public abstract PublicKeySerde publicKeySerde(PublicKeySerdeImplRuntimeDelegatable impl); /** - * If no external configuration provided, BCFKS key store type is used by default. + * If no external configuration provided ({@link KeyStoreConfig}), BouncyCastle BCFKS key store type is + * used by default. */ @Binds public abstract KeyStoreService keyStoreService(KeyStoreServiceImplRuntimeDelegatable impl); + /** + * Configures how to persist storage access credentials. + */ @Binds public abstract PasswordBasedKeyConfig passwordBasedKeyConfig(DefaultPasswordBasedKeyConfigRuntimeDelegatable impl); + /** + * Keystore settings - type, encryption, etc. + */ @BindsOptionalOf - public abstract KeyStoreCreationConfig keyStoreCreationConfig(); + public abstract KeyStoreConfig keyStoreConfig(); } diff --git a/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/hacks/NoOpRandom.java b/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/hacks/NoOpRandom.java index 6d145ab12..4b6bbbe29 100644 --- a/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/hacks/NoOpRandom.java +++ b/datasafe-cli/src/main/java/de/adorsys/datasafe/cli/hacks/NoOpRandom.java @@ -6,7 +6,7 @@ * This class substitutes SecureRandom during CLI generation, it should be overridden during runtime. */ public class NoOpRandom extends SecureRandom { - + public NoOpRandom() { super(null, null); } diff --git a/datasafe-encryption/datasafe-encryption-api/src/main/java/de/adorsys/datasafe/encrypiton/api/types/keystore/KeyStoreConfig.java b/datasafe-encryption/datasafe-encryption-api/src/main/java/de/adorsys/datasafe/encrypiton/api/types/keystore/KeyStoreConfig.java new file mode 100644 index 000000000..62bd98da2 --- /dev/null +++ b/datasafe-encryption/datasafe-encryption-api/src/main/java/de/adorsys/datasafe/encrypiton/api/types/keystore/KeyStoreConfig.java @@ -0,0 +1,60 @@ +package de.adorsys.datasafe.encrypiton.api.types.keystore; + +import de.adorsys.datasafe.encrypiton.api.types.keystore.pbkdf.PBKDF2; +import de.adorsys.datasafe.encrypiton.api.types.keystore.pbkdf.Scrypt; +import lombok.Builder; +import lombok.Getter; + +/** + * Wrapper for keystore config. + */ +@Getter +@Builder +public class KeyStoreConfig { + + public static final KeyStoreConfig DEFAULT = KeyStoreConfig.builder().build(); + + /** + * Which type of keystore to use i.e. BCFKS or UBER, etc. + */ + @Builder.Default + private final String type = "BCFKS"; + + /** + * Keystore encryption algorithm (used both for keys and keystore). For BCFKS refer to for BCFKS refer to + * {@see org.bouncycastle.jcajce.BCFKSLoadStoreParameter} + */ + @Builder.Default + private final String encryptionAlgo = "AES256_KWP"; + + /** + * Password key derivation configuration. + */ + @Builder.Default + private final PBKDF pbkdf = PBKDF.builder().build(); + + /** + * KeyStore authentication algorithm, for BCFKS refer to {@see org.bouncycastle.jcajce.BCFKSLoadStoreParameter} + */ + @Builder.Default + private final String macAlgo = "HmacSHA3_512"; + + /** + * Password key derivation configuration. + */ + @Getter + @Builder + public static class PBKDF { + + /** + * This is non null if we should use PBKDF2 based routines. + */ + @Builder.Default + private final PBKDF2 pbkdf2 = PBKDF2.builder().build(); + + /** + * This is non null if we should use Scrypt-based routines. + */ + private final Scrypt scrypt; + } +} diff --git a/datasafe-encryption/datasafe-encryption-api/src/main/java/de/adorsys/datasafe/encrypiton/api/types/keystore/pbkdf/PBKDF2.java b/datasafe-encryption/datasafe-encryption-api/src/main/java/de/adorsys/datasafe/encrypiton/api/types/keystore/pbkdf/PBKDF2.java new file mode 100644 index 000000000..5df02f214 --- /dev/null +++ b/datasafe-encryption/datasafe-encryption-api/src/main/java/de/adorsys/datasafe/encrypiton/api/types/keystore/pbkdf/PBKDF2.java @@ -0,0 +1,30 @@ +package de.adorsys.datasafe.encrypiton.api.types.keystore.pbkdf; + +import lombok.Builder; +import lombok.Getter; + +/** + * PBKDF2-based key derivation. + */ +@Getter +@Builder +public class PBKDF2 { + + /** + * Password derivation algorithm, for BCFKS refer to {@see org.bouncycastle.crypto.util.PBKDF2Config} + */ + @Builder.Default + private final String algo = "PRF_SHA512"; + + /** + * Password derivation salt length, for BCFKS refer to {@see org.bouncycastle.crypto.util.PBKDF2Config} + */ + @Builder.Default + private final int saltLength = 32; + + /** + * Password derivation iteration count, for BCFKS refer to {@see org.bouncycastle.crypto.util.PBKDF2Config} + */ + @Builder.Default + private final int iterCount = 20480; +} diff --git a/datasafe-encryption/datasafe-encryption-api/src/main/java/de/adorsys/datasafe/encrypiton/api/types/keystore/pbkdf/Scrypt.java b/datasafe-encryption/datasafe-encryption-api/src/main/java/de/adorsys/datasafe/encrypiton/api/types/keystore/pbkdf/Scrypt.java new file mode 100644 index 000000000..e4d80c623 --- /dev/null +++ b/datasafe-encryption/datasafe-encryption-api/src/main/java/de/adorsys/datasafe/encrypiton/api/types/keystore/pbkdf/Scrypt.java @@ -0,0 +1,31 @@ +package de.adorsys.datasafe.encrypiton.api.types.keystore.pbkdf; + +import lombok.Builder; +import lombok.Getter; + +/** + * Scrypt-based key derivation. + */ +@Getter +@Builder +public class Scrypt { + + /** + * Password derivation cost, for BCFKS refer to {@see org.bouncycastle.crypto.util.ScryptConfig} + */ + private final int cost; + /** + * Password derivation block size, for BCFKS refer to {@see org.bouncycastle.crypto.util.ScryptConfig} + */ + private final int blockSize; + + /** + * Password derivation parallelization, for BCFKS refer to {@see org.bouncycastle.crypto.util.ScryptConfig} + */ + private final int parallelization; + + /** + * Password derivation salt length, for BCFKS refer to {@see org.bouncycastle.crypto.util.ScryptConfig} + */ + private final int saltLength; +} diff --git a/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/keystore/KeyStoreCreationConfig.java b/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/keystore/KeyStoreCreationConfig.java deleted file mode 100644 index 46b08f1db..000000000 --- a/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/keystore/KeyStoreCreationConfig.java +++ /dev/null @@ -1,41 +0,0 @@ -package de.adorsys.datasafe.encrypiton.impl.keystore; - -/** - * Wrapper for keystore config. - */ -public class KeyStoreCreationConfig { - public static KeyStoreCreationConfig DEFAULT = getDefaultConfig(); - - private String keyStoreType; - private String storeEncryptionAlgorithm; - private String storePBKDFConfig; - private String storeMacAlgorithm; - - public KeyStoreCreationConfig(String keyStoreType, String storeEncryptionAlgorithm, - String storePBKDFConfig, String storeMacAlgorithm) { - this.keyStoreType = keyStoreType; - this.storeEncryptionAlgorithm = storeEncryptionAlgorithm; - this.storePBKDFConfig = storePBKDFConfig; - this.storeMacAlgorithm = storeMacAlgorithm; - } - - private static KeyStoreCreationConfig getDefaultConfig() { - return new KeyStoreCreationConfig("BCFKS", "AES256_KWP", "PRF_SHA512", "HmacSHA3_512"); - } - - public String getKeyStoreType() { - return keyStoreType; - } - - public String getStoreEncryptionAlgorithm() { - return storeEncryptionAlgorithm; - } - - public String getStorePBKDFConfig() { - return storePBKDFConfig; - } - - public String getStoreMacAlgorithm() { - return storeMacAlgorithm; - } -} diff --git a/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/keystore/KeyStoreGenerator.java b/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/keystore/KeyStoreGenerator.java index fc19af623..2831c3ef3 100644 --- a/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/keystore/KeyStoreGenerator.java +++ b/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/keystore/KeyStoreGenerator.java @@ -22,7 +22,7 @@ public class KeyStoreGenerator { @NonNull - private final KeyStoreCreationConfig keyStoreCreationConfig; + private final KeyStoreConfig keyStoreConfig; @NonNull private final String serverKeyPairAliasPrefix; @@ -39,13 +39,13 @@ public class KeyStoreGenerator { @Builder protected KeyStoreGenerator( KeyCreationConfig keyCreationConfig, - KeyStoreCreationConfig keyStoreCreationConfig, + KeyStoreConfig keyStoreConfig, String serverKeyPairAliasPrefix, ReadKeyPassword readKeyPassword, Map> secretKeys ) { this.config = new KeyCreationConfigImpl(keyCreationConfig); - this.keyStoreCreationConfig = keyStoreCreationConfig; + this.keyStoreConfig = keyStoreConfig; this.serverKeyPairAliasPrefix = "KEYSTORE-ID-0"; this.readKeyPassword = readKeyPassword; this.secretKeys = secretKeys; @@ -62,7 +62,7 @@ public KeyStore generate() { Date startTime = new Date(); try { String keyStoreID = serverKeyPairAliasPrefix; - KeystoreBuilder keystoreBuilder = new KeystoreBuilder().withKeyStoreConfig(keyStoreCreationConfig); + KeystoreBuilder keystoreBuilder = new KeystoreBuilder().withKeyStoreConfig(keyStoreConfig); { KeyPairGenerator encKeyPairGenerator = config.getEncKeyPairGenerator(keyStoreID); diff --git a/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/keystore/KeyStoreServiceImpl.java b/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/keystore/KeyStoreServiceImpl.java index 16fe227a8..d70be080c 100644 --- a/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/keystore/KeyStoreServiceImpl.java +++ b/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/keystore/KeyStoreServiceImpl.java @@ -27,11 +27,11 @@ public class KeyStoreServiceImpl implements KeyStoreService { private final PasswordBasedKeyConfig passwordBasedKeyConfig; - private final Optional keyStoreCreationConfig; + private final Optional keyStoreCreationConfig; @Inject public KeyStoreServiceImpl(PasswordBasedKeyConfig passwordBasedKeyConfig, - Optional keyStoreCreationConfig) { + Optional keyStoreCreationConfig) { this.passwordBasedKeyConfig = passwordBasedKeyConfig; this.keyStoreCreationConfig = keyStoreCreationConfig; } @@ -65,7 +65,7 @@ public KeyStore createKeyStore(KeyStoreAuth keyStoreAuth, log.debug("keystoreid = {}", serverKeyPairAliasPrefix); KeyStoreGenerator keyStoreGenerator = KeyStoreGenerator.builder() .keyCreationConfig(config) - .keyStoreCreationConfig(keyStoreCreationConfig.orElse(KeyStoreCreationConfig.DEFAULT)) + .keyStoreConfig(keyStoreCreationConfig.orElse(KeyStoreConfig.DEFAULT)) .serverKeyPairAliasPrefix(serverKeyPairAliasPrefix) .readKeyPassword(keyStoreAuth.getReadKeyPassword()) .secretKeys(secretKeys) @@ -172,7 +172,7 @@ public KeyStore deserialize(byte[] payload, String storeId, ReadStorePassword re return KeyStoreServiceImplBaseFunctions.loadKeyStore( payload, storeId, - keyStoreCreationConfig.orElse(KeyStoreCreationConfig.DEFAULT), + keyStoreCreationConfig.orElse(KeyStoreConfig.DEFAULT), readStorePassword ); } diff --git a/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/keystore/generator/KeyStoreServiceImplBaseFunctions.java b/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/keystore/generator/KeyStoreServiceImplBaseFunctions.java index 79cd08abd..d142dc41c 100644 --- a/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/keystore/generator/KeyStoreServiceImplBaseFunctions.java +++ b/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/keystore/generator/KeyStoreServiceImplBaseFunctions.java @@ -4,12 +4,14 @@ import de.adorsys.datasafe.encrypiton.api.types.keystore.ReadKeyPassword; import de.adorsys.datasafe.encrypiton.api.types.keystore.ReadStorePassword; import de.adorsys.datasafe.encrypiton.api.types.keystore.SecretKeyEntry; -import de.adorsys.datasafe.encrypiton.impl.keystore.KeyStoreCreationConfig; +import de.adorsys.datasafe.encrypiton.api.types.keystore.KeyStoreConfig; import de.adorsys.datasafe.encrypiton.impl.keystore.types.KeyPairEntry; import lombok.SneakyThrows; import org.bouncycastle.asn1.x509.AlgorithmIdentifier; import org.bouncycastle.cert.X509CertificateHolder; import org.bouncycastle.crypto.util.PBKDF2Config; +import org.bouncycastle.crypto.util.PBKDFConfig; +import org.bouncycastle.crypto.util.ScryptConfig; import org.bouncycastle.jcajce.BCFKSLoadStoreParameter; import java.io.ByteArrayInputStream; @@ -36,22 +38,19 @@ private KeyStoreServiceImplBaseFunctions() { /** * Create an initializes a new key store. The key store is not yet password protected. * - * @param keyStoreConfig storeType + * @param config storeType * @return KeyStore keyStore */ @SneakyThrows - public static KeyStore newKeyStore(KeyStoreCreationConfig keyStoreConfig) { - if (keyStoreConfig == null) keyStoreConfig = KeyStoreCreationConfig.DEFAULT; - KeyStore ks = KeyStore.getInstance(keyStoreConfig.getKeyStoreType()); - if ("BCFKS".equals(keyStoreConfig.getKeyStoreType())) { - AlgorithmIdentifier prf = (AlgorithmIdentifier) PBKDF2Config.class.getDeclaredField(keyStoreConfig.getStorePBKDFConfig()).get(PBKDF2Config.class); - - ks.load(new BCFKSLoadStoreParameter.Builder() - .withStoreEncryptionAlgorithm(BCFKSLoadStoreParameter.EncryptionAlgorithm.valueOf(keyStoreConfig.getStoreEncryptionAlgorithm())) - .withStorePBKDFConfig(new PBKDF2Config.Builder().withPRF(prf).build()) - .withStoreMacAlgorithm(BCFKSLoadStoreParameter.MacAlgorithm.valueOf(keyStoreConfig.getStoreMacAlgorithm())) - .build() - ); + public static KeyStore newKeyStore(KeyStoreConfig config) { + if (config == null) { + config = KeyStoreConfig.DEFAULT; + } + + KeyStore ks = KeyStore.getInstance(config.getType()); + + if ("BCFKS".equals(config.getType())) { + createBCFKSKeystore(config, ks); } else { ks.load(null, null); } @@ -80,12 +79,14 @@ public static byte[] toByteArray(KeyStore keystore, String storeId, ReadStorePas */ @SneakyThrows public static KeyStore loadKeyStore(InputStream in, String storeId, - KeyStoreCreationConfig keyStoreConfig, + KeyStoreConfig keyStoreConfig, ReadStorePassword readStorePassword) { // Use default if blank. - if (keyStoreConfig == null) keyStoreConfig = KeyStoreCreationConfig.DEFAULT; + if (keyStoreConfig == null) { + keyStoreConfig = KeyStoreConfig.DEFAULT; + } - KeyStore ks = KeyStore.getInstance(keyStoreConfig.getKeyStoreType()); + KeyStore ks = KeyStore.getInstance(keyStoreConfig.getType()); ks.load(in, readStorePassword.getValue().toCharArray()); return ks; @@ -93,13 +94,13 @@ public static KeyStore loadKeyStore(InputStream in, String storeId, /** * @param data : the byte array containing key store data. - * @param keyStoreCreationConfig : the type of this key store. f null, the defaut java keystore type is used. + * @param keyStoreConfig : the type of this key store. f null, the defaut java keystore type is used. * @return KeyStore */ public static KeyStore loadKeyStore(byte[] data, String storeId, - KeyStoreCreationConfig keyStoreCreationConfig, + KeyStoreConfig keyStoreConfig, ReadStorePassword readStorePassword) { - return loadKeyStore(new ByteArrayInputStream(data), storeId, keyStoreCreationConfig, readStorePassword); + return loadKeyStore(new ByteArrayInputStream(data), storeId, keyStoreConfig, readStorePassword); } /** @@ -128,6 +129,49 @@ public static void addToKeyStore(final KeyStore ks, KeyEntry keyEntry) { } } + @SneakyThrows + private static void createBCFKSKeystore(KeyStoreConfig config, KeyStore ks) { + BCFKSLoadStoreParameter.EncryptionAlgorithm encAlgo = + BCFKSLoadStoreParameter.EncryptionAlgorithm.valueOf(config.getEncryptionAlgo()); + + BCFKSLoadStoreParameter.MacAlgorithm macAlgo = + BCFKSLoadStoreParameter.MacAlgorithm.valueOf(config.getMacAlgo()); + + ks.load(new BCFKSLoadStoreParameter.Builder() + .withStoreEncryptionAlgorithm(encAlgo) + .withStorePBKDFConfig(pbkdfConfig(config.getPbkdf())) + .withStoreMacAlgorithm(macAlgo) + .build() + ); + } + + @SneakyThrows + private static PBKDFConfig pbkdfConfig(KeyStoreConfig.PBKDF config) { + if (null != config.getPbkdf2()) { + AlgorithmIdentifier prf = (AlgorithmIdentifier) PBKDF2Config.class.getDeclaredField( + config.getPbkdf2().getAlgo() + ).get(PBKDF2Config.class); + + return new PBKDF2Config.Builder() + .withIterationCount(config.getPbkdf2().getIterCount()) + .withSaltLength(config.getPbkdf2().getSaltLength()) + .withPRF(prf) + .build(); + + } else if (config.getScrypt() != null) { + + return new ScryptConfig.Builder( + config.getScrypt().getCost(), + config.getScrypt().getBlockSize(), + config.getScrypt().getParallelization() + ) + .withSaltLength(config.getScrypt().getSaltLength()) + .build(); + } + + throw new IllegalArgumentException("Unknown PBKDF type"); + } + @SneakyThrows private static void addToKeyStore(final KeyStore ks, KeyPairEntry keyPairHolder) { List chainList = new ArrayList<>(); diff --git a/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/keystore/generator/KeystoreBuilder.java b/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/keystore/generator/KeystoreBuilder.java index aa4894498..b499b9820 100644 --- a/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/keystore/generator/KeystoreBuilder.java +++ b/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/keystore/generator/KeystoreBuilder.java @@ -1,17 +1,17 @@ package de.adorsys.datasafe.encrypiton.impl.keystore.generator; import de.adorsys.datasafe.encrypiton.api.types.keystore.KeyEntry; -import de.adorsys.datasafe.encrypiton.impl.keystore.KeyStoreCreationConfig; +import de.adorsys.datasafe.encrypiton.api.types.keystore.KeyStoreConfig; import java.security.KeyStore; import java.util.HashMap; import java.util.Map; public class KeystoreBuilder { - private KeyStoreCreationConfig keyStoreConfig; + private KeyStoreConfig keyStoreConfig; private Map keyEntries = new HashMap<>(); - public KeystoreBuilder withKeyStoreConfig(KeyStoreCreationConfig keyStoreConfig) { + public KeystoreBuilder withKeyStoreConfig(KeyStoreConfig keyStoreConfig) { this.keyStoreConfig = keyStoreConfig; return this; } diff --git a/datasafe-encryption/datasafe-encryption-impl/src/test/java/de/adorsys/datasafe/encrypiton/impl/keystore/KeyStoreServiceTest.java b/datasafe-encryption/datasafe-encryption-impl/src/test/java/de/adorsys/datasafe/encrypiton/impl/keystore/KeyStoreServiceTest.java index 28833d667..d3153b606 100644 --- a/datasafe-encryption/datasafe-encryption-impl/src/test/java/de/adorsys/datasafe/encrypiton/impl/keystore/KeyStoreServiceTest.java +++ b/datasafe-encryption/datasafe-encryption-impl/src/test/java/de/adorsys/datasafe/encrypiton/impl/keystore/KeyStoreServiceTest.java @@ -80,7 +80,7 @@ void getPublicKeys() { @Test void getPrivateKey() throws Exception { - KeyStore keyStore = KeyStoreServiceImplBaseFunctions.newKeyStore(KeyStoreCreationConfig.DEFAULT); // BCFKS + KeyStore keyStore = KeyStoreServiceImplBaseFunctions.newKeyStore(KeyStoreConfig.DEFAULT); // BCFKS ReadKeyPassword readKeyPassword = new ReadKeyPassword("keypass"); KeyCreationConfigImpl keyStoreCreationConfig = new KeyCreationConfigImpl(null); diff --git a/datasafe-rest-impl/src/main/java/de/adorsys/datasafe/rest/impl/config/DatasafeConfig.java b/datasafe-rest-impl/src/main/java/de/adorsys/datasafe/rest/impl/config/DatasafeConfig.java index 81860aba9..2f3898b48 100644 --- a/datasafe-rest-impl/src/main/java/de/adorsys/datasafe/rest/impl/config/DatasafeConfig.java +++ b/datasafe-rest-impl/src/main/java/de/adorsys/datasafe/rest/impl/config/DatasafeConfig.java @@ -20,7 +20,9 @@ import de.adorsys.datasafe.directory.impl.profile.dfs.BucketAccessServiceImpl; import de.adorsys.datasafe.directory.impl.profile.dfs.BucketAccessServiceImplRuntimeDelegatable; import de.adorsys.datasafe.directory.impl.profile.dfs.RegexAccessServiceWithStorageCredentialsImpl; -import de.adorsys.datasafe.encrypiton.impl.keystore.KeyStoreCreationConfig; +import de.adorsys.datasafe.encrypiton.api.types.keystore.KeyStoreConfig; +import de.adorsys.datasafe.encrypiton.api.types.keystore.pbkdf.PBKDF2; +import de.adorsys.datasafe.encrypiton.api.types.keystore.pbkdf.Scrypt; import de.adorsys.datasafe.storage.api.RegexDelegatingStorage; import de.adorsys.datasafe.storage.api.SchemeDelegatingStorage; import de.adorsys.datasafe.storage.api.StorageService; @@ -254,8 +256,36 @@ AmazonS3 s3(DatasafeProperties properties) { @Bean @SneakyThrows - KeyStoreCreationConfig keystoreConfig(KeystoreProperties kp) { - return new KeyStoreCreationConfig(kp.getType(), kp.getEncAlgorithm(), kp.getPrfAlgorithm(), kp.getMacAlgorithm()); + KeyStoreConfig keystoreConfig(KeystoreProperties kp) { + KeyStoreConfig.KeyStoreConfigBuilder builder = KeyStoreConfig.builder(); + builder.encryptionAlgo(kp.getEncryptionAlgo()); + builder.macAlgo(kp.getMacAlgo()); + KeyStoreConfig.PBKDF.PBKDFBuilder pbkdf = KeyStoreConfig.PBKDF.builder(); + + if (null != kp.getPbkdf().getPbkdf2()) { + pbkdf.pbkdf2(buildPBDF2(kp.getPbkdf().getPbkdf2())); + } else { + pbkdf.scrypt(buildScrypt(kp.getPbkdf().getScrypt())); + } + + builder.pbkdf(pbkdf.build()); + return builder.build(); + } + + private Scrypt buildScrypt(KeystoreProperties.Scrypt kp) { + return Scrypt.builder().cost(kp.getCost()) + .blockSize(kp.getBlockSize()) + .parallelization(kp.getParallelization()) + .saltLength(kp.getSaltLength()) + .build(); + } + + private PBKDF2 buildPBDF2(KeystoreProperties.PBKDF2 kp) { + return PBKDF2.builder() + .algo(kp.getAlgo()) + .iterCount(kp.getIterCount()) + .saltLength(kp.getSaltLength()) + .build(); } private static class WithAccessCredentials extends BucketAccessServiceImpl { diff --git a/datasafe-rest-impl/src/main/java/de/adorsys/datasafe/rest/impl/config/KeystoreProperties.java b/datasafe-rest-impl/src/main/java/de/adorsys/datasafe/rest/impl/config/KeystoreProperties.java index 3569daad6..b440def8c 100644 --- a/datasafe-rest-impl/src/main/java/de/adorsys/datasafe/rest/impl/config/KeystoreProperties.java +++ b/datasafe-rest-impl/src/main/java/de/adorsys/datasafe/rest/impl/config/KeystoreProperties.java @@ -3,11 +3,102 @@ import lombok.Data; import org.springframework.boot.context.properties.ConfigurationProperties; +import javax.validation.constraints.Min; +import javax.validation.constraints.NotBlank; +import javax.validation.constraints.NotNull; + @ConfigurationProperties(prefix = "keystore") @Data public class KeystoreProperties { - private String type; - private String encAlgorithm; - private String prfAlgorithm; - private String macAlgorithm; + + /** + * Which type of keystore to use i.e. BCFKS or UBER, etc. + */ + @NotBlank + private String type = "BCFKS"; + + /** + * Keystore encryption algorithm (used both for keys and keystore). For BCFKS refer to for BCFKS refer to + * {@link org.bouncycastle.jcajce.BCFKSLoadStoreParameter} + */ + @NotBlank + private String encryptionAlgo = "AES256_KWP"; + + /** + * Password key derivation configuration. + */ + @NotNull + private PBKDF pbkdf; + + /** + * KeyStore authentication algorithm, for BCFKS refer to {@link org.bouncycastle.jcajce.BCFKSLoadStoreParameter} + */ + @NotBlank + private String macAlgo = "HmacSHA3_512"; + + /** + * Password key derivation configuration. + */ + @Data + public static class PBKDF { + + /** + * This is non null if we should use PBKDF2 based routines. + */ + private PBKDF2 pbkdf2; + + /** + * This is non null if we should use Scrypt-based routines. + */ + private Scrypt scrypt; + } + + @Data + public class PBKDF2 { + + /** + * Password derivation algorithm, for BCFKS refer to {@link org.bouncycastle.crypto.util.PBKDF2Config} + */ + @NotNull + private String algo = "PRF_SHA512"; + + /** + * Password derivation salt length, for BCFKS refer to {@link org.bouncycastle.crypto.util.PBKDF2Config} + */ + @Min(-1) + private int saltLength = 32; + + /** + * Password derivation iteration count, for BCFKS refer to {@link org.bouncycastle.crypto.util.PBKDF2Config} + */ + @Min(1024) + private int iterCount = 20480; + } + + @Data + public class Scrypt { + + /** + * Password derivation cost, for BCFKS refer to {@link org.bouncycastle.crypto.util.ScryptConfig} + */ + @Min(1) + private int cost; + /** + * Password derivation block size, for BCFKS refer to {@link org.bouncycastle.crypto.util.ScryptConfig} + */ + @Min(1) + private int blockSize; + + /** + * Password derivation parallelization, for BCFKS refer to {@link org.bouncycastle.crypto.util.ScryptConfig} + */ + @Min(1) + private int parallelization; + + /** + * Password derivation salt length, for BCFKS refer to {@link org.bouncycastle.crypto.util.ScryptConfig} + */ + @Min(1) + private int saltLength; + } } diff --git a/datasafe-rest-impl/src/main/resources/application.properties b/datasafe-rest-impl/src/main/resources/application.properties index aa47db44d..d01490074 100644 --- a/datasafe-rest-impl/src/main/resources/application.properties +++ b/datasafe-rest-impl/src/main/resources/application.properties @@ -32,6 +32,9 @@ datasafe.dbPassword=${MYSQL_PASSWORD} spring.liquibase.enabled=false keystore.type=BCFKS -keystore.encAlgorithm=AES256_KWP -keystore.prfAlgorithm=PRF_SHA512 -keystore.macAlgorithm=HmacSHA3_512 +keystore.encryptionAlgo=AES256_KWP +keystore.pbkdf.scrypt.cost=16384 +keystore.pbkdf.scrypt.blockSize=8 +keystore.pbkdf.scrypt.parallelization=1 +keystore.pbkdf.scrypt.saltLength=16 +keystore.macAlgo=HmacSHA3_512 diff --git a/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/main/java/de/adorsys/datasafe/simple/adapter/impl/LegacyDatasafeService.java b/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/main/java/de/adorsys/datasafe/simple/adapter/impl/LegacyDatasafeService.java index bf6cd2c98..bf1245a09 100644 --- a/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/main/java/de/adorsys/datasafe/simple/adapter/impl/LegacyDatasafeService.java +++ b/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/main/java/de/adorsys/datasafe/simple/adapter/impl/LegacyDatasafeService.java @@ -9,7 +9,7 @@ import de.adorsys.datasafe.business.impl.service.DefaultDatasafeServices; import de.adorsys.datasafe.business.impl.storage.DefaultStorageModule; import de.adorsys.datasafe.directory.api.config.DFSConfig; -import de.adorsys.datasafe.encrypiton.impl.keystore.KeyStoreCreationConfig; +import de.adorsys.datasafe.encrypiton.api.types.keystore.KeyStoreConfig; import de.adorsys.datasafe.simple.adapter.impl.cmsencryption.SwitchableCMSEncryptionModule; import de.adorsys.datasafe.simple.adapter.impl.pathencryption.LegacyCredentialsModule; import de.adorsys.datasafe.simple.adapter.impl.pathencryption.LegacyPathEncryptionModule; @@ -62,7 +62,7 @@ interface Builder { Builder overridesRegistry(@Nullable OverridesRegistry overridesRegistry); @BindsInstance - Builder keyStoreConfig(KeyStoreCreationConfig keyStoreCreationConfig); + Builder keyStoreConfig(KeyStoreConfig keyStoreConfig); /** * @return Provide NEW instance of Legacy Datasafe services. All dependencies except * annotated with {@code @Singleton} will have scope analogous to Spring {code @Prototype}. diff --git a/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/main/java/de/adorsys/datasafe/simple/adapter/impl/SimpleDatasafeServiceImpl.java b/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/main/java/de/adorsys/datasafe/simple/adapter/impl/SimpleDatasafeServiceImpl.java index 3451bf4f2..0c9bab3a6 100644 --- a/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/main/java/de/adorsys/datasafe/simple/adapter/impl/SimpleDatasafeServiceImpl.java +++ b/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/main/java/de/adorsys/datasafe/simple/adapter/impl/SimpleDatasafeServiceImpl.java @@ -12,7 +12,7 @@ import de.adorsys.datasafe.directory.impl.profile.config.DefaultDFSConfig; import de.adorsys.datasafe.encrypiton.api.types.UserID; import de.adorsys.datasafe.encrypiton.api.types.UserIDAuth; -import de.adorsys.datasafe.encrypiton.impl.keystore.KeyStoreCreationConfig; +import de.adorsys.datasafe.encrypiton.api.types.keystore.KeyStoreConfig; import de.adorsys.datasafe.encrypiton.api.types.keystore.ReadKeyPassword; import de.adorsys.datasafe.encrypiton.api.types.keystore.ReadStorePassword; import de.adorsys.datasafe.simple.adapter.api.SimpleDatasafeService; @@ -69,7 +69,7 @@ public SimpleDatasafeServiceImpl(DFSCredentials dfsCredentials) { storageService = new FileSystemStorageService(FileSystems.getDefault().getPath(filesystemDFSCredentials.getRoot())); customlyBuiltDatasafeServices = DaggerLegacyDatasafeService.builder() .config(new DefaultDFSConfig(systemRoot, universalReadStorePassword.getValue())) - .keyStoreConfig(new KeyStoreCreationConfig("UBER", "", "", "")) + .keyStoreConfig(KeyStoreConfig.builder().build()) .storage(getStorageService()) .build(); @@ -134,7 +134,7 @@ public SimpleDatasafeServiceImpl(DFSCredentials dfsCredentials) { customlyBuiltDatasafeServices = DaggerLegacyDatasafeService.builder() .config(new DefaultDFSConfig(systemRoot, universalReadStorePassword.getValue())) - .keyStoreConfig(new KeyStoreCreationConfig("UBER", "", "", "")) + .keyStoreConfig(KeyStoreConfig.builder().build()) .storage(getStorageService()) .build(); From ffac0e7810aa3dfa1ddd1a7fd40b5557b761dddf Mon Sep 17 00:00:00 2001 From: Valentyn Berezin Date: Fri, 18 Oct 2019 13:17:44 +0300 Subject: [PATCH 221/255] DOC-277. Added bean validation for rest-keystore-encryption config --- .../api/types/keystore/KeyStoreConfig.java | 18 +++++++++++--- datasafe-rest-impl/pom.xml | 6 +++++ .../rest/impl/config/DatasafeConfig.java | 10 ++++---- .../rest/impl/config/KeystoreProperties.java | 24 ++++++------------- .../src/main/resources/application.properties | 8 +++---- 5 files changed, 38 insertions(+), 28 deletions(-) diff --git a/datasafe-encryption/datasafe-encryption-api/src/main/java/de/adorsys/datasafe/encrypiton/api/types/keystore/KeyStoreConfig.java b/datasafe-encryption/datasafe-encryption-api/src/main/java/de/adorsys/datasafe/encrypiton/api/types/keystore/KeyStoreConfig.java index 62bd98da2..aabfe843d 100644 --- a/datasafe-encryption/datasafe-encryption-api/src/main/java/de/adorsys/datasafe/encrypiton/api/types/keystore/KeyStoreConfig.java +++ b/datasafe-encryption/datasafe-encryption-api/src/main/java/de/adorsys/datasafe/encrypiton/api/types/keystore/KeyStoreConfig.java @@ -43,18 +43,30 @@ public class KeyStoreConfig { * Password key derivation configuration. */ @Getter - @Builder public static class PBKDF { /** * This is non null if we should use PBKDF2 based routines. */ - @Builder.Default - private final PBKDF2 pbkdf2 = PBKDF2.builder().build(); + private final PBKDF2 pbkdf2; /** * This is non null if we should use Scrypt-based routines. */ private final Scrypt scrypt; + + @Builder + public PBKDF(PBKDF2 pbkdf2, Scrypt scrypt) { + if (null != pbkdf2 && null != scrypt) { + throw new IllegalArgumentException("Ambiguous PBKDF - both scrypt and pbkdf2 are set"); + } + + if (null == pbkdf2 && null == scrypt) { + pbkdf2 = PBKDF2.builder().build(); + } + + this.pbkdf2 = pbkdf2; + this.scrypt = scrypt; + } } } diff --git a/datasafe-rest-impl/pom.xml b/datasafe-rest-impl/pom.xml index 1388b6b99..adbe7bfe3 100644 --- a/datasafe-rest-impl/pom.xml +++ b/datasafe-rest-impl/pom.xml @@ -18,6 +18,7 @@ 2.1.5.RELEASE 2.9.2 0.10.5 + 6.0.17.Final 2.0.3.RELEASE 1.5.3 1.6.0 @@ -77,6 +78,11 @@ ${spring-boot.version} true + + org.hibernate + hibernate-validator + ${hibernate-validator.version} + io.springfox springfox-swagger2 diff --git a/datasafe-rest-impl/src/main/java/de/adorsys/datasafe/rest/impl/config/DatasafeConfig.java b/datasafe-rest-impl/src/main/java/de/adorsys/datasafe/rest/impl/config/DatasafeConfig.java index 2f3898b48..282b4a3f2 100644 --- a/datasafe-rest-impl/src/main/java/de/adorsys/datasafe/rest/impl/config/DatasafeConfig.java +++ b/datasafe-rest-impl/src/main/java/de/adorsys/datasafe/rest/impl/config/DatasafeConfig.java @@ -262,10 +262,11 @@ KeyStoreConfig keystoreConfig(KeystoreProperties kp) { builder.macAlgo(kp.getMacAlgo()); KeyStoreConfig.PBKDF.PBKDFBuilder pbkdf = KeyStoreConfig.PBKDF.builder(); - if (null != kp.getPbkdf().getPbkdf2()) { - pbkdf.pbkdf2(buildPBDF2(kp.getPbkdf().getPbkdf2())); + if (null != kp.getPbkdf2()) { + pbkdf.pbkdf2(buildPBDF2(kp.getPbkdf2())); } else { - pbkdf.scrypt(buildScrypt(kp.getPbkdf().getScrypt())); + pbkdf.pbkdf2(null); + pbkdf.scrypt(buildScrypt(kp.getScrypt())); } builder.pbkdf(pbkdf.build()); @@ -273,7 +274,8 @@ KeyStoreConfig keystoreConfig(KeystoreProperties kp) { } private Scrypt buildScrypt(KeystoreProperties.Scrypt kp) { - return Scrypt.builder().cost(kp.getCost()) + return Scrypt.builder() + .cost(kp.getCost()) .blockSize(kp.getBlockSize()) .parallelization(kp.getParallelization()) .saltLength(kp.getSaltLength()) diff --git a/datasafe-rest-impl/src/main/java/de/adorsys/datasafe/rest/impl/config/KeystoreProperties.java b/datasafe-rest-impl/src/main/java/de/adorsys/datasafe/rest/impl/config/KeystoreProperties.java index b440def8c..4bbdd9095 100644 --- a/datasafe-rest-impl/src/main/java/de/adorsys/datasafe/rest/impl/config/KeystoreProperties.java +++ b/datasafe-rest-impl/src/main/java/de/adorsys/datasafe/rest/impl/config/KeystoreProperties.java @@ -2,6 +2,7 @@ import lombok.Data; import org.springframework.boot.context.properties.ConfigurationProperties; +import org.springframework.validation.annotation.Validated; import javax.validation.constraints.Min; import javax.validation.constraints.NotBlank; @@ -9,6 +10,7 @@ @ConfigurationProperties(prefix = "keystore") @Data +@Validated public class KeystoreProperties { /** @@ -27,8 +29,9 @@ public class KeystoreProperties { /** * Password key derivation configuration. */ - @NotNull - private PBKDF pbkdf; + private PBKDF2 pbkdf2; + + private Scrypt scrypt; /** * KeyStore authentication algorithm, for BCFKS refer to {@link org.bouncycastle.jcajce.BCFKSLoadStoreParameter} @@ -39,22 +42,9 @@ public class KeystoreProperties { /** * Password key derivation configuration. */ - @Data - public static class PBKDF { - - /** - * This is non null if we should use PBKDF2 based routines. - */ - private PBKDF2 pbkdf2; - - /** - * This is non null if we should use Scrypt-based routines. - */ - private Scrypt scrypt; - } @Data - public class PBKDF2 { + public static class PBKDF2 { /** * Password derivation algorithm, for BCFKS refer to {@link org.bouncycastle.crypto.util.PBKDF2Config} @@ -76,7 +66,7 @@ public class PBKDF2 { } @Data - public class Scrypt { + public static class Scrypt { /** * Password derivation cost, for BCFKS refer to {@link org.bouncycastle.crypto.util.ScryptConfig} diff --git a/datasafe-rest-impl/src/main/resources/application.properties b/datasafe-rest-impl/src/main/resources/application.properties index d01490074..c9bea7761 100644 --- a/datasafe-rest-impl/src/main/resources/application.properties +++ b/datasafe-rest-impl/src/main/resources/application.properties @@ -33,8 +33,8 @@ spring.liquibase.enabled=false keystore.type=BCFKS keystore.encryptionAlgo=AES256_KWP -keystore.pbkdf.scrypt.cost=16384 -keystore.pbkdf.scrypt.blockSize=8 -keystore.pbkdf.scrypt.parallelization=1 -keystore.pbkdf.scrypt.saltLength=16 +keystore.scrypt.cost=16384 +keystore.scrypt.blockSize=8 +keystore.scrypt.parallelization=1 +keystore.scrypt.saltLength=16 keystore.macAlgo=HmacSHA3_512 From 1a52b4f5d0fe991bdc0309f8cd16d7db5bbc02b3 Mon Sep 17 00:00:00 2001 From: Valentyn Berezin Date: Fri, 18 Oct 2019 18:33:13 +0300 Subject: [PATCH 222/255] DOC-277. Expose FULL encryption configuration to properties --- datasafe-business/README.md | 3 +- .../DefaultCMSEncryptionModule.java | 19 +- .../impl/directory/DefaultProfileModule.java | 11 + .../impl/keystore/DefaultKeyStoreModule.java | 31 +- .../impl/service/DefaultDatasafeServices.java | 11 + .../service/VersionedDatasafeServices.java | 11 + .../business/impl/e2e/KeystoreE2ETest.java | 9 +- .../PathEncryptionSecretKeyTest.java | 5 +- .../api/types/CreateUserPrivateProfile.java | 1 - .../api/types/CreateUserPublicProfile.java | 1 - .../keys/DFSPrivateKeyServiceImpl.java | 2 +- .../keys/DocumentKeyStoreOperationsImpl.java | 21 +- .../keys/GenericKeystoreOperations.java | 19 +- .../api/keystore/KeyStoreService.java | 1 + .../types/encryption/CmsEncryptionConfig.java | 16 + .../types/encryption/EncryptionConfig.java | 30 ++ .../types/encryption/KeyCreationConfig.java | 70 +++++ .../KeyStoreConfig.java | 12 +- .../encryption/MutableEncryptionConfig.java | 273 ++++++++++++++++++ .../api/types/keystore/KeyCreationConfig.java | 19 -- .../datasafe-encryption-impl/pom.xml | 16 + .../cmsencryption/ASNCmsEncryptionConfig.java | 50 ++++ .../cmsencryption/CMSEncryptionConfig.java | 14 - .../CMSEncryptionServiceImpl.java | 8 +- .../DefaultCMSEncryptionConfig.java | 20 -- .../DefaultPasswordBasedKeyConfig.java | 19 -- .../impl/keystore/KeyStoreGenerator.java | 9 +- .../impl/keystore/KeyStoreServiceImpl.java | 29 +- .../generator/KeyCreationConfigImpl.java | 20 +- .../KeyStoreServiceImplBaseFunctions.java | 11 +- .../keystore/generator/KeystoreBuilder.java | 2 +- .../types/PasswordBasedKeyConfig.java | 6 - .../MutableEncryptionConfigTest.java | 48 +++ .../CmsEncryptionServiceImplTest.java | 16 +- .../cmsencryption/SymetricEncryptionTest.java | 18 +- .../impl/keystore/KeyStoreServiceTest.java | 28 +- ...ymmetricPathEncryptionServiceImplTest.java | 10 +- .../src/test/resources/mutable-pbkdf2.yaml | 27 ++ .../src/test/resources/mutable-scrypt.yaml | 28 ++ .../CustomlyBuiltDatasafeServices.java | 11 + ...domActionsOnSimpleDatasafeAdapterTest.java | 3 +- .../rest/impl/config/DatasafeConfig.java | 12 +- .../rest/impl/config/KeystoreProperties.java | 4 +- .../adapter/impl/LegacyDatasafeService.java | 5 +- .../impl/SimpleDatasafeServiceImpl.java | 19 +- .../SwitchableCMSEncryptionModule.java | 19 +- .../SwitchableCmsEncryptionImpl.java | 4 +- .../LegacyDFSPrivateKeyServiceImpl.java | 2 +- .../impl/profile/HardcodedProfileModule.java | 14 + .../simple/adapter/impl/CleanupDbTest.java | 3 +- .../impl/DFSRelativeToRootProfileTest.java | 5 +- .../SimpleDatasafeAdapter043CompatTest.java | 4 +- .../impl/SimpleDatasafeAdapterTest.java | 3 +- ...ymmetricPathEncryptionServiceImplTest.java | 10 +- .../adapter/spring/DatasafeSpringBeans.java | 7 +- .../SpringSimpleDatasafeServiceFactory.java | 19 +- .../SpringDatasafeEncryptionProperties.java | 12 + datasafe-simple-adapter/readme.md | 6 +- pom.xml | 15 +- 59 files changed, 890 insertions(+), 231 deletions(-) rename datasafe-business/src/test/java/de/adorsys/datasafe/encrypiton/api/{types/keystore => }/PathEncryptionSecretKeyTest.java (84%) create mode 100644 datasafe-encryption/datasafe-encryption-api/src/main/java/de/adorsys/datasafe/encrypiton/api/types/encryption/CmsEncryptionConfig.java create mode 100644 datasafe-encryption/datasafe-encryption-api/src/main/java/de/adorsys/datasafe/encrypiton/api/types/encryption/EncryptionConfig.java create mode 100644 datasafe-encryption/datasafe-encryption-api/src/main/java/de/adorsys/datasafe/encrypiton/api/types/encryption/KeyCreationConfig.java rename datasafe-encryption/datasafe-encryption-api/src/main/java/de/adorsys/datasafe/encrypiton/api/types/{keystore => encryption}/KeyStoreConfig.java (85%) create mode 100644 datasafe-encryption/datasafe-encryption-api/src/main/java/de/adorsys/datasafe/encrypiton/api/types/encryption/MutableEncryptionConfig.java delete mode 100644 datasafe-encryption/datasafe-encryption-api/src/main/java/de/adorsys/datasafe/encrypiton/api/types/keystore/KeyCreationConfig.java create mode 100644 datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/cmsencryption/ASNCmsEncryptionConfig.java delete mode 100644 datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/cmsencryption/CMSEncryptionConfig.java delete mode 100644 datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/cmsencryption/DefaultCMSEncryptionConfig.java delete mode 100644 datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/keystore/DefaultPasswordBasedKeyConfig.java delete mode 100644 datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/keystore/types/PasswordBasedKeyConfig.java create mode 100644 datasafe-encryption/datasafe-encryption-impl/src/test/java/de/adorsys/datasafe/encrypiton/api/types/encryption/MutableEncryptionConfigTest.java create mode 100644 datasafe-encryption/datasafe-encryption-impl/src/test/resources/mutable-pbkdf2.yaml create mode 100644 datasafe-encryption/datasafe-encryption-impl/src/test/resources/mutable-scrypt.yaml create mode 100644 datasafe-simple-adapter/datasafe-simple-adapter-spring/src/main/java/de/adorsys/datasafe/simple/adapter/spring/properties/SpringDatasafeEncryptionProperties.java diff --git a/datasafe-business/README.md b/datasafe-business/README.md index 9bf6d635c..cbdce8afd 100644 --- a/datasafe-business/README.md +++ b/datasafe-business/README.md @@ -18,8 +18,7 @@ package de.adorsys.datasafe.business.impl.pathencryption; import dagger.Module; import dagger.Provides; -import de.adorsys.datasafe.encrypiton.api.pathencryption.PathEncryption; -import de.adorsys.datasafe.encrypiton.impl.pathencryption.*; +import PathEncryption; /** * This module is responsible for providing No-op pathencryption of document. diff --git a/datasafe-business/src/main/java/de/adorsys/datasafe/business/impl/cmsencryption/DefaultCMSEncryptionModule.java b/datasafe-business/src/main/java/de/adorsys/datasafe/business/impl/cmsencryption/DefaultCMSEncryptionModule.java index 4dd6dccc9..ec94bfba2 100644 --- a/datasafe-business/src/main/java/de/adorsys/datasafe/business/impl/cmsencryption/DefaultCMSEncryptionModule.java +++ b/datasafe-business/src/main/java/de/adorsys/datasafe/business/impl/cmsencryption/DefaultCMSEncryptionModule.java @@ -2,10 +2,13 @@ import dagger.Binds; import dagger.Module; +import dagger.Provides; import de.adorsys.datasafe.encrypiton.api.cmsencryption.CMSEncryptionService; -import de.adorsys.datasafe.encrypiton.impl.cmsencryption.CMSEncryptionConfig; +import de.adorsys.datasafe.encrypiton.api.types.encryption.CmsEncryptionConfig; +import de.adorsys.datasafe.encrypiton.api.types.encryption.EncryptionConfig; import de.adorsys.datasafe.encrypiton.impl.cmsencryption.CMSEncryptionServiceImplRuntimeDelegatable; -import de.adorsys.datasafe.encrypiton.impl.cmsencryption.DefaultCMSEncryptionConfig; + +import javax.annotation.Nullable; /** * This module is responsible for providing CMS encryption of document. @@ -14,10 +17,16 @@ public abstract class DefaultCMSEncryptionModule { /** - * Default CMS-encryption config using AES256_CBC. + * Default CMS-encryption config using AES256_GCM. */ - @Binds - abstract CMSEncryptionConfig defaultCMSEncryptionConfig(DefaultCMSEncryptionConfig defaultCMSEncryptionConfig); + @Provides + static CmsEncryptionConfig cmsEncryptionConfig(@Nullable EncryptionConfig config) { + if (null == config) { + return EncryptionConfig.builder().build().getCms(); + } + + return config.getCms(); + } /** * Default BouncyCastle based CMS encryption for document. diff --git a/datasafe-business/src/main/java/de/adorsys/datasafe/business/impl/directory/DefaultProfileModule.java b/datasafe-business/src/main/java/de/adorsys/datasafe/business/impl/directory/DefaultProfileModule.java index b1de2f2f3..1494e2779 100644 --- a/datasafe-business/src/main/java/de/adorsys/datasafe/business/impl/directory/DefaultProfileModule.java +++ b/datasafe-business/src/main/java/de/adorsys/datasafe/business/impl/directory/DefaultProfileModule.java @@ -15,6 +15,8 @@ import de.adorsys.datasafe.directory.impl.profile.operations.actions.*; import de.adorsys.datasafe.directory.impl.profile.resource.ResourceResolverImplRuntimeDelegatable; import de.adorsys.datasafe.encrypiton.api.types.UserID; +import de.adorsys.datasafe.encrypiton.api.types.encryption.EncryptionConfig; +import de.adorsys.datasafe.encrypiton.api.types.encryption.KeyCreationConfig; import de.adorsys.datasafe.types.api.context.overrides.OverridesRegistry; import javax.annotation.Nullable; @@ -27,6 +29,15 @@ @Module public abstract class DefaultProfileModule { + @Provides + static KeyCreationConfig cmsEncryptionConfig(@Nullable EncryptionConfig config) { + if (null == config) { + return EncryptionConfig.builder().build().getKeys(); + } + + return config.getKeys(); + } + /** * Default Guava-based user profile cache for public and private profile. */ diff --git a/datasafe-business/src/main/java/de/adorsys/datasafe/business/impl/keystore/DefaultKeyStoreModule.java b/datasafe-business/src/main/java/de/adorsys/datasafe/business/impl/keystore/DefaultKeyStoreModule.java index 7f0bc047b..ee1e8e506 100644 --- a/datasafe-business/src/main/java/de/adorsys/datasafe/business/impl/keystore/DefaultKeyStoreModule.java +++ b/datasafe-business/src/main/java/de/adorsys/datasafe/business/impl/keystore/DefaultKeyStoreModule.java @@ -1,15 +1,16 @@ package de.adorsys.datasafe.business.impl.keystore; import dagger.Binds; -import dagger.BindsOptionalOf; import dagger.Module; +import dagger.Provides; import de.adorsys.datasafe.encrypiton.api.keystore.KeyStoreService; import de.adorsys.datasafe.encrypiton.api.keystore.PublicKeySerde; -import de.adorsys.datasafe.encrypiton.impl.keystore.DefaultPasswordBasedKeyConfigRuntimeDelegatable; +import de.adorsys.datasafe.encrypiton.api.types.encryption.EncryptionConfig; +import de.adorsys.datasafe.encrypiton.api.types.encryption.KeyStoreConfig; import de.adorsys.datasafe.encrypiton.impl.keystore.KeyStoreServiceImplRuntimeDelegatable; import de.adorsys.datasafe.encrypiton.impl.keystore.PublicKeySerdeImplRuntimeDelegatable; -import de.adorsys.datasafe.encrypiton.api.types.keystore.KeyStoreConfig; -import de.adorsys.datasafe.encrypiton.impl.keystore.types.PasswordBasedKeyConfig; + +import javax.annotation.Nullable; /** * This module provides keystore management operations. @@ -17,6 +18,15 @@ @Module public abstract class DefaultKeyStoreModule { + @Provides + static KeyStoreConfig cmsEncryptionConfig(@Nullable EncryptionConfig config) { + if (null == config) { + return EncryptionConfig.builder().build().getKeystore(); + } + + return config.getKeystore(); + } + /** * Default public key serializer. */ @@ -29,17 +39,4 @@ public abstract class DefaultKeyStoreModule { */ @Binds public abstract KeyStoreService keyStoreService(KeyStoreServiceImplRuntimeDelegatable impl); - - /** - * Configures how to persist storage access credentials. - */ - @Binds - public abstract PasswordBasedKeyConfig passwordBasedKeyConfig(DefaultPasswordBasedKeyConfigRuntimeDelegatable impl); - - /** - * Keystore settings - type, encryption, etc. - */ - @BindsOptionalOf - public abstract KeyStoreConfig keyStoreConfig(); - } diff --git a/datasafe-business/src/main/java/de/adorsys/datasafe/business/impl/service/DefaultDatasafeServices.java b/datasafe-business/src/main/java/de/adorsys/datasafe/business/impl/service/DefaultDatasafeServices.java index 197cb8a2b..f8c5e1112 100644 --- a/datasafe-business/src/main/java/de/adorsys/datasafe/business/impl/service/DefaultDatasafeServices.java +++ b/datasafe-business/src/main/java/de/adorsys/datasafe/business/impl/service/DefaultDatasafeServices.java @@ -13,6 +13,7 @@ import de.adorsys.datasafe.business.impl.storage.DefaultStorageModule; import de.adorsys.datasafe.directory.api.config.DFSConfig; import de.adorsys.datasafe.directory.api.profile.operations.ProfileOperations; +import de.adorsys.datasafe.encrypiton.api.types.encryption.EncryptionConfig; import de.adorsys.datasafe.inbox.api.InboxService; import de.adorsys.datasafe.privatestore.api.PrivateSpaceService; import de.adorsys.datasafe.storage.api.StorageService; @@ -82,6 +83,16 @@ interface Builder { @BindsInstance Builder overridesRegistry(@Nullable OverridesRegistry overridesRegistry); + /** + * All encryption stuff configuration + * - which keystore to use + * - how to encrypt keys in keystore + * - which types of keys to create + * - what kind of encryption to use when encrypting document content + */ + @BindsInstance + Builder encryption(@Nullable EncryptionConfig encryptionConfig); + /** * @return Provide NEW instance of Standard Datasafe services. All dependencies except * annotated with {@code @Singleton} will have scope analogous to Spring {code @Prototype}. diff --git a/datasafe-business/src/main/java/de/adorsys/datasafe/business/impl/service/VersionedDatasafeServices.java b/datasafe-business/src/main/java/de/adorsys/datasafe/business/impl/service/VersionedDatasafeServices.java index d75e4b5bc..10769d54b 100644 --- a/datasafe-business/src/main/java/de/adorsys/datasafe/business/impl/service/VersionedDatasafeServices.java +++ b/datasafe-business/src/main/java/de/adorsys/datasafe/business/impl/service/VersionedDatasafeServices.java @@ -14,6 +14,7 @@ import de.adorsys.datasafe.business.impl.storage.DefaultStorageModule; import de.adorsys.datasafe.directory.api.config.DFSConfig; import de.adorsys.datasafe.directory.api.profile.operations.ProfileOperations; +import de.adorsys.datasafe.encrypiton.api.types.encryption.EncryptionConfig; import de.adorsys.datasafe.inbox.api.InboxService; import de.adorsys.datasafe.metainfo.version.api.version.VersionedPrivateSpaceService; import de.adorsys.datasafe.metainfo.version.impl.version.latest.DefaultVersionInfoServiceImpl; @@ -97,6 +98,16 @@ interface Builder { @BindsInstance Builder overridesRegistry(@Nullable OverridesRegistry overridesRegistry); + /** + * All encryption stuff configuration + * - which keystore to use + * - how to encrypt keys in keystore + * - which types of keys to create + * - what kind of encryption to use when encrypting document content + */ + @BindsInstance + Builder encryption(@Nullable EncryptionConfig encryptionConfig); + /** * @return Provide NEW instance of Software-versioned Datasafe services. All dependencies except * annotated with {@code @Singleton} will have scope analogous to Spring {code @Prototype}. diff --git a/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/KeystoreE2ETest.java b/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/KeystoreE2ETest.java index f5aebdfed..19280f6f3 100644 --- a/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/KeystoreE2ETest.java +++ b/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/KeystoreE2ETest.java @@ -2,8 +2,8 @@ import de.adorsys.datasafe.business.impl.service.DefaultDatasafeServices; import de.adorsys.datasafe.encrypiton.api.types.UserIDAuth; +import de.adorsys.datasafe.encrypiton.api.types.encryption.KeyStoreConfig; import de.adorsys.datasafe.encrypiton.api.types.keystore.ReadStorePassword; -import de.adorsys.datasafe.encrypiton.impl.keystore.DefaultPasswordBasedKeyConfig; import de.adorsys.datasafe.encrypiton.impl.keystore.KeyStoreServiceImpl; import de.adorsys.datasafe.storage.impl.fs.FileSystemStorageService; import de.adorsys.datasafe.types.api.resource.Uri; @@ -23,12 +23,11 @@ import java.security.Security; import java.util.Enumeration; import java.util.HashSet; -import java.util.Optional; import java.util.Set; import static de.adorsys.datasafe.business.impl.e2e.DatasafeServicesProvider.STORE_PAZZWORD; -import static de.adorsys.datasafe.encrypiton.api.types.keystore.KeyCreationConfig.PATH_KEY_ID_PREFIX; -import static de.adorsys.datasafe.encrypiton.api.types.keystore.KeyCreationConfig.PATH_KEY_ID_PREFIX_CTR; +import static de.adorsys.datasafe.encrypiton.api.types.encryption.KeyCreationConfig.PATH_KEY_ID_PREFIX; +import static de.adorsys.datasafe.encrypiton.api.types.encryption.KeyCreationConfig.PATH_KEY_ID_PREFIX_CTR; import static org.assertj.core.api.Assertions.assertThat; /** @@ -59,7 +58,7 @@ void testDefaultKeystoreHasProperKeys() { URI keystorePath = datasafeServices.userProfile().privateProfile(auth) .getKeystore().location().asURI(); - KeyStoreServiceImpl keyStoreService = new KeyStoreServiceImpl(new DefaultPasswordBasedKeyConfig(), Optional.empty()); + KeyStoreServiceImpl keyStoreService = new KeyStoreServiceImpl(KeyStoreConfig.builder().build()); KeyStore keyStore = keyStoreService.deserialize( Files.readAllBytes(Paths.get(keystorePath)), "ID", diff --git a/datasafe-business/src/test/java/de/adorsys/datasafe/encrypiton/api/types/keystore/PathEncryptionSecretKeyTest.java b/datasafe-business/src/test/java/de/adorsys/datasafe/encrypiton/api/PathEncryptionSecretKeyTest.java similarity index 84% rename from datasafe-business/src/test/java/de/adorsys/datasafe/encrypiton/api/types/keystore/PathEncryptionSecretKeyTest.java rename to datasafe-business/src/test/java/de/adorsys/datasafe/encrypiton/api/PathEncryptionSecretKeyTest.java index c123ffeeb..aa4cecbe5 100644 --- a/datasafe-business/src/test/java/de/adorsys/datasafe/encrypiton/api/types/keystore/PathEncryptionSecretKeyTest.java +++ b/datasafe-business/src/test/java/de/adorsys/datasafe/encrypiton/api/PathEncryptionSecretKeyTest.java @@ -1,5 +1,8 @@ -package de.adorsys.datasafe.encrypiton.api.types.keystore; +package de.adorsys.datasafe.encrypiton.api; +import de.adorsys.datasafe.encrypiton.api.types.keystore.AuthPathEncryptionSecretKey; +import de.adorsys.datasafe.encrypiton.api.types.keystore.KeyID; +import de.adorsys.datasafe.encrypiton.api.types.keystore.SecretKeyIDWithKey; import de.adorsys.datasafe.types.api.shared.BaseMockitoTest; import org.junit.jupiter.api.Test; import org.mockito.Mock; diff --git a/datasafe-directory/datasafe-directory-api/src/main/java/de/adorsys/datasafe/directory/api/types/CreateUserPrivateProfile.java b/datasafe-directory/datasafe-directory-api/src/main/java/de/adorsys/datasafe/directory/api/types/CreateUserPrivateProfile.java index 688a7e817..8e70e21d1 100644 --- a/datasafe-directory/datasafe-directory-api/src/main/java/de/adorsys/datasafe/directory/api/types/CreateUserPrivateProfile.java +++ b/datasafe-directory/datasafe-directory-api/src/main/java/de/adorsys/datasafe/directory/api/types/CreateUserPrivateProfile.java @@ -8,7 +8,6 @@ import de.adorsys.datasafe.types.api.resource.StorageIdentifier; import lombok.Builder; import lombok.NonNull; -import lombok.SneakyThrows; import lombok.Value; import java.util.Collections; diff --git a/datasafe-directory/datasafe-directory-api/src/main/java/de/adorsys/datasafe/directory/api/types/CreateUserPublicProfile.java b/datasafe-directory/datasafe-directory-api/src/main/java/de/adorsys/datasafe/directory/api/types/CreateUserPublicProfile.java index 6cfbd0b9f..492e7b2a2 100644 --- a/datasafe-directory/datasafe-directory-api/src/main/java/de/adorsys/datasafe/directory/api/types/CreateUserPublicProfile.java +++ b/datasafe-directory/datasafe-directory-api/src/main/java/de/adorsys/datasafe/directory/api/types/CreateUserPublicProfile.java @@ -6,7 +6,6 @@ import de.adorsys.datasafe.types.api.resource.PublicResource; import lombok.Builder; import lombok.NonNull; -import lombok.SneakyThrows; import lombok.Value; /** diff --git a/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/keys/DFSPrivateKeyServiceImpl.java b/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/keys/DFSPrivateKeyServiceImpl.java index a9f05fc21..56e0b5d8f 100644 --- a/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/keys/DFSPrivateKeyServiceImpl.java +++ b/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/keys/DFSPrivateKeyServiceImpl.java @@ -21,7 +21,7 @@ import java.util.Set; import java.util.stream.Collectors; -import static de.adorsys.datasafe.encrypiton.api.types.keystore.KeyCreationConfig.*; +import static de.adorsys.datasafe.encrypiton.api.types.encryption.KeyCreationConfig.*; /** * Retrieves and opens private keystore associated with user location DFS storage. diff --git a/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/keys/DocumentKeyStoreOperationsImpl.java b/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/keys/DocumentKeyStoreOperationsImpl.java index a5696ba93..fb739db7d 100644 --- a/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/keys/DocumentKeyStoreOperationsImpl.java +++ b/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/keys/DocumentKeyStoreOperationsImpl.java @@ -7,6 +7,7 @@ import de.adorsys.datasafe.encrypiton.api.keystore.KeyStoreService; import de.adorsys.datasafe.encrypiton.api.types.UserID; import de.adorsys.datasafe.encrypiton.api.types.UserIDAuth; +import de.adorsys.datasafe.encrypiton.api.types.encryption.KeyCreationConfig; import de.adorsys.datasafe.encrypiton.api.types.keystore.*; import de.adorsys.datasafe.storage.api.actions.StorageWriteService; import de.adorsys.datasafe.types.api.context.annotations.RuntimeDelegate; @@ -31,6 +32,7 @@ @RuntimeDelegate public class DocumentKeyStoreOperationsImpl implements DocumentKeyStoreOperations { + private final KeyCreationConfig config; private final GenericKeystoreOperations genericOper; private final DFSConfig dfsConfig; private final BucketAccessService access; @@ -40,10 +42,16 @@ public class DocumentKeyStoreOperationsImpl implements DocumentKeyStoreOperation private final KeyStoreService keyStoreService; @Inject - public DocumentKeyStoreOperationsImpl(GenericKeystoreOperations genericOper, DFSConfig dfsConfig, - BucketAccessService access, ProfileRetrievalService profile, - StorageWriteService writeService, KeyStoreCache keystoreCache, - KeyStoreService keyStoreService) { + public DocumentKeyStoreOperationsImpl( + KeyCreationConfig config, + GenericKeystoreOperations genericOper, + DFSConfig dfsConfig, + BucketAccessService access, + ProfileRetrievalService profile, + StorageWriteService writeService, + KeyStoreCache keystoreCache, + KeyStoreService keyStoreService) { + this.config = config; this.genericOper = genericOper; this.dfsConfig = dfsConfig; this.access = access; @@ -75,7 +83,10 @@ public Set readAliases(UserIDAuth forUser) { @SneakyThrows public List createAndWriteKeyStore(UserIDAuth forUser) { KeyStoreAuth auth = keystoreAuth(forUser, forUser.getReadKeyPassword()); - KeyStore keystoreBlob = keyStoreService.createKeyStore(auth, new KeyCreationConfig(1, 1)); + KeyStore keystoreBlob = keyStoreService.createKeyStore( + auth, + config + ); writeKeystore(forUser.getUserID(), auth, keystoreLocationWithAccess(forUser), keystoreBlob); return keyStoreService.getPublicKeys(new KeyStoreAccess(keystoreBlob, auth)); diff --git a/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/keys/GenericKeystoreOperations.java b/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/keys/GenericKeystoreOperations.java index b705b9890..6ea49d114 100644 --- a/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/keys/GenericKeystoreOperations.java +++ b/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/keys/GenericKeystoreOperations.java @@ -5,7 +5,7 @@ import de.adorsys.datasafe.encrypiton.api.keystore.KeyStoreService; import de.adorsys.datasafe.encrypiton.api.types.UserID; import de.adorsys.datasafe.encrypiton.api.types.UserIDAuth; -import de.adorsys.datasafe.encrypiton.api.types.keystore.KeyCreationConfig; +import de.adorsys.datasafe.encrypiton.api.types.encryption.KeyCreationConfig; import de.adorsys.datasafe.encrypiton.api.types.keystore.KeyStoreAuth; import de.adorsys.datasafe.encrypiton.api.types.keystore.ReadKeyPassword; import de.adorsys.datasafe.encrypiton.api.types.keystore.ReadStorePassword; @@ -35,6 +35,7 @@ @RuntimeDelegate public class GenericKeystoreOperations { + private final KeyCreationConfig config; private final DFSConfig dfsConfig; private final StorageWriteService writeService; private final StorageReadService readService; @@ -42,9 +43,14 @@ public class GenericKeystoreOperations { private final KeyStoreService keyStoreService; @Inject - public GenericKeystoreOperations(DFSConfig dfsConfig, StorageWriteService writeService, - StorageReadService readService, KeyStoreCache keystoreCache, - KeyStoreService keyStoreService) { + public GenericKeystoreOperations( + KeyCreationConfig config, + DFSConfig dfsConfig, + StorageWriteService writeService, + StorageReadService readService, + KeyStoreCache keystoreCache, + KeyStoreService keyStoreService) { + this.config = config; this.dfsConfig = dfsConfig; this.writeService = writeService; this.readService = readService; @@ -53,7 +59,10 @@ public GenericKeystoreOperations(DFSConfig dfsConfig, StorageWriteService writeS } public KeyStore createEmptyKeystore(UserIDAuth auth) { - return keyStoreService.createKeyStore(keystoreAuth(auth), new KeyCreationConfig(0, 0)); + return keyStoreService.createKeyStore( + keystoreAuth(auth), + config.toBuilder().signKeyNumber(0).encKeyNumber(0).build() + ); } /** diff --git a/datasafe-encryption/datasafe-encryption-api/src/main/java/de/adorsys/datasafe/encrypiton/api/keystore/KeyStoreService.java b/datasafe-encryption/datasafe-encryption-api/src/main/java/de/adorsys/datasafe/encrypiton/api/keystore/KeyStoreService.java index 92495fcd7..ed5502433 100644 --- a/datasafe-encryption/datasafe-encryption-api/src/main/java/de/adorsys/datasafe/encrypiton/api/keystore/KeyStoreService.java +++ b/datasafe-encryption/datasafe-encryption-api/src/main/java/de/adorsys/datasafe/encrypiton/api/keystore/KeyStoreService.java @@ -1,5 +1,6 @@ package de.adorsys.datasafe.encrypiton.api.keystore; +import de.adorsys.datasafe.encrypiton.api.types.encryption.KeyCreationConfig; import de.adorsys.datasafe.encrypiton.api.types.keystore.*; import javax.crypto.spec.SecretKeySpec; diff --git a/datasafe-encryption/datasafe-encryption-api/src/main/java/de/adorsys/datasafe/encrypiton/api/types/encryption/CmsEncryptionConfig.java b/datasafe-encryption/datasafe-encryption-api/src/main/java/de/adorsys/datasafe/encrypiton/api/types/encryption/CmsEncryptionConfig.java new file mode 100644 index 000000000..fd0d1c3d3 --- /dev/null +++ b/datasafe-encryption/datasafe-encryption-api/src/main/java/de/adorsys/datasafe/encrypiton/api/types/encryption/CmsEncryptionConfig.java @@ -0,0 +1,16 @@ +package de.adorsys.datasafe.encrypiton.api.types.encryption; + +import lombok.Builder; +import lombok.Getter; + +/** + * Configures document-body encryption algorithm. + * {@see de.adorsys.datasafe.encrypiton.impl.cmsencryption.ASNCmsEncryptionConfig} for values or override it. + */ +@Getter +@Builder(toBuilder = true) +public class CmsEncryptionConfig { + + @Builder.Default + private final String algo = "AES256_GCM"; +} diff --git a/datasafe-encryption/datasafe-encryption-api/src/main/java/de/adorsys/datasafe/encrypiton/api/types/encryption/EncryptionConfig.java b/datasafe-encryption/datasafe-encryption-api/src/main/java/de/adorsys/datasafe/encrypiton/api/types/encryption/EncryptionConfig.java new file mode 100644 index 000000000..02d8d956f --- /dev/null +++ b/datasafe-encryption/datasafe-encryption-api/src/main/java/de/adorsys/datasafe/encrypiton/api/types/encryption/EncryptionConfig.java @@ -0,0 +1,30 @@ +package de.adorsys.datasafe.encrypiton.api.types.encryption; + +import lombok.Builder; +import lombok.Getter; + +/** + * Full encryption configuration. + */ +@Getter +@Builder(toBuilder = true) +public class EncryptionConfig { + + /** + * Which keystore to use and how to encrypt keys in it. + */ + @Builder.Default + private final KeyStoreConfig keystore = KeyStoreConfig.builder().build(); + + /** + * Which keys to create in keystore. + */ + @Builder.Default + private final KeyCreationConfig keys = KeyCreationConfig.builder().build(); + + /** + * How to encrypt documents. + */ + @Builder.Default + private final CmsEncryptionConfig cms = CmsEncryptionConfig.builder().build(); +} diff --git a/datasafe-encryption/datasafe-encryption-api/src/main/java/de/adorsys/datasafe/encrypiton/api/types/encryption/KeyCreationConfig.java b/datasafe-encryption/datasafe-encryption-api/src/main/java/de/adorsys/datasafe/encrypiton/api/types/encryption/KeyCreationConfig.java new file mode 100644 index 000000000..e483cd57b --- /dev/null +++ b/datasafe-encryption/datasafe-encryption-api/src/main/java/de/adorsys/datasafe/encrypiton/api/types/encryption/KeyCreationConfig.java @@ -0,0 +1,70 @@ +package de.adorsys.datasafe.encrypiton.api.types.encryption; + +import lombok.Builder; +import lombok.Getter; + +/** + * Wrapper that contains count of public-key pairs and count of encryption keys. + */ +@Getter +@Builder(toBuilder = true) +public class KeyCreationConfig { + + public static final String PATH_KEY_ID_PREFIX = "PATH_SECRET"; + public static final String PATH_KEY_ID_PREFIX_CTR = "PATH_CTR_SECRET_"; + public static final String DOCUMENT_KEY_ID_PREFIX = "PRIVATE_SECRET"; + + @Builder.Default + private final int encKeyNumber = 1; + + @Builder.Default + private final int signKeyNumber = 1; + + @Builder.Default + private final SecretKeyCreationCfg secret = SecretKeyCreationCfg.builder().build(); + + @Builder.Default + private final EncryptingKeyCreationCfg encrypting = EncryptingKeyCreationCfg.builder().build(); + + @Builder.Default + private final SigningKeyCreationCfg singing = SigningKeyCreationCfg.builder().build(); + + @Getter + @Builder + public static class SecretKeyCreationCfg { + + @Builder.Default + private final String algo = "AES"; + + @Builder.Default + private final int size = 256; + } + + @Getter + @Builder + public static class EncryptingKeyCreationCfg { + + @Builder.Default + private final String algo = "RSA"; + + @Builder.Default + private final int size = 2048; + + @Builder.Default + private final String sigAlgo = "SHA256withRSA"; + } + + @Getter + @Builder + public static class SigningKeyCreationCfg { + + @Builder.Default + private final String algo = "RSA"; + + @Builder.Default + private final int size = 2048; + + @Builder.Default + private final String sigAlgo = "SHA256withRSA"; + } +} diff --git a/datasafe-encryption/datasafe-encryption-api/src/main/java/de/adorsys/datasafe/encrypiton/api/types/keystore/KeyStoreConfig.java b/datasafe-encryption/datasafe-encryption-api/src/main/java/de/adorsys/datasafe/encrypiton/api/types/encryption/KeyStoreConfig.java similarity index 85% rename from datasafe-encryption/datasafe-encryption-api/src/main/java/de/adorsys/datasafe/encrypiton/api/types/keystore/KeyStoreConfig.java rename to datasafe-encryption/datasafe-encryption-api/src/main/java/de/adorsys/datasafe/encrypiton/api/types/encryption/KeyStoreConfig.java index aabfe843d..9dd80edc6 100644 --- a/datasafe-encryption/datasafe-encryption-api/src/main/java/de/adorsys/datasafe/encrypiton/api/types/keystore/KeyStoreConfig.java +++ b/datasafe-encryption/datasafe-encryption-api/src/main/java/de/adorsys/datasafe/encrypiton/api/types/encryption/KeyStoreConfig.java @@ -1,4 +1,4 @@ -package de.adorsys.datasafe.encrypiton.api.types.keystore; +package de.adorsys.datasafe.encrypiton.api.types.encryption; import de.adorsys.datasafe.encrypiton.api.types.keystore.pbkdf.PBKDF2; import de.adorsys.datasafe.encrypiton.api.types.keystore.pbkdf.Scrypt; @@ -9,11 +9,9 @@ * Wrapper for keystore config. */ @Getter -@Builder +@Builder(toBuilder = true) public class KeyStoreConfig { - public static final KeyStoreConfig DEFAULT = KeyStoreConfig.builder().build(); - /** * Which type of keystore to use i.e. BCFKS or UBER, etc. */ @@ -39,6 +37,12 @@ public class KeyStoreConfig { @Builder.Default private final String macAlgo = "HmacSHA3_512"; + /** + * Algorithm to use when encrypting password-like keys to be stored in keystore (i.e. storage credentials). + */ + @Builder.Default + private final String passwordKeysAlgo = "PBEWithHmacSHA256AndAES_256"; + /** * Password key derivation configuration. */ diff --git a/datasafe-encryption/datasafe-encryption-api/src/main/java/de/adorsys/datasafe/encrypiton/api/types/encryption/MutableEncryptionConfig.java b/datasafe-encryption/datasafe-encryption-api/src/main/java/de/adorsys/datasafe/encrypiton/api/types/encryption/MutableEncryptionConfig.java new file mode 100644 index 000000000..8e05dc762 --- /dev/null +++ b/datasafe-encryption/datasafe-encryption-api/src/main/java/de/adorsys/datasafe/encrypiton/api/types/encryption/MutableEncryptionConfig.java @@ -0,0 +1,273 @@ +package de.adorsys.datasafe.encrypiton.api.types.encryption; + +import de.adorsys.datasafe.encrypiton.api.types.keystore.pbkdf.PBKDF2; +import de.adorsys.datasafe.encrypiton.api.types.keystore.pbkdf.Scrypt; +import lombok.Data; + +/** + * This is a helper class to aid mapping between Spring ConfigurationProperties and actual + * {@link EncryptionConfig} because Spring Boot had started to support immutable fields from version 2.2 which + * is rather new to rely on now. + * See {@link EncryptionConfig} for defaults and details on fields. + */ +@Data +public class MutableEncryptionConfig { + + private MutableKeyStoreCreationConfig keystore; + private MutableKeyCreationConfig keys; + private MutableCmsEncryptionConfig cms; + + @Data + public static class MutableCmsEncryptionConfig { + + private String algo; + + CmsEncryptionConfig toCmsEncryptionConfig() { + CmsEncryptionConfig.CmsEncryptionConfigBuilder builder = CmsEncryptionConfig.builder(); + if (null != algo) { + builder.algo(algo); + } + + return builder.build(); + } + } + + @Data + public static class MutableKeyStoreCreationConfig { + + private String type; + private String encryptionAlgo; + private MutableKeyStoreCreationConfig.MutablePBKDF pbkdf; + private String macAlgo; + private String passwordKeysAlgo; + + @Data + public static class MutablePBKDF { + + private MutablePBKDF2 pbkdf2; + private MutableScrypt scrypt; + + @Data + public static class MutablePBKDF2 { + + private String algo; + private Integer saltLength; + private Integer iterCount; + + PBKDF2 toPBKDF2() { + PBKDF2.PBKDF2Builder builder = PBKDF2.builder(); + if (null != algo) { + builder.algo(algo); + } + + if (null != saltLength) { + builder.saltLength(saltLength); + } + + if (null != iterCount) { + builder.iterCount(iterCount); + } + + return builder.build(); + } + } + + @Data + public static class MutableScrypt { + + private Integer cost; + private Integer blockSize; + private Integer parallelization; + private Integer saltLength; + + Scrypt toScrypt() { + + Scrypt.ScryptBuilder builder = Scrypt.builder(); + + if (null != cost) { + builder.cost(cost); + } + + if (null != blockSize) { + builder.blockSize(blockSize); + } + + if (null != parallelization) { + builder.parallelization(parallelization); + } + + if (null != saltLength) { + builder.saltLength(saltLength); + } + + return builder.build(); + } + } + + KeyStoreConfig.PBKDF toPBKDF() { + KeyStoreConfig.PBKDF.PBKDFBuilder builder = KeyStoreConfig.PBKDF.builder(); + + if (null != pbkdf2) { + builder.pbkdf2(pbkdf2.toPBKDF2()); + } + + if (null != scrypt) { + builder.pbkdf2(null); + builder.scrypt(scrypt.toScrypt()); + } + + return builder.build(); + } + } + + KeyStoreConfig toKeyStoreConfig() { + KeyStoreConfig.KeyStoreConfigBuilder builder = KeyStoreConfig.builder(); + if (null != type) { + builder.type(type); + } + + if (null != encryptionAlgo) { + builder.encryptionAlgo(encryptionAlgo); + } + + if (null != pbkdf) { + builder.pbkdf(pbkdf.toPBKDF()); + } + + if (null != macAlgo) { + builder.macAlgo(macAlgo); + } + + if (null != passwordKeysAlgo) { + builder.passwordKeysAlgo(passwordKeysAlgo); + } + + return builder.build(); + } + } + + @Data + public static class MutableKeyCreationConfig { + + private Integer encKeyNumber; + private Integer signKeyNumber; + private MutableSecretKeyCreationCfg secret; + private MutableEncryptingKeyCreationCfg encrypting; + private MutableSigningKeyCreationCfg singing; + + @Data + public static class MutableSecretKeyCreationCfg { + + private String algo; + private Integer size; + + KeyCreationConfig.SecretKeyCreationCfg toSecretKeyCreationCfg() { + KeyCreationConfig.SecretKeyCreationCfg.SecretKeyCreationCfgBuilder builder = + KeyCreationConfig.SecretKeyCreationCfg.builder(); + if (null != algo) { + builder.algo(algo); + } + + if (null != size) { + builder.size(size); + } + + return builder.build(); + } + } + + @Data + public static class MutableEncryptingKeyCreationCfg { + + private String algo; + private Integer size; + private String sigAlgo; + + KeyCreationConfig.EncryptingKeyCreationCfg toEncryptingKeyCreationCfg() { + KeyCreationConfig.EncryptingKeyCreationCfg.EncryptingKeyCreationCfgBuilder builder = + KeyCreationConfig.EncryptingKeyCreationCfg.builder(); + if (null != algo) { + builder.algo(algo); + } + + if (null != size) { + builder.size(size); + } + + if (null != sigAlgo) { + builder.sigAlgo(sigAlgo); + } + + return builder.build(); + } + } + + @Data + public static class MutableSigningKeyCreationCfg { + + private String algo; + private Integer size; + private String sigAlgo; + + KeyCreationConfig.SigningKeyCreationCfg toSigningKeyCreationCfg() { + KeyCreationConfig.SigningKeyCreationCfg.SigningKeyCreationCfgBuilder builder = + KeyCreationConfig.SigningKeyCreationCfg.builder(); + if (null != algo) { + builder.algo(algo); + } + + if (null != size) { + builder.size(size); + } + + if (null != sigAlgo) { + builder.sigAlgo(sigAlgo); + } + + return builder.build(); + } + } + + KeyCreationConfig toKeyCreationConfig() { + KeyCreationConfig.KeyCreationConfigBuilder builder = KeyCreationConfig.builder(); + if (null != encKeyNumber) { + builder.encKeyNumber(encKeyNumber); + } + + if (null != signKeyNumber) { + builder.signKeyNumber(signKeyNumber); + } + + if (null != secret) { + builder.secret(secret.toSecretKeyCreationCfg()); + } + + if (null != encrypting) { + builder.encrypting(encrypting.toEncryptingKeyCreationCfg()); + } + + if (null != singing) { + builder.singing(singing.toSigningKeyCreationCfg()); + } + + return builder.build(); + } + } + + public EncryptionConfig toEncryptionConfig() { + EncryptionConfig.EncryptionConfigBuilder builder = EncryptionConfig.builder(); + if (null != keystore) { + builder.keystore(keystore.toKeyStoreConfig()); + } + + if (null != keys) { + builder.keys(keys.toKeyCreationConfig()); + } + + if (null != cms) { + builder.cms(cms.toCmsEncryptionConfig()); + } + + return builder.build(); + } +} diff --git a/datasafe-encryption/datasafe-encryption-api/src/main/java/de/adorsys/datasafe/encrypiton/api/types/keystore/KeyCreationConfig.java b/datasafe-encryption/datasafe-encryption-api/src/main/java/de/adorsys/datasafe/encrypiton/api/types/keystore/KeyCreationConfig.java deleted file mode 100644 index cc5522a78..000000000 --- a/datasafe-encryption/datasafe-encryption-api/src/main/java/de/adorsys/datasafe/encrypiton/api/types/keystore/KeyCreationConfig.java +++ /dev/null @@ -1,19 +0,0 @@ -package de.adorsys.datasafe.encrypiton.api.types.keystore; - -import lombok.Getter; -import lombok.RequiredArgsConstructor; - -/** - * Wrapper that contains count of public-key pairs and count of encryption keys. - */ -@Getter -@RequiredArgsConstructor -public class KeyCreationConfig { - - public static final String PATH_KEY_ID_PREFIX = "PATH_SECRET"; - public static final String PATH_KEY_ID_PREFIX_CTR = "PATH_CTR_SECRET_"; - public static final String DOCUMENT_KEY_ID_PREFIX = "PRIVATE_SECRET"; - - private final int encKeyNumber; - private final int signKeyNumber; -} diff --git a/datasafe-encryption/datasafe-encryption-impl/pom.xml b/datasafe-encryption/datasafe-encryption-impl/pom.xml index 0c8bf4e61..8aed6885a 100644 --- a/datasafe-encryption/datasafe-encryption-impl/pom.xml +++ b/datasafe-encryption/datasafe-encryption-impl/pom.xml @@ -79,6 +79,12 @@ junit-jupiter-api test + + org.junit.jupiter + junit-jupiter-params + ${jupiter.version} + test + org.assertj assertj-core @@ -96,5 +102,15 @@ test-jar test + + com.fasterxml.jackson.core + jackson-databind + test + + + com.fasterxml.jackson.dataformat + jackson-dataformat-yaml + test + diff --git a/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/cmsencryption/ASNCmsEncryptionConfig.java b/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/cmsencryption/ASNCmsEncryptionConfig.java new file mode 100644 index 000000000..bff1ba0d2 --- /dev/null +++ b/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/cmsencryption/ASNCmsEncryptionConfig.java @@ -0,0 +1,50 @@ +package de.adorsys.datasafe.encrypiton.impl.cmsencryption; + +import com.google.common.collect.ImmutableMap; +import de.adorsys.datasafe.encrypiton.api.types.encryption.CmsEncryptionConfig; +import de.adorsys.datasafe.types.api.context.annotations.RuntimeDelegate; +import lombok.Getter; +import org.bouncycastle.asn1.ASN1ObjectIdentifier; +import org.bouncycastle.asn1.nist.NISTObjectIdentifiers; +import org.bouncycastle.asn1.pkcs.PKCSObjectIdentifiers; + +import javax.inject.Inject; +import java.util.Map; + +/** + * Provides algorithm ID used for CMS-encryption. + */ +@RuntimeDelegate +public class ASNCmsEncryptionConfig { + + private static final Map MAPPINGS = + ImmutableMap.builder() + .put("AES128_CBC", NISTObjectIdentifiers.id_aes128_CBC) + .put("AES192_CBC", NISTObjectIdentifiers.id_aes192_CBC) + .put("AES256_CBC", NISTObjectIdentifiers.id_aes256_CBC) + .put("AES128_CCM", NISTObjectIdentifiers.id_aes128_CCM) + .put("AES192_CCM", NISTObjectIdentifiers.id_aes192_CCM) + .put("AES256_CCM", NISTObjectIdentifiers.id_aes256_CCM) + .put("AES128_GCM", NISTObjectIdentifiers.id_aes128_GCM) + .put("AES192_GCM", NISTObjectIdentifiers.id_aes192_GCM) + .put("AES256_GCM", NISTObjectIdentifiers.id_aes256_GCM) + .put("AES128_WRAP", NISTObjectIdentifiers.id_aes128_wrap) + .put("AES192_WRAP", NISTObjectIdentifiers.id_aes192_wrap) + .put("AES256_WRAP", NISTObjectIdentifiers.id_aes256_wrap) + .put("CHACHA20-POLY1305", PKCSObjectIdentifiers.id_alg_AEADChaCha20Poly1305) + .build(); + + @Getter + private final ASN1ObjectIdentifier algorithm; + + @Inject + public ASNCmsEncryptionConfig(CmsEncryptionConfig cmsEncryptionConfig) { + String algo = cmsEncryptionConfig.getAlgo(); + + if (!MAPPINGS.containsKey(algo)) { + throw new IllegalArgumentException("Unknown ASN1 mapping for algo: " + algo); + } + + algorithm = MAPPINGS.get(algo); + } +} diff --git a/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/cmsencryption/CMSEncryptionConfig.java b/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/cmsencryption/CMSEncryptionConfig.java deleted file mode 100644 index aae98f2ac..000000000 --- a/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/cmsencryption/CMSEncryptionConfig.java +++ /dev/null @@ -1,14 +0,0 @@ -package de.adorsys.datasafe.encrypiton.impl.cmsencryption; - -import org.bouncycastle.asn1.ASN1ObjectIdentifier; - -/** - * Provides algorithm ID used for CMS-encryption. - */ -public interface CMSEncryptionConfig { - - /** - * BouncyCastle compatible algorithm identifier. - */ - ASN1ObjectIdentifier getAlgorithm(); -} diff --git a/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/cmsencryption/CMSEncryptionServiceImpl.java b/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/cmsencryption/CMSEncryptionServiceImpl.java index b57403db7..b7b73cbf6 100644 --- a/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/cmsencryption/CMSEncryptionServiceImpl.java +++ b/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/cmsencryption/CMSEncryptionServiceImpl.java @@ -38,15 +38,15 @@ @RuntimeDelegate public class CMSEncryptionServiceImpl implements CMSEncryptionService { - private CMSEncryptionConfig encryptionConfig; + private ASNCmsEncryptionConfig encryptionConfig; @Inject - public CMSEncryptionServiceImpl(CMSEncryptionConfig encryptionConfig) { + public CMSEncryptionServiceImpl(ASNCmsEncryptionConfig encryptionConfig) { this.encryptionConfig = encryptionConfig; } /** - * Asymmetrical encryption-based stream, algorithm is provided by {@link CMSEncryptionConfig#getAlgorithm()} + * Asymmetrical encryption-based stream, algorithm is provided by {@link ASNCmsEncryptionConfig#getAlgorithm()} * Uses {@link RecipientId#keyTrans} recipient id. */ @Override @@ -65,7 +65,7 @@ public OutputStream buildEncryptionOutputStream(OutputStream dataContentStream, } /** - * Symmetrical encryption-based stream, algorithm is provided by {@link CMSEncryptionConfig#getAlgorithm()} + * Symmetrical encryption-based stream, algorithm is provided by {@link ASNCmsEncryptionConfig#getAlgorithm()} * Uses {@link RecipientId#kek} recipient id. */ @Override diff --git a/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/cmsencryption/DefaultCMSEncryptionConfig.java b/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/cmsencryption/DefaultCMSEncryptionConfig.java deleted file mode 100644 index 1dd0c3d58..000000000 --- a/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/cmsencryption/DefaultCMSEncryptionConfig.java +++ /dev/null @@ -1,20 +0,0 @@ -package de.adorsys.datasafe.encrypiton.impl.cmsencryption; - -import lombok.Getter; -import org.bouncycastle.asn1.ASN1ObjectIdentifier; - -import javax.inject.Inject; - -/** - * Default CMS encryption algorithm. - */ -@Getter -public class DefaultCMSEncryptionConfig implements CMSEncryptionConfig { - - private final ASN1ObjectIdentifier algorithm; - - @Inject - public DefaultCMSEncryptionConfig() { - algorithm = DatasafeCryptoAlgorithm.AES256_GCM; - } -} diff --git a/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/keystore/DefaultPasswordBasedKeyConfig.java b/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/keystore/DefaultPasswordBasedKeyConfig.java deleted file mode 100644 index 2f1773781..000000000 --- a/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/keystore/DefaultPasswordBasedKeyConfig.java +++ /dev/null @@ -1,19 +0,0 @@ -package de.adorsys.datasafe.encrypiton.impl.keystore; - -import de.adorsys.datasafe.encrypiton.impl.keystore.types.PasswordBasedKeyConfig; -import de.adorsys.datasafe.types.api.context.annotations.RuntimeDelegate; - -import javax.inject.Inject; - -@RuntimeDelegate -public class DefaultPasswordBasedKeyConfig implements PasswordBasedKeyConfig { - - @Inject - public DefaultPasswordBasedKeyConfig() { - } - - @Override - public String secretKeyFactoryId() { - return "PBEWithHmacSHA256AndAES_256"; - } -} diff --git a/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/keystore/KeyStoreGenerator.java b/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/keystore/KeyStoreGenerator.java index 2831c3ef3..bd9990613 100644 --- a/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/keystore/KeyStoreGenerator.java +++ b/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/keystore/KeyStoreGenerator.java @@ -1,6 +1,11 @@ package de.adorsys.datasafe.encrypiton.impl.keystore; -import de.adorsys.datasafe.encrypiton.api.types.keystore.*; +import de.adorsys.datasafe.encrypiton.api.types.encryption.KeyCreationConfig; +import de.adorsys.datasafe.encrypiton.api.types.encryption.KeyStoreConfig; +import de.adorsys.datasafe.encrypiton.api.types.keystore.KeyID; +import de.adorsys.datasafe.encrypiton.api.types.keystore.ReadKeyPassword; +import de.adorsys.datasafe.encrypiton.api.types.keystore.SecretKeyEntry; +import de.adorsys.datasafe.encrypiton.api.types.keystore.SecretKeyGenerator; import de.adorsys.datasafe.encrypiton.api.types.keystore.exceptions.KeyStoreConfigException; import de.adorsys.datasafe.encrypiton.impl.keystore.generator.KeyCreationConfigImpl; import de.adorsys.datasafe.encrypiton.impl.keystore.generator.KeystoreBuilder; @@ -89,7 +94,7 @@ public KeyStore generate() { } } { - SecretKeyGenerator secretKeyGenerator = config.getSecretKeyGenerator(keyStoreID); + SecretKeyGenerator secretKeyGenerator = config.getSecretKeyGenerator(); for (Map.Entry> keyEntry : secretKeys.entrySet()) { keystoreBuilder = buildSecretKey( diff --git a/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/keystore/KeyStoreServiceImpl.java b/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/keystore/KeyStoreServiceImpl.java index d70be080c..8c93be206 100644 --- a/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/keystore/KeyStoreServiceImpl.java +++ b/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/keystore/KeyStoreServiceImpl.java @@ -2,9 +2,10 @@ import com.google.common.collect.ImmutableMap; import de.adorsys.datasafe.encrypiton.api.keystore.KeyStoreService; +import de.adorsys.datasafe.encrypiton.api.types.encryption.KeyCreationConfig; +import de.adorsys.datasafe.encrypiton.api.types.encryption.KeyStoreConfig; import de.adorsys.datasafe.encrypiton.api.types.keystore.*; import de.adorsys.datasafe.encrypiton.impl.keystore.generator.KeyStoreServiceImplBaseFunctions; -import de.adorsys.datasafe.encrypiton.impl.keystore.types.PasswordBasedKeyConfig; import de.adorsys.datasafe.types.api.context.annotations.RuntimeDelegate; import lombok.SneakyThrows; import lombok.extern.slf4j.Slf4j; @@ -20,20 +21,19 @@ import java.security.cert.X509Certificate; import java.util.*; -import static de.adorsys.datasafe.encrypiton.api.types.keystore.KeyCreationConfig.*; +import static de.adorsys.datasafe.encrypiton.api.types.encryption.KeyCreationConfig.*; @Slf4j @RuntimeDelegate public class KeyStoreServiceImpl implements KeyStoreService { - private final PasswordBasedKeyConfig passwordBasedKeyConfig; - private final Optional keyStoreCreationConfig; + private final KeyStoreConfig config; + private final String passwordStoreEncAlgo; @Inject - public KeyStoreServiceImpl(PasswordBasedKeyConfig passwordBasedKeyConfig, - Optional keyStoreCreationConfig) { - this.passwordBasedKeyConfig = passwordBasedKeyConfig; - this.keyStoreCreationConfig = keyStoreCreationConfig; + public KeyStoreServiceImpl(KeyStoreConfig config) { + this.config = config; + this.passwordStoreEncAlgo = this.config.getPasswordKeysAlgo(); } @Override @@ -53,19 +53,16 @@ public KeyStore createKeyStore(KeyStoreAuth keyStoreAuth, @Override public KeyStore createKeyStore(KeyStoreAuth keyStoreAuth, - KeyCreationConfig config, + KeyCreationConfig keyConfig, Map> secretKeys) { log.debug("start create keystore "); - if (config == null) { - config = new KeyCreationConfig(5, 5); - } // TODO, hier also statt der StoreID nun das String serverKeyPairAliasPrefix = UUID.randomUUID().toString(); log.debug("keystoreid = {}", serverKeyPairAliasPrefix); KeyStoreGenerator keyStoreGenerator = KeyStoreGenerator.builder() - .keyCreationConfig(config) - .keyStoreConfig(keyStoreCreationConfig.orElse(KeyStoreConfig.DEFAULT)) + .keyCreationConfig(keyConfig) + .keyStoreConfig(config) .serverKeyPairAliasPrefix(serverKeyPairAliasPrefix) .readKeyPassword(keyStoreAuth.getReadKeyPassword()) .secretKeys(secretKeys) @@ -141,7 +138,7 @@ public SecretKeySpec getSecretKey(KeyStoreAccess keyStoreAccess, KeyID keyID) { @SneakyThrows public void addPasswordBasedSecretKey(KeyStoreAccess keyStoreAccess, String alias, char[] secret) { PBEKeySpec pbeKeySpec = new PBEKeySpec(secret); - SecretKeyFactory keyFac = SecretKeyFactory.getInstance(passwordBasedKeyConfig.secretKeyFactoryId()); + SecretKeyFactory keyFac = SecretKeyFactory.getInstance(passwordStoreEncAlgo); SecretKey key = keyFac.generateSecret(pbeKeySpec); keyStoreAccess.getKeyStore() .setKeyEntry( @@ -172,7 +169,7 @@ public KeyStore deserialize(byte[] payload, String storeId, ReadStorePassword re return KeyStoreServiceImplBaseFunctions.loadKeyStore( payload, storeId, - keyStoreCreationConfig.orElse(KeyStoreConfig.DEFAULT), + config, readStorePassword ); } diff --git a/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/keystore/generator/KeyCreationConfigImpl.java b/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/keystore/generator/KeyCreationConfigImpl.java index 8c3c3fe42..7fc4d3be3 100644 --- a/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/keystore/generator/KeyCreationConfigImpl.java +++ b/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/keystore/generator/KeyCreationConfigImpl.java @@ -1,6 +1,6 @@ package de.adorsys.datasafe.encrypiton.impl.keystore.generator; -import de.adorsys.datasafe.encrypiton.api.types.keystore.KeyCreationConfig; +import de.adorsys.datasafe.encrypiton.api.types.encryption.KeyCreationConfig; /** * Created by peter on 09.01.18. @@ -13,15 +13,25 @@ public KeyCreationConfigImpl(KeyCreationConfig config) { } public KeyPairGeneratorImpl getEncKeyPairGenerator(String keyPrefix) { - return new KeyPairGeneratorImpl("RSA", 2048, "SHA256withRSA", "enc-" + keyPrefix); + return new KeyPairGeneratorImpl( + config.getEncrypting().getAlgo(), + config.getEncrypting().getSize(), + config.getEncrypting().getSigAlgo(), + "enc-" + keyPrefix + ); } public KeyPairGeneratorImpl getSignKeyPairGenerator(String keyPrefix) { - return new KeyPairGeneratorImpl("RSA", 2048, "SHA256withRSA", "sign-" + keyPrefix); + return new KeyPairGeneratorImpl( + config.getSinging().getAlgo(), + config.getSinging().getSize(), + config.getSinging().getSigAlgo(), + "sign-" + keyPrefix + ); } - public SecretKeyGeneratorImpl getSecretKeyGenerator(String keyPrefix) { - return new SecretKeyGeneratorImpl("AES", 256); + public SecretKeyGeneratorImpl getSecretKeyGenerator() { + return new SecretKeyGeneratorImpl(config.getSecret().getAlgo(), config.getSecret().getSize()); } public int getEncKeyNumber() { diff --git a/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/keystore/generator/KeyStoreServiceImplBaseFunctions.java b/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/keystore/generator/KeyStoreServiceImplBaseFunctions.java index d142dc41c..fd41f11ac 100644 --- a/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/keystore/generator/KeyStoreServiceImplBaseFunctions.java +++ b/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/keystore/generator/KeyStoreServiceImplBaseFunctions.java @@ -4,7 +4,7 @@ import de.adorsys.datasafe.encrypiton.api.types.keystore.ReadKeyPassword; import de.adorsys.datasafe.encrypiton.api.types.keystore.ReadStorePassword; import de.adorsys.datasafe.encrypiton.api.types.keystore.SecretKeyEntry; -import de.adorsys.datasafe.encrypiton.api.types.keystore.KeyStoreConfig; +import de.adorsys.datasafe.encrypiton.api.types.encryption.KeyStoreConfig; import de.adorsys.datasafe.encrypiton.impl.keystore.types.KeyPairEntry; import lombok.SneakyThrows; import org.bouncycastle.asn1.x509.AlgorithmIdentifier; @@ -43,10 +43,6 @@ private KeyStoreServiceImplBaseFunctions() { */ @SneakyThrows public static KeyStore newKeyStore(KeyStoreConfig config) { - if (config == null) { - config = KeyStoreConfig.DEFAULT; - } - KeyStore ks = KeyStore.getInstance(config.getType()); if ("BCFKS".equals(config.getType())) { @@ -81,11 +77,6 @@ public static byte[] toByteArray(KeyStore keystore, String storeId, ReadStorePas public static KeyStore loadKeyStore(InputStream in, String storeId, KeyStoreConfig keyStoreConfig, ReadStorePassword readStorePassword) { - // Use default if blank. - if (keyStoreConfig == null) { - keyStoreConfig = KeyStoreConfig.DEFAULT; - } - KeyStore ks = KeyStore.getInstance(keyStoreConfig.getType()); ks.load(in, readStorePassword.getValue().toCharArray()); diff --git a/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/keystore/generator/KeystoreBuilder.java b/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/keystore/generator/KeystoreBuilder.java index b499b9820..e96ea4323 100644 --- a/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/keystore/generator/KeystoreBuilder.java +++ b/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/keystore/generator/KeystoreBuilder.java @@ -1,7 +1,7 @@ package de.adorsys.datasafe.encrypiton.impl.keystore.generator; import de.adorsys.datasafe.encrypiton.api.types.keystore.KeyEntry; -import de.adorsys.datasafe.encrypiton.api.types.keystore.KeyStoreConfig; +import de.adorsys.datasafe.encrypiton.api.types.encryption.KeyStoreConfig; import java.security.KeyStore; import java.util.HashMap; diff --git a/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/keystore/types/PasswordBasedKeyConfig.java b/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/keystore/types/PasswordBasedKeyConfig.java deleted file mode 100644 index c8ed065e1..000000000 --- a/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/keystore/types/PasswordBasedKeyConfig.java +++ /dev/null @@ -1,6 +0,0 @@ -package de.adorsys.datasafe.encrypiton.impl.keystore.types; - -public interface PasswordBasedKeyConfig { - - String secretKeyFactoryId(); -} diff --git a/datasafe-encryption/datasafe-encryption-impl/src/test/java/de/adorsys/datasafe/encrypiton/api/types/encryption/MutableEncryptionConfigTest.java b/datasafe-encryption/datasafe-encryption-impl/src/test/java/de/adorsys/datasafe/encrypiton/api/types/encryption/MutableEncryptionConfigTest.java new file mode 100644 index 000000000..a2ea51681 --- /dev/null +++ b/datasafe-encryption/datasafe-encryption-impl/src/test/java/de/adorsys/datasafe/encrypiton/api/types/encryption/MutableEncryptionConfigTest.java @@ -0,0 +1,48 @@ +package de.adorsys.datasafe.encrypiton.api.types.encryption; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.fasterxml.jackson.dataformat.yaml.YAMLFactory; +import com.fasterxml.jackson.dataformat.yaml.YAMLGenerator; +import com.google.common.io.CharSource; +import com.google.common.io.Resources; +import de.adorsys.datasafe.types.api.shared.BaseMockitoTest; +import lombok.SneakyThrows; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.ValueSource; + +import java.io.Reader; +import java.nio.charset.StandardCharsets; + +import static org.assertj.core.api.Assertions.assertThat; + +class MutableEncryptionConfigTest extends BaseMockitoTest { + + @ValueSource(strings = { + "mutable-scrypt.yaml", + "mutable-pbkdf2.yaml" + }) + @ParameterizedTest + @SneakyThrows + void mappingTest(String yamlFixture) { + ObjectMapper mapper = new ObjectMapper(new YAMLFactory().enable(YAMLGenerator.Feature.MINIMIZE_QUOTES)); + mapper.setSerializationInclusion(JsonInclude.Include.NON_NULL); + String expected = readResource(yamlFixture); + MutableEncryptionConfig config = readResource(mapper, yamlFixture, MutableEncryptionConfig.class); + assertThat(config.getKeystore().getType()).isEqualTo("store-type"); + assertThat(mapper.writeValueAsString(config.toEncryptionConfig())).isEqualTo(expected); + } + + @SneakyThrows + private T readResource(ObjectMapper mapper, String path, Class type) { + try (Reader reader = Resources.asCharSource(Resources.getResource(path), StandardCharsets.UTF_8).openStream()) { + return mapper.readValue(reader, type); + } + } + + @SneakyThrows + private String readResource(String path) { + CharSource reader = Resources.asCharSource(Resources.getResource(path), StandardCharsets.UTF_8); + return reader.read(); + } +} \ No newline at end of file diff --git a/datasafe-encryption/datasafe-encryption-impl/src/test/java/de/adorsys/datasafe/encrypiton/impl/cmsencryption/CmsEncryptionServiceImplTest.java b/datasafe-encryption/datasafe-encryption-impl/src/test/java/de/adorsys/datasafe/encrypiton/impl/cmsencryption/CmsEncryptionServiceImplTest.java index 318fff518..a96529a3b 100644 --- a/datasafe-encryption/datasafe-encryption-impl/src/test/java/de/adorsys/datasafe/encrypiton/impl/cmsencryption/CmsEncryptionServiceImplTest.java +++ b/datasafe-encryption/datasafe-encryption-impl/src/test/java/de/adorsys/datasafe/encrypiton/impl/cmsencryption/CmsEncryptionServiceImplTest.java @@ -3,10 +3,12 @@ import com.google.common.io.ByteStreams; import de.adorsys.datasafe.encrypiton.api.cmsencryption.CMSEncryptionService; import de.adorsys.datasafe.encrypiton.api.keystore.KeyStoreService; +import de.adorsys.datasafe.encrypiton.api.types.encryption.CmsEncryptionConfig; +import de.adorsys.datasafe.encrypiton.api.types.encryption.EncryptionConfig; +import de.adorsys.datasafe.encrypiton.api.types.encryption.KeyCreationConfig; import de.adorsys.datasafe.encrypiton.api.types.keystore.*; import de.adorsys.datasafe.encrypiton.impl.WithBouncyCastle; import de.adorsys.datasafe.encrypiton.impl.cmsencryption.exceptions.DecryptionException; -import de.adorsys.datasafe.encrypiton.impl.keystore.DefaultPasswordBasedKeyConfig; import de.adorsys.datasafe.encrypiton.impl.keystore.KeyStoreServiceImpl; import lombok.SneakyThrows; import lombok.extern.slf4j.Slf4j; @@ -30,7 +32,6 @@ import java.security.MessageDigest; import java.util.Arrays; import java.util.Collections; -import java.util.Optional; import static com.google.common.io.ByteStreams.toByteArray; import static de.adorsys.datasafe.encrypiton.impl.cmsencryption.KeyStoreUtil.getKeys; @@ -44,9 +45,12 @@ class CmsEncryptionServiceImplTest extends WithBouncyCastle { private static final String TEST_MESSAGE_CONTENT = "message content"; private static KeyStoreAccess keyStoreAccess; - private static KeyStoreService keyStoreService = new KeyStoreServiceImpl(new DefaultPasswordBasedKeyConfig(), Optional.empty()); - - private CMSEncryptionService cmsEncryptionService = new CMSEncryptionServiceImpl(new DefaultCMSEncryptionConfig()); + private static KeyStoreService keyStoreService = new KeyStoreServiceImpl( + EncryptionConfig.builder().build().getKeystore() + ); + private CMSEncryptionService cmsEncryptionService = new CMSEncryptionServiceImpl( + new ASNCmsEncryptionConfig(CmsEncryptionConfig.builder().build()) + ); @BeforeAll static void setUp() { @@ -203,7 +207,7 @@ private static KeyStoreAccess getKeyStoreAccess(String label) { ReadStorePassword readStorePassword = new ReadStorePassword(label); KeyStoreAuth keyStoreAuth = new KeyStoreAuth(readStorePassword, readKeyPassword); - KeyCreationConfig config = new KeyCreationConfig(1, 1); + KeyCreationConfig config = KeyCreationConfig.builder().encKeyNumber(1).signKeyNumber(1).build(); KeyStore keyStore = keyStoreService.createKeyStore(keyStoreAuth, config); return new KeyStoreAccess(keyStore, keyStoreAuth); diff --git a/datasafe-encryption/datasafe-encryption-impl/src/test/java/de/adorsys/datasafe/encrypiton/impl/cmsencryption/SymetricEncryptionTest.java b/datasafe-encryption/datasafe-encryption-impl/src/test/java/de/adorsys/datasafe/encrypiton/impl/cmsencryption/SymetricEncryptionTest.java index 5acfbadcf..537ec0fca 100644 --- a/datasafe-encryption/datasafe-encryption-impl/src/test/java/de/adorsys/datasafe/encrypiton/impl/cmsencryption/SymetricEncryptionTest.java +++ b/datasafe-encryption/datasafe-encryption-impl/src/test/java/de/adorsys/datasafe/encrypiton/impl/cmsencryption/SymetricEncryptionTest.java @@ -2,9 +2,11 @@ import de.adorsys.datasafe.encrypiton.api.cmsencryption.CMSEncryptionService; import de.adorsys.datasafe.encrypiton.api.keystore.KeyStoreService; +import de.adorsys.datasafe.encrypiton.api.types.encryption.CmsEncryptionConfig; +import de.adorsys.datasafe.encrypiton.api.types.encryption.EncryptionConfig; +import de.adorsys.datasafe.encrypiton.api.types.encryption.KeyCreationConfig; import de.adorsys.datasafe.encrypiton.api.types.keystore.*; import de.adorsys.datasafe.encrypiton.impl.WithBouncyCastle; -import de.adorsys.datasafe.encrypiton.impl.keystore.DefaultPasswordBasedKeyConfig; import de.adorsys.datasafe.encrypiton.impl.keystore.KeyStoreServiceImpl; import lombok.SneakyThrows; import lombok.extern.slf4j.Slf4j; @@ -19,10 +21,9 @@ import java.io.OutputStream; import java.security.KeyStore; import java.util.Enumeration; -import java.util.Optional; -import static de.adorsys.datasafe.encrypiton.api.types.keystore.KeyCreationConfig.PATH_KEY_ID_PREFIX; -import static de.adorsys.datasafe.encrypiton.api.types.keystore.KeyCreationConfig.DOCUMENT_KEY_ID_PREFIX; +import static de.adorsys.datasafe.encrypiton.api.types.encryption.KeyCreationConfig.DOCUMENT_KEY_ID_PREFIX; +import static de.adorsys.datasafe.encrypiton.api.types.encryption.KeyCreationConfig.PATH_KEY_ID_PREFIX; import static de.adorsys.datasafe.encrypiton.impl.cmsencryption.KeyStoreUtil.getKeys; import static org.assertj.core.api.Assertions.assertThat; @@ -31,12 +32,15 @@ class SymetricEncryptionTest extends WithBouncyCastle { private static final String MESSAGE_CONTENT = "message content"; - private CMSEncryptionService cmsEncryptionService = new CMSEncryptionServiceImpl(new DefaultCMSEncryptionConfig()); - private KeyStoreService keyStoreService = new KeyStoreServiceImpl(new DefaultPasswordBasedKeyConfig(), Optional.empty()); + private CMSEncryptionService cmsEncryptionService = new CMSEncryptionServiceImpl( + new ASNCmsEncryptionConfig(CmsEncryptionConfig.builder().build()) + ); + + private KeyStoreService keyStoreService = new KeyStoreServiceImpl(EncryptionConfig.builder().build().getKeystore()); private ReadKeyPassword readKeyPassword = new ReadKeyPassword("readkeypassword"); private ReadStorePassword readStorePassword = new ReadStorePassword("readstorepassword"); private KeyStoreAuth keyStoreAuth = new KeyStoreAuth(readStorePassword, readKeyPassword); - private KeyCreationConfig config = new KeyCreationConfig(1, 1); + private KeyCreationConfig config = KeyCreationConfig.builder().signKeyNumber(1).encKeyNumber(1).build(); private KeyStore keyStore = keyStoreService.createKeyStore(keyStoreAuth, config); private KeyStoreAccess keyStoreAccess = new KeyStoreAccess(keyStore, keyStoreAuth); diff --git a/datasafe-encryption/datasafe-encryption-impl/src/test/java/de/adorsys/datasafe/encrypiton/impl/keystore/KeyStoreServiceTest.java b/datasafe-encryption/datasafe-encryption-impl/src/test/java/de/adorsys/datasafe/encrypiton/impl/keystore/KeyStoreServiceTest.java index d3153b606..9d0910188 100644 --- a/datasafe-encryption/datasafe-encryption-impl/src/test/java/de/adorsys/datasafe/encrypiton/impl/keystore/KeyStoreServiceTest.java +++ b/datasafe-encryption/datasafe-encryption-impl/src/test/java/de/adorsys/datasafe/encrypiton/impl/keystore/KeyStoreServiceTest.java @@ -1,6 +1,9 @@ package de.adorsys.datasafe.encrypiton.impl.keystore; import de.adorsys.datasafe.encrypiton.api.keystore.KeyStoreService; +import de.adorsys.datasafe.encrypiton.api.types.encryption.EncryptionConfig; +import de.adorsys.datasafe.encrypiton.api.types.encryption.KeyCreationConfig; +import de.adorsys.datasafe.encrypiton.api.types.encryption.KeyStoreConfig; import de.adorsys.datasafe.encrypiton.api.types.keystore.*; import de.adorsys.datasafe.encrypiton.api.types.keystore.exceptions.KeyStoreConfigException; import de.adorsys.datasafe.encrypiton.impl.KeystoreUtil; @@ -19,14 +22,13 @@ import java.security.Security; import java.util.Collections; import java.util.List; -import java.util.Optional; import java.util.UUID; -import static de.adorsys.datasafe.encrypiton.api.types.keystore.KeyCreationConfig.DOCUMENT_KEY_ID_PREFIX; +import static de.adorsys.datasafe.encrypiton.api.types.encryption.KeyCreationConfig.DOCUMENT_KEY_ID_PREFIX; class KeyStoreServiceTest extends WithBouncyCastle { - private KeyStoreService keyStoreService = new KeyStoreServiceImpl(new DefaultPasswordBasedKeyConfig(), Optional.empty()); + private KeyStoreService keyStoreService = new KeyStoreServiceImpl(EncryptionConfig.builder().build().getKeystore()); private KeyStoreAuth keyStoreAuth; @BeforeEach @@ -38,7 +40,7 @@ void setUp() { @Test void createKeyStore() throws Exception { - KeyCreationConfig config = new KeyCreationConfig(0, 1); + KeyCreationConfig config = KeyCreationConfig.builder().signKeyNumber(0).encKeyNumber(1).build(); KeyStore keyStore = keyStoreService.createKeyStore(keyStoreAuth, config); Assertions.assertNotNull(keyStore); @@ -53,16 +55,16 @@ void createKeyStore() throws Exception { @Test void createKeyStoreEmptyConfig() throws Exception { - KeyStore keyStore = keyStoreService.createKeyStore(keyStoreAuth, null); + KeyStore keyStore = keyStoreService.createKeyStore(keyStoreAuth, KeyCreationConfig.builder().build()); Assertions.assertNotNull(keyStore); List list = Collections.list(keyStore.aliases()); // One additional secret key being generated for path encryption and one for private doc encryption. - Assertions.assertEquals(13, list.size()); + Assertions.assertEquals(5, list.size()); } @Test void createKeyStoreException() { - KeyCreationConfig config = new KeyCreationConfig(0, 0); + KeyCreationConfig config = KeyCreationConfig.builder().encKeyNumber(0).signKeyNumber(0).build(); Assertions.assertThrows(KeyStoreConfigException.class, () -> keyStoreService.createKeyStore(keyStoreAuth, config, Collections.emptyMap()) @@ -71,19 +73,19 @@ void createKeyStoreException() { @Test void getPublicKeys() { - KeyStore keyStore = keyStoreService.createKeyStore(keyStoreAuth, null); + KeyStore keyStore = keyStoreService.createKeyStore(keyStoreAuth, KeyCreationConfig.builder().build()); KeyStoreAccess keyStoreAccess = new KeyStoreAccess(keyStore, keyStoreAuth); List publicKeys = keyStoreService.getPublicKeys(keyStoreAccess); - Assertions.assertEquals(5, publicKeys.size()); + Assertions.assertEquals(1, publicKeys.size()); } @Test void getPrivateKey() throws Exception { - KeyStore keyStore = KeyStoreServiceImplBaseFunctions.newKeyStore(KeyStoreConfig.DEFAULT); // BCFKS + KeyStore keyStore = KeyStoreServiceImplBaseFunctions.newKeyStore(KeyStoreConfig.builder().build()); // BCFKS ReadKeyPassword readKeyPassword = new ReadKeyPassword("keypass"); - KeyCreationConfigImpl keyStoreCreationConfig = new KeyCreationConfigImpl(null); + KeyCreationConfigImpl keyStoreCreationConfig = new KeyCreationConfigImpl(KeyCreationConfig.builder().build()); KeyPairGenerator encKeyPairGenerator = keyStoreCreationConfig.getEncKeyPairGenerator("KEYSTORE-ID-0"); String alias = "KEYSTORE-ID-0" + UUID.randomUUID().toString(); KeyPairEntry keyPairEntry = encKeyPairGenerator.generateEncryptionKey(alias, readKeyPassword); @@ -100,7 +102,7 @@ void getPrivateKey() throws Exception { @Test void getPrivateKeyException() throws Exception { - KeyStore keyStore = keyStoreService.createKeyStore(keyStoreAuth, null); + KeyStore keyStore = keyStoreService.createKeyStore(keyStoreAuth, KeyCreationConfig.builder().build()); KeyStoreAccess keyStoreAccess = new KeyStoreAccess(keyStore, keyStoreAuth); List list = Collections.list(keyStore.aliases()); Assertions.assertThrows(ClassCastException.class, () -> { @@ -112,7 +114,7 @@ void getPrivateKeyException() throws Exception { @Test void getSecretKey() { - KeyCreationConfig config = new KeyCreationConfig(0, 1); + KeyCreationConfig config = KeyCreationConfig.builder().signKeyNumber(1).encKeyNumber(0).build(); KeyStore keyStore = keyStoreService.createKeyStore(keyStoreAuth, config); KeyStoreAccess keyStoreAccess = new KeyStoreAccess(keyStore, keyStoreAuth); diff --git a/datasafe-encryption/datasafe-encryption-impl/src/test/java/de/adorsys/datasafe/encrypiton/impl/pathencryption/SymmetricPathEncryptionServiceImplTest.java b/datasafe-encryption/datasafe-encryption-impl/src/test/java/de/adorsys/datasafe/encrypiton/impl/pathencryption/SymmetricPathEncryptionServiceImplTest.java index 56acce873..7370c5803 100644 --- a/datasafe-encryption/datasafe-encryption-impl/src/test/java/de/adorsys/datasafe/encrypiton/impl/pathencryption/SymmetricPathEncryptionServiceImplTest.java +++ b/datasafe-encryption/datasafe-encryption-impl/src/test/java/de/adorsys/datasafe/encrypiton/impl/pathencryption/SymmetricPathEncryptionServiceImplTest.java @@ -1,10 +1,11 @@ package de.adorsys.datasafe.encrypiton.impl.pathencryption; import de.adorsys.datasafe.encrypiton.api.keystore.KeyStoreService; +import de.adorsys.datasafe.encrypiton.api.types.encryption.EncryptionConfig; +import de.adorsys.datasafe.encrypiton.api.types.encryption.KeyCreationConfig; import de.adorsys.datasafe.encrypiton.api.types.keystore.*; import de.adorsys.datasafe.encrypiton.impl.KeystoreUtil; import de.adorsys.datasafe.encrypiton.impl.WithBouncyCastle; -import de.adorsys.datasafe.encrypiton.impl.keystore.DefaultPasswordBasedKeyConfig; import de.adorsys.datasafe.encrypiton.impl.keystore.KeyStoreServiceImpl; import de.adorsys.datasafe.types.api.resource.Uri; import lombok.extern.slf4j.Slf4j; @@ -16,9 +17,8 @@ import javax.crypto.spec.SecretKeySpec; import java.net.URI; import java.security.KeyStore; -import java.util.Optional; -import static de.adorsys.datasafe.encrypiton.api.types.keystore.KeyCreationConfig.PATH_KEY_ID_PREFIX_CTR; +import static de.adorsys.datasafe.encrypiton.api.types.encryption.KeyCreationConfig.PATH_KEY_ID_PREFIX_CTR; import static org.assertj.core.api.Assertions.assertThat; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertThrows; @@ -30,11 +30,11 @@ class SymmetricPathEncryptionServiceImplTest extends WithBouncyCastle { new DefaultPathEncryptorDecryptor(new SivMode()) ); - private KeyStoreService keyStoreService = new KeyStoreServiceImpl(new DefaultPasswordBasedKeyConfig(), Optional.empty()); + private KeyStoreService keyStoreService = new KeyStoreServiceImpl(EncryptionConfig.builder().build().getKeystore()); private ReadKeyPassword readKeyPassword = new ReadKeyPassword("readkeypassword"); private ReadStorePassword readStorePassword = new ReadStorePassword("readstorepassword"); private KeyStoreAuth keyStoreAuth = new KeyStoreAuth(readStorePassword, readKeyPassword); - private KeyCreationConfig config = new KeyCreationConfig(0, 1); + private KeyCreationConfig config = KeyCreationConfig.builder().encKeyNumber(0).signKeyNumber(1).build(); private KeyStore keyStore = keyStoreService.createKeyStore(keyStoreAuth, config); private KeyStoreAccess keyStoreAccess = new KeyStoreAccess(keyStore, keyStoreAuth); diff --git a/datasafe-encryption/datasafe-encryption-impl/src/test/resources/mutable-pbkdf2.yaml b/datasafe-encryption/datasafe-encryption-impl/src/test/resources/mutable-pbkdf2.yaml new file mode 100644 index 000000000..75c0a7a5f --- /dev/null +++ b/datasafe-encryption/datasafe-encryption-impl/src/test/resources/mutable-pbkdf2.yaml @@ -0,0 +1,27 @@ +--- +keystore: + type: store-type + encryptionAlgo: store-enc + pbkdf: + pbkdf2: + algo: pbkdf-algo + saltLength: 2 + iterCount: 3 + macAlgo: store-mac + passwordKeysAlgo: store-pwd-keys +keys: + encKeyNumber: 1 + signKeyNumber: 2 + secret: + algo: sec-algo + size: 12 + encrypting: + algo: enc-algo + size: 13 + sigAlgo: srv-sig-algo + singing: + algo: sig-algo + size: 14 + sigAlgo: srv-sig-algo +cms: + algo: cms-algo1 diff --git a/datasafe-encryption/datasafe-encryption-impl/src/test/resources/mutable-scrypt.yaml b/datasafe-encryption/datasafe-encryption-impl/src/test/resources/mutable-scrypt.yaml new file mode 100644 index 000000000..9ad18ba44 --- /dev/null +++ b/datasafe-encryption/datasafe-encryption-impl/src/test/resources/mutable-scrypt.yaml @@ -0,0 +1,28 @@ +--- +keystore: + type: store-type + encryptionAlgo: store-enc + pbkdf: + scrypt: + cost: 1 + blockSize: 2 + parallelization: 3 + saltLength: 4 + macAlgo: store-mac + passwordKeysAlgo: store-pwd-keys +keys: + encKeyNumber: 1 + signKeyNumber: 2 + secret: + algo: sec-algo + size: 12 + encrypting: + algo: enc-algo + size: 13 + sigAlgo: srv-sig-algo + singing: + algo: sig-algo + size: 14 + sigAlgo: srv-sig-algo +cms: + algo: cms-algo1 diff --git a/datasafe-examples/datasafe-examples-customize-dagger/src/main/java/de/adorsys/datasafe/examples/business/filesystem/CustomlyBuiltDatasafeServices.java b/datasafe-examples/datasafe-examples-customize-dagger/src/main/java/de/adorsys/datasafe/examples/business/filesystem/CustomlyBuiltDatasafeServices.java index 2a8bd8d9b..898b265c7 100644 --- a/datasafe-examples/datasafe-examples-customize-dagger/src/main/java/de/adorsys/datasafe/examples/business/filesystem/CustomlyBuiltDatasafeServices.java +++ b/datasafe-examples/datasafe-examples-customize-dagger/src/main/java/de/adorsys/datasafe/examples/business/filesystem/CustomlyBuiltDatasafeServices.java @@ -12,6 +12,7 @@ import de.adorsys.datasafe.business.impl.storage.DefaultStorageModule; import de.adorsys.datasafe.directory.api.config.DFSConfig; import de.adorsys.datasafe.directory.api.profile.operations.ProfileOperations; +import de.adorsys.datasafe.encrypiton.api.types.encryption.EncryptionConfig; import de.adorsys.datasafe.inbox.api.InboxService; import de.adorsys.datasafe.privatestore.api.PrivateSpaceService; import de.adorsys.datasafe.storage.api.StorageService; @@ -81,6 +82,16 @@ interface Builder { @BindsInstance Builder overridesRegistry(@Nullable OverridesRegistry overridesRegistry); + /** + * All encryption stuff configuration + * - which keystore to use + * - how to encrypt keys in keystore + * - which types of keys to create + * - what kind of encryption to use when encrypting document content + */ + @BindsInstance + Builder encryption(@Nullable EncryptionConfig encryptionConfig); + /** * @return Customized Datasafe services. */ diff --git a/datasafe-long-run-tests/datasafe-business-tests-random-actions/src/test/java/de/adorsys/datasafe/business/impl/e2e/randomactions/RandomActionsOnSimpleDatasafeAdapterTest.java b/datasafe-long-run-tests/datasafe-business-tests-random-actions/src/test/java/de/adorsys/datasafe/business/impl/e2e/randomactions/RandomActionsOnSimpleDatasafeAdapterTest.java index 8461e4eb9..c533de867 100644 --- a/datasafe-long-run-tests/datasafe-business-tests-random-actions/src/test/java/de/adorsys/datasafe/business/impl/e2e/randomactions/RandomActionsOnSimpleDatasafeAdapterTest.java +++ b/datasafe-long-run-tests/datasafe-business-tests-random-actions/src/test/java/de/adorsys/datasafe/business/impl/e2e/randomactions/RandomActionsOnSimpleDatasafeAdapterTest.java @@ -7,6 +7,7 @@ import de.adorsys.datasafe.directory.api.types.*; import de.adorsys.datasafe.encrypiton.api.types.UserID; import de.adorsys.datasafe.encrypiton.api.types.UserIDAuth; +import de.adorsys.datasafe.encrypiton.api.types.encryption.MutableEncryptionConfig; import de.adorsys.datasafe.encrypiton.api.types.keystore.ReadKeyPassword; import de.adorsys.datasafe.inbox.api.InboxService; import de.adorsys.datasafe.privatestore.api.PrivateSpaceService; @@ -63,7 +64,7 @@ void testRandomActionsParallelThreads(StorageDescriptor descriptor, int threadCo private DefaultDatasafeServices datasafeServicesFromSimpleDatasafeAdapter(StorageDescriptor descriptor) { SimpleDatasafeService datasafeService = new SimpleDatasafeServiceImpl( - DFSTestCredentialsFactory.credentials(descriptor) + DFSTestCredentialsFactory.credentials(descriptor), new MutableEncryptionConfig() ); return new DefaultDatasafeServices() { diff --git a/datasafe-rest-impl/src/main/java/de/adorsys/datasafe/rest/impl/config/DatasafeConfig.java b/datasafe-rest-impl/src/main/java/de/adorsys/datasafe/rest/impl/config/DatasafeConfig.java index 282b4a3f2..e284669f2 100644 --- a/datasafe-rest-impl/src/main/java/de/adorsys/datasafe/rest/impl/config/DatasafeConfig.java +++ b/datasafe-rest-impl/src/main/java/de/adorsys/datasafe/rest/impl/config/DatasafeConfig.java @@ -20,7 +20,8 @@ import de.adorsys.datasafe.directory.impl.profile.dfs.BucketAccessServiceImpl; import de.adorsys.datasafe.directory.impl.profile.dfs.BucketAccessServiceImplRuntimeDelegatable; import de.adorsys.datasafe.directory.impl.profile.dfs.RegexAccessServiceWithStorageCredentialsImpl; -import de.adorsys.datasafe.encrypiton.api.types.keystore.KeyStoreConfig; +import de.adorsys.datasafe.encrypiton.api.types.encryption.EncryptionConfig; +import de.adorsys.datasafe.encrypiton.api.types.encryption.KeyStoreConfig; import de.adorsys.datasafe.encrypiton.api.types.keystore.pbkdf.PBKDF2; import de.adorsys.datasafe.encrypiton.api.types.keystore.pbkdf.Scrypt; import de.adorsys.datasafe.storage.api.RegexDelegatingStorage; @@ -105,7 +106,8 @@ DFSConfig multiDfsConfig(DatasafeProperties properties) { */ @Bean DefaultDatasafeServices datasafeService(StorageService storageService, DFSConfig dfsConfig, - Optional registry) { + Optional registry, + KeyStoreConfig keyStoreConfig) { Security.addProvider(new BouncyCastleProvider()); @@ -114,12 +116,14 @@ DefaultDatasafeServices datasafeService(StorageService storageService, DFSConfig .config(dfsConfig) .storage(storageService) .overridesRegistry(registry.orElse(null)) + .encryption(EncryptionConfig.builder().keystore(keyStoreConfig).build()) .build(); } @Bean VersionedDatasafeServices versionedDatasafeServices(StorageService storageService, DFSConfig dfsConfig, - Optional registry) { + Optional registry, + KeyStoreConfig keyStoreConfig) { Security.addProvider(new BouncyCastleProvider()); @@ -128,6 +132,7 @@ VersionedDatasafeServices versionedDatasafeServices(StorageService storageServic .config(dfsConfig) .storage(storageService) .overridesRegistry(registry.orElse(null)) + .encryption(EncryptionConfig.builder().keystore(keyStoreConfig).build()) .build(); } @@ -260,6 +265,7 @@ KeyStoreConfig keystoreConfig(KeystoreProperties kp) { KeyStoreConfig.KeyStoreConfigBuilder builder = KeyStoreConfig.builder(); builder.encryptionAlgo(kp.getEncryptionAlgo()); builder.macAlgo(kp.getMacAlgo()); + builder.passwordKeysAlgo(kp.getPasswordKeyAlgo()); KeyStoreConfig.PBKDF.PBKDFBuilder pbkdf = KeyStoreConfig.PBKDF.builder(); if (null != kp.getPbkdf2()) { diff --git a/datasafe-rest-impl/src/main/java/de/adorsys/datasafe/rest/impl/config/KeystoreProperties.java b/datasafe-rest-impl/src/main/java/de/adorsys/datasafe/rest/impl/config/KeystoreProperties.java index 4bbdd9095..49e2dc5fb 100644 --- a/datasafe-rest-impl/src/main/java/de/adorsys/datasafe/rest/impl/config/KeystoreProperties.java +++ b/datasafe-rest-impl/src/main/java/de/adorsys/datasafe/rest/impl/config/KeystoreProperties.java @@ -40,8 +40,10 @@ public class KeystoreProperties { private String macAlgo = "HmacSHA3_512"; /** - * Password key derivation configuration. + * Algorithm to use when encrypting password-like keys to be stored in keystore (i.e. storage credentials). */ + @NotBlank + private String passwordKeyAlgo = "PBEWithHmacSHA256AndAES_256"; @Data public static class PBKDF2 { diff --git a/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/main/java/de/adorsys/datasafe/simple/adapter/impl/LegacyDatasafeService.java b/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/main/java/de/adorsys/datasafe/simple/adapter/impl/LegacyDatasafeService.java index bf1245a09..593e36cf4 100644 --- a/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/main/java/de/adorsys/datasafe/simple/adapter/impl/LegacyDatasafeService.java +++ b/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/main/java/de/adorsys/datasafe/simple/adapter/impl/LegacyDatasafeService.java @@ -9,7 +9,7 @@ import de.adorsys.datasafe.business.impl.service.DefaultDatasafeServices; import de.adorsys.datasafe.business.impl.storage.DefaultStorageModule; import de.adorsys.datasafe.directory.api.config.DFSConfig; -import de.adorsys.datasafe.encrypiton.api.types.keystore.KeyStoreConfig; +import de.adorsys.datasafe.encrypiton.api.types.encryption.EncryptionConfig; import de.adorsys.datasafe.simple.adapter.impl.cmsencryption.SwitchableCMSEncryptionModule; import de.adorsys.datasafe.simple.adapter.impl.pathencryption.LegacyCredentialsModule; import de.adorsys.datasafe.simple.adapter.impl.pathencryption.LegacyPathEncryptionModule; @@ -62,7 +62,8 @@ interface Builder { Builder overridesRegistry(@Nullable OverridesRegistry overridesRegistry); @BindsInstance - Builder keyStoreConfig(KeyStoreConfig keyStoreConfig); + Builder encryption(@Nullable EncryptionConfig encryptionConfig); + /** * @return Provide NEW instance of Legacy Datasafe services. All dependencies except * annotated with {@code @Singleton} will have scope analogous to Spring {code @Prototype}. diff --git a/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/main/java/de/adorsys/datasafe/simple/adapter/impl/SimpleDatasafeServiceImpl.java b/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/main/java/de/adorsys/datasafe/simple/adapter/impl/SimpleDatasafeServiceImpl.java index 0c9bab3a6..3960e11fe 100644 --- a/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/main/java/de/adorsys/datasafe/simple/adapter/impl/SimpleDatasafeServiceImpl.java +++ b/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/main/java/de/adorsys/datasafe/simple/adapter/impl/SimpleDatasafeServiceImpl.java @@ -12,7 +12,8 @@ import de.adorsys.datasafe.directory.impl.profile.config.DefaultDFSConfig; import de.adorsys.datasafe.encrypiton.api.types.UserID; import de.adorsys.datasafe.encrypiton.api.types.UserIDAuth; -import de.adorsys.datasafe.encrypiton.api.types.keystore.KeyStoreConfig; +import de.adorsys.datasafe.encrypiton.api.types.encryption.KeyStoreConfig; +import de.adorsys.datasafe.encrypiton.api.types.encryption.MutableEncryptionConfig; import de.adorsys.datasafe.encrypiton.api.types.keystore.ReadKeyPassword; import de.adorsys.datasafe.encrypiton.api.types.keystore.ReadStorePassword; import de.adorsys.datasafe.simple.adapter.api.SimpleDatasafeService; @@ -53,10 +54,10 @@ public class SimpleDatasafeServiceImpl implements SimpleDatasafeService { private DefaultDatasafeServices customlyBuiltDatasafeServices; public SimpleDatasafeServiceImpl() { - this(DFSCredentialsFactory.getFromEnvironmnet()); + this(DFSCredentialsFactory.getFromEnvironmnet(), new MutableEncryptionConfig()); } - public SimpleDatasafeServiceImpl(DFSCredentials dfsCredentials) { + public SimpleDatasafeServiceImpl(DFSCredentials dfsCredentials, MutableEncryptionConfig config) { if (dfsCredentials instanceof FilesystemDFSCredentials) { FilesystemDFSCredentials filesystemDFSCredentials = (FilesystemDFSCredentials) dfsCredentials; @@ -69,7 +70,11 @@ public SimpleDatasafeServiceImpl(DFSCredentials dfsCredentials) { storageService = new FileSystemStorageService(FileSystems.getDefault().getPath(filesystemDFSCredentials.getRoot())); customlyBuiltDatasafeServices = DaggerLegacyDatasafeService.builder() .config(new DefaultDFSConfig(systemRoot, universalReadStorePassword.getValue())) - .keyStoreConfig(KeyStoreConfig.builder().build()) + .encryption( + config.toEncryptionConfig().toBuilder() + .keystore(KeyStoreConfig.builder().type("UBER").build()) // FIXME: It is legacy keystore, Release 1.1 should fix it + .build() + ) .storage(getStorageService()) .build(); @@ -134,7 +139,11 @@ public SimpleDatasafeServiceImpl(DFSCredentials dfsCredentials) { customlyBuiltDatasafeServices = DaggerLegacyDatasafeService.builder() .config(new DefaultDFSConfig(systemRoot, universalReadStorePassword.getValue())) - .keyStoreConfig(KeyStoreConfig.builder().build()) + .encryption( + config.toEncryptionConfig().toBuilder() + .keystore(KeyStoreConfig.builder().type("UBER").build()) // FIXME: It is legacy keystore, Release 1.1 should fix it + .build() + ) .storage(getStorageService()) .build(); diff --git a/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/main/java/de/adorsys/datasafe/simple/adapter/impl/cmsencryption/SwitchableCMSEncryptionModule.java b/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/main/java/de/adorsys/datasafe/simple/adapter/impl/cmsencryption/SwitchableCMSEncryptionModule.java index 2ceb88cf2..3fc0368d8 100644 --- a/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/main/java/de/adorsys/datasafe/simple/adapter/impl/cmsencryption/SwitchableCMSEncryptionModule.java +++ b/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/main/java/de/adorsys/datasafe/simple/adapter/impl/cmsencryption/SwitchableCMSEncryptionModule.java @@ -2,9 +2,12 @@ import dagger.Binds; import dagger.Module; +import dagger.Provides; import de.adorsys.datasafe.encrypiton.api.cmsencryption.CMSEncryptionService; -import de.adorsys.datasafe.encrypiton.impl.cmsencryption.CMSEncryptionConfig; -import de.adorsys.datasafe.encrypiton.impl.cmsencryption.DefaultCMSEncryptionConfig; +import de.adorsys.datasafe.encrypiton.api.types.encryption.CmsEncryptionConfig; +import de.adorsys.datasafe.encrypiton.api.types.encryption.EncryptionConfig; + +import javax.annotation.Nullable; /** * This module is responsible for providing CMS encryption of document. @@ -13,10 +16,16 @@ public abstract class SwitchableCMSEncryptionModule { /** - * Default CMS-encryption config using AES256_CBC. + * Default CMS-encryption config using AES256_GCM. */ - @Binds - abstract CMSEncryptionConfig defaultCMSEncryptionConfig(DefaultCMSEncryptionConfig defaultCMSEncryptionConfig); + @Provides + static CmsEncryptionConfig cmsEncryptionConfig(@Nullable EncryptionConfig config) { + if (null == config) { + return EncryptionConfig.builder().build().getCms(); + } + + return config.getCms(); + } /** * Default BouncyCastle based CMS encryption for document. diff --git a/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/main/java/de/adorsys/datasafe/simple/adapter/impl/cmsencryption/SwitchableCmsEncryptionImpl.java b/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/main/java/de/adorsys/datasafe/simple/adapter/impl/cmsencryption/SwitchableCmsEncryptionImpl.java index 52d0790a5..ecb0d0cf5 100644 --- a/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/main/java/de/adorsys/datasafe/simple/adapter/impl/cmsencryption/SwitchableCmsEncryptionImpl.java +++ b/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/main/java/de/adorsys/datasafe/simple/adapter/impl/cmsencryption/SwitchableCmsEncryptionImpl.java @@ -2,7 +2,7 @@ import de.adorsys.datasafe.encrypiton.api.types.keystore.KeyID; import de.adorsys.datasafe.encrypiton.api.types.keystore.PublicKeyIDWithPublicKey; -import de.adorsys.datasafe.encrypiton.impl.cmsencryption.CMSEncryptionConfig; +import de.adorsys.datasafe.encrypiton.impl.cmsencryption.ASNCmsEncryptionConfig; import de.adorsys.datasafe.encrypiton.impl.cmsencryption.CMSEncryptionServiceImpl; import lombok.extern.slf4j.Slf4j; @@ -22,7 +22,7 @@ public class SwitchableCmsEncryptionImpl extends CMSEncryptionServiceImpl { private boolean withCmsEncryption = checkCmsEnccryptionToUse(); @Inject - public SwitchableCmsEncryptionImpl(CMSEncryptionConfig encryptionConfig) { + public SwitchableCmsEncryptionImpl(ASNCmsEncryptionConfig encryptionConfig) { super(encryptionConfig); } diff --git a/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/main/java/de/adorsys/datasafe/simple/adapter/impl/legacy/directory/LegacyDFSPrivateKeyServiceImpl.java b/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/main/java/de/adorsys/datasafe/simple/adapter/impl/legacy/directory/LegacyDFSPrivateKeyServiceImpl.java index 1c12ed17d..47d77e95b 100644 --- a/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/main/java/de/adorsys/datasafe/simple/adapter/impl/legacy/directory/LegacyDFSPrivateKeyServiceImpl.java +++ b/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/main/java/de/adorsys/datasafe/simple/adapter/impl/legacy/directory/LegacyDFSPrivateKeyServiceImpl.java @@ -8,7 +8,7 @@ import javax.inject.Inject; -import static de.adorsys.datasafe.encrypiton.api.types.keystore.KeyCreationConfig.PATH_KEY_ID_PREFIX; +import static de.adorsys.datasafe.encrypiton.api.types.encryption.KeyCreationConfig.PATH_KEY_ID_PREFIX; /** * Retrieves and opens private keystore associated with user location DFS storage. diff --git a/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/main/java/de/adorsys/datasafe/simple/adapter/impl/profile/HardcodedProfileModule.java b/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/main/java/de/adorsys/datasafe/simple/adapter/impl/profile/HardcodedProfileModule.java index 490e477a8..b59d7cf7f 100644 --- a/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/main/java/de/adorsys/datasafe/simple/adapter/impl/profile/HardcodedProfileModule.java +++ b/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/main/java/de/adorsys/datasafe/simple/adapter/impl/profile/HardcodedProfileModule.java @@ -2,15 +2,29 @@ import dagger.Binds; import dagger.Module; +import dagger.Provides; import de.adorsys.datasafe.directory.api.profile.operations.*; import de.adorsys.datasafe.directory.api.resource.ResourceResolver; import de.adorsys.datasafe.directory.impl.profile.operations.DFSBasedProfileStorageImplRuntimeDelegatable; import de.adorsys.datasafe.directory.impl.profile.operations.actions.ProfileStorageCredentialsServiceImplRuntimeDelegatable; import de.adorsys.datasafe.directory.impl.profile.resource.ResourceResolverImplRuntimeDelegatable; +import de.adorsys.datasafe.encrypiton.api.types.encryption.EncryptionConfig; +import de.adorsys.datasafe.encrypiton.api.types.encryption.KeyCreationConfig; + +import javax.annotation.Nullable; @Module public abstract class HardcodedProfileModule { + @Provides + static KeyCreationConfig cmsEncryptionConfig(@Nullable EncryptionConfig config) { + if (null == config) { + return EncryptionConfig.builder().build().getKeys(); + } + + return config.getKeys(); + } + /** * Default profile reading service that simply reads json files with serialized public/private located on DFS. */ diff --git a/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/test/java/de/adorsys/datasafe/simple/adapter/impl/CleanupDbTest.java b/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/test/java/de/adorsys/datasafe/simple/adapter/impl/CleanupDbTest.java index cbc1f6448..d63836610 100644 --- a/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/test/java/de/adorsys/datasafe/simple/adapter/impl/CleanupDbTest.java +++ b/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/test/java/de/adorsys/datasafe/simple/adapter/impl/CleanupDbTest.java @@ -1,6 +1,7 @@ package de.adorsys.datasafe.simple.adapter.impl; import de.adorsys.datasafe.encrypiton.api.types.UserIDAuth; +import de.adorsys.datasafe.encrypiton.api.types.encryption.MutableEncryptionConfig; import de.adorsys.datasafe.simple.adapter.api.SimpleDatasafeService; import de.adorsys.datasafe.simple.adapter.api.types.DFSCredentials; import de.adorsys.datasafe.simple.adapter.api.types.DSDocument; @@ -33,7 +34,7 @@ static void setupBouncyCastle() { private void createSimpleService(WithStorageProvider.StorageDescriptor descriptor) { dfsCredentials = InitFromStorageProvider.dfsFromDescriptor(descriptor); if (dfsCredentials != null) { - simpleDatasafeService = new SimpleDatasafeServiceImpl(dfsCredentials); + simpleDatasafeService = new SimpleDatasafeServiceImpl(dfsCredentials, new MutableEncryptionConfig()); } else { simpleDatasafeService = new SimpleDatasafeServiceImpl(); } diff --git a/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/test/java/de/adorsys/datasafe/simple/adapter/impl/DFSRelativeToRootProfileTest.java b/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/test/java/de/adorsys/datasafe/simple/adapter/impl/DFSRelativeToRootProfileTest.java index b6caea6ba..bca968f50 100644 --- a/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/test/java/de/adorsys/datasafe/simple/adapter/impl/DFSRelativeToRootProfileTest.java +++ b/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/test/java/de/adorsys/datasafe/simple/adapter/impl/DFSRelativeToRootProfileTest.java @@ -2,6 +2,7 @@ import de.adorsys.datasafe.encrypiton.api.types.UserID; import de.adorsys.datasafe.encrypiton.api.types.UserIDAuth; +import de.adorsys.datasafe.encrypiton.api.types.encryption.MutableEncryptionConfig; import de.adorsys.datasafe.encrypiton.api.types.keystore.ReadKeyPassword; import de.adorsys.datasafe.simple.adapter.api.SimpleDatasafeService; import de.adorsys.datasafe.simple.adapter.api.types.DFSCredentials; @@ -37,7 +38,9 @@ void createDatasafeAdapter(StorageDescriptor descriptor) { DFSCredentials credentials = InitFromStorageProvider.dfsFromDescriptor(descriptor); simpleDatasafeService = - null != credentials ? new SimpleDatasafeServiceImpl(credentials) : new SimpleDatasafeServiceImpl(); + null != credentials ? + new SimpleDatasafeServiceImpl(credentials, new MutableEncryptionConfig()) + : new SimpleDatasafeServiceImpl(); userIDAuth = new UserIDAuth(new UserID("peter"), new ReadKeyPassword("password")); simpleDatasafeService.createUser(userIDAuth); diff --git a/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/test/java/de/adorsys/datasafe/simple/adapter/impl/SimpleDatasafeAdapter043CompatTest.java b/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/test/java/de/adorsys/datasafe/simple/adapter/impl/SimpleDatasafeAdapter043CompatTest.java index 99a5b89df..1326c2e2b 100644 --- a/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/test/java/de/adorsys/datasafe/simple/adapter/impl/SimpleDatasafeAdapter043CompatTest.java +++ b/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/test/java/de/adorsys/datasafe/simple/adapter/impl/SimpleDatasafeAdapter043CompatTest.java @@ -2,6 +2,7 @@ import de.adorsys.datasafe.encrypiton.api.types.UserID; import de.adorsys.datasafe.encrypiton.api.types.UserIDAuth; +import de.adorsys.datasafe.encrypiton.api.types.encryption.MutableEncryptionConfig; import de.adorsys.datasafe.encrypiton.api.types.keystore.ReadKeyPassword; import de.adorsys.datasafe.simple.adapter.api.types.*; import de.adorsys.datasafe.types.api.shared.Dirs; @@ -31,7 +32,8 @@ void extractFixtureAndPrepare(@TempDir Path tempDir) { dfsRoot = tempDir; Resources.copyResourceDir("compat-0.4.3", tempDir); simpleDatasafeService = new SimpleDatasafeServiceImpl( - FilesystemDFSCredentials.builder().root(tempDir.toString()).build() + FilesystemDFSCredentials.builder().root(tempDir.toString()).build(), + new MutableEncryptionConfig() ); } diff --git a/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/test/java/de/adorsys/datasafe/simple/adapter/impl/SimpleDatasafeAdapterTest.java b/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/test/java/de/adorsys/datasafe/simple/adapter/impl/SimpleDatasafeAdapterTest.java index ee881e53a..de0989dd3 100644 --- a/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/test/java/de/adorsys/datasafe/simple/adapter/impl/SimpleDatasafeAdapterTest.java +++ b/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/test/java/de/adorsys/datasafe/simple/adapter/impl/SimpleDatasafeAdapterTest.java @@ -3,6 +3,7 @@ import com.amazonaws.services.s3.model.AmazonS3Exception; import de.adorsys.datasafe.encrypiton.api.types.UserID; import de.adorsys.datasafe.encrypiton.api.types.UserIDAuth; +import de.adorsys.datasafe.encrypiton.api.types.encryption.MutableEncryptionConfig; import de.adorsys.datasafe.encrypiton.api.types.keystore.ReadKeyPassword; import de.adorsys.datasafe.simple.adapter.api.SimpleDatasafeService; import de.adorsys.datasafe.simple.adapter.api.types.*; @@ -61,7 +62,7 @@ void mybefore() { void mystart() { if (dfsCredentials != null) { - simpleDatasafeService = new SimpleDatasafeServiceImpl(dfsCredentials); + simpleDatasafeService = new SimpleDatasafeServiceImpl(dfsCredentials, new MutableEncryptionConfig()); } else { simpleDatasafeService = new SimpleDatasafeServiceImpl(); } diff --git a/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/test/java/de/adorsys/datasafe/simple/adapter/impl/legacy/LegacySymmetricPathEncryptionServiceImplTest.java b/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/test/java/de/adorsys/datasafe/simple/adapter/impl/legacy/LegacySymmetricPathEncryptionServiceImplTest.java index 3f472aac4..e13807478 100644 --- a/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/test/java/de/adorsys/datasafe/simple/adapter/impl/legacy/LegacySymmetricPathEncryptionServiceImplTest.java +++ b/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/test/java/de/adorsys/datasafe/simple/adapter/impl/legacy/LegacySymmetricPathEncryptionServiceImplTest.java @@ -1,8 +1,9 @@ package de.adorsys.datasafe.simple.adapter.impl.legacy; import de.adorsys.datasafe.encrypiton.api.keystore.KeyStoreService; +import de.adorsys.datasafe.encrypiton.api.types.encryption.KeyCreationConfig; +import de.adorsys.datasafe.encrypiton.api.types.encryption.KeyStoreConfig; import de.adorsys.datasafe.encrypiton.api.types.keystore.*; -import de.adorsys.datasafe.encrypiton.impl.keystore.DefaultPasswordBasedKeyConfig; import de.adorsys.datasafe.encrypiton.impl.keystore.KeyStoreServiceImpl; import de.adorsys.datasafe.simple.adapter.api.legacy.pathencryption.LegacySymmetricPathEncryptionService; import de.adorsys.datasafe.simple.adapter.impl.WithBouncyCastle; @@ -19,9 +20,8 @@ import java.net.URI; import java.net.URISyntaxException; import java.security.KeyStore; -import java.util.Optional; -import static de.adorsys.datasafe.encrypiton.api.types.keystore.KeyCreationConfig.PATH_KEY_ID_PREFIX; +import static de.adorsys.datasafe.encrypiton.api.types.encryption.KeyCreationConfig.PATH_KEY_ID_PREFIX; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertThrows; @@ -32,11 +32,11 @@ class LegacySymmetricPathEncryptionServiceImplTest extends WithBouncyCastle { new LegacyPathEncryptor(new LegacyPathDigestConfig()) ); - private KeyStoreService keyStoreService = new KeyStoreServiceImpl(new DefaultPasswordBasedKeyConfig(), Optional.empty()); + private KeyStoreService keyStoreService = new KeyStoreServiceImpl(KeyStoreConfig.builder().build()); private ReadKeyPassword readKeyPassword = new ReadKeyPassword("readkeypassword"); private ReadStorePassword readStorePassword = new ReadStorePassword("readstorepassword"); private KeyStoreAuth keyStoreAuth = new KeyStoreAuth(readStorePassword, readKeyPassword); - private KeyCreationConfig config = new KeyCreationConfig(0, 1); + private KeyCreationConfig config = KeyCreationConfig.builder().encKeyNumber(1).signKeyNumber(1).build(); private KeyStore keyStore = keyStoreService.createKeyStore(keyStoreAuth, config); private KeyStoreAccess keyStoreAccess = new KeyStoreAccess(keyStore, keyStoreAuth); diff --git a/datasafe-simple-adapter/datasafe-simple-adapter-spring/src/main/java/de/adorsys/datasafe/simple/adapter/spring/DatasafeSpringBeans.java b/datasafe-simple-adapter/datasafe-simple-adapter-spring/src/main/java/de/adorsys/datasafe/simple/adapter/spring/DatasafeSpringBeans.java index b3ce0beb3..83c80841f 100644 --- a/datasafe-simple-adapter/datasafe-simple-adapter-spring/src/main/java/de/adorsys/datasafe/simple/adapter/spring/DatasafeSpringBeans.java +++ b/datasafe-simple-adapter/datasafe-simple-adapter-spring/src/main/java/de/adorsys/datasafe/simple/adapter/spring/DatasafeSpringBeans.java @@ -5,6 +5,7 @@ import de.adorsys.datasafe.simple.adapter.spring.factory.SpringSimpleDatasafeServiceFactory; import de.adorsys.datasafe.simple.adapter.spring.properties.SpringAmazonS3DFSCredentialsProperties; import de.adorsys.datasafe.simple.adapter.spring.properties.SpringDFSCredentialProperties; +import de.adorsys.datasafe.simple.adapter.spring.properties.SpringDatasafeEncryptionProperties; import de.adorsys.datasafe.simple.adapter.spring.properties.SpringFilesystemDFSCredentialsProperties; import lombok.extern.slf4j.Slf4j; import org.springframework.boot.context.properties.EnableConfigurationProperties; @@ -15,10 +16,12 @@ @EnableConfigurationProperties({ SpringDFSCredentialProperties.class, SpringFilesystemDFSCredentialsProperties.class, - SpringAmazonS3DFSCredentialsProperties.class} -) + SpringAmazonS3DFSCredentialsProperties.class, + SpringDatasafeEncryptionProperties.class +}) @Slf4j public class DatasafeSpringBeans { + public DatasafeSpringBeans() { log.info("INIT of DatasafeSpringBeans"); } diff --git a/datasafe-simple-adapter/datasafe-simple-adapter-spring/src/main/java/de/adorsys/datasafe/simple/adapter/spring/factory/SpringSimpleDatasafeServiceFactory.java b/datasafe-simple-adapter/datasafe-simple-adapter-spring/src/main/java/de/adorsys/datasafe/simple/adapter/spring/factory/SpringSimpleDatasafeServiceFactory.java index afd1cde94..a0c8fdc76 100644 --- a/datasafe-simple-adapter/datasafe-simple-adapter-spring/src/main/java/de/adorsys/datasafe/simple/adapter/spring/factory/SpringSimpleDatasafeServiceFactory.java +++ b/datasafe-simple-adapter/datasafe-simple-adapter-spring/src/main/java/de/adorsys/datasafe/simple/adapter/spring/factory/SpringSimpleDatasafeServiceFactory.java @@ -6,6 +6,7 @@ import de.adorsys.datasafe.simple.adapter.api.types.DFSCredentials; import de.adorsys.datasafe.simple.adapter.api.types.FilesystemDFSCredentials; import de.adorsys.datasafe.simple.adapter.impl.SimpleDatasafeServiceImpl; +import de.adorsys.datasafe.simple.adapter.spring.properties.SpringDatasafeEncryptionProperties; import org.springframework.beans.factory.annotation.Autowired; import javax.annotation.PostConstruct; @@ -15,9 +16,13 @@ public class SpringSimpleDatasafeServiceFactory { @Autowired DFSCredentials wiredDfsCredentials; + @Autowired + SpringDatasafeEncryptionProperties encryptionProperties; + DFSCredentials dfsCredentials; boolean useWiredCredentials = true; + @PostConstruct public void postConstruct() { if (useWiredCredentials) { @@ -43,11 +48,21 @@ public SpringSimpleDatasafeServiceFactory(DFSCredentials credentials) { public SimpleDatasafeService getSimpleDataSafeServiceWithSubdir(String subdirBelowRoot) { if (dfsCredentials instanceof AmazonS3DFSCredentials) { AmazonS3DFSCredentials amazonS3DFSCredentials = (AmazonS3DFSCredentials) dfsCredentials; - return new SimpleDatasafeServiceImpl(amazonS3DFSCredentials.toBuilder().rootBucket(amazonS3DFSCredentials.getRootBucket() + "/" + subdirBelowRoot).build()); + return new SimpleDatasafeServiceImpl( + amazonS3DFSCredentials.toBuilder().rootBucket( + amazonS3DFSCredentials.getRootBucket() + "/" + subdirBelowRoot + ).build(), + encryptionProperties.getEncryption() + ); } if (dfsCredentials instanceof FilesystemDFSCredentials) { FilesystemDFSCredentials filesystemDFSCredentials = (FilesystemDFSCredentials) dfsCredentials; - return new SimpleDatasafeServiceImpl(filesystemDFSCredentials.toBuilder().root(filesystemDFSCredentials.getRoot() + "/" + subdirBelowRoot).build()); + return new SimpleDatasafeServiceImpl( + filesystemDFSCredentials.toBuilder().root( + filesystemDFSCredentials.getRoot() + "/" + subdirBelowRoot + ).build(), + encryptionProperties.getEncryption() + ); } throw new SimpleAdapterException("missing switch for DFSCredentials" + dfsCredentials); } diff --git a/datasafe-simple-adapter/datasafe-simple-adapter-spring/src/main/java/de/adorsys/datasafe/simple/adapter/spring/properties/SpringDatasafeEncryptionProperties.java b/datasafe-simple-adapter/datasafe-simple-adapter-spring/src/main/java/de/adorsys/datasafe/simple/adapter/spring/properties/SpringDatasafeEncryptionProperties.java new file mode 100644 index 000000000..e925ae2bd --- /dev/null +++ b/datasafe-simple-adapter/datasafe-simple-adapter-spring/src/main/java/de/adorsys/datasafe/simple/adapter/spring/properties/SpringDatasafeEncryptionProperties.java @@ -0,0 +1,12 @@ +package de.adorsys.datasafe.simple.adapter.spring.properties; + +import de.adorsys.datasafe.encrypiton.api.types.encryption.MutableEncryptionConfig; +import lombok.Data; +import org.springframework.boot.context.properties.ConfigurationProperties; + +@Data +@ConfigurationProperties(prefix = "datasafe") +public class SpringDatasafeEncryptionProperties { + + private MutableEncryptionConfig encryption = new MutableEncryptionConfig(); +} diff --git a/datasafe-simple-adapter/readme.md b/datasafe-simple-adapter/readme.md index 1c5d1fa34..2d60ace79 100644 --- a/datasafe-simple-adapter/readme.md +++ b/datasafe-simple-adapter/readme.md @@ -15,9 +15,9 @@ As this project must not have any dependencies to the docusafe-project all used import de.adorsys.datasafe.simple.adapter.api.SimpleDatasafeService; # parameter classes of service methods -import de.adorsys.datasafe.encrypiton.api.types.UserID; -import de.adorsys.datasafe.encrypiton.api.types.UserIDAuth; -import de.adorsys.datasafe.encrypiton.api.types.keystore.ReadKeyPassword; +import UserID; +import UserIDAuth; +import ReadKeyPassword; import de.adorsys.datasafe.simple.adapter.api.types.DSDocument; import de.adorsys.datasafe.simple.adapter.api.types.DocumentDirectoryFQN; import de.adorsys.datasafe.simple.adapter.api.types.DocumentFQN; diff --git a/pom.xml b/pom.xml index 95c2e3953..17d82d4ef 100644 --- a/pom.xml +++ b/pom.xml @@ -86,7 +86,7 @@ 3.5 1.64 2.8.5 - 2.17 + 2.24 27.0.1-jre 4.0.3 5.4.1 @@ -122,6 +122,7 @@ 5.1.7.RELEASE 2.1.5.RELEASE 1.3.1 + 2.10.0 @@ -319,6 +320,18 @@ HikariCP ${hikari.cp} + + com.fasterxml.jackson.core + jackson-databind + ${jackson.version} + test + + + com.fasterxml.jackson.dataformat + jackson-dataformat-yaml + ${jackson.version} + test + From 28bb461818f7b76177592534e38c557e120f475e Mon Sep 17 00:00:00 2001 From: Valentyn Berezin Date: Fri, 18 Oct 2019 18:42:08 +0300 Subject: [PATCH 223/255] DOC-277. Removing unused stuff --- .../datasafe-encryption-impl/pom.xml | 5 + datasafe-rest-impl/pom.xml | 6 -- .../rest/impl/DatasafeRestApplication.java | 3 +- .../rest/impl/config/DatasafeConfig.java | 50 +--------- .../rest/impl/config/DatasafeProperties.java | 3 + .../rest/impl/config/KeystoreProperties.java | 96 ------------------- pom.xml | 6 ++ 7 files changed, 19 insertions(+), 150 deletions(-) delete mode 100644 datasafe-rest-impl/src/main/java/de/adorsys/datasafe/rest/impl/config/KeystoreProperties.java diff --git a/datasafe-encryption/datasafe-encryption-impl/pom.xml b/datasafe-encryption/datasafe-encryption-impl/pom.xml index 8aed6885a..74827a8e0 100644 --- a/datasafe-encryption/datasafe-encryption-impl/pom.xml +++ b/datasafe-encryption/datasafe-encryption-impl/pom.xml @@ -112,5 +112,10 @@ jackson-dataformat-yaml test + + com.fasterxml.jackson.core + jackson-annotations + test + diff --git a/datasafe-rest-impl/pom.xml b/datasafe-rest-impl/pom.xml index adbe7bfe3..1388b6b99 100644 --- a/datasafe-rest-impl/pom.xml +++ b/datasafe-rest-impl/pom.xml @@ -18,7 +18,6 @@ 2.1.5.RELEASE 2.9.2 0.10.5 - 6.0.17.Final 2.0.3.RELEASE 1.5.3 1.6.0 @@ -78,11 +77,6 @@ ${spring-boot.version} true - - org.hibernate - hibernate-validator - ${hibernate-validator.version} - io.springfox springfox-swagger2 diff --git a/datasafe-rest-impl/src/main/java/de/adorsys/datasafe/rest/impl/DatasafeRestApplication.java b/datasafe-rest-impl/src/main/java/de/adorsys/datasafe/rest/impl/DatasafeRestApplication.java index e27a622f3..6fb6e0dc4 100644 --- a/datasafe-rest-impl/src/main/java/de/adorsys/datasafe/rest/impl/DatasafeRestApplication.java +++ b/datasafe-rest-impl/src/main/java/de/adorsys/datasafe/rest/impl/DatasafeRestApplication.java @@ -1,7 +1,6 @@ package de.adorsys.datasafe.rest.impl; import de.adorsys.datasafe.rest.impl.config.DatasafeProperties; -import de.adorsys.datasafe.rest.impl.config.KeystoreProperties; import de.adorsys.datasafe.rest.impl.security.SecurityProperties; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.EnableAutoConfiguration; @@ -12,7 +11,7 @@ import org.springframework.boot.context.properties.EnableConfigurationProperties; @SpringBootApplication -@EnableConfigurationProperties({DatasafeProperties.class, SecurityProperties.class, KeystoreProperties.class}) +@EnableConfigurationProperties({DatasafeProperties.class, SecurityProperties.class}) @EnableAutoConfiguration(exclude = {DataSourceAutoConfiguration.class, DataSourceTransactionManagerAutoConfiguration.class, HibernateJpaAutoConfiguration.class}) public class DatasafeRestApplication { diff --git a/datasafe-rest-impl/src/main/java/de/adorsys/datasafe/rest/impl/config/DatasafeConfig.java b/datasafe-rest-impl/src/main/java/de/adorsys/datasafe/rest/impl/config/DatasafeConfig.java index e284669f2..eab681e3b 100644 --- a/datasafe-rest-impl/src/main/java/de/adorsys/datasafe/rest/impl/config/DatasafeConfig.java +++ b/datasafe-rest-impl/src/main/java/de/adorsys/datasafe/rest/impl/config/DatasafeConfig.java @@ -20,10 +20,6 @@ import de.adorsys.datasafe.directory.impl.profile.dfs.BucketAccessServiceImpl; import de.adorsys.datasafe.directory.impl.profile.dfs.BucketAccessServiceImplRuntimeDelegatable; import de.adorsys.datasafe.directory.impl.profile.dfs.RegexAccessServiceWithStorageCredentialsImpl; -import de.adorsys.datasafe.encrypiton.api.types.encryption.EncryptionConfig; -import de.adorsys.datasafe.encrypiton.api.types.encryption.KeyStoreConfig; -import de.adorsys.datasafe.encrypiton.api.types.keystore.pbkdf.PBKDF2; -import de.adorsys.datasafe.encrypiton.api.types.keystore.pbkdf.Scrypt; import de.adorsys.datasafe.storage.api.RegexDelegatingStorage; import de.adorsys.datasafe.storage.api.SchemeDelegatingStorage; import de.adorsys.datasafe.storage.api.StorageService; @@ -37,7 +33,6 @@ import de.adorsys.datasafe.types.api.context.BaseOverridesRegistry; import de.adorsys.datasafe.types.api.context.overrides.OverridesRegistry; import de.adorsys.datasafe.types.api.utils.ExecutorServiceUtil; -import lombok.SneakyThrows; import lombok.experimental.Delegate; import lombok.extern.slf4j.Slf4j; import org.bouncycastle.jce.provider.BouncyCastleProvider; @@ -107,7 +102,7 @@ DFSConfig multiDfsConfig(DatasafeProperties properties) { @Bean DefaultDatasafeServices datasafeService(StorageService storageService, DFSConfig dfsConfig, Optional registry, - KeyStoreConfig keyStoreConfig) { + DatasafeProperties properties) { Security.addProvider(new BouncyCastleProvider()); @@ -116,14 +111,14 @@ DefaultDatasafeServices datasafeService(StorageService storageService, DFSConfig .config(dfsConfig) .storage(storageService) .overridesRegistry(registry.orElse(null)) - .encryption(EncryptionConfig.builder().keystore(keyStoreConfig).build()) + .encryption(properties.getEncryption().toEncryptionConfig()) .build(); } @Bean VersionedDatasafeServices versionedDatasafeServices(StorageService storageService, DFSConfig dfsConfig, Optional registry, - KeyStoreConfig keyStoreConfig) { + DatasafeProperties properties) { Security.addProvider(new BouncyCastleProvider()); @@ -132,7 +127,7 @@ VersionedDatasafeServices versionedDatasafeServices(StorageService storageServic .config(dfsConfig) .storage(storageService) .overridesRegistry(registry.orElse(null)) - .encryption(EncryptionConfig.builder().keystore(keyStoreConfig).build()) + .encryption(properties.getEncryption().toEncryptionConfig()) .build(); } @@ -259,43 +254,6 @@ AmazonS3 s3(DatasafeProperties properties) { return amazonS3; } - @Bean - @SneakyThrows - KeyStoreConfig keystoreConfig(KeystoreProperties kp) { - KeyStoreConfig.KeyStoreConfigBuilder builder = KeyStoreConfig.builder(); - builder.encryptionAlgo(kp.getEncryptionAlgo()); - builder.macAlgo(kp.getMacAlgo()); - builder.passwordKeysAlgo(kp.getPasswordKeyAlgo()); - KeyStoreConfig.PBKDF.PBKDFBuilder pbkdf = KeyStoreConfig.PBKDF.builder(); - - if (null != kp.getPbkdf2()) { - pbkdf.pbkdf2(buildPBDF2(kp.getPbkdf2())); - } else { - pbkdf.pbkdf2(null); - pbkdf.scrypt(buildScrypt(kp.getScrypt())); - } - - builder.pbkdf(pbkdf.build()); - return builder.build(); - } - - private Scrypt buildScrypt(KeystoreProperties.Scrypt kp) { - return Scrypt.builder() - .cost(kp.getCost()) - .blockSize(kp.getBlockSize()) - .parallelization(kp.getParallelization()) - .saltLength(kp.getSaltLength()) - .build(); - } - - private PBKDF2 buildPBDF2(KeystoreProperties.PBKDF2 kp) { - return PBKDF2.builder() - .algo(kp.getAlgo()) - .iterCount(kp.getIterCount()) - .saltLength(kp.getSaltLength()) - .build(); - } - private static class WithAccessCredentials extends BucketAccessServiceImpl { @Delegate diff --git a/datasafe-rest-impl/src/main/java/de/adorsys/datasafe/rest/impl/config/DatasafeProperties.java b/datasafe-rest-impl/src/main/java/de/adorsys/datasafe/rest/impl/config/DatasafeProperties.java index e195aa00f..bdc33c913 100644 --- a/datasafe-rest-impl/src/main/java/de/adorsys/datasafe/rest/impl/config/DatasafeProperties.java +++ b/datasafe-rest-impl/src/main/java/de/adorsys/datasafe/rest/impl/config/DatasafeProperties.java @@ -1,5 +1,6 @@ package de.adorsys.datasafe.rest.impl.config; +import de.adorsys.datasafe.encrypiton.api.types.encryption.MutableEncryptionConfig; import lombok.Data; import org.springframework.boot.context.properties.ConfigurationProperties; @@ -39,4 +40,6 @@ public class DatasafeProperties { * From where to serve static resources. */ private String staticResources; + + private MutableEncryptionConfig encryption = new MutableEncryptionConfig(); } diff --git a/datasafe-rest-impl/src/main/java/de/adorsys/datasafe/rest/impl/config/KeystoreProperties.java b/datasafe-rest-impl/src/main/java/de/adorsys/datasafe/rest/impl/config/KeystoreProperties.java deleted file mode 100644 index 49e2dc5fb..000000000 --- a/datasafe-rest-impl/src/main/java/de/adorsys/datasafe/rest/impl/config/KeystoreProperties.java +++ /dev/null @@ -1,96 +0,0 @@ -package de.adorsys.datasafe.rest.impl.config; - -import lombok.Data; -import org.springframework.boot.context.properties.ConfigurationProperties; -import org.springframework.validation.annotation.Validated; - -import javax.validation.constraints.Min; -import javax.validation.constraints.NotBlank; -import javax.validation.constraints.NotNull; - -@ConfigurationProperties(prefix = "keystore") -@Data -@Validated -public class KeystoreProperties { - - /** - * Which type of keystore to use i.e. BCFKS or UBER, etc. - */ - @NotBlank - private String type = "BCFKS"; - - /** - * Keystore encryption algorithm (used both for keys and keystore). For BCFKS refer to for BCFKS refer to - * {@link org.bouncycastle.jcajce.BCFKSLoadStoreParameter} - */ - @NotBlank - private String encryptionAlgo = "AES256_KWP"; - - /** - * Password key derivation configuration. - */ - private PBKDF2 pbkdf2; - - private Scrypt scrypt; - - /** - * KeyStore authentication algorithm, for BCFKS refer to {@link org.bouncycastle.jcajce.BCFKSLoadStoreParameter} - */ - @NotBlank - private String macAlgo = "HmacSHA3_512"; - - /** - * Algorithm to use when encrypting password-like keys to be stored in keystore (i.e. storage credentials). - */ - @NotBlank - private String passwordKeyAlgo = "PBEWithHmacSHA256AndAES_256"; - - @Data - public static class PBKDF2 { - - /** - * Password derivation algorithm, for BCFKS refer to {@link org.bouncycastle.crypto.util.PBKDF2Config} - */ - @NotNull - private String algo = "PRF_SHA512"; - - /** - * Password derivation salt length, for BCFKS refer to {@link org.bouncycastle.crypto.util.PBKDF2Config} - */ - @Min(-1) - private int saltLength = 32; - - /** - * Password derivation iteration count, for BCFKS refer to {@link org.bouncycastle.crypto.util.PBKDF2Config} - */ - @Min(1024) - private int iterCount = 20480; - } - - @Data - public static class Scrypt { - - /** - * Password derivation cost, for BCFKS refer to {@link org.bouncycastle.crypto.util.ScryptConfig} - */ - @Min(1) - private int cost; - /** - * Password derivation block size, for BCFKS refer to {@link org.bouncycastle.crypto.util.ScryptConfig} - */ - @Min(1) - private int blockSize; - - /** - * Password derivation parallelization, for BCFKS refer to {@link org.bouncycastle.crypto.util.ScryptConfig} - */ - @Min(1) - private int parallelization; - - /** - * Password derivation salt length, for BCFKS refer to {@link org.bouncycastle.crypto.util.ScryptConfig} - */ - @Min(1) - private int saltLength; - } -} diff --git a/pom.xml b/pom.xml index 17d82d4ef..20afc2e2c 100644 --- a/pom.xml +++ b/pom.xml @@ -332,6 +332,12 @@ ${jackson.version} test + + com.fasterxml.jackson.core + jackson-annotations + ${jackson.version} + test + From b2c5354f51d0ecacf95113f95e3210eef0ad3f16 Mon Sep 17 00:00:00 2001 From: Valentyn Berezin Date: Fri, 18 Oct 2019 18:56:49 +0300 Subject: [PATCH 224/255] DOC-277. Localize Jackson to proper POM's --- .../datasafe-encryption-impl/pom.xml | 4 ++++ datasafe-rest-impl/pom.xml | 3 ++- pom.xml | 18 ------------------ 3 files changed, 6 insertions(+), 19 deletions(-) diff --git a/datasafe-encryption/datasafe-encryption-impl/pom.xml b/datasafe-encryption/datasafe-encryption-impl/pom.xml index 74827a8e0..e511114f8 100644 --- a/datasafe-encryption/datasafe-encryption-impl/pom.xml +++ b/datasafe-encryption/datasafe-encryption-impl/pom.xml @@ -102,19 +102,23 @@ test-jar test + com.fasterxml.jackson.core jackson-databind + ${jackson.version} test com.fasterxml.jackson.dataformat jackson-dataformat-yaml + ${jackson.version} test com.fasterxml.jackson.core jackson-annotations + ${jackson.version} test diff --git a/datasafe-rest-impl/pom.xml b/datasafe-rest-impl/pom.xml index 1388b6b99..005317111 100644 --- a/datasafe-rest-impl/pom.xml +++ b/datasafe-rest-impl/pom.xml @@ -92,10 +92,11 @@ logback-elasticsearch-appender 1.6 + com.fasterxml.jackson.core jackson-databind - 2.9.8 + 2.9.10 io.jsonwebtoken diff --git a/pom.xml b/pom.xml index 20afc2e2c..84e804780 100644 --- a/pom.xml +++ b/pom.xml @@ -320,24 +320,6 @@ HikariCP ${hikari.cp} - - com.fasterxml.jackson.core - jackson-databind - ${jackson.version} - test - - - com.fasterxml.jackson.dataformat - jackson-dataformat-yaml - ${jackson.version} - test - - - com.fasterxml.jackson.core - jackson-annotations - ${jackson.version} - test - From e97389f152d55207f825bbf0822ff9f0e2fee1ca Mon Sep 17 00:00:00 2001 From: Valentyn Berezin Date: Fri, 18 Oct 2019 19:34:34 +0300 Subject: [PATCH 225/255] DOC-277. Fix failing test, use ChaChaPoly in REST layer --- .../cmsencryption/ASNCmsEncryptionConfig.java | 6 +++++- .../src/main/resources/application.properties | 15 ++++++++------- .../SpringSimpleDatasafeServiceFactory.java | 5 +++-- 3 files changed, 16 insertions(+), 10 deletions(-) diff --git a/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/cmsencryption/ASNCmsEncryptionConfig.java b/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/cmsencryption/ASNCmsEncryptionConfig.java index bff1ba0d2..1127a3d6e 100644 --- a/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/cmsencryption/ASNCmsEncryptionConfig.java +++ b/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/cmsencryption/ASNCmsEncryptionConfig.java @@ -17,6 +17,10 @@ @RuntimeDelegate public class ASNCmsEncryptionConfig { + /** + * These are recommended mappings, one can override this static map by RuntimeDelegate to + * ASNCmsEncryptionConfig. + */ private static final Map MAPPINGS = ImmutableMap.builder() .put("AES128_CBC", NISTObjectIdentifiers.id_aes128_CBC) @@ -31,7 +35,7 @@ public class ASNCmsEncryptionConfig { .put("AES128_WRAP", NISTObjectIdentifiers.id_aes128_wrap) .put("AES192_WRAP", NISTObjectIdentifiers.id_aes192_wrap) .put("AES256_WRAP", NISTObjectIdentifiers.id_aes256_wrap) - .put("CHACHA20-POLY1305", PKCSObjectIdentifiers.id_alg_AEADChaCha20Poly1305) + .put("CHACHA20_POLY1305", PKCSObjectIdentifiers.id_alg_AEADChaCha20Poly1305) .build(); @Getter diff --git a/datasafe-rest-impl/src/main/resources/application.properties b/datasafe-rest-impl/src/main/resources/application.properties index c9bea7761..013924c38 100644 --- a/datasafe-rest-impl/src/main/resources/application.properties +++ b/datasafe-rest-impl/src/main/resources/application.properties @@ -31,10 +31,11 @@ datasafe.dbPassword=${MYSQL_PASSWORD} spring.liquibase.enabled=false -keystore.type=BCFKS -keystore.encryptionAlgo=AES256_KWP -keystore.scrypt.cost=16384 -keystore.scrypt.blockSize=8 -keystore.scrypt.parallelization=1 -keystore.scrypt.saltLength=16 -keystore.macAlgo=HmacSHA3_512 +datasafe.encryption.keystore.type=BCFKS +datasafe.encryption.keystore.encryptionAlgo=AES256_KWP +datasafe.encryption.keystore.pbkdf.scrypt.cost=16384 +datasafe.encryption.keystore.pbkdf.scrypt.blockSize=8 +datasafe.encryption.keystore.pbkdf.scrypt.parallelization=1 +datasafe.encryption.keystore.pbkdf.scrypt.saltLength=16 +datasafe.encryption.keystore.macAlgo=HmacSHA3_512 +datasafe.encryption.cms.algo=CHACHA20_POLY1305 diff --git a/datasafe-simple-adapter/datasafe-simple-adapter-spring/src/main/java/de/adorsys/datasafe/simple/adapter/spring/factory/SpringSimpleDatasafeServiceFactory.java b/datasafe-simple-adapter/datasafe-simple-adapter-spring/src/main/java/de/adorsys/datasafe/simple/adapter/spring/factory/SpringSimpleDatasafeServiceFactory.java index a0c8fdc76..aa250b0b4 100644 --- a/datasafe-simple-adapter/datasafe-simple-adapter-spring/src/main/java/de/adorsys/datasafe/simple/adapter/spring/factory/SpringSimpleDatasafeServiceFactory.java +++ b/datasafe-simple-adapter/datasafe-simple-adapter-spring/src/main/java/de/adorsys/datasafe/simple/adapter/spring/factory/SpringSimpleDatasafeServiceFactory.java @@ -1,5 +1,6 @@ package de.adorsys.datasafe.simple.adapter.spring.factory; +import de.adorsys.datasafe.encrypiton.api.types.encryption.MutableEncryptionConfig; import de.adorsys.datasafe.simple.adapter.api.SimpleDatasafeService; import de.adorsys.datasafe.simple.adapter.api.exceptions.SimpleAdapterException; import de.adorsys.datasafe.simple.adapter.api.types.AmazonS3DFSCredentials; @@ -52,7 +53,7 @@ public SimpleDatasafeService getSimpleDataSafeServiceWithSubdir(String subdirBel amazonS3DFSCredentials.toBuilder().rootBucket( amazonS3DFSCredentials.getRootBucket() + "/" + subdirBelowRoot ).build(), - encryptionProperties.getEncryption() + null != encryptionProperties ? encryptionProperties.getEncryption() : new MutableEncryptionConfig() ); } if (dfsCredentials instanceof FilesystemDFSCredentials) { @@ -61,7 +62,7 @@ public SimpleDatasafeService getSimpleDataSafeServiceWithSubdir(String subdirBel filesystemDFSCredentials.toBuilder().root( filesystemDFSCredentials.getRoot() + "/" + subdirBelowRoot ).build(), - encryptionProperties.getEncryption() + null != encryptionProperties ? encryptionProperties.getEncryption() : new MutableEncryptionConfig() ); } throw new SimpleAdapterException("missing switch for DFSCredentials" + dfsCredentials); From c003487846d74b2e15f11fe4429e09d70061a06b Mon Sep 17 00:00:00 2001 From: Valentyn Berezin Date: Mon, 21 Oct 2019 11:31:37 +0300 Subject: [PATCH 226/255] DOC-277. Update README, smarter selection of keystore type for adapter and null-config tests --- README.md | 48 +++++++++-------- datasafe-business/README.md | 6 +-- .../MutableEncryptionConfigTest.java | 52 +++++++++++++++++-- .../{ => config-test}/mutable-pbkdf2.yaml | 0 .../{ => config-test}/mutable-scrypt.yaml | 0 .../expectation/mutable-null-cms.yaml | 28 ++++++++++ .../expectation/mutable-null-keys.yaml | 28 ++++++++++ .../expectation/mutable-null-keystore.yaml | 27 ++++++++++ .../null-test/mutable-null-cms.yaml | 26 ++++++++++ .../null-test/mutable-null-keys.yaml | 14 +++++ .../null-test/mutable-null-keystore.yaml | 17 ++++++ .../impl/SimpleDatasafeServiceImpl.java | 16 +++++- 12 files changed, 230 insertions(+), 32 deletions(-) rename datasafe-encryption/datasafe-encryption-impl/src/test/resources/{ => config-test}/mutable-pbkdf2.yaml (100%) rename datasafe-encryption/datasafe-encryption-impl/src/test/resources/{ => config-test}/mutable-scrypt.yaml (100%) create mode 100644 datasafe-encryption/datasafe-encryption-impl/src/test/resources/config-test/null-test/expectation/mutable-null-cms.yaml create mode 100644 datasafe-encryption/datasafe-encryption-impl/src/test/resources/config-test/null-test/expectation/mutable-null-keys.yaml create mode 100644 datasafe-encryption/datasafe-encryption-impl/src/test/resources/config-test/null-test/expectation/mutable-null-keystore.yaml create mode 100644 datasafe-encryption/datasafe-encryption-impl/src/test/resources/config-test/null-test/mutable-null-cms.yaml create mode 100644 datasafe-encryption/datasafe-encryption-impl/src/test/resources/config-test/null-test/mutable-null-keys.yaml create mode 100644 datasafe-encryption/datasafe-encryption-impl/src/test/resources/config-test/null-test/mutable-null-keystore.yaml diff --git a/README.md b/README.md index c65e0cd64..9a99fd15f 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ Datasafe is a cross-platform library that allows sharing and storing data and do your data using **AES-GCM** algorithm and uses **CMS-envelopes** as encrypted content wrapper. CMS-envelope wraps and encrypts document encryption key using key encryption key that provides additional level of security. For user private files, Datasafe uses CMS-envelope with symmetric encryption of data encryption key. For files -that are shared with other users (sent to their INBOX folder), Datasafe uses asymmetric encryption for +that are shared with other users (sent to their INBOX folder), Datasafe uses asymmetric encryption for data encryption key, so only recipient (or multiple recipients) can read it. Datasafe is built with the idea to be as configurable as possible - it uses Dagger2 for dependency injection and modular @@ -27,7 +27,7 @@ capability too. - Proprietary software **friendly license** - **Flexibility** - you can easily change encryption and configure or customize other aspects of library - AES encryption using **CMS-envelopes** for increased security and interoperability with other languages -- Secure file sharing with other users +- Secure file sharing with other users - **Extra protection layer** - encryption using securely generated keys that are completely unrelated to your password - **Client side encryption** - you own your data - Works with filesystem and Amazon S3 compatible storage - S3, minio, CEPH, etc. @@ -36,16 +36,16 @@ capability too. ## Performance -Datasafe was tested for performance in Amazon cloud. -In short, on m5.xlarge amazon instance with Datasafe library can have write throughput of 50 MiB/s and 80 MiB/s of +Datasafe was tested for performance in Amazon cloud. +In short, on m5.xlarge amazon instance with Datasafe library can have write throughput of 50 MiB/s and 80 MiB/s of read throughput, when using **Amazon S3 bucket** as backing storage (performance is CPU-bound and network-bound). -Detailed performance report is here: +Detailed performance report is here: [Datasafe performance results](datasafe-long-run-tests/README.md) ## Quick demo ### Datasafe-CLI -You can try Datasafe as a CLI (command-line-interface) executable for encryption of your own sensitive files. +You can try Datasafe as a CLI (command-line-interface) executable for encryption of your own sensitive files. Your encrypted files can be saved either in S3 bucket or local filesystem safely, because encryption will happen locally - on your machine (See [CLI-README](datasafe-cli/README.md) for details). @@ -53,7 +53,7 @@ locally - on your machine (See [CLI-README](datasafe-cli/README.md) for details) 1. [MacOS native executable](https://github.com/adorsys/datasafe/releases/download/v0.6.0/datasafe-cli-osx-x64) 1. [Linux native executable](https://github.com/adorsys/datasafe/releases/download/v0.6.0/datasafe-cli-linux-x64) -1. Windows executable (N/A yet), please use java version below +1. Windows executable (N/A yet), please use java version below 1. [Java-based jar](https://github.com/adorsys/datasafe/releases/download/v0.6.0/datasafe-cli.jar), requires JRE (1.8+), use `java -jar datasafe-cli.jar` to execute #### Example actions: @@ -71,7 +71,7 @@ curl -L https://github.com/adorsys/datasafe/releases/download/v0.6.0/datasafe-cl ```bash echo '{"username": "john", "password": "Doe", "systemPassword": "password"}' > john.credentials ``` -- Create your new user profile (credentials come from john.credentials). You can enter value or click enter to accept +- Create your new user profile (credentials come from john.credentials). You can enter value or click enter to accept the default value when prompted. ```bash @@ -86,7 +86,7 @@ secure than having credentials file, but is fine for demo purposes): ```bash ./datasafe-cli -u=MeHappyUser -p=MyCoolPassword -sp=greatSystemPassword private cat secret.txt ``` -Command above will show private file `secret.txt` content for user `MeHappyUser` who has password `MyCoolPassword` and +Command above will show private file `secret.txt` content for user `MeHappyUser` who has password `MyCoolPassword` and system password `greatSystemPassword` ##### Encrypt and decrypt some secret data for our user: @@ -143,7 +143,7 @@ cat private/encrypted_file_name_from_above ![list_actions](docs/demo/list_actions.gif) ### REST based demo -[Here](datasafe-rest-impl/DEMO.md) you can find quick docker-based demo of project capabilities with +[Here](datasafe-rest-impl/DEMO.md) you can find quick docker-based demo of project capabilities with instructions of how to use it (REST-api based to show how to deploy as encryption server). @@ -166,7 +166,7 @@ Datasafe is available from maven-central repository, you can add it to your proj datasafe-business 0.5.0 -``` +``` To add filesystem storage provider: ```xml @@ -175,7 +175,7 @@ To add filesystem storage provider: datasafe-storage-impl-fs 0.5.0 -``` +``` To add S3 storage provider: ```xml @@ -184,7 +184,7 @@ To add S3 storage provider: datasafe-storage-impl-s3 0.5.0 -``` +``` # Project overview @@ -406,7 +406,7 @@ we can use storage provider that supports versioning. But if we have storage pro (i.e. minio) we can turn-on software versioning, here is its usage examples; First, we will obtain versioned Datasafe services that uses filesystem storage adapter: -[Example:Create versioned Datasafe services](datasafe-examples/datasafe-examples-business/src/test/java/de/adorsys/datasafe/examples/business/filesystem/BaseUserOperationsTestWithVersionedDatasafeTest.java#L48-L55) +[Example:Create versioned Datasafe services](datasafe-examples/datasafe-examples-business/src/test/java/de/adorsys/datasafe/examples/business/filesystem/BaseUserOperationsTestWithVersionedDatasafeTest.java#L47-L54) ```groovy Security.addProvider(new BouncyCastleProvider()); // this will create all Datasafe files and user documents under @@ -417,7 +417,7 @@ versionedServices = DaggerVersionedDatasafeServices.builder() ``` Next we will create user, this is same as in non-versioned services: -[Example:Creating user for versioned services looks same](datasafe-examples/datasafe-examples-business/src/test/java/de/adorsys/datasafe/examples/business/filesystem/BaseUserOperationsTestWithVersionedDatasafeTest.java#L63-L70) +[Example:Creating user for versioned services looks same](datasafe-examples/datasafe-examples-business/src/test/java/de/adorsys/datasafe/examples/business/filesystem/BaseUserOperationsTestWithVersionedDatasafeTest.java#L62-L69) ```groovy // Creating new user: /* @@ -428,7 +428,7 @@ versionedServices.userProfile().registerUsingDefaults(new UserIDAuth("user", "pa ``` This is how file versioning works when saving file multiple times: -[Example:Saving file couple of times - versioned](datasafe-examples/datasafe-examples-business/src/test/java/de/adorsys/datasafe/examples/business/filesystem/BaseUserOperationsTestWithVersionedDatasafeTest.java#L82-L106) +[Example:Saving file couple of times - versioned](datasafe-examples/datasafe-examples-business/src/test/java/de/adorsys/datasafe/examples/business/filesystem/BaseUserOperationsTestWithVersionedDatasafeTest.java#L81-L105) ```groovy // creating new user UserIDAuth user = registerUser("john"); @@ -456,7 +456,7 @@ assertThat(versionedServices.latestPrivate().list(ListRequest.forDefaultPrivate( ``` And we can work with file versions too, of course, everything is encrypted: -[Example:Lets check how to read oldest file version](datasafe-examples/datasafe-examples-business/src/test/java/de/adorsys/datasafe/examples/business/filesystem/BaseUserOperationsTestWithVersionedDatasafeTest.java#L108-L124) +[Example:Lets check how to read oldest file version](datasafe-examples/datasafe-examples-business/src/test/java/de/adorsys/datasafe/examples/business/filesystem/BaseUserOperationsTestWithVersionedDatasafeTest.java#L107-L123) ```groovy // so lets collect all versions List, PrivateResource, DFSVersion>> withVersions = @@ -476,7 +476,7 @@ assertThat(versionedServices.privateService() ``` Another important case to mention is how to determine if file has changed on storage compared to some copy we have: -[Example:Check if we have latest file locally](datasafe-examples/datasafe-examples-business/src/test/java/de/adorsys/datasafe/examples/business/filesystem/BaseUserOperationsTestWithVersionedDatasafeTest.java#L134-L165) +[Example:Check if we have latest file locally](datasafe-examples/datasafe-examples-business/src/test/java/de/adorsys/datasafe/examples/business/filesystem/BaseUserOperationsTestWithVersionedDatasafeTest.java#L133-L164) ```groovy // creating new user UserIDAuth user = registerUser("john"); @@ -513,8 +513,9 @@ assertThat(savedOnPC).isAfter(savedOnMobile); ## Datasafe on versioned storage If you have storage for user files on **versioned S3 bucket** and want to get object version when you write object or to read some older version encrypted object, you can follow this example of how to do that: -[Example:Versioned storage support - writing file and reading back](datasafe-examples/datasafe-examples-versioned-s3/src/test/java/de/adorsys/datasafe/examples/business/s3/BaseUserOperationsWithDefaultDatasafeOnVersionedStorageTest.java#L137-L171) +[Example:Versioned storage support - writing file and reading back](datasafe-examples/datasafe-examples-versioned-s3/src/test/java/de/adorsys/datasafe/examples/business/s3/BaseUserOperationsWithDefaultDatasafeOnVersionedStorageTest.java#L138-L173) ```groovy +Security.addProvider(new BouncyCastleProvider()); // creating new user UserIDAuth user = registerUser("john"); @@ -551,7 +552,7 @@ assertThat(defaultDatasafeServices.privateService().read( ``` Removing old file version can be done by [bucket policy](https://docs.aws.amazon.com/AmazonS3/latest/dev/intro-lifecycle-rules.html#non-current-days-calculations) or manually, using this snippet: -[Example:Versioned storage support - removing specific version](datasafe-examples/datasafe-examples-versioned-s3/src/test/java/de/adorsys/datasafe/examples/business/s3/BaseUserOperationsWithDefaultDatasafeOnVersionedStorageTest.java#L187-L214) +[Example:Versioned storage support - removing specific version](datasafe-examples/datasafe-examples-versioned-s3/src/test/java/de/adorsys/datasafe/examples/business/s3/BaseUserOperationsWithDefaultDatasafeOnVersionedStorageTest.java#L189-L216) ```groovy // creating new user UserIDAuth user = registerUser("john"); @@ -651,7 +652,7 @@ assertThat(walk(root)).asString().contains("file.txt"); ### Customizing Datasafe to store dynamic and user-provided credentials In case user wants to register storage credentials himself or place keystore within credentials-protected location one can use this example: -[Example:Datasafe with multi-dfs setup](datasafe-examples/datasafe-examples-multidfs/src/test/java/de/adorsys/datasafe/examples/business/s3/MultiDfsWithCredentialsExampleTest.java#L103-L217) +[Example:Datasafe with multi-dfs setup](datasafe-examples/datasafe-examples-multidfs/src/test/java/de/adorsys/datasafe/examples/business/s3/MultiDfsWithCredentialsExampleTest.java#L107-L222) ```groovy Security.addProvider(new BouncyCastleProvider()); String directoryBucketS3Uri = "s3://" + DIRECTORY_BUCKET.getBucketName() + "/"; @@ -676,12 +677,13 @@ DefaultDatasafeServices multiDfsDatasafe = DaggerDefaultDatasafeServices // bind URI that contains `directoryBucket` to directoryStorage .put(Pattern.compile(directoryBucketS3Uri + ".+"), directoryStorage) .put( - Pattern.compile("http://127.0.0.1.+"), + Pattern.compile(getDockerUri("http://127.0.0.1") + ".+"), // Dynamically creates S3 client with bucket name equal to host value new UriBasedAuthStorageService( acc -> new S3StorageService( S3ClientFactory.getClient( - acc.getOnlyHostPart().toString(), + acc.getEndpoint(), + acc.getRegion(), acc.getAccessKey(), acc.getSecretKey() ), diff --git a/datasafe-business/README.md b/datasafe-business/README.md index cbdce8afd..16b78946c 100644 --- a/datasafe-business/README.md +++ b/datasafe-business/README.md @@ -18,10 +18,10 @@ package de.adorsys.datasafe.business.impl.pathencryption; import dagger.Module; import dagger.Provides; -import PathEncryption; +import de.adorsys.datasafe.encrypiton.api.pathencryption.PathEncryption; /** - * This module is responsible for providing No-op pathencryption of document. + * This module is responsible for providing No-op path encryption of document. */ @Module public abstract class NoOpPathEncryptionModule { @@ -43,7 +43,7 @@ public abstract class NoOpPathEncryptionModule { } ``` -And create DatasafeService like this: +And create DatasafeService that has PathEncryptionModule overridden with NoOpPathEncryptionModule: ```java package de.adorsys.datasafe.business.impl.service; diff --git a/datasafe-encryption/datasafe-encryption-impl/src/test/java/de/adorsys/datasafe/encrypiton/api/types/encryption/MutableEncryptionConfigTest.java b/datasafe-encryption/datasafe-encryption-impl/src/test/java/de/adorsys/datasafe/encrypiton/api/types/encryption/MutableEncryptionConfigTest.java index a2ea51681..c4748d4c1 100644 --- a/datasafe-encryption/datasafe-encryption-impl/src/test/java/de/adorsys/datasafe/encrypiton/api/types/encryption/MutableEncryptionConfigTest.java +++ b/datasafe-encryption/datasafe-encryption-impl/src/test/java/de/adorsys/datasafe/encrypiton/api/types/encryption/MutableEncryptionConfigTest.java @@ -7,32 +7,45 @@ import com.google.common.io.CharSource; import com.google.common.io.Resources; import de.adorsys.datasafe.types.api.shared.BaseMockitoTest; +import lombok.AllArgsConstructor; +import lombok.Data; import lombok.SneakyThrows; import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; import org.junit.jupiter.params.provider.ValueSource; import java.io.Reader; import java.nio.charset.StandardCharsets; +import java.util.stream.Stream; import static org.assertj.core.api.Assertions.assertThat; class MutableEncryptionConfigTest extends BaseMockitoTest { + private ObjectMapper mapper = createMapper(); + @ValueSource(strings = { - "mutable-scrypt.yaml", - "mutable-pbkdf2.yaml" + "config-test/mutable-scrypt.yaml", + "config-test/mutable-pbkdf2.yaml" }) @ParameterizedTest @SneakyThrows void mappingTest(String yamlFixture) { - ObjectMapper mapper = new ObjectMapper(new YAMLFactory().enable(YAMLGenerator.Feature.MINIMIZE_QUOTES)); - mapper.setSerializationInclusion(JsonInclude.Include.NON_NULL); String expected = readResource(yamlFixture); MutableEncryptionConfig config = readResource(mapper, yamlFixture, MutableEncryptionConfig.class); assertThat(config.getKeystore().getType()).isEqualTo("store-type"); assertThat(mapper.writeValueAsString(config.toEncryptionConfig())).isEqualTo(expected); } + @MethodSource("nullsTest") + @ParameterizedTest + @SneakyThrows + void mappingWithNullsTest(SourceAndExpectation yamlFixture) { + String expected = readResource(yamlFixture.getExpectation()); + MutableEncryptionConfig config = readResource(mapper, yamlFixture.getSource(), MutableEncryptionConfig.class); + assertThat(mapper.writeValueAsString(config.toEncryptionConfig())).isEqualTo(expected); + } + @SneakyThrows private T readResource(ObjectMapper mapper, String path, Class type) { try (Reader reader = Resources.asCharSource(Resources.getResource(path), StandardCharsets.UTF_8).openStream()) { @@ -45,4 +58,35 @@ private String readResource(String path) { CharSource reader = Resources.asCharSource(Resources.getResource(path), StandardCharsets.UTF_8); return reader.read(); } + + private static Stream nullsTest() { + return Stream.of( + new SourceAndExpectation( + "config-test/null-test/mutable-null-cms.yaml", + "config-test/null-test/expectation/mutable-null-cms.yaml" + ), + new SourceAndExpectation( + "config-test/null-test/mutable-null-keys.yaml", + "config-test/null-test/expectation/mutable-null-keys.yaml" + ), + new SourceAndExpectation( + "config-test/null-test/mutable-null-keystore.yaml", + "config-test/null-test/expectation/mutable-null-keystore.yaml" + ) + ); + } + + private static ObjectMapper createMapper() { + ObjectMapper mapper = new ObjectMapper(new YAMLFactory().enable(YAMLGenerator.Feature.MINIMIZE_QUOTES)); + mapper.setSerializationInclusion(JsonInclude.Include.NON_NULL); + return mapper; + } + + @Data + @AllArgsConstructor + private static class SourceAndExpectation { + + private String source; + private String expectation; + } } \ No newline at end of file diff --git a/datasafe-encryption/datasafe-encryption-impl/src/test/resources/mutable-pbkdf2.yaml b/datasafe-encryption/datasafe-encryption-impl/src/test/resources/config-test/mutable-pbkdf2.yaml similarity index 100% rename from datasafe-encryption/datasafe-encryption-impl/src/test/resources/mutable-pbkdf2.yaml rename to datasafe-encryption/datasafe-encryption-impl/src/test/resources/config-test/mutable-pbkdf2.yaml diff --git a/datasafe-encryption/datasafe-encryption-impl/src/test/resources/mutable-scrypt.yaml b/datasafe-encryption/datasafe-encryption-impl/src/test/resources/config-test/mutable-scrypt.yaml similarity index 100% rename from datasafe-encryption/datasafe-encryption-impl/src/test/resources/mutable-scrypt.yaml rename to datasafe-encryption/datasafe-encryption-impl/src/test/resources/config-test/mutable-scrypt.yaml diff --git a/datasafe-encryption/datasafe-encryption-impl/src/test/resources/config-test/null-test/expectation/mutable-null-cms.yaml b/datasafe-encryption/datasafe-encryption-impl/src/test/resources/config-test/null-test/expectation/mutable-null-cms.yaml new file mode 100644 index 000000000..9d5e12ca7 --- /dev/null +++ b/datasafe-encryption/datasafe-encryption-impl/src/test/resources/config-test/null-test/expectation/mutable-null-cms.yaml @@ -0,0 +1,28 @@ +--- +keystore: + type: store-type + encryptionAlgo: store-enc + pbkdf: + scrypt: + cost: 1 + blockSize: 2 + parallelization: 3 + saltLength: 4 + macAlgo: store-mac + passwordKeysAlgo: store-pwd-keys +keys: + encKeyNumber: 1 + signKeyNumber: 2 + secret: + algo: sec-algo + size: 12 + encrypting: + algo: enc-algo + size: 13 + sigAlgo: srv-sig-algo + singing: + algo: sig-algo + size: 14 + sigAlgo: srv-sig-algo +cms: + algo: AES256_GCM diff --git a/datasafe-encryption/datasafe-encryption-impl/src/test/resources/config-test/null-test/expectation/mutable-null-keys.yaml b/datasafe-encryption/datasafe-encryption-impl/src/test/resources/config-test/null-test/expectation/mutable-null-keys.yaml new file mode 100644 index 000000000..6cb3e3241 --- /dev/null +++ b/datasafe-encryption/datasafe-encryption-impl/src/test/resources/config-test/null-test/expectation/mutable-null-keys.yaml @@ -0,0 +1,28 @@ +--- +keystore: + type: store-type + encryptionAlgo: store-enc + pbkdf: + scrypt: + cost: 1 + blockSize: 2 + parallelization: 3 + saltLength: 4 + macAlgo: store-mac + passwordKeysAlgo: store-pwd-keys +keys: + encKeyNumber: 1 + signKeyNumber: 1 + secret: + algo: AES + size: 256 + encrypting: + algo: RSA + size: 2048 + sigAlgo: SHA256withRSA + singing: + algo: RSA + size: 2048 + sigAlgo: SHA256withRSA +cms: + algo: cms-algo1 diff --git a/datasafe-encryption/datasafe-encryption-impl/src/test/resources/config-test/null-test/expectation/mutable-null-keystore.yaml b/datasafe-encryption/datasafe-encryption-impl/src/test/resources/config-test/null-test/expectation/mutable-null-keystore.yaml new file mode 100644 index 000000000..5b5872fa0 --- /dev/null +++ b/datasafe-encryption/datasafe-encryption-impl/src/test/resources/config-test/null-test/expectation/mutable-null-keystore.yaml @@ -0,0 +1,27 @@ +--- +keystore: + type: BCFKS + encryptionAlgo: AES256_KWP + pbkdf: + pbkdf2: + algo: PRF_SHA512 + saltLength: 32 + iterCount: 20480 + macAlgo: HmacSHA3_512 + passwordKeysAlgo: PBEWithHmacSHA256AndAES_256 +keys: + encKeyNumber: 1 + signKeyNumber: 2 + secret: + algo: sec-algo + size: 12 + encrypting: + algo: enc-algo + size: 13 + sigAlgo: srv-sig-algo + singing: + algo: sig-algo + size: 14 + sigAlgo: srv-sig-algo +cms: + algo: cms-algo1 diff --git a/datasafe-encryption/datasafe-encryption-impl/src/test/resources/config-test/null-test/mutable-null-cms.yaml b/datasafe-encryption/datasafe-encryption-impl/src/test/resources/config-test/null-test/mutable-null-cms.yaml new file mode 100644 index 000000000..2d2653277 --- /dev/null +++ b/datasafe-encryption/datasafe-encryption-impl/src/test/resources/config-test/null-test/mutable-null-cms.yaml @@ -0,0 +1,26 @@ +--- +keystore: + type: store-type + encryptionAlgo: store-enc + pbkdf: + scrypt: + cost: 1 + blockSize: 2 + parallelization: 3 + saltLength: 4 + macAlgo: store-mac + passwordKeysAlgo: store-pwd-keys +keys: + encKeyNumber: 1 + signKeyNumber: 2 + secret: + algo: sec-algo + size: 12 + encrypting: + algo: enc-algo + size: 13 + sigAlgo: srv-sig-algo + singing: + algo: sig-algo + size: 14 + sigAlgo: srv-sig-algo \ No newline at end of file diff --git a/datasafe-encryption/datasafe-encryption-impl/src/test/resources/config-test/null-test/mutable-null-keys.yaml b/datasafe-encryption/datasafe-encryption-impl/src/test/resources/config-test/null-test/mutable-null-keys.yaml new file mode 100644 index 000000000..52c23cba4 --- /dev/null +++ b/datasafe-encryption/datasafe-encryption-impl/src/test/resources/config-test/null-test/mutable-null-keys.yaml @@ -0,0 +1,14 @@ +--- +keystore: + type: store-type + encryptionAlgo: store-enc + pbkdf: + scrypt: + cost: 1 + blockSize: 2 + parallelization: 3 + saltLength: 4 + macAlgo: store-mac + passwordKeysAlgo: store-pwd-keys +cms: + algo: cms-algo1 \ No newline at end of file diff --git a/datasafe-encryption/datasafe-encryption-impl/src/test/resources/config-test/null-test/mutable-null-keystore.yaml b/datasafe-encryption/datasafe-encryption-impl/src/test/resources/config-test/null-test/mutable-null-keystore.yaml new file mode 100644 index 000000000..e799a2f34 --- /dev/null +++ b/datasafe-encryption/datasafe-encryption-impl/src/test/resources/config-test/null-test/mutable-null-keystore.yaml @@ -0,0 +1,17 @@ +--- +keys: + encKeyNumber: 1 + signKeyNumber: 2 + secret: + algo: sec-algo + size: 12 + encrypting: + algo: enc-algo + size: 13 + sigAlgo: srv-sig-algo + singing: + algo: sig-algo + size: 14 + sigAlgo: srv-sig-algo +cms: + algo: cms-algo1 \ No newline at end of file diff --git a/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/main/java/de/adorsys/datasafe/simple/adapter/impl/SimpleDatasafeServiceImpl.java b/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/main/java/de/adorsys/datasafe/simple/adapter/impl/SimpleDatasafeServiceImpl.java index 3960e11fe..e666ef47e 100644 --- a/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/main/java/de/adorsys/datasafe/simple/adapter/impl/SimpleDatasafeServiceImpl.java +++ b/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/main/java/de/adorsys/datasafe/simple/adapter/impl/SimpleDatasafeServiceImpl.java @@ -7,6 +7,7 @@ import com.amazonaws.client.builder.AwsClientBuilder; import com.amazonaws.services.s3.AmazonS3; import com.amazonaws.services.s3.AmazonS3ClientBuilder; +import com.google.common.base.Strings; import com.google.common.io.ByteStreams; import de.adorsys.datasafe.business.impl.service.DefaultDatasafeServices; import de.adorsys.datasafe.directory.impl.profile.config.DefaultDFSConfig; @@ -72,7 +73,7 @@ public SimpleDatasafeServiceImpl(DFSCredentials dfsCredentials, MutableEncryptio .config(new DefaultDFSConfig(systemRoot, universalReadStorePassword.getValue())) .encryption( config.toEncryptionConfig().toBuilder() - .keystore(KeyStoreConfig.builder().type("UBER").build()) // FIXME: It is legacy keystore, Release 1.1 should fix it + .keystore(extractKeystoreType(config)) .build() ) .storage(getStorageService()) @@ -141,7 +142,7 @@ public SimpleDatasafeServiceImpl(DFSCredentials dfsCredentials, MutableEncryptio .config(new DefaultDFSConfig(systemRoot, universalReadStorePassword.getValue())) .encryption( config.toEncryptionConfig().toBuilder() - .keystore(KeyStoreConfig.builder().type("UBER").build()) // FIXME: It is legacy keystore, Release 1.1 should fix it + .keystore(extractKeystoreType(config)) .build() ) .storage(getStorageService()) @@ -151,6 +152,17 @@ public SimpleDatasafeServiceImpl(DFSCredentials dfsCredentials, MutableEncryptio } } + private KeyStoreConfig extractKeystoreType(MutableEncryptionConfig config) { + String keystoreType = null == config.getKeystore() || Strings.isNullOrEmpty(config.getKeystore().getType()) ? + "UBER" : config.getKeystore().getType(); + + // FIXME: It is legacy keystore default - UBER, Release 1.1 should fix it + if (keystoreType.equals("UBER")) { + log.warn("Using UBER keystore type, consider switching to BCFKS"); + } + return KeyStoreConfig.builder().type(keystoreType).build(); + } + public StorageService getStorageService() { return storageService; } From aabfcb06dea6911353fea4534bd11f8e3d1ae03f Mon Sep 17 00:00:00 2001 From: psp Date: Mon, 21 Oct 2019 15:06:06 +0200 Subject: [PATCH 227/255] DOC-279 fixed conflicts --- .../datasafe/business/impl/e2e/BasicFunctionalityTest.java | 2 -- .../RandomActionsOnSimpleDatasafeAdapterTest.java | 4 ---- 2 files changed, 6 deletions(-) diff --git a/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/BasicFunctionalityTest.java b/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/BasicFunctionalityTest.java index 5887e8a7a..1d2eb88f0 100644 --- a/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/BasicFunctionalityTest.java +++ b/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/BasicFunctionalityTest.java @@ -72,8 +72,6 @@ void testDFSPasswordClearance(WithStorageProvider.StorageDescriptor descriptor) john = registerUser(userJohn.getValue(), readKeyPassword); assertThat(profileRetrievalService.userExists(userJohn)).isTrue(); - assertThat(profileRetrievalService.privateProfile(john).getAppVersion()).isEqualTo(Version.current()); - assertThat(profileRetrievalService.publicProfile(john.getUserID()).getAppVersion()).isEqualTo(Version.current()); String filename = "root.txt"; String content = "affe"; diff --git a/datasafe-long-run-tests/datasafe-business-tests-random-actions/src/test/java/de/adorsys/datasafe/business/impl/e2e/randomactions/RandomActionsOnSimpleDatasafeAdapterTest.java b/datasafe-long-run-tests/datasafe-business-tests-random-actions/src/test/java/de/adorsys/datasafe/business/impl/e2e/randomactions/RandomActionsOnSimpleDatasafeAdapterTest.java index bd3dda8ff..5cfa089a9 100644 --- a/datasafe-long-run-tests/datasafe-business-tests-random-actions/src/test/java/de/adorsys/datasafe/business/impl/e2e/randomactions/RandomActionsOnSimpleDatasafeAdapterTest.java +++ b/datasafe-long-run-tests/datasafe-business-tests-random-actions/src/test/java/de/adorsys/datasafe/business/impl/e2e/randomactions/RandomActionsOnSimpleDatasafeAdapterTest.java @@ -7,11 +7,7 @@ import de.adorsys.datasafe.directory.api.types.*; import de.adorsys.datasafe.encrypiton.api.types.UserID; import de.adorsys.datasafe.encrypiton.api.types.UserIDAuth; -<<<<<<< HEAD -======= import de.adorsys.datasafe.encrypiton.api.types.encryption.MutableEncryptionConfig; -import de.adorsys.datasafe.encrypiton.api.types.keystore.ReadKeyPassword; ->>>>>>> develop import de.adorsys.datasafe.inbox.api.InboxService; import de.adorsys.datasafe.privatestore.api.PasswordClearingInputStream; import de.adorsys.datasafe.privatestore.api.PasswordClearingOutputStream; From 09e65f66be24023b7fb0456b404f1d957443b631 Mon Sep 17 00:00:00 2001 From: psp Date: Tue, 22 Oct 2019 14:49:12 +0200 Subject: [PATCH 228/255] DOC-280 test to directly compare UBER vs BCFKS --- .../impl/e2e/KeyStoreTypeCompareTest.java | 97 +++++++++++++++++++ 1 file changed, 97 insertions(+) create mode 100644 datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/KeyStoreTypeCompareTest.java diff --git a/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/KeyStoreTypeCompareTest.java b/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/KeyStoreTypeCompareTest.java new file mode 100644 index 000000000..fb61fe31a --- /dev/null +++ b/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/KeyStoreTypeCompareTest.java @@ -0,0 +1,97 @@ +package de.adorsys.datasafe.business.impl.e2e; + +import de.adorsys.datasafe.business.impl.service.DaggerDefaultDatasafeServices; +import de.adorsys.datasafe.business.impl.service.DefaultDatasafeServices; +import de.adorsys.datasafe.directory.impl.profile.config.DefaultDFSConfig; +import de.adorsys.datasafe.encrypiton.api.types.UserID; +import de.adorsys.datasafe.encrypiton.api.types.UserIDAuth; +import de.adorsys.datasafe.encrypiton.api.types.encryption.MutableEncryptionConfig; +import de.adorsys.datasafe.teststorage.WithStorageProvider; +import de.adorsys.datasafe.types.api.actions.ReadRequest; +import de.adorsys.datasafe.types.api.actions.WriteRequest; +import de.adorsys.datasafe.types.api.types.ReadKeyPassword; +import de.adorsys.datasafe.types.api.types.ReadStorePassword; +import de.adorsys.datasafe.types.api.utils.ReadKeyPasswordTestFactory; +import lombok.SneakyThrows; +import lombok.extern.slf4j.Slf4j; +import org.joda.time.DateTime; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +import java.io.InputStream; +import java.io.OutputStream; +import java.util.Arrays; + +import static org.assertj.core.api.Assertions.assertThat; + +@Slf4j +public class KeyStoreTypeCompareTest extends BaseE2ETest { + private final static int NUMBER_WRITES = 100; + private final static int NUMBER_READS = 100; + + @SneakyThrows + @ParameterizedTest + @MethodSource("fsOnly") + void compareKeyStoreTypes(WithStorageProvider.StorageDescriptor descriptor) { + long t1 = test(descriptor, "johnUber", "UBER"); + long t2 = test(descriptor, "johnBCFKS", "BCFKS"); + log.info("UBER test took:" + t1); + log.info("BCFKS test took:" + t2); + } + + + @SneakyThrows + long test(WithStorageProvider.StorageDescriptor descriptor, String userName, String keystoreType) { + init(descriptor, keystoreType); + UserID user = new UserID(userName); + assertThat(profileRetrievalService.userExists(user)).isFalse(); + john = registerUser(user.getValue(), ReadKeyPasswordTestFactory.getForString("john")); + assertThat(profileRetrievalService.userExists(user)).isTrue(); + + String filename = "root.txt"; + String content = "affe"; + + DateTime start = new DateTime(); + + for (int i = 0; i < NUMBER_WRITES; i++) { + log.debug("write file for the {} time", i); + try (OutputStream os = writeToPrivate + .write(WriteRequest.forDefaultPrivate(john, filename))) { + os.write(content.getBytes()); + } + } + + for (int i = 0; i < NUMBER_READS; i++) { + log.debug("read file for the {} time", i); + try (InputStream is = readFromPrivate + .read(ReadRequest.forDefaultPrivate(john, filename))) { + assertThat(is).hasContent(content); + } + } + + DateTime stop = new DateTime(); + long diff = stop.getMillis() - start.getMillis(); + + log.info("TIME TOOK {} MILLISECS",diff); + return diff; + } + + private void init(StorageDescriptor descriptor, String keystoreType) { + + MutableEncryptionConfig mutableEncryptionConfig = new MutableEncryptionConfig(); + MutableEncryptionConfig.MutableKeyStoreCreationConfig mutableKeyStoreCreationConfig = new MutableEncryptionConfig.MutableKeyStoreCreationConfig(); + mutableKeyStoreCreationConfig.setType(keystoreType); + mutableEncryptionConfig.setKeystore(mutableKeyStoreCreationConfig); + mutableEncryptionConfig.getKeystore(); + + DefaultDatasafeServices datasafeServices = DaggerDefaultDatasafeServices.builder() + .config(new DefaultDFSConfig(descriptor.getLocation(), new ReadStorePassword("PAZZWORT"))) + .encryption( + mutableEncryptionConfig.toEncryptionConfig().toBuilder() + .build() + ) + .storage(descriptor.getStorageService().get()) + .build(); + initialize(DatasafeServicesProvider.dfsConfig(descriptor.getLocation()), datasafeServices); + } +} From a6ab262e9f9063d8cc6355aa500c05ff27aa61c2 Mon Sep 17 00:00:00 2001 From: psp Date: Tue, 22 Oct 2019 17:48:53 +0200 Subject: [PATCH 229/255] DOC-280 keystore converted to uber keystore --- .../profile/keys/DefaultKeyStoreCache.java | 61 ++++++++++++++++++- .../keys/DocumentKeyStoreOperationsImpl.java | 5 +- .../impl/profile/keys/KeyStoreCache.java | 11 ++++ 3 files changed, 74 insertions(+), 3 deletions(-) diff --git a/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/keys/DefaultKeyStoreCache.java b/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/keys/DefaultKeyStoreCache.java index 974c39e91..4d2429843 100644 --- a/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/keys/DefaultKeyStoreCache.java +++ b/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/keys/DefaultKeyStoreCache.java @@ -1,19 +1,26 @@ package de.adorsys.datasafe.directory.impl.profile.keys; +import de.adorsys.datasafe.encrypiton.api.keystore.KeyStoreService; import de.adorsys.datasafe.encrypiton.api.types.UserID; +import de.adorsys.datasafe.encrypiton.api.types.UserIDAuth; import de.adorsys.datasafe.encrypiton.api.types.keystore.PublicKeyIDWithPublicKey; import de.adorsys.datasafe.types.api.context.annotations.RuntimeDelegate; import lombok.Getter; +import lombok.SneakyThrows; +import lombok.extern.slf4j.Slf4j; import javax.inject.Inject; +import java.security.Key; import java.security.KeyStore; +import java.util.Enumeration; import java.util.List; import java.util.Map; +import java.util.function.Function; /** * Default map-based private and public keys cache implementation. Quite safe to cache since they change infrequently. */ -@Getter +@Slf4j @RuntimeDelegate public class DefaultKeyStoreCache implements KeyStoreCache { @@ -31,6 +38,34 @@ public DefaultKeyStoreCache( this.storageAccess = storageAccess; } + @Override + public Map> getPublicKeys() { + return publicKeys; + } + + @Override + public Map getKeystore() { + return keystore; + } + + @Override + public Map getStorageAccess() { + return storageAccess; + } + + @Override + public KeyStore computeIfAbsent(UserIDAuth userIDAuth, Function mappingFunction) { + return getKeystore().computeIfAbsent(userIDAuth.getUserID(), userID -> { + KeyStore keyStore = mappingFunction.apply(userIDAuth.getUserID()); + if (keyStore.getType().equals("UBER")) { + getKeystore().put(userIDAuth.getUserID(), keyStore); + return keyStore; + } + return convertKeyStoreToUberKeyStore(userIDAuth, keyStore); + }); + + } + @Override public void remove(UserID userID) { @@ -38,4 +73,28 @@ public void remove(UserID userID) { keystore.remove(userID); storageAccess.remove(userID); } + + + @SneakyThrows + private KeyStore convertKeyStoreToUberKeyStore(UserIDAuth currentCredentials, KeyStore current) { + log.debug("the keystore is of type {} and will be converted to uber in cache", current.getType() ); + + KeyStore newKeystore = KeyStore.getInstance("UBER"); + newKeystore.load(null, null); + Enumeration aliases = current.aliases(); + + while (aliases.hasMoreElements()) { + String alias = aliases.nextElement(); + Key currentKey = current.getKey(alias, currentCredentials.getReadKeyPassword().getValue()); + newKeystore.setKeyEntry( + alias, + currentKey, + currentCredentials.getReadKeyPassword().getValue(), + current.getCertificateChain(alias) + ); + } + + return newKeystore; + } + } diff --git a/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/keys/DocumentKeyStoreOperationsImpl.java b/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/keys/DocumentKeyStoreOperationsImpl.java index a38edf002..1e53d7b25 100644 --- a/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/keys/DocumentKeyStoreOperationsImpl.java +++ b/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/keys/DocumentKeyStoreOperationsImpl.java @@ -124,9 +124,10 @@ private > void writeKeystore(UserID forUser, KeySt } private KeyStore keyStore(UserIDAuth forUser) { - return keystoreCache.getKeystore().computeIfAbsent( - forUser.getUserID(), + return keystoreCache.computeIfAbsent( + forUser, userId -> { + log.debug("THE KEYSTORE IS PHYSICALLY READ HERE for user {}", userId); AbsoluteLocation location = keystoreLocationWithAccess(forUser); return genericOper.readKeyStore(forUser, location); } diff --git a/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/keys/KeyStoreCache.java b/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/keys/KeyStoreCache.java index eb4ad2905..859554e99 100644 --- a/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/keys/KeyStoreCache.java +++ b/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/keys/KeyStoreCache.java @@ -1,11 +1,14 @@ package de.adorsys.datasafe.directory.impl.profile.keys; import de.adorsys.datasafe.encrypiton.api.types.UserID; +import de.adorsys.datasafe.encrypiton.api.types.UserIDAuth; import de.adorsys.datasafe.encrypiton.api.types.keystore.PublicKeyIDWithPublicKey; +import org.checkerframework.checker.units.qual.K; import java.security.KeyStore; import java.util.List; import java.util.Map; +import java.util.function.Function; /** * Cache delegating class to read users' public and private or secret keys. @@ -27,5 +30,13 @@ public interface KeyStoreCache { */ Map getStorageAccess(); + /** + * expects any keystore. Rather than storing the store as it is, + * it will be converted to a UBER keystore to save performance in + * decrypting the store. + * The returned KeyStore is added to the getKeyStore() Map. + */ + KeyStore computeIfAbsent(UserIDAuth userIDAuth, Function mappingFunction); + void remove(UserID forUser); } From 24f68b074cdb62c60b9a9aa40d049b1c4105a2ed Mon Sep 17 00:00:00 2001 From: psp Date: Wed, 23 Oct 2019 10:21:54 +0200 Subject: [PATCH 230/255] Revert "DOC-280 keystore converted to uber keystore" This reverts commit a6ab262e --- .../profile/keys/DefaultKeyStoreCache.java | 61 +------------------ .../keys/DocumentKeyStoreOperationsImpl.java | 5 +- .../impl/profile/keys/KeyStoreCache.java | 11 ---- 3 files changed, 3 insertions(+), 74 deletions(-) diff --git a/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/keys/DefaultKeyStoreCache.java b/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/keys/DefaultKeyStoreCache.java index 4d2429843..974c39e91 100644 --- a/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/keys/DefaultKeyStoreCache.java +++ b/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/keys/DefaultKeyStoreCache.java @@ -1,26 +1,19 @@ package de.adorsys.datasafe.directory.impl.profile.keys; -import de.adorsys.datasafe.encrypiton.api.keystore.KeyStoreService; import de.adorsys.datasafe.encrypiton.api.types.UserID; -import de.adorsys.datasafe.encrypiton.api.types.UserIDAuth; import de.adorsys.datasafe.encrypiton.api.types.keystore.PublicKeyIDWithPublicKey; import de.adorsys.datasafe.types.api.context.annotations.RuntimeDelegate; import lombok.Getter; -import lombok.SneakyThrows; -import lombok.extern.slf4j.Slf4j; import javax.inject.Inject; -import java.security.Key; import java.security.KeyStore; -import java.util.Enumeration; import java.util.List; import java.util.Map; -import java.util.function.Function; /** * Default map-based private and public keys cache implementation. Quite safe to cache since they change infrequently. */ -@Slf4j +@Getter @RuntimeDelegate public class DefaultKeyStoreCache implements KeyStoreCache { @@ -38,34 +31,6 @@ public DefaultKeyStoreCache( this.storageAccess = storageAccess; } - @Override - public Map> getPublicKeys() { - return publicKeys; - } - - @Override - public Map getKeystore() { - return keystore; - } - - @Override - public Map getStorageAccess() { - return storageAccess; - } - - @Override - public KeyStore computeIfAbsent(UserIDAuth userIDAuth, Function mappingFunction) { - return getKeystore().computeIfAbsent(userIDAuth.getUserID(), userID -> { - KeyStore keyStore = mappingFunction.apply(userIDAuth.getUserID()); - if (keyStore.getType().equals("UBER")) { - getKeystore().put(userIDAuth.getUserID(), keyStore); - return keyStore; - } - return convertKeyStoreToUberKeyStore(userIDAuth, keyStore); - }); - - } - @Override public void remove(UserID userID) { @@ -73,28 +38,4 @@ public void remove(UserID userID) { keystore.remove(userID); storageAccess.remove(userID); } - - - @SneakyThrows - private KeyStore convertKeyStoreToUberKeyStore(UserIDAuth currentCredentials, KeyStore current) { - log.debug("the keystore is of type {} and will be converted to uber in cache", current.getType() ); - - KeyStore newKeystore = KeyStore.getInstance("UBER"); - newKeystore.load(null, null); - Enumeration aliases = current.aliases(); - - while (aliases.hasMoreElements()) { - String alias = aliases.nextElement(); - Key currentKey = current.getKey(alias, currentCredentials.getReadKeyPassword().getValue()); - newKeystore.setKeyEntry( - alias, - currentKey, - currentCredentials.getReadKeyPassword().getValue(), - current.getCertificateChain(alias) - ); - } - - return newKeystore; - } - } diff --git a/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/keys/DocumentKeyStoreOperationsImpl.java b/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/keys/DocumentKeyStoreOperationsImpl.java index 1e53d7b25..a38edf002 100644 --- a/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/keys/DocumentKeyStoreOperationsImpl.java +++ b/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/keys/DocumentKeyStoreOperationsImpl.java @@ -124,10 +124,9 @@ private > void writeKeystore(UserID forUser, KeySt } private KeyStore keyStore(UserIDAuth forUser) { - return keystoreCache.computeIfAbsent( - forUser, + return keystoreCache.getKeystore().computeIfAbsent( + forUser.getUserID(), userId -> { - log.debug("THE KEYSTORE IS PHYSICALLY READ HERE for user {}", userId); AbsoluteLocation location = keystoreLocationWithAccess(forUser); return genericOper.readKeyStore(forUser, location); } diff --git a/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/keys/KeyStoreCache.java b/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/keys/KeyStoreCache.java index 859554e99..eb4ad2905 100644 --- a/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/keys/KeyStoreCache.java +++ b/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/keys/KeyStoreCache.java @@ -1,14 +1,11 @@ package de.adorsys.datasafe.directory.impl.profile.keys; import de.adorsys.datasafe.encrypiton.api.types.UserID; -import de.adorsys.datasafe.encrypiton.api.types.UserIDAuth; import de.adorsys.datasafe.encrypiton.api.types.keystore.PublicKeyIDWithPublicKey; -import org.checkerframework.checker.units.qual.K; import java.security.KeyStore; import java.util.List; import java.util.Map; -import java.util.function.Function; /** * Cache delegating class to read users' public and private or secret keys. @@ -30,13 +27,5 @@ public interface KeyStoreCache { */ Map getStorageAccess(); - /** - * expects any keystore. Rather than storing the store as it is, - * it will be converted to a UBER keystore to save performance in - * decrypting the store. - * The returned KeyStore is added to the getKeyStore() Map. - */ - KeyStore computeIfAbsent(UserIDAuth userIDAuth, Function mappingFunction); - void remove(UserID forUser); } From b6e4a6bf130693d58769010b97753e7a580022ee Mon Sep 17 00:00:00 2001 From: psp Date: Wed, 23 Oct 2019 11:38:04 +0200 Subject: [PATCH 231/255] DOC-280 for valentyn --- .../impl/e2e/KeyStoreTypeCompareTest.java | 3 - .../profile/keys/DefaultKeyStoreCache.java | 4 +- .../keys/DocumentKeyStoreOperationsImpl.java | 2 +- .../impl/profile/keys/KeyStoreCache.java | 2 +- .../impl/profile/keys/MapUserIDKeyStore.java | 85 +++++++++++++++++++ 5 files changed, 89 insertions(+), 7 deletions(-) create mode 100644 datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/keys/MapUserIDKeyStore.java diff --git a/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/KeyStoreTypeCompareTest.java b/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/KeyStoreTypeCompareTest.java index fb61fe31a..626c06ff8 100644 --- a/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/KeyStoreTypeCompareTest.java +++ b/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/KeyStoreTypeCompareTest.java @@ -4,12 +4,10 @@ import de.adorsys.datasafe.business.impl.service.DefaultDatasafeServices; import de.adorsys.datasafe.directory.impl.profile.config.DefaultDFSConfig; import de.adorsys.datasafe.encrypiton.api.types.UserID; -import de.adorsys.datasafe.encrypiton.api.types.UserIDAuth; import de.adorsys.datasafe.encrypiton.api.types.encryption.MutableEncryptionConfig; import de.adorsys.datasafe.teststorage.WithStorageProvider; import de.adorsys.datasafe.types.api.actions.ReadRequest; import de.adorsys.datasafe.types.api.actions.WriteRequest; -import de.adorsys.datasafe.types.api.types.ReadKeyPassword; import de.adorsys.datasafe.types.api.types.ReadStorePassword; import de.adorsys.datasafe.types.api.utils.ReadKeyPasswordTestFactory; import lombok.SneakyThrows; @@ -20,7 +18,6 @@ import java.io.InputStream; import java.io.OutputStream; -import java.util.Arrays; import static org.assertj.core.api.Assertions.assertThat; diff --git a/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/keys/DefaultKeyStoreCache.java b/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/keys/DefaultKeyStoreCache.java index 974c39e91..60bb95bef 100644 --- a/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/keys/DefaultKeyStoreCache.java +++ b/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/keys/DefaultKeyStoreCache.java @@ -18,7 +18,7 @@ public class DefaultKeyStoreCache implements KeyStoreCache { private final Map> publicKeys; - private final Map keystore; + private final MapUserIDKeyStore keystore; private final Map storageAccess; @Inject @@ -27,7 +27,7 @@ public DefaultKeyStoreCache( Map keystore, Map storageAccess) { this.publicKeys = publicKeys; - this.keystore = keystore; + this.keystore = new MapUserIDKeyStore(keystore); this.storageAccess = storageAccess; } diff --git a/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/keys/DocumentKeyStoreOperationsImpl.java b/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/keys/DocumentKeyStoreOperationsImpl.java index a38edf002..bcd3eb2bf 100644 --- a/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/keys/DocumentKeyStoreOperationsImpl.java +++ b/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/keys/DocumentKeyStoreOperationsImpl.java @@ -125,7 +125,7 @@ private > void writeKeystore(UserID forUser, KeySt private KeyStore keyStore(UserIDAuth forUser) { return keystoreCache.getKeystore().computeIfAbsent( - forUser.getUserID(), + forUser, userId -> { AbsoluteLocation location = keystoreLocationWithAccess(forUser); return genericOper.readKeyStore(forUser, location); diff --git a/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/keys/KeyStoreCache.java b/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/keys/KeyStoreCache.java index eb4ad2905..3aae0bd42 100644 --- a/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/keys/KeyStoreCache.java +++ b/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/keys/KeyStoreCache.java @@ -20,7 +20,7 @@ public interface KeyStoreCache { /** * Cache for users' private/secret keys */ - Map getKeystore(); + MapUserIDKeyStore getKeystore(); /** * Cache for users' storage access diff --git a/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/keys/MapUserIDKeyStore.java b/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/keys/MapUserIDKeyStore.java new file mode 100644 index 000000000..426a748d3 --- /dev/null +++ b/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/keys/MapUserIDKeyStore.java @@ -0,0 +1,85 @@ +package de.adorsys.datasafe.directory.impl.profile.keys; + +import de.adorsys.datasafe.encrypiton.api.types.UserID; +import de.adorsys.datasafe.encrypiton.api.types.UserIDAuth; +import lombok.AllArgsConstructor; +import lombok.SneakyThrows; +import lombok.experimental.Delegate; +import lombok.extern.slf4j.Slf4j; + +import java.security.Key; +import java.security.KeyStore; +import java.util.Enumeration; +import java.util.Map; +import java.util.function.Function; + +@Slf4j +@AllArgsConstructor +public class MapUserIDKeyStore { + @Delegate(types=LombokGemericMap.class, excludes = LombokComputeIfAbsent.class) + private final Map map; + + + /** + * This method must not be called. It is task of the DefaultKeyStoreCache + * to generate a new Uber Key Store. For that the password is needed which is + * not provided in this method here. + */ + /* + public KeyStore computeIfAbsent(UserID key, Function mappingFunction) { + + RuntimeException e = new RuntimeException("Must not be called"); + log.error(e.getMessage(), e); + throw e; + } + */ + + public KeyStore computeIfAbsent(UserIDAuth userIDAuth, Function mappingFunction) { + if (map.containsKey(userIDAuth.getUserID())) { + return map.get(userIDAuth.getUserID()); + } + KeyStore keyStore = mappingFunction.apply(userIDAuth.getUserID()); + if (! "UBER".equals(keyStore.getType())) { + keyStore = convertKeyStoreToUberKeyStore(userIDAuth, keyStore); + } + map.put(userIDAuth.getUserID(), keyStore); + return keyStore; + + } + + @SneakyThrows + private KeyStore convertKeyStoreToUberKeyStore(UserIDAuth currentCredentials, KeyStore current) { + log.warn("the keystore is of type {} and will be converted to uber in cache", current.getType() ); + + KeyStore newKeystore = KeyStore.getInstance("UBER"); + newKeystore.load(null, null); + Enumeration aliases = current.aliases(); + + while (aliases.hasMoreElements()) { + String alias = aliases.nextElement(); + Key currentKey = current.getKey(alias, currentCredentials.getReadKeyPassword().getValue()); + newKeystore.setKeyEntry( + alias, + currentKey, + currentCredentials.getReadKeyPassword().getValue(), + current.getCertificateChain(alias) + ); + } + + return newKeystore; + } + + + + private interface ComputeIfAbsent { + V computeIfAbsent(K key, Function mappingFunction); + } + + private abstract class LombokGemericMap implements Map { + } + + private abstract class LombokComputeIfAbsent implements ComputeIfAbsent { + } + + +} From 17f2ece11733ed8c9f968bab9e2d02c112e41fce Mon Sep 17 00:00:00 2001 From: Valentyn Berezin Date: Wed, 23 Oct 2019 12:49:27 +0300 Subject: [PATCH 232/255] DOC-280. Fixed wrong keystore type --- .../datasafe/encrypiton/impl/keystore/KeyStoreServiceImpl.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/keystore/KeyStoreServiceImpl.java b/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/keystore/KeyStoreServiceImpl.java index 09e4325e8..e67c6389e 100644 --- a/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/keystore/KeyStoreServiceImpl.java +++ b/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/keystore/KeyStoreServiceImpl.java @@ -80,8 +80,7 @@ public KeyStore createKeyStore(KeyStoreAuth keyStoreAuth, public KeyStore updateKeyStoreReadKeyPassword(KeyStore current, KeyStoreAuth currentCredentials, KeyStoreAuth newCredentials) { - KeyStore newKeystore = KeyStore.getInstance(current.getType()); - newKeystore.load(null, null); + KeyStore newKeystore = KeyStoreServiceImplBaseFunctions.newKeyStore(config); Enumeration aliases = current.aliases(); while (aliases.hasMoreElements()) { From dcfa64e9e830530c795aa62d85218fcbb6bd8467 Mon Sep 17 00:00:00 2001 From: psp Date: Wed, 23 Oct 2019 12:12:01 +0200 Subject: [PATCH 233/255] DOC-280 logging down to debug --- .../impl/profile/keys/MapUserIDKeyStore.java | 32 ++++++++++++------- 1 file changed, 21 insertions(+), 11 deletions(-) diff --git a/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/keys/MapUserIDKeyStore.java b/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/keys/MapUserIDKeyStore.java index 426a748d3..d8888e4c8 100644 --- a/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/keys/MapUserIDKeyStore.java +++ b/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/keys/MapUserIDKeyStore.java @@ -20,20 +20,23 @@ public class MapUserIDKeyStore { private final Map map; - /** - * This method must not be called. It is task of the DefaultKeyStoreCache - * to generate a new Uber Key Store. For that the password is needed which is - * not provided in this method here. - */ /* - public KeyStore computeIfAbsent(UserID key, Function mappingFunction) { + The original Map.computeIfAbsent method must not be called and thus is not provided + by this class! It is task of the DefaultKeyStoreCache to generate a new Uber Key Store + for the cache only. For that the password needed, which is + not provided in this method here, is expected too. See next method. - RuntimeException e = new RuntimeException("Must not be called"); - log.error(e.getMessage(), e); - throw e; - } + public KeyStore computeIfAbsent(UserID key, Function mappingFunction) {} */ + /** + * If the keyStore provided is a not a UBER KeyStore, a new UBER KeyStore without a + * ReadStorePassword is created. This store is returned and stored in the map. + * + * @param userIDAuth + * @param mappingFunction + * @return always a UBER KeyStore + */ public KeyStore computeIfAbsent(UserIDAuth userIDAuth, Function mappingFunction) { if (map.containsKey(userIDAuth.getUserID())) { return map.get(userIDAuth.getUserID()); @@ -47,9 +50,16 @@ public KeyStore computeIfAbsent(UserIDAuth userIDAuth, Function Date: Wed, 23 Oct 2019 12:19:33 +0200 Subject: [PATCH 234/255] DOC-280 comparison UBER BCFKS with time checking --- .../datasafe/business/impl/e2e/KeyStoreTypeCompareTest.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/KeyStoreTypeCompareTest.java b/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/KeyStoreTypeCompareTest.java index 626c06ff8..4150f082d 100644 --- a/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/KeyStoreTypeCompareTest.java +++ b/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/KeyStoreTypeCompareTest.java @@ -13,6 +13,7 @@ import lombok.SneakyThrows; import lombok.extern.slf4j.Slf4j; import org.joda.time.DateTime; +import org.junit.Assert; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.MethodSource; @@ -34,6 +35,8 @@ void compareKeyStoreTypes(WithStorageProvider.StorageDescriptor descriptor) { long t2 = test(descriptor, "johnBCFKS", "BCFKS"); log.info("UBER test took:" + t1); log.info("BCFKS test took:" + t2); + // We make sure, that with BCFKS it does not take longer than three times of UBER + Assert.assertTrue(t1 * 3 > t2); } From 23a5374dd0f565929f5f44994d63e31c34ae6c50 Mon Sep 17 00:00:00 2001 From: psp Date: Wed, 23 Oct 2019 13:34:46 +0200 Subject: [PATCH 235/255] DOC-280 removed wrong dependency --- .../business/impl/e2e/KeyStoreTypeCompareTest.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/KeyStoreTypeCompareTest.java b/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/KeyStoreTypeCompareTest.java index 4150f082d..58f3a183c 100644 --- a/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/KeyStoreTypeCompareTest.java +++ b/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/KeyStoreTypeCompareTest.java @@ -12,13 +12,13 @@ import de.adorsys.datasafe.types.api.utils.ReadKeyPasswordTestFactory; import lombok.SneakyThrows; import lombok.extern.slf4j.Slf4j; -import org.joda.time.DateTime; import org.junit.Assert; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.MethodSource; import java.io.InputStream; import java.io.OutputStream; +import java.util.Date; import static org.assertj.core.api.Assertions.assertThat; @@ -51,7 +51,7 @@ long test(WithStorageProvider.StorageDescriptor descriptor, String userName, Str String filename = "root.txt"; String content = "affe"; - DateTime start = new DateTime(); + Date start = new Date(); for (int i = 0; i < NUMBER_WRITES; i++) { log.debug("write file for the {} time", i); @@ -69,8 +69,8 @@ long test(WithStorageProvider.StorageDescriptor descriptor, String userName, Str } } - DateTime stop = new DateTime(); - long diff = stop.getMillis() - start.getMillis(); + Date stop = new Date(); + long diff = stop.getTime() - start.getTime(); log.info("TIME TOOK {} MILLISECS",diff); return diff; From f63ac7e74646e9e590723e9a81774db94de259a5 Mon Sep 17 00:00:00 2001 From: psp Date: Wed, 23 Oct 2019 15:14:18 +0200 Subject: [PATCH 236/255] DOC-280 removed wrong dependency --- .../datasafe/business/impl/e2e/KeyStoreTypeCompareTest.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/KeyStoreTypeCompareTest.java b/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/KeyStoreTypeCompareTest.java index 58f3a183c..8d8123e47 100644 --- a/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/KeyStoreTypeCompareTest.java +++ b/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/KeyStoreTypeCompareTest.java @@ -12,7 +12,7 @@ import de.adorsys.datasafe.types.api.utils.ReadKeyPasswordTestFactory; import lombok.SneakyThrows; import lombok.extern.slf4j.Slf4j; -import org.junit.Assert; +import org.junit.jupiter.api.Assertions; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.MethodSource; @@ -36,7 +36,7 @@ void compareKeyStoreTypes(WithStorageProvider.StorageDescriptor descriptor) { log.info("UBER test took:" + t1); log.info("BCFKS test took:" + t2); // We make sure, that with BCFKS it does not take longer than three times of UBER - Assert.assertTrue(t1 * 3 > t2); + Assertions.assertTrue(t1 * 3 > t2); } From 7139763b08aa060a350ac294d57fb6962c07bd67 Mon Sep 17 00:00:00 2001 From: Valentyn Berezin Date: Thu, 24 Oct 2019 12:01:53 +0300 Subject: [PATCH 237/255] Directly to develop - fixed embed.sh to preserve trailing spaces --- embed.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/embed.sh b/embed.sh index 8c02dc120..9e3515f60 100755 --- a/embed.sh +++ b/embed.sh @@ -95,7 +95,7 @@ function snippet_position_end() # expects 2 args - filename and snippet beginnin CLEANED=$(cleanup_embedded) -while read -r line; do +while IFS= read -r line; do if [[ $line =~ $ANCHOR_PATTERN ]]; then filename="${BASH_REMATCH[2]}" snippet_name="${BASH_REMATCH[1]}" From 585fb9cc1e4b6670c4a1eb815a8bbf359f597962 Mon Sep 17 00:00:00 2001 From: Maxim Grischenko Date: Mon, 21 Oct 2019 15:33:23 +0200 Subject: [PATCH 238/255] e-mail fix --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 84e804780..5c81b7018 100644 --- a/pom.xml +++ b/pom.xml @@ -51,7 +51,7 @@ Maksym Hryshchenko - mhrex@adorsys.de + mhr@adorsys.de adorsys https://adorsys.de/ From 6247152a2fb7fce8d421953560ad963694240fb6 Mon Sep 17 00:00:00 2001 From: Maxim Grischenko Date: Mon, 21 Oct 2019 15:35:27 +0200 Subject: [PATCH 239/255] rest properties optimization --- .../de/adorsys/datasafe/rest/impl/config/DatasafeConfig.java | 2 +- .../adorsys/datasafe/rest/impl/config/DatasafeProperties.java | 1 - datasafe-rest-impl/src/main/resources/application.properties | 4 ---- 3 files changed, 1 insertion(+), 6 deletions(-) diff --git a/datasafe-rest-impl/src/main/java/de/adorsys/datasafe/rest/impl/config/DatasafeConfig.java b/datasafe-rest-impl/src/main/java/de/adorsys/datasafe/rest/impl/config/DatasafeConfig.java index e1f251e28..8864b8e79 100644 --- a/datasafe-rest-impl/src/main/java/de/adorsys/datasafe/rest/impl/config/DatasafeConfig.java +++ b/datasafe-rest-impl/src/main/java/de/adorsys/datasafe/rest/impl/config/DatasafeConfig.java @@ -93,7 +93,7 @@ OverridesRegistry withClientCredentialsOverrides() { @Bean @ConditionalOnMissingBean(DFSConfig.class) DFSConfig multiDfsConfig(DatasafeProperties properties) { - return new MultiDFSConfig(URI.create(properties.getS3Path()), URI.create(properties.getDbProfilePath()), + return new MultiDFSConfig(URI.create(properties.getSystemRoot()), URI.create(properties.getDbProfilePath()), new ReadStorePassword(properties.getKeystorePassword())); } diff --git a/datasafe-rest-impl/src/main/java/de/adorsys/datasafe/rest/impl/config/DatasafeProperties.java b/datasafe-rest-impl/src/main/java/de/adorsys/datasafe/rest/impl/config/DatasafeProperties.java index bdc33c913..065385dd5 100644 --- a/datasafe-rest-impl/src/main/java/de/adorsys/datasafe/rest/impl/config/DatasafeProperties.java +++ b/datasafe-rest-impl/src/main/java/de/adorsys/datasafe/rest/impl/config/DatasafeProperties.java @@ -24,7 +24,6 @@ public class DatasafeProperties { */ private String keystorePassword; - private String s3Path; private String dbProfilePath; private String amazonUrl; diff --git a/datasafe-rest-impl/src/main/resources/application.properties b/datasafe-rest-impl/src/main/resources/application.properties index 013924c38..215fe3dff 100644 --- a/datasafe-rest-impl/src/main/resources/application.properties +++ b/datasafe-rest-impl/src/main/resources/application.properties @@ -19,11 +19,7 @@ datasafe.amazonRegion=${AWS_REGION} #datasafe.amazonAccessKeyID= #datasafe.amazonRegion= -datasafe.s3Path=s3://adorsys-docusafe - # MySQL db -# example db path: jdbc-mysql://localhost:3306/test_db/ -datasafe.dbProfilePath=${MYSQL_PROFILE_PATH} # example url: jdbc-mysql://localhost:3306/test_db/ datasafe.dbUrl=${MYSQL_URL} datasafe.dbUsername=${MYSQL_USER} From 6fd5eaae5ac763aa8b8a69705e90959fd39e5564 Mon Sep 17 00:00:00 2001 From: Maxim Grischenko Date: Mon, 21 Oct 2019 17:07:38 +0200 Subject: [PATCH 240/255] class rename --- .../DefaultPathEncryptionModule.java | 8 ++++---- ...a => IntegrityPreservingUriEncryption.java} | 4 ++-- .../pathencryption/PathEncryptionImpl.java | 10 +++++----- ...java => PathSegmentEncryptorDecryptor.java} | 4 ++-- ... IntegrityPreservingUriEncryptionTest.java} | 16 ++++++++-------- .../datasafe-examples-business/README.md | 6 +++--- .../RuntimeOverrideOperationsTest.java | 2 +- ...egacyIntegrityPreservingUriEncryption.java} | 4 ++-- .../LegacyPathEncryptionImpl.java | 10 +++++----- .../LegacyPathEncryptionModule.java | 4 ++-- .../SwitchablePathEncryptionImpl.java | 5 +++-- ...yIntegrityPreservingUriEncryptionTest.java} | 18 +++++++++--------- 12 files changed, 46 insertions(+), 45 deletions(-) rename datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/pathencryption/{SymmetricPathEncryptionServiceImpl.java => IntegrityPreservingUriEncryption.java} (97%) rename datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/pathencryption/{DefaultPathEncryptorDecryptor.java => PathSegmentEncryptorDecryptor.java} (92%) rename datasafe-encryption/datasafe-encryption-impl/src/test/java/de/adorsys/datasafe/encrypiton/impl/pathencryption/{SymmetricPathEncryptionServiceImplTest.java => IntegrityPreservingUriEncryptionTest.java} (85%) rename datasafe-simple-adapter/datasafe-simple-adapter-impl/src/main/java/de/adorsys/datasafe/simple/adapter/impl/legacy/pathencryption/{LegacySymmetricPathEncryptionServiceImpl.java => LegacyIntegrityPreservingUriEncryption.java} (94%) rename datasafe-simple-adapter/datasafe-simple-adapter-impl/src/test/java/de/adorsys/datasafe/simple/adapter/impl/legacy/{LegacySymmetricPathEncryptionServiceImplTest.java => LegacyIntegrityPreservingUriEncryptionTest.java} (82%) diff --git a/datasafe-business/src/main/java/de/adorsys/datasafe/business/impl/pathencryption/DefaultPathEncryptionModule.java b/datasafe-business/src/main/java/de/adorsys/datasafe/business/impl/pathencryption/DefaultPathEncryptionModule.java index fb09804b0..edf00c01e 100644 --- a/datasafe-business/src/main/java/de/adorsys/datasafe/business/impl/pathencryption/DefaultPathEncryptionModule.java +++ b/datasafe-business/src/main/java/de/adorsys/datasafe/business/impl/pathencryption/DefaultPathEncryptionModule.java @@ -5,10 +5,10 @@ import dagger.Provides; import de.adorsys.datasafe.encrypiton.api.pathencryption.PathEncryption; import de.adorsys.datasafe.encrypiton.api.pathencryption.encryption.SymmetricPathEncryptionService; -import de.adorsys.datasafe.encrypiton.impl.pathencryption.DefaultPathEncryptorDecryptorRuntimeDelegatable; +import de.adorsys.datasafe.encrypiton.impl.pathencryption.IntegrityPreservingUriEncryptionRuntimeDelegatable; import de.adorsys.datasafe.encrypiton.impl.pathencryption.PathEncryptionImplRuntimeDelegatable; import de.adorsys.datasafe.encrypiton.impl.pathencryption.PathEncryptorDecryptor; -import de.adorsys.datasafe.encrypiton.impl.pathencryption.SymmetricPathEncryptionServiceImplRuntimeDelegatable; +import de.adorsys.datasafe.encrypiton.impl.pathencryption.PathSegmentEncryptorDecryptorRuntimeDelegatable; import org.cryptomator.siv.SivMode; /** @@ -30,7 +30,7 @@ static SivMode sivMode() { * Default path encryption that uses Base64-urlsafe path serialization and AES-CGM-SIV mode for encryption */ @Binds - abstract PathEncryptorDecryptor pathEncryptorDecryptor(DefaultPathEncryptorDecryptorRuntimeDelegatable impl); + abstract PathEncryptorDecryptor pathEncryptorDecryptor(PathSegmentEncryptorDecryptorRuntimeDelegatable impl); /** * By default simply use @@ -44,5 +44,5 @@ static SivMode sivMode() { * Default symmetric path encryption that encrypts URI segment-by-segment. */ @Binds - abstract SymmetricPathEncryptionService bucketPathEncryptionService(SymmetricPathEncryptionServiceImplRuntimeDelegatable impl); + abstract SymmetricPathEncryptionService symmetricPathEncryptionService(IntegrityPreservingUriEncryptionRuntimeDelegatable impl); } diff --git a/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/pathencryption/SymmetricPathEncryptionServiceImpl.java b/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/pathencryption/IntegrityPreservingUriEncryption.java similarity index 97% rename from datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/pathencryption/SymmetricPathEncryptionServiceImpl.java rename to datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/pathencryption/IntegrityPreservingUriEncryption.java index 63ed1d517..928a358d7 100644 --- a/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/pathencryption/SymmetricPathEncryptionServiceImpl.java +++ b/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/pathencryption/IntegrityPreservingUriEncryption.java @@ -29,7 +29,7 @@ */ @Slf4j @RuntimeDelegate -public class SymmetricPathEncryptionServiceImpl implements SymmetricPathEncryptionService { +public class IntegrityPreservingUriEncryption implements SymmetricPathEncryptionService { private static final int DOT_SLASH_PREFIX_LENGTH = 2; private static final String DOT_SLASH_PREFIX = "./"; @@ -39,7 +39,7 @@ public class SymmetricPathEncryptionServiceImpl implements SymmetricPathEncrypti private final Function decryptAndDecode; @Inject - public SymmetricPathEncryptionServiceImpl(PathEncryptorDecryptor pathEncryptorDecryptor) { + public IntegrityPreservingUriEncryption(PathEncryptorDecryptor pathEncryptorDecryptor) { encryptAndEncode = keyAndSegment -> encryptorAndEncoder(keyAndSegment, pathEncryptorDecryptor); decryptAndDecode = keyAndSegment -> decryptorAndDecoder(keyAndSegment, pathEncryptorDecryptor); } diff --git a/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/pathencryption/PathEncryptionImpl.java b/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/pathencryption/PathEncryptionImpl.java index 5a3758fbb..76bc10001 100644 --- a/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/pathencryption/PathEncryptionImpl.java +++ b/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/pathencryption/PathEncryptionImpl.java @@ -20,13 +20,13 @@ @RuntimeDelegate public class PathEncryptionImpl implements PathEncryption { - private final SymmetricPathEncryptionService bucketPathEncryptionService; + private final SymmetricPathEncryptionService symmetricPathEncryptionService; private final PrivateKeyService privateKeyService; @Inject - public PathEncryptionImpl(SymmetricPathEncryptionService bucketPathEncryptionService, + public PathEncryptionImpl(SymmetricPathEncryptionService symmetricPathEncryptionService, PrivateKeyService privateKeyService) { - this.bucketPathEncryptionService = bucketPathEncryptionService; + this.symmetricPathEncryptionService = symmetricPathEncryptionService; this.privateKeyService = privateKeyService; } @@ -36,7 +36,7 @@ public PathEncryptionImpl(SymmetricPathEncryptionService bucketPathEncryptionSer @Override public Uri encrypt(UserIDAuth forUser, Uri path) { AuthPathEncryptionSecretKey pathEncryptionSecretKey = privateKeyService.pathEncryptionSecretKey(forUser); - Uri encrypt = bucketPathEncryptionService.encrypt(pathEncryptionSecretKey, path); + Uri encrypt = symmetricPathEncryptionService.encrypt(pathEncryptionSecretKey, path); log.debug("encrypted path {} for user {} path {}", encrypt, forUser.getUserID(), path); return encrypt; } @@ -48,7 +48,7 @@ public Uri encrypt(UserIDAuth forUser, Uri path) { public Function decryptor(UserIDAuth forUser) { AuthPathEncryptionSecretKey pathEncryptionSecretKey = privateKeyService.pathEncryptionSecretKey(forUser); return encryptedPath -> { - Uri decrypt = bucketPathEncryptionService.decrypt(pathEncryptionSecretKey, encryptedPath); + Uri decrypt = symmetricPathEncryptionService.decrypt(pathEncryptionSecretKey, encryptedPath); log.debug("decrypted path {} for user {} path {}", decrypt, forUser.getUserID(), encryptedPath); return decrypt; }; diff --git a/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/pathencryption/DefaultPathEncryptorDecryptor.java b/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/pathencryption/PathSegmentEncryptorDecryptor.java similarity index 92% rename from datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/pathencryption/DefaultPathEncryptorDecryptor.java rename to datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/pathencryption/PathSegmentEncryptorDecryptor.java index ef3c93917..9004d2478 100644 --- a/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/pathencryption/DefaultPathEncryptorDecryptor.java +++ b/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/pathencryption/PathSegmentEncryptorDecryptor.java @@ -17,12 +17,12 @@ */ @Slf4j @RuntimeDelegate -public class DefaultPathEncryptorDecryptor implements PathEncryptorDecryptor { +public class PathSegmentEncryptorDecryptor implements PathEncryptorDecryptor { private final SivMode sivMode; @Inject - public DefaultPathEncryptorDecryptor(SivMode sivMode) { + public PathSegmentEncryptorDecryptor(SivMode sivMode) { this.sivMode = sivMode; } diff --git a/datasafe-encryption/datasafe-encryption-impl/src/test/java/de/adorsys/datasafe/encrypiton/impl/pathencryption/SymmetricPathEncryptionServiceImplTest.java b/datasafe-encryption/datasafe-encryption-impl/src/test/java/de/adorsys/datasafe/encrypiton/impl/pathencryption/IntegrityPreservingUriEncryptionTest.java similarity index 85% rename from datasafe-encryption/datasafe-encryption-impl/src/test/java/de/adorsys/datasafe/encrypiton/impl/pathencryption/SymmetricPathEncryptionServiceImplTest.java rename to datasafe-encryption/datasafe-encryption-impl/src/test/java/de/adorsys/datasafe/encrypiton/impl/pathencryption/IntegrityPreservingUriEncryptionTest.java index 0aa99e802..bb8ae6c10 100644 --- a/datasafe-encryption/datasafe-encryption-impl/src/test/java/de/adorsys/datasafe/encrypiton/impl/pathencryption/SymmetricPathEncryptionServiceImplTest.java +++ b/datasafe-encryption/datasafe-encryption-impl/src/test/java/de/adorsys/datasafe/encrypiton/impl/pathencryption/IntegrityPreservingUriEncryptionTest.java @@ -27,10 +27,10 @@ import static org.junit.jupiter.api.Assertions.assertThrows; @Slf4j -class SymmetricPathEncryptionServiceImplTest extends WithBouncyCastle { +class IntegrityPreservingUriEncryptionTest extends WithBouncyCastle { - private SymmetricPathEncryptionServiceImpl bucketPathEncryptionService = new SymmetricPathEncryptionServiceImpl( - new DefaultPathEncryptorDecryptor(new SivMode()) + private IntegrityPreservingUriEncryption symmetricPathEncryptionService = new IntegrityPreservingUriEncryption( + new PathSegmentEncryptorDecryptor(new SivMode()) ); private KeyStoreService keyStoreService = new KeyStoreServiceImpl(EncryptionConfig.builder().build().getKeystore()); @@ -48,7 +48,7 @@ void testEncryptionDoesNotLeakSameSegments() { Uri testURI = new Uri(testPath); AuthPathEncryptionSecretKey pathEncryptionSecretKey = pathEncryptionSecretKey(); - Uri encrypted = bucketPathEncryptionService.encrypt(pathEncryptionSecretKey, testURI); + Uri encrypted = symmetricPathEncryptionService.encrypt(pathEncryptionSecretKey, testURI); String[] encryptedSegments = encrypted.asString().split("/"); assertThat(encryptedSegments[1]).isNotEqualTo(encryptedSegments[3]); @@ -62,10 +62,10 @@ void testSuccessEncryptDecryptPath() { Uri testURI = new Uri(testPath); AuthPathEncryptionSecretKey pathEncryptionSecretKey = pathEncryptionSecretKey(); - Uri encrypted = bucketPathEncryptionService.encrypt(pathEncryptionSecretKey, testURI); + Uri encrypted = symmetricPathEncryptionService.encrypt(pathEncryptionSecretKey, testURI); log.debug("Encrypted path: {}", encrypted); - Uri decrypted = bucketPathEncryptionService.decrypt(pathEncryptionSecretKey, encrypted); + Uri decrypted = symmetricPathEncryptionService.decrypt(pathEncryptionSecretKey, encrypted); log.debug("Decrypted path: {}", decrypted); assertEquals(testPath, decrypted.toASCIIString()); @@ -76,7 +76,7 @@ void testFailEncryptPathWithBrokenEncryptedPath() { AuthPathEncryptionSecretKey pathEncryptionSecretKey = pathEncryptionSecretKey(); assertThrows(BadPaddingException.class, - () -> bucketPathEncryptionService.decrypt(pathEncryptionSecretKey, + () -> symmetricPathEncryptionService.decrypt(pathEncryptionSecretKey, new Uri(URI.create("bRQiW8qLNPEy5tO7shfV0w==/k0HooCVlmhHkQFw8mc==")))); } @@ -86,7 +86,7 @@ void testFailEncryptPathWithTextPath() { assertThrows( IllegalBlockSizeException.class, - () -> bucketPathEncryptionService.decrypt(pathEncryptionSecretKey, new Uri("simple/text/path/")) + () -> symmetricPathEncryptionService.decrypt(pathEncryptionSecretKey, new Uri("simple/text/path/")) ); } diff --git a/datasafe-examples/datasafe-examples-business/README.md b/datasafe-examples/datasafe-examples-business/README.md index da51b1197..1f751563d 100644 --- a/datasafe-examples/datasafe-examples-business/README.md +++ b/datasafe-examples/datasafe-examples-business/README.md @@ -2,10 +2,10 @@ This module contains examples of how to use Datasafe library using its business layer. -- [BaseUserOperationsTestWithDefaultDatasafe](src/test/java/de/adorsys/datasafe/examples/business/filesystem/BaseUserOperationsTestWithDefaultDatasafe.java) +- [BaseUserOperationsTestWithDefaultDatasafe](src/test/java/de/adorsys/datasafe/examples/business/filesystem/BaseUserOperationsTestWithDefaultDatasafeTest.java) shows how to use standard Datasafe service -- [BaseUserOperationsTestWithVersionedDatasafe](src/test/java/de/adorsys/datasafe/examples/business/filesystem/BaseUserOperationsTestWithVersionedDatasafe.java) +- [BaseUserOperationsTestWithVersionedDatasafe](src/test/java/de/adorsys/datasafe/examples/business/filesystem/BaseUserOperationsTestWithVersionedDatasafeTest.java) shows how to use standard Datasafe service with [software versioning](../../datasafe-metainfo/datasafe-metainfo-version-api/src/main/java/de/adorsys/datasafe/metainfo/version/api/version/VersionedPrivateSpaceService.java) - [RuntimeOverrideOperationsTest](src/test/java/de/adorsys/datasafe/examples/business/filesystem/RuntimeOverrideOperationsTest.java) -shows how to customize Datasafe without recompilation \ No newline at end of file +shows how to customize Datasafe without recompilation diff --git a/datasafe-examples/datasafe-examples-business/src/test/java/de/adorsys/datasafe/examples/business/filesystem/RuntimeOverrideOperationsTest.java b/datasafe-examples/datasafe-examples-business/src/test/java/de/adorsys/datasafe/examples/business/filesystem/RuntimeOverrideOperationsTest.java index 8cef051d7..3d332e2d0 100644 --- a/datasafe-examples/datasafe-examples-business/src/test/java/de/adorsys/datasafe/examples/business/filesystem/RuntimeOverrideOperationsTest.java +++ b/datasafe-examples/datasafe-examples-business/src/test/java/de/adorsys/datasafe/examples/business/filesystem/RuntimeOverrideOperationsTest.java @@ -60,7 +60,7 @@ void testPathEncryptionOverridden(@TempDir Path root) { class PathEncryptionImplOverridden extends PathEncryptionImpl { PathEncryptionImplOverridden(PathEncryptionImplRuntimeDelegatable.ArgumentsCaptor captor) { - super(captor.getBucketPathEncryptionService(), captor.getPrivateKeyService()); + super(captor.getSymmetricPathEncryptionService(), captor.getPrivateKeyService()); } @Override diff --git a/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/main/java/de/adorsys/datasafe/simple/adapter/impl/legacy/pathencryption/LegacySymmetricPathEncryptionServiceImpl.java b/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/main/java/de/adorsys/datasafe/simple/adapter/impl/legacy/pathencryption/LegacyIntegrityPreservingUriEncryption.java similarity index 94% rename from datasafe-simple-adapter/datasafe-simple-adapter-impl/src/main/java/de/adorsys/datasafe/simple/adapter/impl/legacy/pathencryption/LegacySymmetricPathEncryptionServiceImpl.java rename to datasafe-simple-adapter/datasafe-simple-adapter-impl/src/main/java/de/adorsys/datasafe/simple/adapter/impl/legacy/pathencryption/LegacyIntegrityPreservingUriEncryption.java index 3aac17a03..715bc08dd 100644 --- a/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/main/java/de/adorsys/datasafe/simple/adapter/impl/legacy/pathencryption/LegacySymmetricPathEncryptionServiceImpl.java +++ b/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/main/java/de/adorsys/datasafe/simple/adapter/impl/legacy/pathencryption/LegacyIntegrityPreservingUriEncryption.java @@ -22,14 +22,14 @@ * cipher(path) will yield same string. */ @Slf4j -public class LegacySymmetricPathEncryptionServiceImpl implements LegacySymmetricPathEncryptionService { +public class LegacyIntegrityPreservingUriEncryption implements LegacySymmetricPathEncryptionService { private static final String PATH_SEPARATOR = "/"; private final LegacyPathEncryptionConfig encryptionConfig; @Inject - public LegacySymmetricPathEncryptionServiceImpl(LegacyPathEncryptionConfig encryptionConfig) { + public LegacyIntegrityPreservingUriEncryption(LegacyPathEncryptionConfig encryptionConfig) { this.encryptionConfig = encryptionConfig; } diff --git a/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/main/java/de/adorsys/datasafe/simple/adapter/impl/legacy/pathencryption/LegacyPathEncryptionImpl.java b/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/main/java/de/adorsys/datasafe/simple/adapter/impl/legacy/pathencryption/LegacyPathEncryptionImpl.java index 893944015..ccfe48b98 100644 --- a/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/main/java/de/adorsys/datasafe/simple/adapter/impl/legacy/pathencryption/LegacyPathEncryptionImpl.java +++ b/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/main/java/de/adorsys/datasafe/simple/adapter/impl/legacy/pathencryption/LegacyPathEncryptionImpl.java @@ -18,13 +18,13 @@ @Slf4j public class LegacyPathEncryptionImpl implements PathEncryption { - private final LegacySymmetricPathEncryptionService bucketPathEncryptionService; + private final LegacySymmetricPathEncryptionService symmetricPathEncryptionService; private final PrivateKeyService privateKeyService; @Inject - public LegacyPathEncryptionImpl(LegacySymmetricPathEncryptionService bucketPathEncryptionService, + public LegacyPathEncryptionImpl(LegacySymmetricPathEncryptionService symmetricPathEncryptionService, PrivateKeyService privateKeyService) { - this.bucketPathEncryptionService = bucketPathEncryptionService; + this.symmetricPathEncryptionService = symmetricPathEncryptionService; this.privateKeyService = privateKeyService; } @@ -34,7 +34,7 @@ public LegacyPathEncryptionImpl(LegacySymmetricPathEncryptionService bucketPathE @Override public Uri encrypt(UserIDAuth forUser, Uri path) { AuthPathEncryptionSecretKey keySpec = privateKeyService.pathEncryptionSecretKey(forUser); - Uri encrypt = bucketPathEncryptionService.encrypt(keySpec.getSecretKey().getSecretKey(), path); + Uri encrypt = symmetricPathEncryptionService.encrypt(keySpec.getSecretKey().getSecretKey(), path); log.debug("encrypted path {} for user {} path {}", encrypt, forUser.getUserID(), path); return encrypt; } @@ -46,7 +46,7 @@ public Uri encrypt(UserIDAuth forUser, Uri path) { public Function decryptor(UserIDAuth forUser) { AuthPathEncryptionSecretKey keySpec = privateKeyService.pathEncryptionSecretKey(forUser); return encryptedPath -> { - Uri decrypt = bucketPathEncryptionService.decrypt(keySpec.getSecretKey().getSecretKey(), encryptedPath); + Uri decrypt = symmetricPathEncryptionService.decrypt(keySpec.getSecretKey().getSecretKey(), encryptedPath); log.debug("decrypted path {} for user {} path {}", decrypt, forUser.getUserID(), encryptedPath); return decrypt; }; diff --git a/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/main/java/de/adorsys/datasafe/simple/adapter/impl/pathencryption/LegacyPathEncryptionModule.java b/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/main/java/de/adorsys/datasafe/simple/adapter/impl/pathencryption/LegacyPathEncryptionModule.java index 22fda4377..051fe8f1e 100644 --- a/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/main/java/de/adorsys/datasafe/simple/adapter/impl/pathencryption/LegacyPathEncryptionModule.java +++ b/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/main/java/de/adorsys/datasafe/simple/adapter/impl/pathencryption/LegacyPathEncryptionModule.java @@ -8,7 +8,7 @@ import de.adorsys.datasafe.simple.adapter.api.legacy.pathencryption.LegacySymmetricPathEncryptionService; import de.adorsys.datasafe.simple.adapter.impl.legacy.pathencryption.LegacyPathDigestConfig; import de.adorsys.datasafe.simple.adapter.impl.legacy.pathencryption.LegacyPathEncryptor; -import de.adorsys.datasafe.simple.adapter.impl.legacy.pathencryption.LegacySymmetricPathEncryptionServiceImpl; +import de.adorsys.datasafe.simple.adapter.impl.legacy.pathencryption.LegacyIntegrityPreservingUriEncryption; /** * This module is responsible for providing pathencryption of document. @@ -42,5 +42,5 @@ static LegacyPathDigestConfig digestConfig() { * Default symmetric path encryption that encrypts URI segment-by-segment. */ @Binds - abstract LegacySymmetricPathEncryptionService bucketPathEncryptionService(LegacySymmetricPathEncryptionServiceImpl impl); + abstract LegacySymmetricPathEncryptionService legacySymmetricPathEncryptionService(LegacyIntegrityPreservingUriEncryption impl); } diff --git a/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/main/java/de/adorsys/datasafe/simple/adapter/impl/pathencryption/SwitchablePathEncryptionImpl.java b/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/main/java/de/adorsys/datasafe/simple/adapter/impl/pathencryption/SwitchablePathEncryptionImpl.java index 456823710..fe2bbe192 100644 --- a/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/main/java/de/adorsys/datasafe/simple/adapter/impl/pathencryption/SwitchablePathEncryptionImpl.java +++ b/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/main/java/de/adorsys/datasafe/simple/adapter/impl/pathencryption/SwitchablePathEncryptionImpl.java @@ -18,8 +18,9 @@ public class SwitchablePathEncryptionImpl extends LegacyPathEncryptionImpl { private boolean withPathEncryption = checkIsPathEncryptionToUse(); @Inject - public SwitchablePathEncryptionImpl(LegacySymmetricPathEncryptionService bucketPathEncryptionService, PrivateKeyService privateKeyService) { - super(bucketPathEncryptionService, privateKeyService); + public SwitchablePathEncryptionImpl(LegacySymmetricPathEncryptionService legacySymmetricPathEncryptionService, + PrivateKeyService privateKeyService) { + super(legacySymmetricPathEncryptionService, privateKeyService); } @Override diff --git a/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/test/java/de/adorsys/datasafe/simple/adapter/impl/legacy/LegacySymmetricPathEncryptionServiceImplTest.java b/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/test/java/de/adorsys/datasafe/simple/adapter/impl/legacy/LegacyIntegrityPreservingUriEncryptionTest.java similarity index 82% rename from datasafe-simple-adapter/datasafe-simple-adapter-impl/src/test/java/de/adorsys/datasafe/simple/adapter/impl/legacy/LegacySymmetricPathEncryptionServiceImplTest.java rename to datasafe-simple-adapter/datasafe-simple-adapter-impl/src/test/java/de/adorsys/datasafe/simple/adapter/impl/legacy/LegacyIntegrityPreservingUriEncryptionTest.java index 477a0d3f6..07e563d09 100644 --- a/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/test/java/de/adorsys/datasafe/simple/adapter/impl/legacy/LegacySymmetricPathEncryptionServiceImplTest.java +++ b/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/test/java/de/adorsys/datasafe/simple/adapter/impl/legacy/LegacyIntegrityPreservingUriEncryptionTest.java @@ -9,7 +9,7 @@ import de.adorsys.datasafe.simple.adapter.impl.WithBouncyCastle; import de.adorsys.datasafe.simple.adapter.impl.legacy.pathencryption.LegacyPathDigestConfig; import de.adorsys.datasafe.simple.adapter.impl.legacy.pathencryption.LegacyPathEncryptor; -import de.adorsys.datasafe.simple.adapter.impl.legacy.pathencryption.LegacySymmetricPathEncryptionServiceImpl; +import de.adorsys.datasafe.simple.adapter.impl.legacy.pathencryption.LegacyIntegrityPreservingUriEncryption; import de.adorsys.datasafe.types.api.resource.Uri; import de.adorsys.datasafe.types.api.types.ReadKeyPassword; import de.adorsys.datasafe.types.api.types.ReadStorePassword; @@ -29,9 +29,9 @@ import static org.junit.jupiter.api.Assertions.assertThrows; @Slf4j -class LegacySymmetricPathEncryptionServiceImplTest extends WithBouncyCastle { +class LegacyIntegrityPreservingUriEncryptionTest extends WithBouncyCastle { - private LegacySymmetricPathEncryptionService bucketPathEncryptionService = new LegacySymmetricPathEncryptionServiceImpl( + private LegacySymmetricPathEncryptionService legacySymmetricPathEncryptionService = new LegacyIntegrityPreservingUriEncryption( new LegacyPathEncryptor(new LegacyPathDigestConfig()) ); @@ -55,8 +55,8 @@ void testSuccessEncryptDecryptPath() { keyStoreAccess, KeystoreUtil.keyIdByPrefix(keyStore, PATH_KEY_ID_PREFIX) ); - Uri encrypted = bucketPathEncryptionService.encrypt(secretKey, testURI); - Uri decrypted = bucketPathEncryptionService.decrypt(secretKey, encrypted); + Uri encrypted = legacySymmetricPathEncryptionService.encrypt(secretKey, testURI); + Uri decrypted = legacySymmetricPathEncryptionService.decrypt(secretKey, encrypted); log.debug("Encrypted path: {}", encrypted); @@ -73,8 +73,8 @@ void testFailEncryptPathWithWrongKeyID() throws URISyntaxException { SecretKeySpec secretKey = keyStoreService.getSecretKey(keyStoreAccess, new KeyID("Invalid key")); // secret keys is null, because during key obtain was used incorrect KeyID, - // so bucketPathEncryptionService#encrypt throw BaseException(was handled NullPointerException) - assertThrows(IllegalArgumentException.class, () -> bucketPathEncryptionService.encrypt(secretKey, testURI)); + // so symmetricPathEncryptionService#encrypt throw BaseException(was handled NullPointerException) + assertThrows(IllegalArgumentException.class, () -> legacySymmetricPathEncryptionService.encrypt(secretKey, testURI)); } @Test @@ -85,7 +85,7 @@ void testFailEncryptPathWithBrokenEncryptedPath() { ); assertThrows(BadPaddingException.class, - () -> bucketPathEncryptionService.decrypt(secretKey, + () -> legacySymmetricPathEncryptionService.decrypt(secretKey, new Uri(URI.create("bRQiW8qLNPEy5tO7shfV0w==/k0HooCVlmhHkQFw8mc==")))); } @@ -97,7 +97,7 @@ void testFailEncryptPathWithTextPath() { ); assertThrows(IllegalBlockSizeException.class, - () -> bucketPathEncryptionService.decrypt(secretKey, + () -> legacySymmetricPathEncryptionService.decrypt(secretKey, new Uri("/simple/text/path/"))); } } From 4a9166dd6c1fe3121ab9ecd50b97a4d4e24c6174 Mon Sep 17 00:00:00 2001 From: Maxim Grischenko Date: Mon, 21 Oct 2019 17:08:48 +0200 Subject: [PATCH 241/255] security whitepaper --- README.md | 2 + SECURITY.WHITEPAPER.md | 108 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 110 insertions(+) create mode 100644 SECURITY.WHITEPAPER.md diff --git a/README.md b/README.md index 9a99fd15f..646c16822 100644 --- a/README.md +++ b/README.md @@ -212,6 +212,8 @@ inbox and private space virtual folders - you get similar actions available from Additionally, for file versioning purposes like reading only last file version, there is [versioned privatespace](datasafe-business/src/main/java/de/adorsys/datasafe/business/impl/service/VersionedDatasafeServices.java) that supports versioned and encrypted private file storage (for storage providers that do not support versioning). +Details about used encryption algorithms can be found in [security whitepaper](SECURITY.WHITEPAPER.md). + # How it works ## Library modules diff --git a/SECURITY.WHITEPAPER.md b/SECURITY.WHITEPAPER.md new file mode 100644 index 000000000..dc2d1da7c --- /dev/null +++ b/SECURITY.WHITEPAPER.md @@ -0,0 +1,108 @@ +# Datasafe Security Whitepaper + +## General information +Datasafe is a flexible encryption library. It uses different encryption algorithms. Some of them can be +configured by client application. It uses encryption algorithms provided by Bouncy Castle library by default. + +## Default storage configuration +Datasafe library can operate with different type of storages: filesystem, datasabe, s3 compliant(amazon aws, ceph, minio). +Other storage types can be added by implementing storage api interface. +Each library user can use more then one storage. All users storages form users dfs (distributed file system) +By default on system start have to be configured one system dfs where users profiles will be stored. +New user registers in datasafe directory service using his name and password. +Default user creation process consists of creation private profile, public profile, keystore with public keys, keystore with private keys. +Default location within system dfs: + /profiles + /private + /username - user's private profile + /public + /username - user's public profile + /users + /public + /pubkeys - keystore consists user's public key + /inbox - location of shared with user files + /private + /keystore - keystore consists user's private key + /files/SIV - location of private files. SIV is 3 symbol path encryption algorithm identifier. + +Example private profile: +``` + { + "keystore": { + "resource": "s3://adorsys-docusafe/users/username/private/keystore" + }, + "privateStorage": [ + [{"id": "DEFAULT"}, {"resource": "s3://adorsys-docusafe/users/username/private/files/"}] + ], + "inboxWithFullAccess": { + "resource": "s3://adorsys-docusafe/users/username/public/inbox/" + }, + "publishPublicKeysTo": { + "resource": "s3://adorsys-docusafe/users/username/public/pubkeys" + }, + "associatedResources": [ + {"resource": "s3://adorsys-docusafe/users/username/"} + ], + "documentVersionStorage": { + "resource": "s3://adorsys-docusafe/users/username/versions/" + }, + "appVersion": "BASELINE" + } +``` + +Example public profile: +``` + { + "publicKeys": { + "resource": "s3://adorsys-docusafe/users/username/public/pubkeys" + }, + "inbox": { + "resource": "s3://adorsys-docusafe/users/username/public/inbox/" + }, + "appVersion": "BASELINE" + } +``` + +## Keystore encryption +User personal password is used to access keystore. Password can be changed without the need of changing keystore content. +Default keystore prefix for generated keys is "KEYSTORE-ID-0" +Keystore contains secret keys for private files and path encryption, public/private key pairs for sharing files and +certificates for sign/verify files. +Keystore keeps secret keys, public/private key pairs and certificates. It secures them by encrypting content +with following default algorithms: +BCFKS keystore type is used +EncryptionAlgorithm AES256_KWP +PBKDFConfig PRF_SHA512 +MacAlgorithm HmacSHA3_512 + +## Private files encryption algoritm +Datasafe files uploaded by users are encrypted using 256-bit Advanced Encryption Standard +(AES). +For private files encryption AES algorithm is used with default key length 256 bit. +256_GCM wit default AES256_GCM + +default secret key algoritm PBEWithHmacSHA256AndAES_256 + +## Encryption used for file sharing +Datasafe uses CMS (crypto message syntax) standard for exchanging and sharing files. +For encryption used RSA public keys with key size 2048 "SHA256withRSA". Prefix in keystore "enc-" + keystoreID + UUID +Files can be shared with other clients of library whose inbox location is known. +Files can be shared simultaneously with any number of recipients. And it doesn't require repeating encryption for each recipient +due to support of multiple recipients from CMS standard. + +## File location encryption +Files can be stored in subdirectories. Each part of path encrypted separately using AES-GCM-SIV algorithm. +(Synthetic Initialization Vector) [RFC-845]("https://tools.ietf.org/html/rfc845"). +Default implementation of symmetric path encryption is integrity preserving which means that each invocation of +cipher(segment) yields same result. Additionally each segment is authenticated against its parent path hash (SHA-256 digest), so +attacker can't move a/file to b/file without being detected + +It requires 2 secret keys for path encryption/decryption. They stored inside keystore with prefixes "PATH_SECRET" for +S2V AES key used in Cipher-based Message Authentication Code(CMAC) mode and "PATH_CTR_SECRET_" for CTR AES key used in +counter mode. Both 256 bit size by default. +After encryption each path part concatenated to result encrypted path. +Example: +unencrypted file location: /path/to/file/document.pdf +encrypted location: /cipher(path)/cipher(to)/cipher(file)/cipher(document.pdf) +Such approach gives ability to list any directory without the need of decryption all files location. +Base64-urlsafe path serialization From 6383f9d43f431747a2a60b2190bc7be8c8ddd667 Mon Sep 17 00:00:00 2001 From: Maxim Grischenko Date: Tue, 22 Oct 2019 12:33:34 +0200 Subject: [PATCH 242/255] security whitepaper --- SECURITY.WHITEPAPER.md | 53 ++++++++++--------- .../DatasafeCryptoAlgorithm.java | 26 --------- 2 files changed, 29 insertions(+), 50 deletions(-) delete mode 100644 datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/cmsencryption/DatasafeCryptoAlgorithm.java diff --git a/SECURITY.WHITEPAPER.md b/SECURITY.WHITEPAPER.md index dc2d1da7c..662eb8bcf 100644 --- a/SECURITY.WHITEPAPER.md +++ b/SECURITY.WHITEPAPER.md @@ -2,15 +2,18 @@ ## General information Datasafe is a flexible encryption library. It uses different encryption algorithms. Some of them can be -configured by client application. It uses encryption algorithms provided by Bouncy Castle library by default. +configured by client application. It uses encryption algorithms provided by Bouncy Castle library by default. +CMS (crypto message syntax) standard [RFC5652](https://tools.ietf.org/html/rfc5652.html) employed for storing private +files encrypted with symmetric keys as well as for sharing files with other users using asymmetric key pairs. ## Default storage configuration -Datasafe library can operate with different type of storages: filesystem, datasabe, s3 compliant(amazon aws, ceph, minio). +Datasafe library can operate with different type of storages: filesystem, datasabe, s3 compatible(amazon aws, ceph, minio). Other storage types can be added by implementing storage api interface. -Each library user can use more then one storage. All users storages form users dfs (distributed file system) +Each library user can use more then one storage. All user storages form users dfs (distributed file system) By default on system start have to be configured one system dfs where users profiles will be stored. New user registers in datasafe directory service using his name and password. Default user creation process consists of creation private profile, public profile, keystore with public keys, keystore with private keys. +``` Default location within system dfs: /profiles /private @@ -24,7 +27,7 @@ Default location within system dfs: /private /keystore - keystore consists user's private key /files/SIV - location of private files. SIV is 3 symbol path encryption algorithm identifier. - +``` Example private profile: ``` { @@ -64,31 +67,33 @@ Example public profile: ``` ## Keystore encryption -User personal password is used to access keystore. Password can be changed without the need of changing keystore content. -Default keystore prefix for generated keys is "KEYSTORE-ID-0" +User personal password is used to access keystore. Password can be changed without the need of changing keystore content. +By default BCFKS keystore type is used. Keystore encryption algorithm is AES256_KWP. Password key derivation algorithm +PRF_SHA512 with salt length 32 and iteration count 20480, KeyStore authentication algorithm HmacSHA3_512, password-like +keys encryption algorithm is PBEWithHmacSHA256AndAES_256. +All this parameters can be changed by setting keystore config. For example instead of BCFKS keystore can be used UBER, +instead of PBKDF2 based routines can be used Scrypt based. Keystore contains secret keys for private files and path encryption, public/private key pairs for sharing files and certificates for sign/verify files. -Keystore keeps secret keys, public/private key pairs and certificates. It secures them by encrypting content -with following default algorithms: -BCFKS keystore type is used -EncryptionAlgorithm AES256_KWP -PBKDFConfig PRF_SHA512 -MacAlgorithm HmacSHA3_512 - -## Private files encryption algoritm -Datasafe files uploaded by users are encrypted using 256-bit Advanced Encryption Standard -(AES). -For private files encryption AES algorithm is used with default key length 256 bit. -256_GCM wit default AES256_GCM +Default keystore prefix for generated keys is "KEYSTORE-ID-0". Each signing and encryption key has unique alias which +is formed from keystore prefix plus UUID. -default secret key algoritm PBEWithHmacSHA256AndAES_256 +## Private files encryption algoritm +Datasafe files uploaded by users in private area are encrypted using symmetric key 256-bit Advanced Encryption Standard (AES). +By default GCM operation mode is used. +Can be configured to use another encryption algorithm. Datasafe supports AES algorithms with 128, 192 and 256 key size +in operation modes CBC, CCM, GCM or WRAP. Also supported CHACHA20_POLY1305 algorithm. +Default key prefix is "PRIVATE_SECRET" +Encrypted data wrapped into CMS standard envelope which contents information about key ID and algorithm used for encryption. +[RFC5652 section-6.2.3](http://tools.ietf.org/html/rfc5652#section-6.2.3) ## Encryption used for file sharing -Datasafe uses CMS (crypto message syntax) standard for exchanging and sharing files. -For encryption used RSA public keys with key size 2048 "SHA256withRSA". Prefix in keystore "enc-" + keystoreID + UUID -Files can be shared with other clients of library whose inbox location is known. +Datasafe uses CMS for exchanging and sharing files. Public key is used to encrypt content-encryption key which is then +stored inside cms envelope with other meta information like key alias and date. Receiver decrypts content-encryption +key with his private key. By default used RSA public keys with key size 2048 "SHA256withRSA". Prefix in keystore +"enc-" + keystoreID + UUID. Files can be shared with other clients of library whose inbox location is known. Files can be shared simultaneously with any number of recipients. And it doesn't require repeating encryption for each recipient -due to support of multiple recipients from CMS standard. +due to support of multiple recipients from CMS standard. Anyone can send file to user's inbox if his inbox location is known. ## File location encryption Files can be stored in subdirectories. Each part of path encrypted separately using AES-GCM-SIV algorithm. @@ -105,4 +110,4 @@ Example: unencrypted file location: /path/to/file/document.pdf encrypted location: /cipher(path)/cipher(to)/cipher(file)/cipher(document.pdf) Such approach gives ability to list any directory without the need of decryption all files location. -Base64-urlsafe path serialization +Resulting encrypted path string is Base64-urlsafe. diff --git a/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/cmsencryption/DatasafeCryptoAlgorithm.java b/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/cmsencryption/DatasafeCryptoAlgorithm.java deleted file mode 100644 index ca161494b..000000000 --- a/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/cmsencryption/DatasafeCryptoAlgorithm.java +++ /dev/null @@ -1,26 +0,0 @@ -package de.adorsys.datasafe.encrypiton.impl.cmsencryption; - -import lombok.experimental.UtilityClass; -import org.bouncycastle.asn1.ASN1ObjectIdentifier; -import org.bouncycastle.asn1.nist.NISTObjectIdentifiers; - -/** - * Usable crypto-algorithms registry. - */ -@UtilityClass -public class DatasafeCryptoAlgorithm { - - // Asymmetric algorithms - public static final ASN1ObjectIdentifier AES128_CBC = NISTObjectIdentifiers.id_aes128_CBC.intern(); - public static final ASN1ObjectIdentifier AES192_CBC = NISTObjectIdentifiers.id_aes192_CBC.intern(); - public static final ASN1ObjectIdentifier AES256_CBC = NISTObjectIdentifiers.id_aes256_CBC.intern(); - public static final ASN1ObjectIdentifier AES128_CCM = NISTObjectIdentifiers.id_aes128_CCM.intern(); - public static final ASN1ObjectIdentifier AES192_CCM = NISTObjectIdentifiers.id_aes192_CCM.intern(); - public static final ASN1ObjectIdentifier AES256_CCM = NISTObjectIdentifiers.id_aes256_CCM.intern(); - public static final ASN1ObjectIdentifier AES128_GCM = NISTObjectIdentifiers.id_aes128_GCM.intern(); - public static final ASN1ObjectIdentifier AES192_GCM = NISTObjectIdentifiers.id_aes192_GCM.intern(); - public static final ASN1ObjectIdentifier AES256_GCM = NISTObjectIdentifiers.id_aes256_GCM.intern(); - public static final ASN1ObjectIdentifier AES128_WRAP = NISTObjectIdentifiers.id_aes128_wrap.intern(); - public static final ASN1ObjectIdentifier AES192_WRAP = NISTObjectIdentifiers.id_aes192_wrap.intern(); - public static final ASN1ObjectIdentifier AES256_WRAP = NISTObjectIdentifiers.id_aes256_wrap.intern(); -} From 4dc447378e236c45a822de1526c63bc0d99f3cd2 Mon Sep 17 00:00:00 2001 From: Maxim Grischenko Date: Tue, 22 Oct 2019 12:51:25 +0200 Subject: [PATCH 243/255] link to whitepaper moved up --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 646c16822..705c68d96 100644 --- a/README.md +++ b/README.md @@ -22,6 +22,8 @@ wants to share into users' inbox space using the recipients' public key so that - For storage systems that do not support file versioning natively (i.e. minio) this library provides versioning capability too. +Details about used encryption algorithms can be found in [security whitepaper](SECURITY.WHITEPAPER.md). + ## Features - Proprietary software **friendly license** @@ -212,8 +214,6 @@ inbox and private space virtual folders - you get similar actions available from Additionally, for file versioning purposes like reading only last file version, there is [versioned privatespace](datasafe-business/src/main/java/de/adorsys/datasafe/business/impl/service/VersionedDatasafeServices.java) that supports versioned and encrypted private file storage (for storage providers that do not support versioning). -Details about used encryption algorithms can be found in [security whitepaper](SECURITY.WHITEPAPER.md). - # How it works ## Library modules From 35ad44ee8d6ef2a630e2043b3f1f77582b577ffb Mon Sep 17 00:00:00 2001 From: Maxim Grischenko Date: Tue, 22 Oct 2019 14:06:31 +0200 Subject: [PATCH 244/255] whitepaper changes --- SECURITY.WHITEPAPER.md | 32 +++++++++++++++++++------------- 1 file changed, 19 insertions(+), 13 deletions(-) diff --git a/SECURITY.WHITEPAPER.md b/SECURITY.WHITEPAPER.md index 662eb8bcf..491e10139 100644 --- a/SECURITY.WHITEPAPER.md +++ b/SECURITY.WHITEPAPER.md @@ -2,12 +2,12 @@ ## General information Datasafe is a flexible encryption library. It uses different encryption algorithms. Some of them can be -configured by client application. It uses encryption algorithms provided by Bouncy Castle library by default. -CMS (crypto message syntax) standard [RFC5652](https://tools.ietf.org/html/rfc5652.html) employed for storing private +configured by client application. Under the hood Datasafe uses BouncyCastle library to perform encryption. +CMS (Cryptographic Message Syntax) standard [RFC5652](https://tools.ietf.org/html/rfc5652.html) employed for storing private files encrypted with symmetric keys as well as for sharing files with other users using asymmetric key pairs. ## Default storage configuration -Datasafe library can operate with different type of storages: filesystem, datasabe, s3 compatible(amazon aws, ceph, minio). +Datasafe library can operate with different type of storages: filesystem, database, s3 compatible(amazon aws, ceph, minio). Other storage types can be added by implementing storage api interface. Each library user can use more then one storage. All user storages form users dfs (distributed file system) By default on system start have to be configured one system dfs where users profiles will be stored. @@ -67,14 +67,20 @@ Example public profile: ``` ## Keystore encryption -User personal password is used to access keystore. Password can be changed without the need of changing keystore content. -By default BCFKS keystore type is used. Keystore encryption algorithm is AES256_KWP. Password key derivation algorithm -PRF_SHA512 with salt length 32 and iteration count 20480, KeyStore authentication algorithm HmacSHA3_512, password-like -keys encryption algorithm is PBEWithHmacSHA256AndAES_256. +System wide password is used to open keystore and users' personal password to read users' keys. Password can be changed +without the need of changing keystore content. +By default used: +- BCFKS keystore type to store on disk and UBER to cache keys in memory; +- keystore encryption algorithm is AES256_KWP; +- password key derivation algorithm PRF_SHA512; +- salt length 32 bytes; +- iteration count 20480; +- keystore authentication algorithm HmacSHA3_512; +- password-like keys encryption algorithm is PBEWithHmacSHA256AndAES_256. + All this parameters can be changed by setting keystore config. For example instead of BCFKS keystore can be used UBER, instead of PBKDF2 based routines can be used Scrypt based. -Keystore contains secret keys for private files and path encryption, public/private key pairs for sharing files and -certificates for sign/verify files. +Keystore contains secret keys for private files and path encryption, public/private key pairs for sharing files. Default keystore prefix for generated keys is "KEYSTORE-ID-0". Each signing and encryption key has unique alias which is formed from keystore prefix plus UUID. @@ -82,7 +88,8 @@ is formed from keystore prefix plus UUID. Datasafe files uploaded by users in private area are encrypted using symmetric key 256-bit Advanced Encryption Standard (AES). By default GCM operation mode is used. Can be configured to use another encryption algorithm. Datasafe supports AES algorithms with 128, 192 and 256 key size -in operation modes CBC, CCM, GCM or WRAP. Also supported CHACHA20_POLY1305 algorithm. +in operation modes CBC, CCM, GCM or WRAP. For the cases when large amounts of data (> 300GB) are going to be stored one +should prefer CHACHA20_POLY1305 that is also available. Default key prefix is "PRIVATE_SECRET" Encrypted data wrapped into CMS standard envelope which contents information about key ID and algorithm used for encryption. [RFC5652 section-6.2.3](http://tools.ietf.org/html/rfc5652#section-6.2.3) @@ -98,9 +105,8 @@ due to support of multiple recipients from CMS standard. Anyone can send file to ## File location encryption Files can be stored in subdirectories. Each part of path encrypted separately using AES-GCM-SIV algorithm. (Synthetic Initialization Vector) [RFC-845]("https://tools.ietf.org/html/rfc845"). -Default implementation of symmetric path encryption is integrity preserving which means that each invocation of -cipher(segment) yields same result. Additionally each segment is authenticated against its parent path hash (SHA-256 digest), so -attacker can't move a/file to b/file without being detected +Default implementation of symmetric path encryption is integrity preserving which means that each segment is +authenticated against its parent path hash (SHA-256 digest), so attacker can't move a/file to b/file without being detected. It requires 2 secret keys for path encryption/decryption. They stored inside keystore with prefixes "PATH_SECRET" for S2V AES key used in Cipher-based Message Authentication Code(CMAC) mode and "PATH_CTR_SECRET_" for CTR AES key used in From eadcd1114cb1b677700c32743e47404d88040e12 Mon Sep 17 00:00:00 2001 From: Maxim Grischenko Date: Tue, 22 Oct 2019 15:07:33 +0200 Subject: [PATCH 245/255] whitepaper changes --- SECURITY.WHITEPAPER.md | 62 ++++++++++++++++++++++++------------------ 1 file changed, 36 insertions(+), 26 deletions(-) diff --git a/SECURITY.WHITEPAPER.md b/SECURITY.WHITEPAPER.md index 491e10139..61678fad4 100644 --- a/SECURITY.WHITEPAPER.md +++ b/SECURITY.WHITEPAPER.md @@ -3,18 +3,16 @@ ## General information Datasafe is a flexible encryption library. It uses different encryption algorithms. Some of them can be configured by client application. Under the hood Datasafe uses BouncyCastle library to perform encryption. + CMS (Cryptographic Message Syntax) standard [RFC5652](https://tools.ietf.org/html/rfc5652.html) employed for storing private files encrypted with symmetric keys as well as for sharing files with other users using asymmetric key pairs. -## Default storage configuration -Datasafe library can operate with different type of storages: filesystem, database, s3 compatible(amazon aws, ceph, minio). -Other storage types can be added by implementing storage api interface. -Each library user can use more then one storage. All user storages form users dfs (distributed file system) -By default on system start have to be configured one system dfs where users profiles will be stored. -New user registers in datasafe directory service using his name and password. -Default user creation process consists of creation private profile, public profile, keystore with public keys, keystore with private keys. -``` +## Default locations +By default on system start have to be configured one system dfs (distributed file system). +It is used for storing users' private profile, public profile, keystore with public keys, keystore with private keys. + Default location within system dfs: +``` /profiles /private /username - user's private profile @@ -32,22 +30,22 @@ Example private profile: ``` { "keystore": { - "resource": "s3://adorsys-docusafe/users/username/private/keystore" + "resource": "s3://bucketname/users/username/private/keystore" }, "privateStorage": [ - [{"id": "DEFAULT"}, {"resource": "s3://adorsys-docusafe/users/username/private/files/"}] + [{"id": "DEFAULT"}, {"resource": "s3://bucketname/users/username/private/files/"}] ], "inboxWithFullAccess": { - "resource": "s3://adorsys-docusafe/users/username/public/inbox/" + "resource": "s3://bucketname/users/username/public/inbox/" }, "publishPublicKeysTo": { - "resource": "s3://adorsys-docusafe/users/username/public/pubkeys" + "resource": "s3://bucketname/users/username/public/pubkeys" }, "associatedResources": [ - {"resource": "s3://adorsys-docusafe/users/username/"} + {"resource": "s3://bucketname/users/username/"} ], "documentVersionStorage": { - "resource": "s3://adorsys-docusafe/users/username/versions/" + "resource": "s3://bucketname/users/username/versions/" }, "appVersion": "BASELINE" } @@ -57,10 +55,10 @@ Example public profile: ``` { "publicKeys": { - "resource": "s3://adorsys-docusafe/users/username/public/pubkeys" + "resource": "s3://bucketname/users/username/public/pubkeys" }, "inbox": { - "resource": "s3://adorsys-docusafe/users/username/public/inbox/" + "resource": "s3://bucketname/users/username/public/inbox/" }, "appVersion": "BASELINE" } @@ -80,16 +78,22 @@ By default used: All this parameters can be changed by setting keystore config. For example instead of BCFKS keystore can be used UBER, instead of PBKDF2 based routines can be used Scrypt based. + Keystore contains secret keys for private files and path encryption, public/private key pairs for sharing files. -Default keystore prefix for generated keys is "KEYSTORE-ID-0". Each signing and encryption key has unique alias which -is formed from keystore prefix plus UUID. + +Default keystore prefix for generated keys is "KEYSTORE-ID-0". + +Each signing and encryption key has unique alias which is formed from keystore prefix plus UUID. ## Private files encryption algoritm Datasafe files uploaded by users in private area are encrypted using symmetric key 256-bit Advanced Encryption Standard (AES). -By default GCM operation mode is used. + +By default GCM (Galois counter mode) operation mode is used. It is considered best practice to use authenticated +encryption modes such as CCM or GCM in preference to CBC. It prevent attacks coming from fake or tampered ciphertexts. + Can be configured to use another encryption algorithm. Datasafe supports AES algorithms with 128, 192 and 256 key size -in operation modes CBC, CCM, GCM or WRAP. For the cases when large amounts of data (> 300GB) are going to be stored one -should prefer CHACHA20_POLY1305 that is also available. +in operation modes CBC (Cipher-block chaining), CCM (CBC-MAC), GCM or WRAP (Key Wrap). For the cases when +large amounts of data (> 300GB) are going to be stored one should prefer CHACHA20_POLY1305 that is also available. Default key prefix is "PRIVATE_SECRET" Encrypted data wrapped into CMS standard envelope which contents information about key ID and algorithm used for encryption. [RFC5652 section-6.2.3](http://tools.ietf.org/html/rfc5652#section-6.2.3) @@ -97,23 +101,29 @@ Encrypted data wrapped into CMS standard envelope which contents information abo ## Encryption used for file sharing Datasafe uses CMS for exchanging and sharing files. Public key is used to encrypt content-encryption key which is then stored inside cms envelope with other meta information like key alias and date. Receiver decrypts content-encryption -key with his private key. By default used RSA public keys with key size 2048 "SHA256withRSA". Prefix in keystore -"enc-" + keystoreID + UUID. Files can be shared with other clients of library whose inbox location is known. +key with his private key. By default used RSA public keys with key size 2048 "SHA256withRSA". For data encryption used +AES GCM 256 symmetric key. Prefix in keystore "enc-" + keystoreID + UUID. Files can be shared with other clients of +library whose inbox location is known. + Files can be shared simultaneously with any number of recipients. And it doesn't require repeating encryption for each recipient due to support of multiple recipients from CMS standard. Anyone can send file to user's inbox if his inbox location is known. ## File location encryption Files can be stored in subdirectories. Each part of path encrypted separately using AES-GCM-SIV algorithm. -(Synthetic Initialization Vector) [RFC-845]("https://tools.ietf.org/html/rfc845"). +(Synthetic Initialization Vector) [RFC-845](https://tools.ietf.org/html/rfc845). + Default implementation of symmetric path encryption is integrity preserving which means that each segment is authenticated against its parent path hash (SHA-256 digest), so attacker can't move a/file to b/file without being detected. It requires 2 secret keys for path encryption/decryption. They stored inside keystore with prefixes "PATH_SECRET" for S2V AES key used in Cipher-based Message Authentication Code(CMAC) mode and "PATH_CTR_SECRET_" for CTR AES key used in counter mode. Both 256 bit size by default. + After encryption each path part concatenated to result encrypted path. + Example: -unencrypted file location: /path/to/file/document.pdf -encrypted location: /cipher(path)/cipher(to)/cipher(file)/cipher(document.pdf) +- unencrypted file location: /path/to/file/document.pdf +- encrypted location: /cipher(path)/cipher(to)/cipher(file)/cipher(document.pdf) + Such approach gives ability to list any directory without the need of decryption all files location. Resulting encrypted path string is Base64-urlsafe. From d5e4ea7f31e5217dd5956d383f98708bf476d6a2 Mon Sep 17 00:00:00 2001 From: Maxim Grischenko Date: Tue, 22 Oct 2019 16:25:31 +0200 Subject: [PATCH 246/255] whitepaper examples collapsible --- SECURITY.WHITEPAPER.md | 54 +++++++++++++++++++++++++----------------- 1 file changed, 32 insertions(+), 22 deletions(-) diff --git a/SECURITY.WHITEPAPER.md b/SECURITY.WHITEPAPER.md index 61678fad4..53136cc41 100644 --- a/SECURITY.WHITEPAPER.md +++ b/SECURITY.WHITEPAPER.md @@ -8,25 +8,31 @@ CMS (Cryptographic Message Syntax) standard [RFC5652](https://tools.ietf.org/htm files encrypted with symmetric keys as well as for sharing files with other users using asymmetric key pairs. ## Default locations -By default on system start have to be configured one system dfs (distributed file system). -It is used for storing users' private profile, public profile, keystore with public keys, keystore with private keys. - -Default location within system dfs: -``` - /profiles - /private - /username - user's private profile - /public - /username - user's public profile - /users - /public - /pubkeys - keystore consists user's public key - /inbox - location of shared with user files - /private - /keystore - keystore consists user's private key - /files/SIV - location of private files. SIV is 3 symbol path encryption algorithm identifier. -``` -Example private profile: +To maintain information where user data resides, Datasafe uses concept of user profile. There are two types of user +profile: private and public + +

+ Default location within system dfs + + ``` + /profiles + /private + /username - user's private profile + /public + /username - user's public profile + /users + /public + /pubkeys - keystore consists user's public key + /inbox - location of shared with user files + /private + /keystore - keystore consists user's private key + /files/SIV - location of private files. SIV is 3 symbol path encryption algorithm identifier. + ``` +
+ +
+ Example private profile: + ``` { "keystore": { @@ -50,8 +56,11 @@ Example private profile: "appVersion": "BASELINE" } ``` - -Example public profile: +
+ +
+ Example public profile: + ``` { "publicKeys": { @@ -63,7 +72,8 @@ Example public profile: "appVersion": "BASELINE" } ``` - +
+ ## Keystore encryption System wide password is used to open keystore and users' personal password to read users' keys. Password can be changed without the need of changing keystore content. From 171997a5b55821dad87f95476b6ba79e6839e83e Mon Sep 17 00:00:00 2001 From: Maxim Grischenko Date: Tue, 22 Oct 2019 17:45:42 +0200 Subject: [PATCH 247/255] whitepaper update --- SECURITY.WHITEPAPER.md | 31 +++++++++++++------------------ 1 file changed, 13 insertions(+), 18 deletions(-) diff --git a/SECURITY.WHITEPAPER.md b/SECURITY.WHITEPAPER.md index 53136cc41..611422f06 100644 --- a/SECURITY.WHITEPAPER.md +++ b/SECURITY.WHITEPAPER.md @@ -14,7 +14,6 @@ profile: private and public
Default location within system dfs - ``` /profiles /private /username - user's private profile @@ -27,13 +26,11 @@ profile: private and public /private /keystore - keystore consists user's private key /files/SIV - location of private files. SIV is 3 symbol path encryption algorithm identifier. - ```
Example private profile: -``` { "keystore": { "resource": "s3://bucketname/users/username/private/keystore" @@ -55,13 +52,11 @@ profile: private and public }, "appVersion": "BASELINE" } -```
Example public profile: -``` { "publicKeys": { "resource": "s3://bucketname/users/username/public/pubkeys" @@ -71,28 +66,30 @@ profile: private and public }, "appVersion": "BASELINE" } -```
## Keystore encryption System wide password is used to open keystore and users' personal password to read users' keys. Password can be changed without the need of changing keystore content. -By default used: -- BCFKS keystore type to store on disk and UBER to cache keys in memory; +By default used BCFKS keystore type to store on disk with: - keystore encryption algorithm is AES256_KWP; - password key derivation algorithm PRF_SHA512; - salt length 32 bytes; - iteration count 20480; -- keystore authentication algorithm HmacSHA3_512; +- keystore authentication algorithm HmacSHA3_512 (protects keystore from tampering); - password-like keys encryption algorithm is PBEWithHmacSHA256AndAES_256. +UBER is used to cache keys in memory. Despite UBER keystore protected worse than BCFKS it has better performance and +is a good choice to cache keys in memory. Anyway if someone gets to memory dump of machine there is really not that +much can be done to protect application. +[UBER algorithms decription](https://cryptosense.com/blog/bouncycastle-keystore-security/). + + All this parameters can be changed by setting keystore config. For example instead of BCFKS keystore can be used UBER, -instead of PBKDF2 based routines can be used Scrypt based. +instead of PBKDF2 (Password-Based Key Derivation Function) ) based routines can be used Scrypt based. Keystore contains secret keys for private files and path encryption, public/private key pairs for sharing files. -Default keystore prefix for generated keys is "KEYSTORE-ID-0". - Each signing and encryption key has unique alias which is formed from keystore prefix plus UUID. ## Private files encryption algoritm @@ -104,7 +101,6 @@ encryption modes such as CCM or GCM in preference to CBC. It prevent attacks com Can be configured to use another encryption algorithm. Datasafe supports AES algorithms with 128, 192 and 256 key size in operation modes CBC (Cipher-block chaining), CCM (CBC-MAC), GCM or WRAP (Key Wrap). For the cases when large amounts of data (> 300GB) are going to be stored one should prefer CHACHA20_POLY1305 that is also available. -Default key prefix is "PRIVATE_SECRET" Encrypted data wrapped into CMS standard envelope which contents information about key ID and algorithm used for encryption. [RFC5652 section-6.2.3](http://tools.ietf.org/html/rfc5652#section-6.2.3) @@ -112,8 +108,7 @@ Encrypted data wrapped into CMS standard envelope which contents information abo Datasafe uses CMS for exchanging and sharing files. Public key is used to encrypt content-encryption key which is then stored inside cms envelope with other meta information like key alias and date. Receiver decrypts content-encryption key with his private key. By default used RSA public keys with key size 2048 "SHA256withRSA". For data encryption used -AES GCM 256 symmetric key. Prefix in keystore "enc-" + keystoreID + UUID. Files can be shared with other clients of -library whose inbox location is known. +AES GCM 256 symmetric key. Files can be shared with other clients of library whose inbox location is known. Files can be shared simultaneously with any number of recipients. And it doesn't require repeating encryption for each recipient due to support of multiple recipients from CMS standard. Anyone can send file to user's inbox if his inbox location is known. @@ -125,9 +120,9 @@ Files can be stored in subdirectories. Each part of path encrypted separately us Default implementation of symmetric path encryption is integrity preserving which means that each segment is authenticated against its parent path hash (SHA-256 digest), so attacker can't move a/file to b/file without being detected. -It requires 2 secret keys for path encryption/decryption. They stored inside keystore with prefixes "PATH_SECRET" for -S2V AES key used in Cipher-based Message Authentication Code(CMAC) mode and "PATH_CTR_SECRET_" for CTR AES key used in -counter mode. Both 256 bit size by default. +It requires 2 secret keys for path encryption/decryption (both 256 bit size by default): +- S2V AES key used in CMAC (Cipher-based Message Authentication Code) mode +- CTR AES key used in counter mode. After encryption each path part concatenated to result encrypted path. From 0a2c6f6bbb8a80461222b102cb15e994ece8ac5b Mon Sep 17 00:00:00 2001 From: Maxim Grischenko Date: Tue, 22 Oct 2019 18:10:52 +0200 Subject: [PATCH 248/255] whitepaper update --- SECURITY.WHITEPAPER.md | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/SECURITY.WHITEPAPER.md b/SECURITY.WHITEPAPER.md index 611422f06..e8b13c10a 100644 --- a/SECURITY.WHITEPAPER.md +++ b/SECURITY.WHITEPAPER.md @@ -79,11 +79,15 @@ By default used BCFKS keystore type to store on disk with: - keystore authentication algorithm HmacSHA3_512 (protects keystore from tampering); - password-like keys encryption algorithm is PBEWithHmacSHA256AndAES_256. -UBER is used to cache keys in memory. Despite UBER keystore protected worse than BCFKS it has better performance and -is a good choice to cache keys in memory. Anyway if someone gets to memory dump of machine there is really not that -much can be done to protect application. -[UBER algorithms decription](https://cryptosense.com/blog/bouncycastle-keystore-security/). - +UBER keystore type is used to cache keys in memory +([algorithms details](https://cryptosense.com/blog/bouncycastle-keystore-security/)). +Despite UBER keystore protected worse than BCFKS it has better performance and still a good choice to cache keys in memory. +Anyway if someone gets to memory dump of machine there is really not that much can be done to protect application. + +UBER parameters: +- keys encryption algorithm is PBEWithSHAAnd3-KeyTripleDES-CBC; +- salt length 20 bytes; +- iteration count random(1024, 2047). All this parameters can be changed by setting keystore config. For example instead of BCFKS keystore can be used UBER, instead of PBKDF2 (Password-Based Key Derivation Function) ) based routines can be used Scrypt based. From 1f6c8a961ebd73735bcd9e90c4b69645a67573cd Mon Sep 17 00:00:00 2001 From: Maxim Grischenko Date: Wed, 23 Oct 2019 11:52:06 +0200 Subject: [PATCH 249/255] whitepaper fix --- SECURITY.WHITEPAPER.md | 25 ++++++++++++++++++++----- 1 file changed, 20 insertions(+), 5 deletions(-) diff --git a/SECURITY.WHITEPAPER.md b/SECURITY.WHITEPAPER.md index e8b13c10a..66195fd07 100644 --- a/SECURITY.WHITEPAPER.md +++ b/SECURITY.WHITEPAPER.md @@ -1,11 +1,27 @@ # Datasafe Security Whitepaper +Keystore + +* [BCFKS](#Keystore-encryption) - to store keystores (AES256_KWP, PRF_SHA512, PBEWithHmacSHA256AndAES_256) +* [UBER](#Keystore-encryption) - to cache keys in memory (PBEWithSHAAnd3-KeyTripleDES-CBC) + +Path encryption + +* [AES-GCM-SIV](#File-location-encryption) + +CMS Encryption + +* [AES256_GCM, CHACHA20_POLY1305, SHA256withRSA](#Private-files-encryption-algoritm) + ## General information Datasafe is a flexible encryption library. It uses different encryption algorithms. Some of them can be configured by client application. Under the hood Datasafe uses BouncyCastle library to perform encryption. CMS (Cryptographic Message Syntax) standard [RFC5652](https://tools.ietf.org/html/rfc5652.html) employed for storing private -files encrypted with symmetric keys as well as for sharing files with other users using asymmetric key pairs. +files encrypted with symmetric keys as well as for sharing files with other users using asymmetric key pairs. + +Encryption algorithms are customizable by [Encryption config](datasafe-encryption/datasafe-encryption-api/src/main/java/de/adorsys/datasafe/encrypiton/api/types/encryption/EncryptionConfig.java). +It combines configs which describe parameters of keystore, keys inside keystore and cms. ## Default locations To maintain information where user data resides, Datasafe uses concept of user profile. There are two types of user @@ -89,13 +105,12 @@ UBER parameters: - salt length 20 bytes; - iteration count random(1024, 2047). -All this parameters can be changed by setting keystore config. For example instead of BCFKS keystore can be used UBER, -instead of PBKDF2 (Password-Based Key Derivation Function) ) based routines can be used Scrypt based. +All this parameters can be changed by setting [keystore config](datasafe-encryption/datasafe-encryption-api/src/main/java/de/adorsys/datasafe/encrypiton/api/types/encryption/KeyStoreConfig.java). +For example instead of BCFKS keystore can be used UBER, instead of PBKDF2 (Password-Based Key Derivation Function) +based routines can be used Scrypt based. Keystore contains secret keys for private files and path encryption, public/private key pairs for sharing files. -Each signing and encryption key has unique alias which is formed from keystore prefix plus UUID. - ## Private files encryption algoritm Datasafe files uploaded by users in private area are encrypted using symmetric key 256-bit Advanced Encryption Standard (AES). From 00c41bae9cd4cb4166e5d11384279a6301643d29 Mon Sep 17 00:00:00 2001 From: Maxim Grischenko Date: Wed, 23 Oct 2019 15:59:17 +0200 Subject: [PATCH 250/255] whitepaper fix --- SECURITY.WHITEPAPER.md | 10 +++++----- .../pathencryption/PathSegmentEncryptorDecryptor.java | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/SECURITY.WHITEPAPER.md b/SECURITY.WHITEPAPER.md index 66195fd07..280d0d251 100644 --- a/SECURITY.WHITEPAPER.md +++ b/SECURITY.WHITEPAPER.md @@ -7,14 +7,14 @@ Keystore Path encryption -* [AES-GCM-SIV](#File-location-encryption) +* [AES-SIV](#File-location-encryption) CMS Encryption -* [AES256_GCM, CHACHA20_POLY1305, SHA256withRSA](#Private-files-encryption-algoritm) +* [AES256_GCM, CHACHA20_POLY1305, PBKDF2, SHA256withRSA](#Private-files-encryption-algoritm) ## General information -Datasafe is a flexible encryption library. It uses different encryption algorithms. Some of them can be +Datasafe is a flexible encryption library. It uses different encryption algorithms. They can be configured by client application. Under the hood Datasafe uses BouncyCastle library to perform encryption. CMS (Cryptographic Message Syntax) standard [RFC5652](https://tools.ietf.org/html/rfc5652.html) employed for storing private @@ -133,13 +133,13 @@ Files can be shared simultaneously with any number of recipients. And it doesn't due to support of multiple recipients from CMS standard. Anyone can send file to user's inbox if his inbox location is known. ## File location encryption -Files can be stored in subdirectories. Each part of path encrypted separately using AES-GCM-SIV algorithm. +Files can be stored in subdirectories. Each part of path encrypted separately using AES-SIV algorithm. (Synthetic Initialization Vector) [RFC-845](https://tools.ietf.org/html/rfc845). Default implementation of symmetric path encryption is integrity preserving which means that each segment is authenticated against its parent path hash (SHA-256 digest), so attacker can't move a/file to b/file without being detected. -It requires 2 secret keys for path encryption/decryption (both 256 bit size by default): +It requires 2 secret keys for path encryption/decryption (both 256 bit key size by default, block size 128 bit): - S2V AES key used in CMAC (Cipher-based Message Authentication Code) mode - CTR AES key used in counter mode. diff --git a/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/pathencryption/PathSegmentEncryptorDecryptor.java b/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/pathencryption/PathSegmentEncryptorDecryptor.java index 9004d2478..1d0658f0d 100644 --- a/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/pathencryption/PathSegmentEncryptorDecryptor.java +++ b/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/pathencryption/PathSegmentEncryptorDecryptor.java @@ -9,7 +9,7 @@ import javax.inject.Inject; /** - * Default path encryption/decryption that uses AES-GCM-SIV mode. + * Default path encryption/decryption that uses AES-SIV mode. * * @see RFC-845 * Using @see SIV-MODE library for encryption and decryption From fe900694b748f911a5f4877f7cd0dfd4bb68b5af Mon Sep 17 00:00:00 2001 From: Maxim Grischenko Date: Wed, 23 Oct 2019 18:01:03 +0200 Subject: [PATCH 251/255] whitepaper fix --- SECURITY.WHITEPAPER.md | 11 +++++++---- .../datasafe/rest/impl/config/DatasafeConfig.java | 2 +- .../datasafe/rest/impl/config/DatasafeProperties.java | 2 -- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/SECURITY.WHITEPAPER.md b/SECURITY.WHITEPAPER.md index 280d0d251..a3d0ebee1 100644 --- a/SECURITY.WHITEPAPER.md +++ b/SECURITY.WHITEPAPER.md @@ -11,7 +11,8 @@ Path encryption CMS Encryption -* [AES256_GCM, CHACHA20_POLY1305, PBKDF2, SHA256withRSA](#Private-files-encryption-algoritm) +* [AES256_GCM, CHACHA20_POLY1305, AES256-WRAP](#Private-files-encryption-algoritm) - for private files +* [RSAES-PKCS1-v1_5, SHA256withRSA](#Encryption-used-for-file-sharing) - for sharing files ## General information Datasafe is a flexible encryption library. It uses different encryption algorithms. They can be @@ -120,12 +121,14 @@ encryption modes such as CCM or GCM in preference to CBC. It prevent attacks com Can be configured to use another encryption algorithm. Datasafe supports AES algorithms with 128, 192 and 256 key size in operation modes CBC (Cipher-block chaining), CCM (CBC-MAC), GCM or WRAP (Key Wrap). For the cases when large amounts of data (> 300GB) are going to be stored one should prefer CHACHA20_POLY1305 that is also available. -Encrypted data wrapped into CMS standard envelope which contents information about key ID and algorithm used for encryption. +Encrypted data wrapped into CMS standard envelope which contents information about key ID and algorithm used for encryption. +Key derivation algorithm is AES256-WRAP (OID 2.16.840.1.101.3.4.1.45) [RFC5652 section-6.2.3](http://tools.ietf.org/html/rfc5652#section-6.2.3) ## Encryption used for file sharing -Datasafe uses CMS for exchanging and sharing files. Public key is used to encrypt content-encryption key which is then -stored inside cms envelope with other meta information like key alias and date. Receiver decrypts content-encryption +Datasafe uses CMS for exchanging and sharing files. Public key is used to create content-encryption key using +RSAES-PKCS1-v1_5 (OID 1.2.840.113549.1.1.1) algorithm. Public key then stored inside cms envelope with other meta +information like key alias and date. Receiver decrypts content-encryption key with his private key. By default used RSA public keys with key size 2048 "SHA256withRSA". For data encryption used AES GCM 256 symmetric key. Files can be shared with other clients of library whose inbox location is known. diff --git a/datasafe-rest-impl/src/main/java/de/adorsys/datasafe/rest/impl/config/DatasafeConfig.java b/datasafe-rest-impl/src/main/java/de/adorsys/datasafe/rest/impl/config/DatasafeConfig.java index 8864b8e79..950917e64 100644 --- a/datasafe-rest-impl/src/main/java/de/adorsys/datasafe/rest/impl/config/DatasafeConfig.java +++ b/datasafe-rest-impl/src/main/java/de/adorsys/datasafe/rest/impl/config/DatasafeConfig.java @@ -93,7 +93,7 @@ OverridesRegistry withClientCredentialsOverrides() { @Bean @ConditionalOnMissingBean(DFSConfig.class) DFSConfig multiDfsConfig(DatasafeProperties properties) { - return new MultiDFSConfig(URI.create(properties.getSystemRoot()), URI.create(properties.getDbProfilePath()), + return new MultiDFSConfig(URI.create(properties.getSystemRoot()), URI.create(properties.getDbUrl()), new ReadStorePassword(properties.getKeystorePassword())); } diff --git a/datasafe-rest-impl/src/main/java/de/adorsys/datasafe/rest/impl/config/DatasafeProperties.java b/datasafe-rest-impl/src/main/java/de/adorsys/datasafe/rest/impl/config/DatasafeProperties.java index 065385dd5..ddd7e8e01 100644 --- a/datasafe-rest-impl/src/main/java/de/adorsys/datasafe/rest/impl/config/DatasafeProperties.java +++ b/datasafe-rest-impl/src/main/java/de/adorsys/datasafe/rest/impl/config/DatasafeProperties.java @@ -24,8 +24,6 @@ public class DatasafeProperties { */ private String keystorePassword; - private String dbProfilePath; - private String amazonUrl; private String amazonAccessKeyID; private String amazonSecretAccessKey; From bb10f1a5b21635bbb194c13a58d40306731953ed Mon Sep 17 00:00:00 2001 From: Maxim Grischenko Date: Thu, 24 Oct 2019 09:41:52 +0200 Subject: [PATCH 252/255] whitepaper formatting fixes --- SECURITY.WHITEPAPER.md | 36 +++++++++---------- .../datasafe-examples-business/README.md | 6 ++-- 2 files changed, 21 insertions(+), 21 deletions(-) diff --git a/SECURITY.WHITEPAPER.md b/SECURITY.WHITEPAPER.md index a3d0ebee1..e7f4c7229 100644 --- a/SECURITY.WHITEPAPER.md +++ b/SECURITY.WHITEPAPER.md @@ -2,17 +2,17 @@ Keystore -* [BCFKS](#Keystore-encryption) - to store keystores (AES256_KWP, PRF_SHA512, PBEWithHmacSHA256AndAES_256) -* [UBER](#Keystore-encryption) - to cache keys in memory (PBEWithSHAAnd3-KeyTripleDES-CBC) +* [BCFKS](#Keystore-encryption) - to store keystores (AES256_KWP, PRF_SHA512, PBEWithHmacSHA256AndAES_256) +* [UBER](#Keystore-encryption) - to cache keys in memory (PBEWithSHAAnd3-KeyTripleDES-CBC) Path encryption -* [AES-SIV](#File-location-encryption) +* [AES-SIV](#File-location-encryption) CMS Encryption -* [AES256_GCM, CHACHA20_POLY1305, AES256-WRAP](#Private-files-encryption-algoritm) - for private files -* [RSAES-PKCS1-v1_5, SHA256withRSA](#Encryption-used-for-file-sharing) - for sharing files +* [AES256_GCM, CHACHA20_POLY1305, AES256-WRAP](#Private-files-encryption-algoritm) - for private files +* [RSAES-PKCS1-v1_5, SHA256withRSA](#Encryption-used-for-file-sharing) - for sharing files ## General information Datasafe is a flexible encryption library. It uses different encryption algorithms. They can be @@ -89,12 +89,12 @@ profile: private and public System wide password is used to open keystore and users' personal password to read users' keys. Password can be changed without the need of changing keystore content. By default used BCFKS keystore type to store on disk with: -- keystore encryption algorithm is AES256_KWP; -- password key derivation algorithm PRF_SHA512; -- salt length 32 bytes; -- iteration count 20480; -- keystore authentication algorithm HmacSHA3_512 (protects keystore from tampering); -- password-like keys encryption algorithm is PBEWithHmacSHA256AndAES_256. +* keystore encryption algorithm is AES256_KWP; +* password key derivation algorithm PRF_SHA512; +* salt length 32 bytes; +* iteration count 20480; +* keystore authentication algorithm HmacSHA3_512 (protects keystore from tampering); +* password-like keys encryption algorithm is PBEWithHmacSHA256AndAES_256. UBER keystore type is used to cache keys in memory ([algorithms details](https://cryptosense.com/blog/bouncycastle-keystore-security/)). @@ -102,9 +102,9 @@ Despite UBER keystore protected worse than BCFKS it has better performance and s Anyway if someone gets to memory dump of machine there is really not that much can be done to protect application. UBER parameters: -- keys encryption algorithm is PBEWithSHAAnd3-KeyTripleDES-CBC; -- salt length 20 bytes; -- iteration count random(1024, 2047). +* keys encryption algorithm is PBEWithSHAAnd3-KeyTripleDES-CBC; +* salt length 20 bytes; +* iteration count random(1024, 2047). All this parameters can be changed by setting [keystore config](datasafe-encryption/datasafe-encryption-api/src/main/java/de/adorsys/datasafe/encrypiton/api/types/encryption/KeyStoreConfig.java). For example instead of BCFKS keystore can be used UBER, instead of PBKDF2 (Password-Based Key Derivation Function) @@ -143,14 +143,14 @@ Default implementation of symmetric path encryption is integrity preserving whic authenticated against its parent path hash (SHA-256 digest), so attacker can't move a/file to b/file without being detected. It requires 2 secret keys for path encryption/decryption (both 256 bit key size by default, block size 128 bit): -- S2V AES key used in CMAC (Cipher-based Message Authentication Code) mode -- CTR AES key used in counter mode. +* S2V AES key used in CMAC (Cipher-based Message Authentication Code) mode +* CTR AES key used in counter mode. After encryption each path part concatenated to result encrypted path. Example: -- unencrypted file location: /path/to/file/document.pdf -- encrypted location: /cipher(path)/cipher(to)/cipher(file)/cipher(document.pdf) +* unencrypted file location: /path/to/file/document.pdf +* encrypted location: /cipher(path)/cipher(to)/cipher(file)/cipher(document.pdf) Such approach gives ability to list any directory without the need of decryption all files location. Resulting encrypted path string is Base64-urlsafe. diff --git a/datasafe-examples/datasafe-examples-business/README.md b/datasafe-examples/datasafe-examples-business/README.md index 1f751563d..ffed9d68b 100644 --- a/datasafe-examples/datasafe-examples-business/README.md +++ b/datasafe-examples/datasafe-examples-business/README.md @@ -2,10 +2,10 @@ This module contains examples of how to use Datasafe library using its business layer. -- [BaseUserOperationsTestWithDefaultDatasafe](src/test/java/de/adorsys/datasafe/examples/business/filesystem/BaseUserOperationsTestWithDefaultDatasafeTest.java) +* [BaseUserOperationsTestWithDefaultDatasafe](src/test/java/de/adorsys/datasafe/examples/business/filesystem/BaseUserOperationsTestWithDefaultDatasafeTest.java) shows how to use standard Datasafe service -- [BaseUserOperationsTestWithVersionedDatasafe](src/test/java/de/adorsys/datasafe/examples/business/filesystem/BaseUserOperationsTestWithVersionedDatasafeTest.java) +* [BaseUserOperationsTestWithVersionedDatasafe](src/test/java/de/adorsys/datasafe/examples/business/filesystem/BaseUserOperationsTestWithVersionedDatasafeTest.java) shows how to use standard Datasafe service with [software versioning](../../datasafe-metainfo/datasafe-metainfo-version-api/src/main/java/de/adorsys/datasafe/metainfo/version/api/version/VersionedPrivateSpaceService.java) -- [RuntimeOverrideOperationsTest](src/test/java/de/adorsys/datasafe/examples/business/filesystem/RuntimeOverrideOperationsTest.java) +* [RuntimeOverrideOperationsTest](src/test/java/de/adorsys/datasafe/examples/business/filesystem/RuntimeOverrideOperationsTest.java) shows how to customize Datasafe without recompilation From 474d42fa6ba02166bd7b235afc47860f05e5ea56 Mon Sep 17 00:00:00 2001 From: Maxim Grischenko Date: Thu, 24 Oct 2019 10:48:58 +0200 Subject: [PATCH 253/255] whitepaper list of all algorithms in the beginning --- SECURITY.WHITEPAPER.md | 63 +++++++++++++++++++++++++----------------- 1 file changed, 38 insertions(+), 25 deletions(-) diff --git a/SECURITY.WHITEPAPER.md b/SECURITY.WHITEPAPER.md index e7f4c7229..a31131213 100644 --- a/SECURITY.WHITEPAPER.md +++ b/SECURITY.WHITEPAPER.md @@ -1,18 +1,27 @@ # Datasafe Security Whitepaper -Keystore +Keystore: -* [BCFKS](#Keystore-encryption) - to store keystores (AES256_KWP, PRF_SHA512, PBEWithHmacSHA256AndAES_256) -* [UBER](#Keystore-encryption) - to cache keys in memory (PBEWithSHAAnd3-KeyTripleDES-CBC) +* [BCFKS](#BCFKS) - to store keys; + * [AES256_KWP](#AES256_KWP) - for keystore encryption; + * [PBKDF2](#PBKDF2) (PRF_SHA512 algorithm with 32 bytes salt and 20480 iterations) - for password key derivation; + * [HmacSHA3_512](#HmacSHA3_512) - keyStore authentication algorithm; + * [PBEWithHmacSHA256AndAES_256](#PBEWithHmacSHA256AndAES_256) - for password-like keys encryption. -Path encryption +* [UBER](#UBER) - to cache keys in memory; + * [PBEWithSHAAnd3-KeyTripleDES-CBC](#PBEWithSHAAnd3-KeyTripleDES-CBC) - for keys encryption. -* [AES-SIV](#File-location-encryption) +Path encryption: -CMS Encryption +* [AES-SIV](#AES-SIV) - for path encryption. -* [AES256_GCM, CHACHA20_POLY1305, AES256-WRAP](#Private-files-encryption-algoritm) - for private files -* [RSAES-PKCS1-v1_5, SHA256withRSA](#Encryption-used-for-file-sharing) - for sharing files +CMS Encryption: + +* [AES256_GCM](#AES256_GCM) - for content encryption; +* [CHACHA20_POLY1305](#CHACHA20_POLY1305) - optional, preferred for big data (>350GB) encryption; +* [AES256-WRAP](#AES256-WRAP) - key derivation algorithm for private files (use secret key); +* [RSAES-PKCS1-v1_5](#RSAES-PKCS1-v1_5) - key derivation algorithm for shared files (use public key); +* [SHA256withRSA](#SHA256withRSA) - for public keys. ## General information Datasafe is a flexible encryption library. It uses different encryption algorithms. They can be @@ -88,21 +97,25 @@ profile: private and public ## Keystore encryption System wide password is used to open keystore and users' personal password to read users' keys. Password can be changed without the need of changing keystore content. -By default used BCFKS keystore type to store on disk with: -* keystore encryption algorithm is AES256_KWP; -* password key derivation algorithm PRF_SHA512; -* salt length 32 bytes; -* iteration count 20480; -* keystore authentication algorithm HmacSHA3_512 (protects keystore from tampering); -* password-like keys encryption algorithm is PBEWithHmacSHA256AndAES_256. - -UBER keystore type is used to cache keys in memory +By default used BCFKS keystore type to store on disk with: +* keystore encryption algorithm is AES256_KWP; + +* password based key derivation function PBKDF2 with: + * password key derivation algorithm PRF_SHA512; + * salt length 32 bytes; + * iteration count 20480; + +* keystore authentication algorithm HmacSHA3_512 (protects keystore from tampering); + +* password-like keys encryption algorithm is PBEWithHmacSHA256AndAES_256. + + UBER keystore type is used to cache keys in memory ([algorithms details](https://cryptosense.com/blog/bouncycastle-keystore-security/)). Despite UBER keystore protected worse than BCFKS it has better performance and still a good choice to cache keys in memory. Anyway if someone gets to memory dump of machine there is really not that much can be done to protect application. UBER parameters: -* keys encryption algorithm is PBEWithSHAAnd3-KeyTripleDES-CBC; +* keys encryption algorithm is PBEWithSHAAnd3-KeyTripleDES-CBC; * salt length 20 bytes; * iteration count random(1024, 2047). @@ -113,30 +126,30 @@ based routines can be used Scrypt based. Keystore contains secret keys for private files and path encryption, public/private key pairs for sharing files. ## Private files encryption algoritm -Datasafe files uploaded by users in private area are encrypted using symmetric key 256-bit Advanced Encryption Standard (AES). + Datasafe files uploaded by users in private area are encrypted using symmetric key 256-bit Advanced Encryption Standard (AES). By default GCM (Galois counter mode) operation mode is used. It is considered best practice to use authenticated -encryption modes such as CCM or GCM in preference to CBC. It prevent attacks coming from fake or tampered ciphertexts. +encryption modes such as CCM or GCM in preference to CBC. It prevent attacks coming from fake or tampered cipher texts. Can be configured to use another encryption algorithm. Datasafe supports AES algorithms with 128, 192 and 256 key size in operation modes CBC (Cipher-block chaining), CCM (CBC-MAC), GCM or WRAP (Key Wrap). For the cases when -large amounts of data (> 300GB) are going to be stored one should prefer CHACHA20_POLY1305 that is also available. +large amounts of data (> 350GB) are going to be stored one should prefer CHACHA20_POLY1305 that is also available. Encrypted data wrapped into CMS standard envelope which contents information about key ID and algorithm used for encryption. -Key derivation algorithm is AES256-WRAP (OID 2.16.840.1.101.3.4.1.45) +Key derivation algorithm is AES256-WRAP (OID 2.16.840.1.101.3.4.1.45) [RFC5652 section-6.2.3](http://tools.ietf.org/html/rfc5652#section-6.2.3) ## Encryption used for file sharing Datasafe uses CMS for exchanging and sharing files. Public key is used to create content-encryption key using -RSAES-PKCS1-v1_5 (OID 1.2.840.113549.1.1.1) algorithm. Public key then stored inside cms envelope with other meta + RSAES-PKCS1-v1_5 (OID 1.2.840.113549.1.1.1) algorithm. Public key then stored inside cms envelope with other meta information like key alias and date. Receiver decrypts content-encryption -key with his private key. By default used RSA public keys with key size 2048 "SHA256withRSA". For data encryption used +key with his private key. By default used RSA public keys with key size 2048 SHA256withRSA. For data encryption used AES GCM 256 symmetric key. Files can be shared with other clients of library whose inbox location is known. Files can be shared simultaneously with any number of recipients. And it doesn't require repeating encryption for each recipient due to support of multiple recipients from CMS standard. Anyone can send file to user's inbox if his inbox location is known. ## File location encryption -Files can be stored in subdirectories. Each part of path encrypted separately using AES-SIV algorithm. +Files can be stored in subdirectories. Each part of path encrypted separately using AES-SIV algorithm. (Synthetic Initialization Vector) [RFC-845](https://tools.ietf.org/html/rfc845). Default implementation of symmetric path encryption is integrity preserving which means that each segment is From 8634370785ab4d1fcb5e2c16802bb28f7fa32a77 Mon Sep 17 00:00:00 2001 From: psp Date: Fri, 25 Oct 2019 00:34:52 +0200 Subject: [PATCH 254/255] DOC-280 thanks for review --- .../impl/e2e/KeyStoreTypeCompareTest.java | 36 +++++++++---------- .../profile/keys/DefaultKeyStoreCache.java | 4 +-- .../impl/profile/keys/KeyStoreCache.java | 2 +- ...IDKeyStore.java => UserKeyStoreCache.java} | 18 +++------- 4 files changed, 24 insertions(+), 36 deletions(-) rename datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/keys/{MapUserIDKeyStore.java => UserKeyStoreCache.java} (86%) diff --git a/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/KeyStoreTypeCompareTest.java b/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/KeyStoreTypeCompareTest.java index 8d8123e47..da6d78d3a 100644 --- a/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/KeyStoreTypeCompareTest.java +++ b/datasafe-business/src/test/java/de/adorsys/datasafe/business/impl/e2e/KeyStoreTypeCompareTest.java @@ -4,7 +4,8 @@ import de.adorsys.datasafe.business.impl.service.DefaultDatasafeServices; import de.adorsys.datasafe.directory.impl.profile.config.DefaultDFSConfig; import de.adorsys.datasafe.encrypiton.api.types.UserID; -import de.adorsys.datasafe.encrypiton.api.types.encryption.MutableEncryptionConfig; +import de.adorsys.datasafe.encrypiton.api.types.encryption.EncryptionConfig; +import de.adorsys.datasafe.encrypiton.api.types.encryption.KeyStoreConfig; import de.adorsys.datasafe.teststorage.WithStorageProvider; import de.adorsys.datasafe.types.api.actions.ReadRequest; import de.adorsys.datasafe.types.api.actions.WriteRequest; @@ -15,10 +16,10 @@ import org.junit.jupiter.api.Assertions; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.MethodSource; +import org.testcontainers.shaded.org.apache.commons.lang.time.StopWatch; import java.io.InputStream; import java.io.OutputStream; -import java.util.Date; import static org.assertj.core.api.Assertions.assertThat; @@ -31,12 +32,12 @@ public class KeyStoreTypeCompareTest extends BaseE2ETest { @ParameterizedTest @MethodSource("fsOnly") void compareKeyStoreTypes(WithStorageProvider.StorageDescriptor descriptor) { - long t1 = test(descriptor, "johnUber", "UBER"); - long t2 = test(descriptor, "johnBCFKS", "BCFKS"); - log.info("UBER test took:" + t1); - log.info("BCFKS test took:" + t2); + long tUBER = test(descriptor, "johnUber", "UBER"); + long tBCFKS = test(descriptor, "johnBCFKS", "BCFKS"); + log.info("UBER test took: {}", tUBER); + log.info("BCFKS test took: {}", tBCFKS); // We make sure, that with BCFKS it does not take longer than three times of UBER - Assertions.assertTrue(t1 * 3 > t2); + Assertions.assertTrue(tUBER * 3 > tBCFKS); } @@ -51,7 +52,8 @@ long test(WithStorageProvider.StorageDescriptor descriptor, String userName, Str String filename = "root.txt"; String content = "affe"; - Date start = new Date(); + StopWatch timer = new StopWatch(); + timer.start(); for (int i = 0; i < NUMBER_WRITES; i++) { log.debug("write file for the {} time", i); @@ -69,25 +71,20 @@ long test(WithStorageProvider.StorageDescriptor descriptor, String userName, Str } } - Date stop = new Date(); - long diff = stop.getTime() - start.getTime(); + timer.stop(); - log.info("TIME TOOK {} MILLISECS",diff); + long diff = timer.getTime(); + + log.info("TIME TOOK {} MILLISECS", diff); return diff; } private void init(StorageDescriptor descriptor, String keystoreType) { - - MutableEncryptionConfig mutableEncryptionConfig = new MutableEncryptionConfig(); - MutableEncryptionConfig.MutableKeyStoreCreationConfig mutableKeyStoreCreationConfig = new MutableEncryptionConfig.MutableKeyStoreCreationConfig(); - mutableKeyStoreCreationConfig.setType(keystoreType); - mutableEncryptionConfig.setKeystore(mutableKeyStoreCreationConfig); - mutableEncryptionConfig.getKeystore(); - DefaultDatasafeServices datasafeServices = DaggerDefaultDatasafeServices.builder() .config(new DefaultDFSConfig(descriptor.getLocation(), new ReadStorePassword("PAZZWORT"))) .encryption( - mutableEncryptionConfig.toEncryptionConfig().toBuilder() + EncryptionConfig.builder() + .keystore(KeyStoreConfig.builder().type(keystoreType).build()) .build() ) .storage(descriptor.getStorageService().get()) @@ -95,3 +92,4 @@ private void init(StorageDescriptor descriptor, String keystoreType) { initialize(DatasafeServicesProvider.dfsConfig(descriptor.getLocation()), datasafeServices); } } + diff --git a/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/keys/DefaultKeyStoreCache.java b/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/keys/DefaultKeyStoreCache.java index 60bb95bef..ea48714ec 100644 --- a/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/keys/DefaultKeyStoreCache.java +++ b/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/keys/DefaultKeyStoreCache.java @@ -18,7 +18,7 @@ public class DefaultKeyStoreCache implements KeyStoreCache { private final Map> publicKeys; - private final MapUserIDKeyStore keystore; + private final UserKeyStoreCache keystore; private final Map storageAccess; @Inject @@ -27,7 +27,7 @@ public DefaultKeyStoreCache( Map keystore, Map storageAccess) { this.publicKeys = publicKeys; - this.keystore = new MapUserIDKeyStore(keystore); + this.keystore = new UserKeyStoreCache(keystore); this.storageAccess = storageAccess; } diff --git a/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/keys/KeyStoreCache.java b/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/keys/KeyStoreCache.java index 3aae0bd42..21be31c56 100644 --- a/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/keys/KeyStoreCache.java +++ b/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/keys/KeyStoreCache.java @@ -20,7 +20,7 @@ public interface KeyStoreCache { /** * Cache for users' private/secret keys */ - MapUserIDKeyStore getKeystore(); + UserKeyStoreCache getKeystore(); /** * Cache for users' storage access diff --git a/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/keys/MapUserIDKeyStore.java b/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/keys/UserKeyStoreCache.java similarity index 86% rename from datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/keys/MapUserIDKeyStore.java rename to datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/keys/UserKeyStoreCache.java index d8888e4c8..f59739d0c 100644 --- a/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/keys/MapUserIDKeyStore.java +++ b/datasafe-directory/datasafe-directory-impl/src/main/java/de/adorsys/datasafe/directory/impl/profile/keys/UserKeyStoreCache.java @@ -15,8 +15,8 @@ @Slf4j @AllArgsConstructor -public class MapUserIDKeyStore { - @Delegate(types=LombokGemericMap.class, excludes = LombokComputeIfAbsent.class) +public class UserKeyStoreCache { + @Delegate (excludes = ExcludeComputeIfAbsent.class) private final Map map; @@ -79,17 +79,7 @@ private KeyStore convertKeyStoreToUberKeyStore(UserIDAuth currentCredentials, Ke return newKeystore; } - - - private interface ComputeIfAbsent { - V computeIfAbsent(K key, Function mappingFunction); - } - - private abstract class LombokGemericMap implements Map { + private interface ExcludeComputeIfAbsent { + KeyStore computeIfAbsent(UserID key, Function mappingFunction); } - - private abstract class LombokComputeIfAbsent implements ComputeIfAbsent { - } - - } From 79bd1b0b25c94bb57dcb3f64657a534e6a03b93d Mon Sep 17 00:00:00 2001 From: psp Date: Sat, 26 Oct 2019 17:25:54 +0200 Subject: [PATCH 255/255] Prepare release 0.7.0 --- datasafe-business/pom.xml | 2 +- datasafe-cli/pom.xml | 2 +- datasafe-directory/datasafe-directory-api/pom.xml | 2 +- datasafe-directory/datasafe-directory-impl/pom.xml | 2 +- datasafe-directory/pom.xml | 2 +- datasafe-encryption/datasafe-encryption-api/pom.xml | 2 +- datasafe-encryption/datasafe-encryption-impl/pom.xml | 2 +- datasafe-encryption/pom.xml | 2 +- datasafe-examples/datasafe-examples-business/pom.xml | 2 +- datasafe-examples/datasafe-examples-customize-dagger/pom.xml | 2 +- datasafe-examples/datasafe-examples-multidfs/pom.xml | 2 +- datasafe-examples/datasafe-examples-versioned-s3/pom.xml | 2 +- datasafe-examples/pom.xml | 2 +- datasafe-inbox/datasafe-inbox-api/pom.xml | 2 +- datasafe-inbox/datasafe-inbox-impl/pom.xml | 2 +- datasafe-inbox/pom.xml | 2 +- .../datasafe-business-tests-random-actions/pom.xml | 2 +- datasafe-long-run-tests/pom.xml | 2 +- datasafe-metainfo/datasafe-metainfo-version-api/pom.xml | 2 +- datasafe-metainfo/datasafe-metainfo-version-impl/pom.xml | 2 +- datasafe-metainfo/pom.xml | 2 +- datasafe-privatestore/datasafe-privatestore-api/pom.xml | 2 +- datasafe-privatestore/datasafe-privatestore-impl/pom.xml | 2 +- datasafe-privatestore/pom.xml | 2 +- datasafe-rest-impl/pom.xml | 4 ++-- datasafe-runtime-delegate/pom.xml | 2 +- datasafe-simple-adapter/datasafe-simple-adapter-api/pom.xml | 2 +- datasafe-simple-adapter/datasafe-simple-adapter-impl/pom.xml | 2 +- .../datasafe-simple-adapter-spring/pom.xml | 2 +- datasafe-simple-adapter/pom.xml | 2 +- datasafe-storage/datasafe-storage-api/pom.xml | 2 +- datasafe-storage/datasafe-storage-impl-db/pom.xml | 2 +- datasafe-storage/datasafe-storage-impl-fs/pom.xml | 2 +- datasafe-storage/datasafe-storage-impl-s3/pom.xml | 2 +- datasafe-storage/pom.xml | 2 +- datasafe-test-storages/pom.xml | 2 +- datasafe-types-api/pom.xml | 2 +- last-module-codecoverage-check/pom.xml | 2 +- pom.xml | 2 +- 39 files changed, 40 insertions(+), 40 deletions(-) diff --git a/datasafe-business/pom.xml b/datasafe-business/pom.xml index b2325358e..2638503a8 100644 --- a/datasafe-business/pom.xml +++ b/datasafe-business/pom.xml @@ -5,7 +5,7 @@ datasafe de.adorsys - 0.6.3-SNAPSHOT + 0.7.0 4.0.0 diff --git a/datasafe-cli/pom.xml b/datasafe-cli/pom.xml index 6f0b0a9d6..191b3b48f 100644 --- a/datasafe-cli/pom.xml +++ b/datasafe-cli/pom.xml @@ -5,7 +5,7 @@ de.adorsys datasafe - 0.6.3-SNAPSHOT + 0.7.0 datasafe-cli diff --git a/datasafe-directory/datasafe-directory-api/pom.xml b/datasafe-directory/datasafe-directory-api/pom.xml index 8622cf71b..a125a7f29 100644 --- a/datasafe-directory/datasafe-directory-api/pom.xml +++ b/datasafe-directory/datasafe-directory-api/pom.xml @@ -3,7 +3,7 @@ de.adorsys datasafe-directory - 0.6.3-SNAPSHOT + 0.7.0 datasafe-directory-api diff --git a/datasafe-directory/datasafe-directory-impl/pom.xml b/datasafe-directory/datasafe-directory-impl/pom.xml index f1ad227f2..61f6397d9 100644 --- a/datasafe-directory/datasafe-directory-impl/pom.xml +++ b/datasafe-directory/datasafe-directory-impl/pom.xml @@ -3,7 +3,7 @@ de.adorsys datasafe-directory - 0.6.3-SNAPSHOT + 0.7.0 datasafe-directory-impl diff --git a/datasafe-directory/pom.xml b/datasafe-directory/pom.xml index 86bebfda9..20ab5b055 100644 --- a/datasafe-directory/pom.xml +++ b/datasafe-directory/pom.xml @@ -5,7 +5,7 @@ datasafe de.adorsys - 0.6.3-SNAPSHOT + 0.7.0 4.0.0 diff --git a/datasafe-encryption/datasafe-encryption-api/pom.xml b/datasafe-encryption/datasafe-encryption-api/pom.xml index 58889350c..973338966 100644 --- a/datasafe-encryption/datasafe-encryption-api/pom.xml +++ b/datasafe-encryption/datasafe-encryption-api/pom.xml @@ -5,7 +5,7 @@ de.adorsys datasafe-encryption - 0.6.3-SNAPSHOT + 0.7.0 datasafe-encryption-api diff --git a/datasafe-encryption/datasafe-encryption-impl/pom.xml b/datasafe-encryption/datasafe-encryption-impl/pom.xml index e511114f8..462faff1d 100644 --- a/datasafe-encryption/datasafe-encryption-impl/pom.xml +++ b/datasafe-encryption/datasafe-encryption-impl/pom.xml @@ -5,7 +5,7 @@ de.adorsys datasafe-encryption - 0.6.3-SNAPSHOT + 0.7.0 datasafe-encryption-impl diff --git a/datasafe-encryption/pom.xml b/datasafe-encryption/pom.xml index fcaffeb80..bd3383c55 100644 --- a/datasafe-encryption/pom.xml +++ b/datasafe-encryption/pom.xml @@ -5,7 +5,7 @@ datasafe de.adorsys - 0.6.3-SNAPSHOT + 0.7.0 4.0.0 diff --git a/datasafe-examples/datasafe-examples-business/pom.xml b/datasafe-examples/datasafe-examples-business/pom.xml index 6bec085db..08fc36099 100644 --- a/datasafe-examples/datasafe-examples-business/pom.xml +++ b/datasafe-examples/datasafe-examples-business/pom.xml @@ -5,7 +5,7 @@ de.adorsys datasafe-examples - 0.6.3-SNAPSHOT + 0.7.0 datasafe-examples-business diff --git a/datasafe-examples/datasafe-examples-customize-dagger/pom.xml b/datasafe-examples/datasafe-examples-customize-dagger/pom.xml index 410cbacb0..ec11444ea 100644 --- a/datasafe-examples/datasafe-examples-customize-dagger/pom.xml +++ b/datasafe-examples/datasafe-examples-customize-dagger/pom.xml @@ -5,7 +5,7 @@ de.adorsys datasafe-examples - 0.6.3-SNAPSHOT + 0.7.0 datasafe-examples-customize-dagger diff --git a/datasafe-examples/datasafe-examples-multidfs/pom.xml b/datasafe-examples/datasafe-examples-multidfs/pom.xml index 9e72e65b7..498301d45 100644 --- a/datasafe-examples/datasafe-examples-multidfs/pom.xml +++ b/datasafe-examples/datasafe-examples-multidfs/pom.xml @@ -5,7 +5,7 @@ de.adorsys datasafe-examples - 0.6.3-SNAPSHOT + 0.7.0 datasafe-examples-multidfs diff --git a/datasafe-examples/datasafe-examples-versioned-s3/pom.xml b/datasafe-examples/datasafe-examples-versioned-s3/pom.xml index c2d377585..03eaa4305 100644 --- a/datasafe-examples/datasafe-examples-versioned-s3/pom.xml +++ b/datasafe-examples/datasafe-examples-versioned-s3/pom.xml @@ -5,7 +5,7 @@ de.adorsys datasafe-examples - 0.6.3-SNAPSHOT + 0.7.0 datasafe-examples-versioned-s3 diff --git a/datasafe-examples/pom.xml b/datasafe-examples/pom.xml index b98dc89c1..9becac62f 100644 --- a/datasafe-examples/pom.xml +++ b/datasafe-examples/pom.xml @@ -5,7 +5,7 @@ datasafe de.adorsys - 0.6.3-SNAPSHOT + 0.7.0 4.0.0 diff --git a/datasafe-inbox/datasafe-inbox-api/pom.xml b/datasafe-inbox/datasafe-inbox-api/pom.xml index 70aa15d6d..0d852dbfd 100644 --- a/datasafe-inbox/datasafe-inbox-api/pom.xml +++ b/datasafe-inbox/datasafe-inbox-api/pom.xml @@ -5,7 +5,7 @@ de.adorsys datasafe-inbox - 0.6.3-SNAPSHOT + 0.7.0 datasafe-inbox-api diff --git a/datasafe-inbox/datasafe-inbox-impl/pom.xml b/datasafe-inbox/datasafe-inbox-impl/pom.xml index a34a1df76..af74c0929 100644 --- a/datasafe-inbox/datasafe-inbox-impl/pom.xml +++ b/datasafe-inbox/datasafe-inbox-impl/pom.xml @@ -5,7 +5,7 @@ de.adorsys datasafe-inbox - 0.6.3-SNAPSHOT + 0.7.0 datasafe-inbox-impl diff --git a/datasafe-inbox/pom.xml b/datasafe-inbox/pom.xml index 7af989bf8..84c95e987 100644 --- a/datasafe-inbox/pom.xml +++ b/datasafe-inbox/pom.xml @@ -5,7 +5,7 @@ datasafe de.adorsys - 0.6.3-SNAPSHOT + 0.7.0 4.0.0 diff --git a/datasafe-long-run-tests/datasafe-business-tests-random-actions/pom.xml b/datasafe-long-run-tests/datasafe-business-tests-random-actions/pom.xml index cf8aa441f..f68745632 100644 --- a/datasafe-long-run-tests/datasafe-business-tests-random-actions/pom.xml +++ b/datasafe-long-run-tests/datasafe-business-tests-random-actions/pom.xml @@ -5,7 +5,7 @@ datasafe-long-run-tests de.adorsys - 0.6.3-SNAPSHOT + 0.7.0 4.0.0 diff --git a/datasafe-long-run-tests/pom.xml b/datasafe-long-run-tests/pom.xml index 7e767e9bf..1fe23d8d4 100644 --- a/datasafe-long-run-tests/pom.xml +++ b/datasafe-long-run-tests/pom.xml @@ -5,7 +5,7 @@ datasafe de.adorsys - 0.6.3-SNAPSHOT + 0.7.0 4.0.0 diff --git a/datasafe-metainfo/datasafe-metainfo-version-api/pom.xml b/datasafe-metainfo/datasafe-metainfo-version-api/pom.xml index 345e03555..62fcb560b 100644 --- a/datasafe-metainfo/datasafe-metainfo-version-api/pom.xml +++ b/datasafe-metainfo/datasafe-metainfo-version-api/pom.xml @@ -5,7 +5,7 @@ de.adorsys datasafe-metainfo - 0.6.3-SNAPSHOT + 0.7.0 datasafe-metainfo-version-api diff --git a/datasafe-metainfo/datasafe-metainfo-version-impl/pom.xml b/datasafe-metainfo/datasafe-metainfo-version-impl/pom.xml index 3219000a0..b0785ebe3 100644 --- a/datasafe-metainfo/datasafe-metainfo-version-impl/pom.xml +++ b/datasafe-metainfo/datasafe-metainfo-version-impl/pom.xml @@ -5,7 +5,7 @@ de.adorsys datasafe-metainfo - 0.6.3-SNAPSHOT + 0.7.0 datasafe-metainfo-version-impl diff --git a/datasafe-metainfo/pom.xml b/datasafe-metainfo/pom.xml index 628ad3649..e15852ffd 100644 --- a/datasafe-metainfo/pom.xml +++ b/datasafe-metainfo/pom.xml @@ -5,7 +5,7 @@ datasafe de.adorsys - 0.6.3-SNAPSHOT + 0.7.0 4.0.0 diff --git a/datasafe-privatestore/datasafe-privatestore-api/pom.xml b/datasafe-privatestore/datasafe-privatestore-api/pom.xml index 871318695..047773bf5 100644 --- a/datasafe-privatestore/datasafe-privatestore-api/pom.xml +++ b/datasafe-privatestore/datasafe-privatestore-api/pom.xml @@ -5,7 +5,7 @@ datasafe-privatestore de.adorsys - 0.6.3-SNAPSHOT + 0.7.0 4.0.0 diff --git a/datasafe-privatestore/datasafe-privatestore-impl/pom.xml b/datasafe-privatestore/datasafe-privatestore-impl/pom.xml index e625bcb52..db67008b4 100644 --- a/datasafe-privatestore/datasafe-privatestore-impl/pom.xml +++ b/datasafe-privatestore/datasafe-privatestore-impl/pom.xml @@ -5,7 +5,7 @@ datasafe-privatestore de.adorsys - 0.6.3-SNAPSHOT + 0.7.0 4.0.0 diff --git a/datasafe-privatestore/pom.xml b/datasafe-privatestore/pom.xml index 3609c1076..2e9a1c23e 100644 --- a/datasafe-privatestore/pom.xml +++ b/datasafe-privatestore/pom.xml @@ -5,7 +5,7 @@ datasafe de.adorsys - 0.6.3-SNAPSHOT + 0.7.0 4.0.0 diff --git a/datasafe-rest-impl/pom.xml b/datasafe-rest-impl/pom.xml index 005317111..de0a8fe33 100644 --- a/datasafe-rest-impl/pom.xml +++ b/datasafe-rest-impl/pom.xml @@ -5,11 +5,11 @@ datasafe de.adorsys - 0.6.3-SNAPSHOT + 0.7.0 datasafe-rest-impl - 0.6.3-SNAPSHOT + 0.7.0 datasafe-rest-impl Spring Boot DataSafe Application diff --git a/datasafe-runtime-delegate/pom.xml b/datasafe-runtime-delegate/pom.xml index f2e8b0620..22acc7d7a 100644 --- a/datasafe-runtime-delegate/pom.xml +++ b/datasafe-runtime-delegate/pom.xml @@ -5,7 +5,7 @@ de.adorsys datasafe - 0.6.3-SNAPSHOT + 0.7.0 datasafe-runtime-delegate diff --git a/datasafe-simple-adapter/datasafe-simple-adapter-api/pom.xml b/datasafe-simple-adapter/datasafe-simple-adapter-api/pom.xml index 028a3faeb..47389e8d4 100644 --- a/datasafe-simple-adapter/datasafe-simple-adapter-api/pom.xml +++ b/datasafe-simple-adapter/datasafe-simple-adapter-api/pom.xml @@ -5,7 +5,7 @@ datasafe-simple-adapter de.adorsys - 0.6.3-SNAPSHOT + 0.7.0 4.0.0 diff --git a/datasafe-simple-adapter/datasafe-simple-adapter-impl/pom.xml b/datasafe-simple-adapter/datasafe-simple-adapter-impl/pom.xml index b590ac008..4f67b43dc 100644 --- a/datasafe-simple-adapter/datasafe-simple-adapter-impl/pom.xml +++ b/datasafe-simple-adapter/datasafe-simple-adapter-impl/pom.xml @@ -5,7 +5,7 @@ datasafe-simple-adapter de.adorsys - 0.6.3-SNAPSHOT + 0.7.0 4.0.0 diff --git a/datasafe-simple-adapter/datasafe-simple-adapter-spring/pom.xml b/datasafe-simple-adapter/datasafe-simple-adapter-spring/pom.xml index 3cca37ec9..906b6fb25 100644 --- a/datasafe-simple-adapter/datasafe-simple-adapter-spring/pom.xml +++ b/datasafe-simple-adapter/datasafe-simple-adapter-spring/pom.xml @@ -5,7 +5,7 @@ datasafe-simple-adapter de.adorsys - 0.6.3-SNAPSHOT + 0.7.0 4.0.0 diff --git a/datasafe-simple-adapter/pom.xml b/datasafe-simple-adapter/pom.xml index 7484b6ae3..951dceadc 100644 --- a/datasafe-simple-adapter/pom.xml +++ b/datasafe-simple-adapter/pom.xml @@ -5,7 +5,7 @@ datasafe de.adorsys - 0.6.3-SNAPSHOT + 0.7.0 4.0.0 diff --git a/datasafe-storage/datasafe-storage-api/pom.xml b/datasafe-storage/datasafe-storage-api/pom.xml index 52187e414..44377c451 100644 --- a/datasafe-storage/datasafe-storage-api/pom.xml +++ b/datasafe-storage/datasafe-storage-api/pom.xml @@ -5,7 +5,7 @@ de.adorsys datasafe-storage - 0.6.3-SNAPSHOT + 0.7.0 datasafe-storage-api diff --git a/datasafe-storage/datasafe-storage-impl-db/pom.xml b/datasafe-storage/datasafe-storage-impl-db/pom.xml index 7d73e8e04..c04a6b0cf 100644 --- a/datasafe-storage/datasafe-storage-impl-db/pom.xml +++ b/datasafe-storage/datasafe-storage-impl-db/pom.xml @@ -5,7 +5,7 @@ datasafe-storage de.adorsys - 0.6.3-SNAPSHOT + 0.7.0 4.0.0 diff --git a/datasafe-storage/datasafe-storage-impl-fs/pom.xml b/datasafe-storage/datasafe-storage-impl-fs/pom.xml index 01fa1286c..fb45da1cc 100644 --- a/datasafe-storage/datasafe-storage-impl-fs/pom.xml +++ b/datasafe-storage/datasafe-storage-impl-fs/pom.xml @@ -5,7 +5,7 @@ datasafe-storage de.adorsys - 0.6.3-SNAPSHOT + 0.7.0 4.0.0 diff --git a/datasafe-storage/datasafe-storage-impl-s3/pom.xml b/datasafe-storage/datasafe-storage-impl-s3/pom.xml index 3cc31e980..3931ec8c2 100644 --- a/datasafe-storage/datasafe-storage-impl-s3/pom.xml +++ b/datasafe-storage/datasafe-storage-impl-s3/pom.xml @@ -5,7 +5,7 @@ datasafe-storage de.adorsys - 0.6.3-SNAPSHOT + 0.7.0 4.0.0 diff --git a/datasafe-storage/pom.xml b/datasafe-storage/pom.xml index cd93feb51..3e7f258e9 100644 --- a/datasafe-storage/pom.xml +++ b/datasafe-storage/pom.xml @@ -5,7 +5,7 @@ datasafe de.adorsys - 0.6.3-SNAPSHOT + 0.7.0 4.0.0 diff --git a/datasafe-test-storages/pom.xml b/datasafe-test-storages/pom.xml index 97628cc71..8aa13a6ab 100644 --- a/datasafe-test-storages/pom.xml +++ b/datasafe-test-storages/pom.xml @@ -5,7 +5,7 @@ datasafe de.adorsys - 0.6.3-SNAPSHOT + 0.7.0 4.0.0 diff --git a/datasafe-types-api/pom.xml b/datasafe-types-api/pom.xml index 7b388940d..49ac98b76 100644 --- a/datasafe-types-api/pom.xml +++ b/datasafe-types-api/pom.xml @@ -5,7 +5,7 @@ de.adorsys datasafe - 0.6.3-SNAPSHOT + 0.7.0 datasafe-types-api diff --git a/last-module-codecoverage-check/pom.xml b/last-module-codecoverage-check/pom.xml index 44109be36..27f940b35 100644 --- a/last-module-codecoverage-check/pom.xml +++ b/last-module-codecoverage-check/pom.xml @@ -5,7 +5,7 @@ datasafe de.adorsys - 0.6.3-SNAPSHOT + 0.7.0 4.0.0 diff --git a/pom.xml b/pom.xml index 5c81b7018..48b12f245 100644 --- a/pom.xml +++ b/pom.xml @@ -25,7 +25,7 @@ de.adorsys datasafe - 0.6.3-SNAPSHOT + 0.7.0 datasafe Datasafe https://github.com/adorsys/datasafe