diff --git a/.travis.yml b/.travis.yml index 9e58983a6..77d7169b3 100644 --- a/.travis.yml +++ b/.travis.yml @@ -41,19 +41,19 @@ deploy: 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)?$" +# - 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: - /bin/bash .travis/codecov_bash.sh diff --git a/datasafe-business/pom.xml b/datasafe-business/pom.xml index acb14c0d9..dbf35104b 100644 --- a/datasafe-business/pom.xml +++ b/datasafe-business/pom.xml @@ -5,7 +5,7 @@ datasafe de.adorsys - 1.0.2 + 1.0.3 4.0.0 diff --git a/datasafe-cli/pom.xml b/datasafe-cli/pom.xml index 3e71a6b5a..276b47479 100644 --- a/datasafe-cli/pom.xml +++ b/datasafe-cli/pom.xml @@ -5,7 +5,7 @@ de.adorsys datasafe - 1.0.2 + 1.0.3 datasafe-cli diff --git a/datasafe-directory/datasafe-directory-api/pom.xml b/datasafe-directory/datasafe-directory-api/pom.xml index 4d36056ca..9e8ceec44 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 - 1.0.2 + 1.0.3 datasafe-directory-api diff --git a/datasafe-directory/datasafe-directory-impl/pom.xml b/datasafe-directory/datasafe-directory-impl/pom.xml index 6de81289d..499010f42 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 - 1.0.2 + 1.0.3 datasafe-directory-impl diff --git a/datasafe-directory/pom.xml b/datasafe-directory/pom.xml index ac8af4f64..5e7c5a278 100644 --- a/datasafe-directory/pom.xml +++ b/datasafe-directory/pom.xml @@ -5,7 +5,7 @@ datasafe de.adorsys - 1.0.2 + 1.0.3 4.0.0 diff --git a/datasafe-encryption/datasafe-encryption-api/pom.xml b/datasafe-encryption/datasafe-encryption-api/pom.xml index 433d8b809..03062d68a 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 - 1.0.2 + 1.0.3 datasafe-encryption-api diff --git a/datasafe-encryption/datasafe-encryption-impl/pom.xml b/datasafe-encryption/datasafe-encryption-impl/pom.xml index 9f0d6ad94..62c342c60 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 - 1.0.2 + 1.0.3 datasafe-encryption-impl diff --git a/datasafe-encryption/pom.xml b/datasafe-encryption/pom.xml index c3bdbc721..99494b93c 100644 --- a/datasafe-encryption/pom.xml +++ b/datasafe-encryption/pom.xml @@ -5,7 +5,7 @@ datasafe de.adorsys - 1.0.2 + 1.0.3 4.0.0 diff --git a/datasafe-examples/datasafe-examples-business/pom.xml b/datasafe-examples/datasafe-examples-business/pom.xml index 58d8670ac..f570942af 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 - 1.0.2 + 1.0.3 datasafe-examples-business diff --git a/datasafe-examples/datasafe-examples-customize-dagger/pom.xml b/datasafe-examples/datasafe-examples-customize-dagger/pom.xml index 6521c03b3..10b764cc5 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 - 1.0.2 + 1.0.3 datasafe-examples-customize-dagger diff --git a/datasafe-examples/datasafe-examples-multidfs/pom.xml b/datasafe-examples/datasafe-examples-multidfs/pom.xml index 89f8ef439..1d9a90dc0 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 - 1.0.2 + 1.0.3 datasafe-examples-multidfs diff --git a/datasafe-examples/datasafe-examples-versioned-s3/pom.xml b/datasafe-examples/datasafe-examples-versioned-s3/pom.xml index 6883e6d8a..046508017 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 - 1.0.2 + 1.0.3 datasafe-examples-versioned-s3 diff --git a/datasafe-examples/pom.xml b/datasafe-examples/pom.xml index ba407f23f..69ac73e31 100644 --- a/datasafe-examples/pom.xml +++ b/datasafe-examples/pom.xml @@ -5,7 +5,7 @@ datasafe de.adorsys - 1.0.2 + 1.0.3 4.0.0 diff --git a/datasafe-inbox/datasafe-inbox-api/pom.xml b/datasafe-inbox/datasafe-inbox-api/pom.xml index b05dfb9c1..59fcf5480 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 - 1.0.2 + 1.0.3 datasafe-inbox-api diff --git a/datasafe-inbox/datasafe-inbox-impl/pom.xml b/datasafe-inbox/datasafe-inbox-impl/pom.xml index 47d229a33..3182d96ff 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 - 1.0.2 + 1.0.3 datasafe-inbox-impl diff --git a/datasafe-inbox/pom.xml b/datasafe-inbox/pom.xml index 374a44ece..ee32e4265 100644 --- a/datasafe-inbox/pom.xml +++ b/datasafe-inbox/pom.xml @@ -5,7 +5,7 @@ datasafe de.adorsys - 1.0.2 + 1.0.3 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 2cfce0f6c..5c45e511b 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 - 1.0.2 + 1.0.3 4.0.0 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 8855bb729..3cc92af44 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 @@ -29,6 +29,7 @@ import de.adorsys.datasafe.simple.adapter.api.types.ListRecursiveFlag; import de.adorsys.datasafe.simple.adapter.impl.DFSTestCredentialsFactory; import de.adorsys.datasafe.simple.adapter.impl.SimpleDatasafeServiceImpl; +import de.adorsys.datasafe.simple.adapter.impl.config.PathEncryptionConfig; import de.adorsys.datasafe.types.api.actions.ListRequest; import de.adorsys.datasafe.types.api.actions.ReadRequest; import de.adorsys.datasafe.types.api.actions.RemoveRequest; @@ -89,7 +90,7 @@ void testRandomActionsParallelThreads(StorageDescriptor descriptor, int threadCo private DefaultDatasafeServices datasafeServicesFromSimpleDatasafeAdapter(StorageDescriptor descriptor) { SimpleDatasafeService datasafeService = new SimpleDatasafeServiceImpl( - DFSTestCredentialsFactory.credentials(descriptor), new MutableEncryptionConfig() + DFSTestCredentialsFactory.credentials(descriptor), new MutableEncryptionConfig(), new PathEncryptionConfig(true) ); return new DefaultDatasafeServices() { diff --git a/datasafe-long-run-tests/pom.xml b/datasafe-long-run-tests/pom.xml index 3d3cbb97d..3baeff99a 100644 --- a/datasafe-long-run-tests/pom.xml +++ b/datasafe-long-run-tests/pom.xml @@ -5,7 +5,7 @@ datasafe de.adorsys - 1.0.2 + 1.0.3 4.0.0 diff --git a/datasafe-metainfo/datasafe-metainfo-version-api/pom.xml b/datasafe-metainfo/datasafe-metainfo-version-api/pom.xml index 60569a002..d12b14d62 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 - 1.0.2 + 1.0.3 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 ab33ffdcf..afef9d6e3 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 - 1.0.2 + 1.0.3 datasafe-metainfo-version-impl diff --git a/datasafe-metainfo/pom.xml b/datasafe-metainfo/pom.xml index 1e3275b01..ca94d6adc 100644 --- a/datasafe-metainfo/pom.xml +++ b/datasafe-metainfo/pom.xml @@ -5,7 +5,7 @@ datasafe de.adorsys - 1.0.2 + 1.0.3 4.0.0 diff --git a/datasafe-privatestore/datasafe-privatestore-api/pom.xml b/datasafe-privatestore/datasafe-privatestore-api/pom.xml index aad91e461..960158328 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 - 1.0.2 + 1.0.3 4.0.0 diff --git a/datasafe-privatestore/datasafe-privatestore-impl/pom.xml b/datasafe-privatestore/datasafe-privatestore-impl/pom.xml index 48a13725b..14d8167ef 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 - 1.0.2 + 1.0.3 4.0.0 diff --git a/datasafe-privatestore/pom.xml b/datasafe-privatestore/pom.xml index 8f5a34949..a33368c8b 100644 --- a/datasafe-privatestore/pom.xml +++ b/datasafe-privatestore/pom.xml @@ -5,7 +5,7 @@ datasafe de.adorsys - 1.0.2 + 1.0.3 4.0.0 diff --git a/datasafe-rest-impl/pom.xml b/datasafe-rest-impl/pom.xml index 6420f45ac..a6e304c5a 100644 --- a/datasafe-rest-impl/pom.xml +++ b/datasafe-rest-impl/pom.xml @@ -5,11 +5,11 @@ datasafe de.adorsys - 1.0.2 + 1.0.3 datasafe-rest-impl - 1.0.2 + 1.0.3 datasafe-rest-impl Spring Boot DataSafe Application diff --git a/datasafe-runtime-delegate/pom.xml b/datasafe-runtime-delegate/pom.xml index 1c08a6da8..a883a5bf2 100644 --- a/datasafe-runtime-delegate/pom.xml +++ b/datasafe-runtime-delegate/pom.xml @@ -5,7 +5,7 @@ de.adorsys datasafe - 1.0.2 + 1.0.3 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 a92fdfa55..0d6f6f1f0 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 - 1.0.2 + 1.0.3 4.0.0 @@ -21,6 +21,11 @@ datasafe-encryption-api ${project.version} + + de.adorsys + datasafe-inbox-api + ${project.version} + org.slf4j 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 4f6a8a7e8..8c744907b 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,6 +2,7 @@ import de.adorsys.datasafe.encrypiton.api.types.UserID; import de.adorsys.datasafe.encrypiton.api.types.UserIDAuth; +import de.adorsys.datasafe.inbox.api.InboxService; import de.adorsys.datasafe.simple.adapter.api.types.DSDocument; import de.adorsys.datasafe.simple.adapter.api.types.DSDocumentStream; import de.adorsys.datasafe.simple.adapter.api.types.DocumentDirectoryFQN; @@ -46,6 +47,8 @@ public interface SimpleDatasafeService { List list(UserIDAuth userIDAuth, DocumentDirectoryFQN documentDirectoryFQN, ListRecursiveFlag recursiveFlag); + InboxService getInboxService(); + // deletes all users and their files from storage void cleanupDb(); } diff --git a/datasafe-simple-adapter/datasafe-simple-adapter-api/src/main/java/de/adorsys/datasafe/simple/adapter/api/types/AmazonS3DFSCredentials.java b/datasafe-simple-adapter/datasafe-simple-adapter-api/src/main/java/de/adorsys/datasafe/simple/adapter/api/types/AmazonS3DFSCredentials.java index f38b5bf5f..ac03836e8 100644 --- a/datasafe-simple-adapter/datasafe-simple-adapter-api/src/main/java/de/adorsys/datasafe/simple/adapter/api/types/AmazonS3DFSCredentials.java +++ b/datasafe-simple-adapter/datasafe-simple-adapter-api/src/main/java/de/adorsys/datasafe/simple/adapter/api/types/AmazonS3DFSCredentials.java @@ -32,11 +32,7 @@ public class AmazonS3DFSCredentials extends DFSCredentials { @Builder.Default private final int requestTimeout = 0; - public String getContainer() { return rootBucket.split("/")[0]; } - - - } diff --git a/datasafe-simple-adapter/datasafe-simple-adapter-impl/pom.xml b/datasafe-simple-adapter/datasafe-simple-adapter-impl/pom.xml index fea2e5d95..02ffa567f 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 - 1.0.2 + 1.0.3 4.0.0 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 d19737f58..02f9cb024 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 @@ -14,6 +14,8 @@ 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.impl.pathencryption.PathEncryptionImplRuntimeDelegatable; +import de.adorsys.datasafe.inbox.api.InboxService; 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; @@ -26,7 +28,8 @@ import de.adorsys.datasafe.simple.adapter.api.types.DocumentFQN; import de.adorsys.datasafe.simple.adapter.api.types.FilesystemDFSCredentials; import de.adorsys.datasafe.simple.adapter.api.types.ListRecursiveFlag; -import de.adorsys.datasafe.simple.adapter.impl.pathencryption.SwitchablePathEncryptionImpl; +import de.adorsys.datasafe.simple.adapter.impl.config.PathEncryptionConfig; +import de.adorsys.datasafe.simple.adapter.impl.pathencryption.NoPathEncryptionImpl; import de.adorsys.datasafe.storage.api.StorageService; import de.adorsys.datasafe.storage.impl.fs.FileSystemStorageService; import de.adorsys.datasafe.storage.impl.s3.S3StorageService; @@ -34,6 +37,7 @@ 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; @@ -62,24 +66,38 @@ public class SimpleDatasafeServiceImpl implements SimpleDatasafeService { private SystemRootAndStorageService rootAndStorage; private DefaultDatasafeServices customlyBuiltDatasafeServices; + public SimpleDatasafeServiceImpl(PathEncryptionConfig pathEncryptionConfig) { + this(DFSCredentialsFactory.getFromEnvironmnet(), new MutableEncryptionConfig(), pathEncryptionConfig); + } + public SimpleDatasafeServiceImpl() { - this(DFSCredentialsFactory.getFromEnvironmnet(), new MutableEncryptionConfig()); + this(DFSCredentialsFactory.getFromEnvironmnet(), new MutableEncryptionConfig(), new PathEncryptionConfig(true)); } - public SimpleDatasafeServiceImpl(DFSCredentials dfsCredentials, MutableEncryptionConfig config) { + public SimpleDatasafeServiceImpl(DFSCredentials dfsCredentials, MutableEncryptionConfig config, PathEncryptionConfig pathEncryptionConfig) { if (dfsCredentials instanceof FilesystemDFSCredentials) { - this.rootAndStorage = useFileSystem((FilesystemDFSCredentials) dfsCredentials); + this.rootAndStorage = useFileSystem((FilesystemDFSCredentials) dfsCredentials, pathEncryptionConfig); } if (dfsCredentials instanceof AmazonS3DFSCredentials) { - this.rootAndStorage = useAmazonS3((AmazonS3DFSCredentials) dfsCredentials); + this.rootAndStorage = useAmazonS3((AmazonS3DFSCredentials) dfsCredentials, pathEncryptionConfig); } - customlyBuiltDatasafeServices = DaggerSwitchableDatasafeServices.builder() + SwitchableDatasafeServices.Builder switchableDatasafeService = DaggerSwitchableDatasafeServices.builder() .config(new DefaultDFSConfig(rootAndStorage.getSystemRoot(), universalReadStorePassword)) .encryption(config.toEncryptionConfig()) - .storage(getStorageService()) - .build(); + .storage(getStorageService()); + + if (!pathEncryptionConfig.getWithPathEncryption()) { + BaseOverridesRegistry baseOverridesRegistry = new BaseOverridesRegistry(); + PathEncryptionImplRuntimeDelegatable.overrideWith(baseOverridesRegistry, args -> + new NoPathEncryptionImpl( + args.getSymmetricPathEncryptionService(), + args.getPrivateKeyService())); + switchableDatasafeService.overridesRegistry(baseOverridesRegistry); + } + + customlyBuiltDatasafeServices = switchableDatasafeService.build(); } public StorageService getStorageService() { @@ -196,6 +214,11 @@ public List list(UserIDAuth userIDAuth, DocumentDirectoryFQN docume .collect(Collectors.toList()); } + @Override + public InboxService getInboxService() { + return customlyBuiltDatasafeServices.inboxService(); + } + @Override public void cleanupDb() { rootAndStorage.getStorageService() @@ -205,14 +228,14 @@ public void cleanupDb() { } - private static SystemRootAndStorageService useAmazonS3(AmazonS3DFSCredentials dfsCredentials) { + private static SystemRootAndStorageService useAmazonS3(AmazonS3DFSCredentials dfsCredentials, PathEncryptionConfig pathEncryptionConfig) { AmazonS3DFSCredentials amazonS3DFSCredentials = dfsCredentials; LogStringFrame lsf = new LogStringFrame(); lsf.add("AMAZON S3"); lsf.add("root bucket : " + amazonS3DFSCredentials.getRootBucket()); lsf.add("url : " + amazonS3DFSCredentials.getUrl()); lsf.add("region : " + amazonS3DFSCredentials.getRegion()); - lsf.add("path encryption : " + SwitchablePathEncryptionImpl.checkIsPathEncryptionToUse()); + lsf.add("path encryption : " + pathEncryptionConfig.getWithPathEncryption()); lsf.add("no https : " + amazonS3DFSCredentials.isNoHttps()); lsf.add("threadpool size : " + amazonS3DFSCredentials.getThreadPoolSize()); int maxConnections = amazonS3DFSCredentials.getMaxConnections(); @@ -288,12 +311,12 @@ private static SystemRootAndStorageService useAmazonS3(AmazonS3DFSCredentials df return new SystemRootAndStorageService(systemRoot, storageService); } - private static SystemRootAndStorageService useFileSystem(FilesystemDFSCredentials dfsCredentials) { + private static SystemRootAndStorageService useFileSystem(FilesystemDFSCredentials dfsCredentials, PathEncryptionConfig pathEncryptionConfig) { FilesystemDFSCredentials filesystemDFSCredentials = dfsCredentials; LogStringFrame lsf = new LogStringFrame(); lsf.add("FILESYSTEM"); lsf.add("root bucket : " + filesystemDFSCredentials.getRoot()); - lsf.add("path encryption : " + SwitchablePathEncryptionImpl.checkIsPathEncryptionToUse()); + lsf.add("path encryption : " + pathEncryptionConfig.getWithPathEncryption()); log.info(lsf.toString()); URI systemRoot = FileSystems.getDefault().getPath(filesystemDFSCredentials.getRoot()).toAbsolutePath().toUri(); StorageService storageService = new FileSystemStorageService(FileSystems.getDefault().getPath(filesystemDFSCredentials.getRoot())); diff --git a/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/main/java/de/adorsys/datasafe/simple/adapter/impl/SwitchableDatasafeServices.java b/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/main/java/de/adorsys/datasafe/simple/adapter/impl/SwitchableDatasafeServices.java index c4a399a68..97333bae2 100644 --- a/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/main/java/de/adorsys/datasafe/simple/adapter/impl/SwitchableDatasafeServices.java +++ b/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/main/java/de/adorsys/datasafe/simple/adapter/impl/SwitchableDatasafeServices.java @@ -6,13 +6,13 @@ 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.pathencryption.DefaultPathEncryptionModule; 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.encrypiton.api.types.encryption.EncryptionConfig; import de.adorsys.datasafe.simple.adapter.impl.cmsencryption.SwitchableCMSEncryptionModule; -import de.adorsys.datasafe.simple.adapter.impl.pathencryption.SwitchablePathEncryptionModule; 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; @@ -26,7 +26,7 @@ DefaultKeyStoreModule.class, DefaultDocumentModule.class, SwitchableCMSEncryptionModule.class, - SwitchablePathEncryptionModule.class, + DefaultPathEncryptionModule.class, DefaultInboxActionsModule.class, DefaultPrivateActionsModule.class, HardcodedProfileModule.class, @@ -61,7 +61,6 @@ interface Builder { @BindsInstance 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/config/PathEncryptionConfig.java b/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/main/java/de/adorsys/datasafe/simple/adapter/impl/config/PathEncryptionConfig.java new file mode 100644 index 000000000..b40d7a787 --- /dev/null +++ b/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/main/java/de/adorsys/datasafe/simple/adapter/impl/config/PathEncryptionConfig.java @@ -0,0 +1,10 @@ +package de.adorsys.datasafe.simple.adapter.impl.config; + +import lombok.Getter; +import lombok.RequiredArgsConstructor; + +@RequiredArgsConstructor +@Getter +public class PathEncryptionConfig { + private final Boolean withPathEncryption; +} diff --git a/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/main/java/de/adorsys/datasafe/simple/adapter/impl/pathencryption/NoPathEncryptionImpl.java b/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/main/java/de/adorsys/datasafe/simple/adapter/impl/pathencryption/NoPathEncryptionImpl.java new file mode 100644 index 000000000..68ded7dbc --- /dev/null +++ b/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/main/java/de/adorsys/datasafe/simple/adapter/impl/pathencryption/NoPathEncryptionImpl.java @@ -0,0 +1,32 @@ +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.types.api.resource.Uri; +import lombok.extern.slf4j.Slf4j; + +import javax.inject.Inject; +import java.util.function.Function; + +@Slf4j +public class NoPathEncryptionImpl extends PathEncryptionImpl { + + @Inject + public NoPathEncryptionImpl( + SymmetricPathEncryptionService symmetricPathEncryptionService, + PrivateKeyService privateKeyService) { + super(symmetricPathEncryptionService, privateKeyService); + } + + @Override + public Uri encrypt(UserIDAuth forUser, Uri path) { + return path; + } + + @Override + public Function decryptor(UserIDAuth forUser) { + return Function.identity(); + } +} 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 deleted file mode 100644 index b354d6f0c..000000000 --- a/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/main/java/de/adorsys/datasafe/simple/adapter/impl/pathencryption/SwitchablePathEncryptionImpl.java +++ /dev/null @@ -1,59 +0,0 @@ -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.types.api.resource.Uri; -import lombok.extern.slf4j.Slf4j; - -import javax.inject.Inject; -import java.util.function.Function; - -@Slf4j -public class SwitchablePathEncryptionImpl extends PathEncryptionImpl { - - public static final String NO_BUCKETPATH_ENCRYPTION = "SC-NO-BUCKETPATH-ENCRYPTION"; - - private boolean withPathEncryption = checkIsPathEncryptionToUse(); - - @Inject - public SwitchablePathEncryptionImpl(SymmetricPathEncryptionService symmetricPathEncryptionService, - PrivateKeyService privateKeyService) { - super(symmetricPathEncryptionService, privateKeyService); - } - - @Override - public Uri encrypt(UserIDAuth forUser, Uri path) { - if (withPathEncryption) { - return super.encrypt(forUser, path); - } - return path; - } - - @Override - public Function decryptor(UserIDAuth forUser) { - if (withPathEncryption) { - return super.decryptor(forUser); - } - return Function.identity(); - } - - public static boolean checkIsPathEncryptionToUse() { - String value = System.getProperty(NO_BUCKETPATH_ENCRYPTION); - if (value != null) { - if (value.equalsIgnoreCase(Boolean.FALSE.toString())) { - log.debug("path encryption is on"); - return true; - } - if (value.equalsIgnoreCase(Boolean.TRUE.toString())) { - log.debug("path encryption is off"); - return false; - } - throw new RuntimeException("value " + value + " for " + NO_BUCKETPATH_ENCRYPTION + " is unknown"); - } - log.debug("path encryption is on"); - return true; - } - -} diff --git a/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/main/java/de/adorsys/datasafe/simple/adapter/impl/pathencryption/SwitchablePathEncryptionModule.java b/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/main/java/de/adorsys/datasafe/simple/adapter/impl/pathencryption/SwitchablePathEncryptionModule.java deleted file mode 100644 index 95671bd9b..000000000 --- a/datasafe-simple-adapter/datasafe-simple-adapter-impl/src/main/java/de/adorsys/datasafe/simple/adapter/impl/pathencryption/SwitchablePathEncryptionModule.java +++ /dev/null @@ -1,46 +0,0 @@ -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.encrypiton.api.pathencryption.encryption.SymmetricPathEncryptionService; -import de.adorsys.datasafe.encrypiton.impl.pathencryption.IntegrityPreservingUriEncryptionRuntimeDelegatable; -import de.adorsys.datasafe.encrypiton.impl.pathencryption.PathEncryptorDecryptor; -import de.adorsys.datasafe.encrypiton.impl.pathencryption.PathSegmentEncryptorDecryptorRuntimeDelegatable; -import org.cryptomator.siv.SivMode; - -/** - * This module is responsible for providing pathencryption of document. - */ -@Module -public abstract class SwitchablePathEncryptionModule { - /** - * SivMode using for encryption and decryption in AES CGM SIV mode - * @return SivMode - */ - @Provides - static SivMode sivMode() { - return new SivMode(); - } - - /** - * Default path encryption that uses Base64-urlsafe path serialization and AES-CGM-SIV mode for encryption - */ - @Binds - abstract PathEncryptorDecryptor pathEncryptorDecryptor(PathSegmentEncryptorDecryptorRuntimeDelegatable impl); - - /** - * By default simply use - * {@link de.adorsys.datasafe.directory.api.profile.keys.PrivateKeyService} to get key - * and pass path with key to {@link SymmetricPathEncryptionService} - */ - @Binds - abstract PathEncryption pathEncryption(SwitchablePathEncryptionImpl impl); - - /** - * Default symmetric path encryption that encrypts URI segment-by-segment. - */ - @Binds - abstract SymmetricPathEncryptionService symmetricPathEncryptionService(IntegrityPreservingUriEncryptionRuntimeDelegatable impl); -} 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 5ffcf8762..45cce5494 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,6 +7,7 @@ import de.adorsys.datasafe.simple.adapter.api.types.DSDocument; import de.adorsys.datasafe.simple.adapter.api.types.DocumentContent; import de.adorsys.datasafe.simple.adapter.api.types.DocumentFQN; +import de.adorsys.datasafe.simple.adapter.impl.config.PathEncryptionConfig; import de.adorsys.datasafe.teststorage.WithStorageProvider; import de.adorsys.datasafe.types.api.resource.AbsoluteLocation; import de.adorsys.datasafe.types.api.resource.BasePrivateResource; @@ -23,11 +24,12 @@ class CleanupDbTest extends WithStorageProvider { private SimpleDatasafeService simpleDatasafeService; private DFSCredentials dfsCredentials; + private PathEncryptionConfig pathEncryptionConfig = new PathEncryptionConfig(true); private void createSimpleService(WithStorageProvider.StorageDescriptor descriptor) { dfsCredentials = InitFromStorageProvider.dfsFromDescriptor(descriptor); if (dfsCredentials != null) { - simpleDatasafeService = new SimpleDatasafeServiceImpl(dfsCredentials, new MutableEncryptionConfig()); + simpleDatasafeService = new SimpleDatasafeServiceImpl(dfsCredentials, new MutableEncryptionConfig(), pathEncryptionConfig); } 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 a9d0043c0..4833e6bcd 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 @@ -8,6 +8,7 @@ import de.adorsys.datasafe.simple.adapter.api.types.DSDocument; import de.adorsys.datasafe.simple.adapter.api.types.DocumentContent; import de.adorsys.datasafe.simple.adapter.api.types.DocumentFQN; +import de.adorsys.datasafe.simple.adapter.impl.config.PathEncryptionConfig; import de.adorsys.datasafe.teststorage.WithStorageProvider; import de.adorsys.datasafe.types.api.resource.AbsoluteLocation; import de.adorsys.datasafe.types.api.resource.BasePrivateResource; @@ -25,13 +26,14 @@ class DFSRelativeToRootProfileTest extends WithStorageProvider { private SimpleDatasafeService simpleDatasafeService; private UserIDAuth userIDAuth; + private PathEncryptionConfig pathEncryptionConfig = new PathEncryptionConfig(true); void createDatasafeAdapter(StorageDescriptor descriptor) { DFSCredentials credentials = InitFromStorageProvider.dfsFromDescriptor(descriptor); simpleDatasafeService = null != credentials ? - new SimpleDatasafeServiceImpl(credentials, new MutableEncryptionConfig()) + new SimpleDatasafeServiceImpl(credentials, new MutableEncryptionConfig(), pathEncryptionConfig) : new SimpleDatasafeServiceImpl(); userIDAuth = new UserIDAuth(new UserID("peter"), ReadKeyPasswordTestFactory.getForString("password")); 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 6c3675bd4..9d5d34527 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 @@ -10,7 +10,7 @@ import de.adorsys.datasafe.simple.adapter.api.types.DocumentFQN; import de.adorsys.datasafe.simple.adapter.api.types.FilesystemDFSCredentials; import de.adorsys.datasafe.simple.adapter.impl.cmsencryption.SwitchableCmsEncryptionImpl; -import de.adorsys.datasafe.simple.adapter.impl.pathencryption.SwitchablePathEncryptionImpl; +import de.adorsys.datasafe.simple.adapter.impl.config.PathEncryptionConfig; import de.adorsys.datasafe.types.api.resource.AbsoluteLocation; import de.adorsys.datasafe.types.api.resource.BasePrivateResource; import de.adorsys.datasafe.types.api.resource.PrivateResource; @@ -48,7 +48,6 @@ class SimpleAdapterFeatureTest extends BaseMockitoTest { @BeforeEach @AfterEach void afterEach() { - System.setProperty(SwitchablePathEncryptionImpl.NO_BUCKETPATH_ENCRYPTION, Boolean.FALSE.toString()); System.setProperty(SwitchableCmsEncryptionImpl.NO_CMSENCRYPTION_AT_ALL, Boolean.FALSE.toString()); } @@ -69,8 +68,7 @@ void testWithEncryption() { @Test @SneakyThrows void testWithoutPathEncryption() { - System.setProperty(SwitchablePathEncryptionImpl.NO_BUCKETPATH_ENCRYPTION, Boolean.TRUE.toString()); - SimpleDatasafeServiceImpl simpleDatasafeService = new SimpleDatasafeServiceImpl(); + SimpleDatasafeServiceImpl simpleDatasafeService = new SimpleDatasafeServiceImpl(new PathEncryptionConfig(false)); simpleDatasafeService.createUser(userIDAuth); simpleDatasafeService.storeDocument(userIDAuth, document); @@ -94,9 +92,8 @@ void testWithoutPathEncryption() { @Test @SneakyThrows void testWithoutEncryption() { - System.setProperty(SwitchablePathEncryptionImpl.NO_BUCKETPATH_ENCRYPTION, Boolean.TRUE.toString()); System.setProperty(SwitchableCmsEncryptionImpl.NO_CMSENCRYPTION_AT_ALL, Boolean.TRUE.toString()); - SimpleDatasafeServiceImpl simpleDatasafeService = new SimpleDatasafeServiceImpl(); + SimpleDatasafeServiceImpl simpleDatasafeService = new SimpleDatasafeServiceImpl(new PathEncryptionConfig(false)); simpleDatasafeService.createUser(userIDAuth); simpleDatasafeService.storeDocument(userIDAuth, document); 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 22ccd5069..a7ce59715 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 @@ -14,6 +14,7 @@ import de.adorsys.datasafe.simple.adapter.api.types.DocumentDirectoryFQN; import de.adorsys.datasafe.simple.adapter.api.types.DocumentFQN; import de.adorsys.datasafe.simple.adapter.api.types.ListRecursiveFlag; +import de.adorsys.datasafe.simple.adapter.impl.config.PathEncryptionConfig; import de.adorsys.datasafe.storage.impl.fs.FileSystemStorageService; import de.adorsys.datasafe.teststorage.WithStorageProvider; import de.adorsys.datasafe.types.api.resource.AbsoluteLocation; @@ -62,7 +63,7 @@ private static Stream storages() { void mystart() { if (dfsCredentials != null) { - simpleDatasafeService = new SimpleDatasafeServiceImpl(dfsCredentials, new MutableEncryptionConfig()); + simpleDatasafeService = new SimpleDatasafeServiceImpl(dfsCredentials, new MutableEncryptionConfig(), new PathEncryptionConfig(true)); } else { simpleDatasafeService = new SimpleDatasafeServiceImpl(); } diff --git a/datasafe-simple-adapter/datasafe-simple-adapter-spring/pom.xml b/datasafe-simple-adapter/datasafe-simple-adapter-spring/pom.xml index c5ee50540..d26a79b52 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 - 1.0.2 + 1.0.3 4.0.0 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 aa250b0b4..064d3208a 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 @@ -7,11 +7,14 @@ 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.impl.config.PathEncryptionConfig; import de.adorsys.datasafe.simple.adapter.spring.properties.SpringDatasafeEncryptionProperties; +import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.annotation.Autowired; import javax.annotation.PostConstruct; +@Slf4j public class SpringSimpleDatasafeServiceFactory { @Autowired @@ -32,17 +35,19 @@ public void postConstruct() { } dfsCredentials = wiredDfsCredentials; } + log.info("encryptionProperties are:{}", encryptionProperties); } public SpringSimpleDatasafeServiceFactory() { useWiredCredentials = true; } - public SpringSimpleDatasafeServiceFactory(DFSCredentials credentials) { + public SpringSimpleDatasafeServiceFactory(DFSCredentials credentials, SpringDatasafeEncryptionProperties springDatasafeEncryptionProperties) { if (credentials == null) { throw new RuntimeException("dfs credentials passed in must not be null"); } dfsCredentials = credentials; + encryptionProperties = springDatasafeEncryptionProperties; useWiredCredentials = false; } @@ -50,19 +55,21 @@ public SimpleDatasafeService getSimpleDataSafeServiceWithSubdir(String subdirBel if (dfsCredentials instanceof AmazonS3DFSCredentials) { AmazonS3DFSCredentials amazonS3DFSCredentials = (AmazonS3DFSCredentials) dfsCredentials; return new SimpleDatasafeServiceImpl( - amazonS3DFSCredentials.toBuilder().rootBucket( - amazonS3DFSCredentials.getRootBucket() + "/" + subdirBelowRoot - ).build(), - null != encryptionProperties ? encryptionProperties.getEncryption() : new MutableEncryptionConfig() + amazonS3DFSCredentials.toBuilder().rootBucket( + amazonS3DFSCredentials.getRootBucket() + "/" + subdirBelowRoot + ).build(), + null != encryptionProperties ? encryptionProperties.getEncryption() : new MutableEncryptionConfig(), + new PathEncryptionConfig(null == encryptionProperties ? true : encryptionProperties.getPathEncryption()) ); } if (dfsCredentials instanceof FilesystemDFSCredentials) { FilesystemDFSCredentials filesystemDFSCredentials = (FilesystemDFSCredentials) dfsCredentials; return new SimpleDatasafeServiceImpl( - filesystemDFSCredentials.toBuilder().root( - filesystemDFSCredentials.getRoot() + "/" + subdirBelowRoot - ).build(), - null != encryptionProperties ? encryptionProperties.getEncryption() : new MutableEncryptionConfig() + filesystemDFSCredentials.toBuilder().root( + filesystemDFSCredentials.getRoot() + "/" + subdirBelowRoot + ).build(), + null != encryptionProperties ? encryptionProperties.getEncryption() : new MutableEncryptionConfig(), + new PathEncryptionConfig(null == encryptionProperties ? true : encryptionProperties.getPathEncryption()) ); } 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/SpringAmazonS3DFSCredentialsProperties.java b/datasafe-simple-adapter/datasafe-simple-adapter-spring/src/main/java/de/adorsys/datasafe/simple/adapter/spring/properties/SpringAmazonS3DFSCredentialsProperties.java index 0013a1e4c..2ce796b94 100644 --- a/datasafe-simple-adapter/datasafe-simple-adapter-spring/src/main/java/de/adorsys/datasafe/simple/adapter/spring/properties/SpringAmazonS3DFSCredentialsProperties.java +++ b/datasafe-simple-adapter/datasafe-simple-adapter-spring/src/main/java/de/adorsys/datasafe/simple/adapter/spring/properties/SpringAmazonS3DFSCredentialsProperties.java @@ -20,6 +20,7 @@ public class SpringAmazonS3DFSCredentialsProperties { private final static String DEFAULT_ROOT = "datasafe-root"; public final static String template = "\n" + "datasafe:\n" + + " pathEncryption: (optional, default true)\n" + " storeconnection:\n" + " amazons3:\n" + " url: (mandatory)\n" + 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 index e925ae2bd..fdad9de08 100644 --- 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 @@ -3,10 +3,13 @@ import de.adorsys.datasafe.encrypiton.api.types.encryption.MutableEncryptionConfig; import lombok.Data; import org.springframework.boot.context.properties.ConfigurationProperties; +import org.springframework.lang.Nullable; @Data @ConfigurationProperties(prefix = "datasafe") public class SpringDatasafeEncryptionProperties { private MutableEncryptionConfig encryption = new MutableEncryptionConfig(); + @Nullable + private Boolean pathEncryption = true; } diff --git a/datasafe-simple-adapter/datasafe-simple-adapter-spring/src/main/java/de/adorsys/datasafe/simple/adapter/spring/properties/SpringFilesystemDFSCredentialsProperties.java b/datasafe-simple-adapter/datasafe-simple-adapter-spring/src/main/java/de/adorsys/datasafe/simple/adapter/spring/properties/SpringFilesystemDFSCredentialsProperties.java index 71d486ea2..d95567ff9 100644 --- a/datasafe-simple-adapter/datasafe-simple-adapter-spring/src/main/java/de/adorsys/datasafe/simple/adapter/spring/properties/SpringFilesystemDFSCredentialsProperties.java +++ b/datasafe-simple-adapter/datasafe-simple-adapter-spring/src/main/java/de/adorsys/datasafe/simple/adapter/spring/properties/SpringFilesystemDFSCredentialsProperties.java @@ -16,6 +16,7 @@ public class SpringFilesystemDFSCredentialsProperties { private final static String DEFAULT_ROOT = "datasafe-root"; public final static String template = "\n" + "datasafe:\n" + + " pathEncryption: (optional, default true)\n" + " storeconnection:\n" + " filesystem:\n" + " rootbucket: (mandatory)\n"; diff --git a/datasafe-simple-adapter/datasafe-simple-adapter-spring/src/test/java/de/adorsys/datasafe/simple/adapter/spring/InectionForMinioTest.java b/datasafe-simple-adapter/datasafe-simple-adapter-spring/src/test/java/de/adorsys/datasafe/simple/adapter/spring/InjectionForMinioTest.java similarity index 86% rename from datasafe-simple-adapter/datasafe-simple-adapter-spring/src/test/java/de/adorsys/datasafe/simple/adapter/spring/InectionForMinioTest.java rename to datasafe-simple-adapter/datasafe-simple-adapter-spring/src/test/java/de/adorsys/datasafe/simple/adapter/spring/InjectionForMinioTest.java index 8517b342c..0a4f14085 100644 --- a/datasafe-simple-adapter/datasafe-simple-adapter-spring/src/test/java/de/adorsys/datasafe/simple/adapter/spring/InectionForMinioTest.java +++ b/datasafe-simple-adapter/datasafe-simple-adapter-spring/src/test/java/de/adorsys/datasafe/simple/adapter/spring/InjectionForMinioTest.java @@ -4,6 +4,7 @@ import de.adorsys.datasafe.simple.adapter.spring.annotations.UseDatasafeSpringConfiguration; import de.adorsys.datasafe.simple.adapter.spring.factory.SpringSimpleDatasafeServiceFactory; import de.adorsys.datasafe.simple.adapter.spring.properties.SpringDFSCredentialProperties; +import de.adorsys.datasafe.simple.adapter.spring.properties.SpringDatasafeEncryptionProperties; import de.adorsys.datasafe.teststorage.WithStorageProvider; import lombok.extern.slf4j.Slf4j; import org.junit.jupiter.api.BeforeAll; @@ -18,11 +19,14 @@ @Slf4j @ActiveProfiles("minio") @UseDatasafeSpringConfiguration -public class InectionForMinioTest extends InjectionTest { +public class InjectionForMinioTest extends InjectionTest { @Autowired private SpringDFSCredentialProperties dfsCredentialProperties; + @Autowired + private SpringDatasafeEncryptionProperties encryptionProperties; + @BeforeAll static void startMinio() { minio().getStorageService().get(); @@ -37,7 +41,7 @@ private static Stream minioonly() { @MethodSource("minioonly") public void plainService(WithStorageProvider.StorageDescriptor descriptor) { log.info("descriptor is " + descriptor.getName()); - SpringSimpleDatasafeServiceFactory springSimpleDatasafeServiceFactory = new SpringSimpleDatasafeServiceFactory(SpringPropertiesToDFSCredentialsUtil.dfsCredentials(dfsCredentialProperties)); + SpringSimpleDatasafeServiceFactory springSimpleDatasafeServiceFactory = new SpringSimpleDatasafeServiceFactory(SpringPropertiesToDFSCredentialsUtil.dfsCredentials(dfsCredentialProperties), encryptionProperties); SimpleDatasafeService service = springSimpleDatasafeServiceFactory.getSimpleDataSafeServiceWithSubdir("subdir"); testCreateUser(service); } 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 726088eef..e230609f1 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 @@ -3,18 +3,46 @@ import de.adorsys.datasafe.encrypiton.api.types.UserID; import de.adorsys.datasafe.encrypiton.api.types.UserIDAuth; import de.adorsys.datasafe.simple.adapter.api.SimpleDatasafeService; +import de.adorsys.datasafe.simple.adapter.api.types.AmazonS3DFSCredentials; +import de.adorsys.datasafe.simple.adapter.api.types.DFSCredentials; +import de.adorsys.datasafe.simple.adapter.api.types.DSDocument; +import de.adorsys.datasafe.simple.adapter.api.types.DocumentContent; +import de.adorsys.datasafe.simple.adapter.api.types.DocumentFQN; +import de.adorsys.datasafe.simple.adapter.api.types.FilesystemDFSCredentials; +import de.adorsys.datasafe.simple.adapter.impl.SimpleDatasafeServiceImpl; import de.adorsys.datasafe.simple.adapter.spring.annotations.UseDatasafeSpringConfiguration; 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.PrivateResource; +import de.adorsys.datasafe.types.api.resource.ResolvedResource; import de.adorsys.datasafe.types.api.types.ReadKeyPassword; import de.adorsys.datasafe.types.api.utils.ReadKeyPasswordTestFactory; +import lombok.SneakyThrows; +import lombok.extern.slf4j.Slf4j; +import org.jetbrains.annotations.Nullable; +import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.extension.ExtendWith; import org.springframework.boot.SpringBootConfiguration; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.junit.jupiter.SpringExtension; +import org.testcontainers.shaded.org.apache.commons.io.IOUtils; +import java.io.InputStream; +import java.io.StringWriter; +import java.net.URI; +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.assertj.core.api.Assertions.assertThat; +import static org.junit.Assert.assertFalse; +import static org.junit.jupiter.api.Assertions.assertEquals; +@Slf4j @SpringBootTest @ExtendWith(SpringExtension.class) @ContextConfiguration @@ -32,4 +60,58 @@ public void testCreateUser(SimpleDatasafeService datasafeService) { assertThat(datasafeService.userExists(userid)).isTrue(); datasafeService.destroyUser(userIDAuth); } + + @SneakyThrows + void testWithoutPathEncryption(SimpleDatasafeService simpleDatasafeServiceApi, DFSCredentials dfsCredentials) { + if (!(simpleDatasafeServiceApi instanceof SimpleDatasafeServiceImpl)) { + throw new TestException("Did expect instance of SimpleDatasafeServiceImpl"); + } + AbsoluteLocation rootLocation = getPrivateResourceAbsoluteLocation(dfsCredentials); + SimpleDatasafeServiceImpl simpleDatasafeService = (SimpleDatasafeServiceImpl) simpleDatasafeServiceApi; + + UserIDAuth userIDAuth = new UserIDAuth(new UserID("peter"), ReadKeyPasswordTestFactory.getForString("password")); + String content = "content of document"; + String path = "a/b/c.txt"; + DSDocument document = new DSDocument(new DocumentFQN(path), new DocumentContent(content.getBytes())); + simpleDatasafeService.createUser(userIDAuth); + simpleDatasafeService.storeDocument(userIDAuth, document); + + try (Stream> absoluteLocationStream = simpleDatasafeService.getStorageService().list(rootLocation)) { + assertEquals(1, absoluteLocationStream.filter(el -> el.location().toASCIIString().contains(path)).count()); + } + try (Stream> absoluteLocationStream = simpleDatasafeService.getStorageService().list(rootLocation)) { + Optional> first = absoluteLocationStream.filter(el -> el.location().toASCIIString().contains(path)).findFirst(); + if (!first.isPresent()) { + throw new TestException("expeceted absoluteLocatinn stream to have at least one element"); + } + + 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); + } + + @Nullable + @SneakyThrows + private AbsoluteLocation getPrivateResourceAbsoluteLocation(DFSCredentials dfsCredentials) { + if (dfsCredentials instanceof FilesystemDFSCredentials) { + String root = ((FilesystemDFSCredentials) dfsCredentials).getRoot(); + Path listpath = FileSystems.getDefault().getPath(root); + return new AbsoluteLocation<>(BasePrivateResource.forPrivate(listpath.toUri())); + } + if (dfsCredentials instanceof AmazonS3DFSCredentials) { + AmazonS3DFSCredentials a = (AmazonS3DFSCredentials) dfsCredentials; + return new AbsoluteLocation<>(BasePrivateResource.forPrivate(new URI(a.getUrl() + "/" + a.getRootBucket()))); + } + throw new TestException("NYI"); + } + + static class TestException extends RuntimeException { + public TestException(String message) { + super(message); + } + } } diff --git a/datasafe-simple-adapter/datasafe-simple-adapter-spring/src/test/java/de/adorsys/datasafe/simple/adapter/spring/InjectionWithoutPathEncryptionForFilesystemTest.java b/datasafe-simple-adapter/datasafe-simple-adapter-spring/src/test/java/de/adorsys/datasafe/simple/adapter/spring/InjectionWithoutPathEncryptionForFilesystemTest.java new file mode 100644 index 000000000..969653f13 --- /dev/null +++ b/datasafe-simple-adapter/datasafe-simple-adapter-spring/src/test/java/de/adorsys/datasafe/simple/adapter/spring/InjectionWithoutPathEncryptionForFilesystemTest.java @@ -0,0 +1,44 @@ +package de.adorsys.datasafe.simple.adapter.spring; + +import de.adorsys.datasafe.simple.adapter.api.SimpleDatasafeService; +import de.adorsys.datasafe.simple.adapter.api.types.DFSCredentials; +import de.adorsys.datasafe.simple.adapter.spring.annotations.UseDatasafeSpringConfiguration; +import de.adorsys.datasafe.simple.adapter.spring.factory.SpringSimpleDatasafeServiceFactory; +import de.adorsys.datasafe.simple.adapter.spring.properties.SpringDFSCredentialProperties; +import de.adorsys.datasafe.simple.adapter.spring.properties.SpringDatasafeEncryptionProperties; +import de.adorsys.datasafe.teststorage.WithStorageProvider; +import lombok.extern.slf4j.Slf4j; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.boot.SpringBootConfiguration; +import org.springframework.test.context.ActiveProfiles; +import org.springframework.test.context.ContextConfiguration; + +import java.util.stream.Stream; + +@Slf4j +@ActiveProfiles("fs-withoutPathEncryption") +@UseDatasafeSpringConfiguration +public class InjectionWithoutPathEncryptionForFilesystemTest extends InjectionTest { + @Autowired + private SpringDFSCredentialProperties dfsCredentialProperties; + + @Autowired + private SpringDatasafeEncryptionProperties encryptionProperties; + + private static Stream fsonly() { + return Stream.of(fs()); + } + + @ParameterizedTest + @MethodSource("fsonly") + public void plainService(WithStorageProvider.StorageDescriptor descriptor) { + log.info("descriptor is {}", descriptor.getName()); + DFSCredentials dfsCredentials = SpringPropertiesToDFSCredentialsUtil.dfsCredentials(dfsCredentialProperties); + SpringSimpleDatasafeServiceFactory springSimpleDatasafeServiceFactory = new SpringSimpleDatasafeServiceFactory(dfsCredentials, encryptionProperties); + SimpleDatasafeService service = springSimpleDatasafeServiceFactory.getSimpleDataSafeServiceWithSubdir("subdir"); + testWithoutPathEncryption(service, dfsCredentials); + } + +} diff --git a/datasafe-simple-adapter/datasafe-simple-adapter-spring/src/test/java/de/adorsys/datasafe/simple/adapter/spring/InjectionWithoutPathEncryptionForMinioTest.java b/datasafe-simple-adapter/datasafe-simple-adapter-spring/src/test/java/de/adorsys/datasafe/simple/adapter/spring/InjectionWithoutPathEncryptionForMinioTest.java new file mode 100644 index 000000000..023f93952 --- /dev/null +++ b/datasafe-simple-adapter/datasafe-simple-adapter-spring/src/test/java/de/adorsys/datasafe/simple/adapter/spring/InjectionWithoutPathEncryptionForMinioTest.java @@ -0,0 +1,49 @@ +package de.adorsys.datasafe.simple.adapter.spring; + +import de.adorsys.datasafe.simple.adapter.api.SimpleDatasafeService; +import de.adorsys.datasafe.simple.adapter.api.types.DFSCredentials; +import de.adorsys.datasafe.simple.adapter.spring.annotations.UseDatasafeSpringConfiguration; +import de.adorsys.datasafe.simple.adapter.spring.factory.SpringSimpleDatasafeServiceFactory; +import de.adorsys.datasafe.simple.adapter.spring.properties.SpringDFSCredentialProperties; +import de.adorsys.datasafe.simple.adapter.spring.properties.SpringDatasafeEncryptionProperties; +import de.adorsys.datasafe.teststorage.WithStorageProvider; +import lombok.extern.slf4j.Slf4j; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.test.context.ActiveProfiles; + +import java.util.stream.Stream; + +@Slf4j +@ActiveProfiles("minio-withoutPathEncryption") +@UseDatasafeSpringConfiguration +public class InjectionWithoutPathEncryptionForMinioTest extends InjectionTest { + @Autowired + private SpringDFSCredentialProperties dfsCredentialProperties; + + @Autowired + private SpringDatasafeEncryptionProperties encryptionProperties; + + @BeforeAll + static void startMinio() { + minio().getStorageService().get(); + System.setProperty("MINIO_URL", minio().getMappedUrl()); + } + + private static Stream minioonly() { + return Stream.of(minio()); + } + + @ParameterizedTest + @MethodSource("minioonly") + public void plainService(WithStorageProvider.StorageDescriptor descriptor) { + log.info("descriptor is {}", descriptor.getName()); + DFSCredentials dfsCredentials = SpringPropertiesToDFSCredentialsUtil.dfsCredentials(dfsCredentialProperties); + SpringSimpleDatasafeServiceFactory springSimpleDatasafeServiceFactory = new SpringSimpleDatasafeServiceFactory(dfsCredentials, encryptionProperties); + SimpleDatasafeService service = springSimpleDatasafeServiceFactory.getSimpleDataSafeServiceWithSubdir("subdir"); + testWithoutPathEncryption(service, dfsCredentials); + } + +} diff --git a/datasafe-simple-adapter/datasafe-simple-adapter-spring/src/test/resources/application-fs-withoutPathEncryption.yml b/datasafe-simple-adapter/datasafe-simple-adapter-spring/src/test/resources/application-fs-withoutPathEncryption.yml new file mode 100644 index 000000000..002a1c9b7 --- /dev/null +++ b/datasafe-simple-adapter/datasafe-simple-adapter-spring/src/test/resources/application-fs-withoutPathEncryption.yml @@ -0,0 +1,5 @@ +datasafe: + pathEncryption: false + storeconnection: + filesystem: + rootbucket: target/test-filesystem diff --git a/datasafe-simple-adapter/datasafe-simple-adapter-spring/src/test/resources/application-minio-withoutPathEncryption.yml b/datasafe-simple-adapter/datasafe-simple-adapter-spring/src/test/resources/application-minio-withoutPathEncryption.yml new file mode 100644 index 000000000..afcd9bebf --- /dev/null +++ b/datasafe-simple-adapter/datasafe-simple-adapter-spring/src/test/resources/application-minio-withoutPathEncryption.yml @@ -0,0 +1,8 @@ +datasafe: + pathEncryption: false + storeconnection: + amazons3: + url: ${MINIO_URL} + accesskey: admin + secretkey: password + rootbucket: adorsys diff --git a/datasafe-simple-adapter/pom.xml b/datasafe-simple-adapter/pom.xml index f369e4442..e868b8ea4 100644 --- a/datasafe-simple-adapter/pom.xml +++ b/datasafe-simple-adapter/pom.xml @@ -5,7 +5,7 @@ datasafe de.adorsys - 1.0.2 + 1.0.3 4.0.0 diff --git a/datasafe-storage/datasafe-storage-api/pom.xml b/datasafe-storage/datasafe-storage-api/pom.xml index 6cfcaa797..5c19f830b 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 - 1.0.2 + 1.0.3 datasafe-storage-api diff --git a/datasafe-storage/datasafe-storage-impl-db/pom.xml b/datasafe-storage/datasafe-storage-impl-db/pom.xml index 15be46d3b..8693a50d0 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 - 1.0.2 + 1.0.3 4.0.0 diff --git a/datasafe-storage/datasafe-storage-impl-fs/pom.xml b/datasafe-storage/datasafe-storage-impl-fs/pom.xml index 4a6aa87e5..a02a779da 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 - 1.0.2 + 1.0.3 4.0.0 diff --git a/datasafe-storage/datasafe-storage-impl-s3/pom.xml b/datasafe-storage/datasafe-storage-impl-s3/pom.xml index 60aac2193..1163d2b4b 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 - 1.0.2 + 1.0.3 4.0.0 diff --git a/datasafe-storage/pom.xml b/datasafe-storage/pom.xml index 2407de696..cf926dd4a 100644 --- a/datasafe-storage/pom.xml +++ b/datasafe-storage/pom.xml @@ -5,7 +5,7 @@ datasafe de.adorsys - 1.0.2 + 1.0.3 4.0.0 diff --git a/datasafe-test-storages/pom.xml b/datasafe-test-storages/pom.xml index 3b03e5f98..6a9f2a8e9 100644 --- a/datasafe-test-storages/pom.xml +++ b/datasafe-test-storages/pom.xml @@ -5,7 +5,7 @@ datasafe de.adorsys - 1.0.2 + 1.0.3 4.0.0 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 cb3b7cc5f..2b5684e13 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 @@ -470,7 +470,7 @@ public StorageDescriptor(WithStorageProvider.StorageDescriptorName name, Supplie this.region = region; this.rootBucket = rootBucket; - log.info("StorageDescriptor name: {} location: {} region: {} root bucket: {}", this.name, this.location, this.region, this.rootBucket); + log.debug("StorageDescriptor name: {} location: {} region: {} root bucket: {}", this.name, this.location, this.region, this.rootBucket); } public String getMappedUrl() { diff --git a/datasafe-types-api/pom.xml b/datasafe-types-api/pom.xml index 75bb351c9..d987476ad 100644 --- a/datasafe-types-api/pom.xml +++ b/datasafe-types-api/pom.xml @@ -5,7 +5,7 @@ de.adorsys datasafe - 1.0.2 + 1.0.3 datasafe-types-api diff --git a/last-module-codecoverage-check/pom.xml b/last-module-codecoverage-check/pom.xml index 48c34712b..8d377f7a6 100644 --- a/last-module-codecoverage-check/pom.xml +++ b/last-module-codecoverage-check/pom.xml @@ -5,7 +5,7 @@ datasafe de.adorsys - 1.0.2 + 1.0.3 4.0.0 diff --git a/pom.xml b/pom.xml index 40144294f..e44daf4a6 100644 --- a/pom.xml +++ b/pom.xml @@ -25,7 +25,7 @@ de.adorsys datasafe - 1.0.2 + 1.0.3 datasafe Datasafe https://github.com/adorsys/datasafe