diff --git a/.gitignore b/.gitignore index 5c33d5d87..9dfd2b1dd 100644 --- a/.gitignore +++ b/.gitignore @@ -42,4 +42,8 @@ hs_err_pid* # node.js / frontend node_modules/ dist/ +.angular/ +main.js.map +package-lock.json + diff --git a/datasafe-business/pom.xml b/datasafe-business/pom.xml index 4d72dfef4..0b560880e 100644 --- a/datasafe-business/pom.xml +++ b/datasafe-business/pom.xml @@ -5,7 +5,7 @@ datasafe de.adorsys - 2.0.0 + 2.0.2 4.0.0 diff --git a/datasafe-cli/pom.xml b/datasafe-cli/pom.xml index dd92f3ec2..a185dc1ad 100644 --- a/datasafe-cli/pom.xml +++ b/datasafe-cli/pom.xml @@ -5,7 +5,7 @@ de.adorsys datasafe - 2.0.0 + 2.0.2 datasafe-cli diff --git a/datasafe-directory/datasafe-directory-api/pom.xml b/datasafe-directory/datasafe-directory-api/pom.xml index e47d87e34..64078b587 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 - 2.0.0 + 2.0.2 datasafe-directory-api diff --git a/datasafe-directory/datasafe-directory-impl/pom.xml b/datasafe-directory/datasafe-directory-impl/pom.xml index ac56f72f5..8d01a516a 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 - 2.0.0 + 2.0.2 datasafe-directory-impl diff --git a/datasafe-directory/pom.xml b/datasafe-directory/pom.xml index d40ff6dfd..7bbf7574f 100644 --- a/datasafe-directory/pom.xml +++ b/datasafe-directory/pom.xml @@ -5,7 +5,7 @@ datasafe de.adorsys - 2.0.0 + 2.0.2 4.0.0 diff --git a/datasafe-encryption/datasafe-encryption-api/pom.xml b/datasafe-encryption/datasafe-encryption-api/pom.xml index 0460c9ffd..4e453c981 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 - 2.0.0 + 2.0.2 datasafe-encryption-api 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 index 9bab88b51..7d20aaaa2 100644 --- 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 @@ -45,13 +45,16 @@ public static class SecretKeyCreationCfg { public static class EncryptingKeyCreationCfg { @Builder.Default - private final String algo = "RSA"; + private final String algo = "ECDH"; @Builder.Default - private final int size = 2048; + private final int size = 256; + + @Builder.Default + private final String sigAlgo = "SHA256withECDSA"; @Builder.Default - private final String sigAlgo = "SHA256withRSA"; + private final String customNamedCurve = "Curve25519"; } @Getter @@ -59,12 +62,15 @@ public static class EncryptingKeyCreationCfg { public static class SigningKeyCreationCfg { @Builder.Default - private final String algo = "RSA"; + private final String algo = "ECDH"; + + @Builder.Default + private final int size = 256; @Builder.Default - private final int size = 2048; + private final String sigAlgo = "SHA256withECDSA"; @Builder.Default - private final String sigAlgo = "SHA256withRSA"; + private final String customNamedCurve = "Curve25519"; } } diff --git a/datasafe-encryption/datasafe-encryption-impl/pom.xml b/datasafe-encryption/datasafe-encryption-impl/pom.xml index 0036b7e51..7109cd9b4 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 - 2.0.0 + 2.0.2 datasafe-encryption-impl 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 4d8dc886d..abca2737d 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 @@ -36,7 +36,7 @@ /** * Cryptographic message syntax document encoder/decoder - see * - * @see CMS + * @see CMS * wiki */ @Slf4j 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 fd1487d9f..622a624d9 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 @@ -19,6 +19,8 @@ import de.adorsys.keymanagement.api.types.template.generated.Secret; import lombok.SneakyThrows; import lombok.extern.slf4j.Slf4j; +import org.bouncycastle.crypto.ec.CustomNamedCurves; +import org.bouncycastle.jcajce.provider.asymmetric.util.EC5Util; import javax.crypto.SecretKey; import javax.crypto.SecretKeyFactory; @@ -89,6 +91,7 @@ public KeyStore createKeyStore(KeyStoreAuth keyStoreAuth, .keySize(encConf.getSize()) .prefix("ENC") .password(passSupplier) + .paramSpec(EC5Util.convertToSpec(CustomNamedCurves.getByName(encConf.getCustomNamedCurve()))) .build() .repeat(keyConfig.getEncKeyNumber()) ) diff --git a/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/pathencryption/IntegrityPreservingUriEncryption.java b/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/pathencryption/IntegrityPreservingUriEncryption.java index 928a358d7..f24d11f7f 100644 --- a/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/pathencryption/IntegrityPreservingUriEncryption.java +++ b/datasafe-encryption/datasafe-encryption-impl/src/main/java/de/adorsys/datasafe/encrypiton/impl/pathencryption/IntegrityPreservingUriEncryption.java @@ -24,7 +24,7 @@ * 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 + * Additionally, each segment is authenticated against its parent path hash, so attacker can't * move a/file to b/file without being detected. */ @Slf4j diff --git a/datasafe-encryption/pom.xml b/datasafe-encryption/pom.xml index 90c6f4422..e8597d40f 100644 --- a/datasafe-encryption/pom.xml +++ b/datasafe-encryption/pom.xml @@ -5,7 +5,7 @@ datasafe de.adorsys - 2.0.0 + 2.0.2 4.0.0 diff --git a/datasafe-examples/datasafe-examples-business/pom.xml b/datasafe-examples/datasafe-examples-business/pom.xml index 16bffc4bc..6d9e1e396 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 - 2.0.0 + 2.0.2 datasafe-examples-business diff --git a/datasafe-examples/datasafe-examples-customize-dagger/pom.xml b/datasafe-examples/datasafe-examples-customize-dagger/pom.xml index d2ee6ca21..bd2050378 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 - 2.0.0 + 2.0.2 datasafe-examples-customize-dagger diff --git a/datasafe-examples/datasafe-examples-multidfs/pom.xml b/datasafe-examples/datasafe-examples-multidfs/pom.xml index 17feb9450..1693f8ab1 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 - 2.0.0 + 2.0.2 datasafe-examples-multidfs diff --git a/datasafe-examples/datasafe-examples-versioned-s3/pom.xml b/datasafe-examples/datasafe-examples-versioned-s3/pom.xml index af6dcdf69..fe1bd76db 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 - 2.0.0 + 2.0.2 datasafe-examples-versioned-s3 diff --git a/datasafe-examples/pom.xml b/datasafe-examples/pom.xml index 8f7af5a3f..98d612712 100644 --- a/datasafe-examples/pom.xml +++ b/datasafe-examples/pom.xml @@ -5,7 +5,7 @@ datasafe de.adorsys - 2.0.0 + 2.0.2 4.0.0 diff --git a/datasafe-inbox/datasafe-inbox-api/pom.xml b/datasafe-inbox/datasafe-inbox-api/pom.xml index 04c70b749..bd7523ee2 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 - 2.0.0 + 2.0.2 datasafe-inbox-api diff --git a/datasafe-inbox/datasafe-inbox-impl/pom.xml b/datasafe-inbox/datasafe-inbox-impl/pom.xml index 69390da78..19feb8c4d 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 - 2.0.0 + 2.0.2 datasafe-inbox-impl diff --git a/datasafe-inbox/pom.xml b/datasafe-inbox/pom.xml index 979cc6224..84bdb7ab9 100644 --- a/datasafe-inbox/pom.xml +++ b/datasafe-inbox/pom.xml @@ -5,7 +5,7 @@ datasafe de.adorsys - 2.0.0 + 2.0.2 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 68e292184..7d8b7c7ee 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,16 +5,12 @@ datasafe-long-run-tests de.adorsys - 2.0.0 + 2.0.2 4.0.0 datasafe-business-tests-random-actions - - 2.22.2 - - de.adorsys @@ -185,9 +181,8 @@ org.apache.maven.plugins maven-surefire-plugin - ${maven.surefire.plugin.version} + ${surefire.version} - once ${testArgs} diff --git a/datasafe-long-run-tests/pom.xml b/datasafe-long-run-tests/pom.xml index 0c8b29271..71593ffc8 100644 --- a/datasafe-long-run-tests/pom.xml +++ b/datasafe-long-run-tests/pom.xml @@ -5,7 +5,7 @@ datasafe de.adorsys - 2.0.0 + 2.0.2 4.0.0 diff --git a/datasafe-metainfo/datasafe-metainfo-version-api/pom.xml b/datasafe-metainfo/datasafe-metainfo-version-api/pom.xml index 8c9ea5867..e0bc9924f 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 - 2.0.0 + 2.0.2 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 22620b071..d07acfb1f 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 - 2.0.0 + 2.0.2 datasafe-metainfo-version-impl diff --git a/datasafe-metainfo/pom.xml b/datasafe-metainfo/pom.xml index 7663fb743..9811a2401 100644 --- a/datasafe-metainfo/pom.xml +++ b/datasafe-metainfo/pom.xml @@ -5,7 +5,7 @@ datasafe de.adorsys - 2.0.0 + 2.0.2 4.0.0 diff --git a/datasafe-privatestore/datasafe-privatestore-api/pom.xml b/datasafe-privatestore/datasafe-privatestore-api/pom.xml index bfb824bb2..662e128c0 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 - 2.0.0 + 2.0.2 4.0.0 diff --git a/datasafe-privatestore/datasafe-privatestore-impl/pom.xml b/datasafe-privatestore/datasafe-privatestore-impl/pom.xml index cba7aaf0d..1ba432ee7 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 - 2.0.0 + 2.0.2 4.0.0 diff --git a/datasafe-privatestore/pom.xml b/datasafe-privatestore/pom.xml index a6ed1f8b7..56ac365c5 100644 --- a/datasafe-privatestore/pom.xml +++ b/datasafe-privatestore/pom.xml @@ -5,7 +5,7 @@ datasafe de.adorsys - 2.0.0 + 2.0.2 4.0.0 diff --git a/datasafe-rest-impl/pom.xml b/datasafe-rest-impl/pom.xml index dd53fb7d0..20fa36a5d 100644 --- a/datasafe-rest-impl/pom.xml +++ b/datasafe-rest-impl/pom.xml @@ -5,11 +5,11 @@ datasafe de.adorsys - 2.0.0 + 2.0.2 datasafe-rest-impl - 2.0.0 + 2.0.2 datasafe-rest-impl Spring Boot DataSafe Application @@ -24,6 +24,11 @@ + + org.springdoc + springdoc-openapi-starter-webmvc-ui + 2.2.0 + de.adorsys datasafe-business diff --git a/datasafe-rest-impl/src/main/java/de/adorsys/datasafe/rest/impl/security/SecurityConfig.java b/datasafe-rest-impl/src/main/java/de/adorsys/datasafe/rest/impl/security/SecurityConfig.java index ed5677088..0ff08cab6 100644 --- a/datasafe-rest-impl/src/main/java/de/adorsys/datasafe/rest/impl/security/SecurityConfig.java +++ b/datasafe-rest-impl/src/main/java/de/adorsys/datasafe/rest/impl/security/SecurityConfig.java @@ -26,10 +26,13 @@ import org.springframework.web.cors.UrlBasedCorsConfigurationSource; import org.springframework.web.servlet.handler.HandlerMappingIntrospector; +import java.util.Arrays; import java.util.HashMap; +import java.util.List; import java.util.Map; import static de.adorsys.datasafe.rest.impl.security.SecurityConstants.TOKEN_HEADER; +import static org.springframework.security.config.Customizer.withDefaults; @Configuration @EnableWebSecurity @@ -44,24 +47,17 @@ public class SecurityConfig { @Bean public SecurityFilterChain filterChain(HttpSecurity http, MvcRequestMatcher.Builder mvc, AuthenticationManager authenticationManager) throws Exception { - MvcRequestMatcher[] SWAGGER_RESOURCES = { - mvc.pattern("/v2/api-docs"), - mvc.pattern("/configuration/ui"), - mvc.pattern("/swagger-resources"), - mvc.pattern("/configuration/security"), - mvc.pattern("/swagger-ui.html"), - mvc.pattern("/webjars/**"), - mvc.pattern("/swagger-resources/configuration/ui"), + MvcRequestMatcher[] swaggerResources = { + mvc.pattern("/v3/api-docs"), mvc.pattern("/swagger-ui.html") }; - - http.cors(AbstractHttpConfigurer::disable) + http.cors(withDefaults()) .csrf(AbstractHttpConfigurer::disable) .authorizeHttpRequests(authz -> authz - .requestMatchers(SWAGGER_RESOURCES).permitAll() + .requestMatchers(swaggerResources).permitAll() .requestMatchers(mvc.pattern("/static/**")).permitAll() .requestMatchers(mvc.pattern(SecurityConstants.AUTH_LOGIN_URL)).permitAll() - .requestMatchers(mvc.pattern(HttpMethod.OPTIONS, "/**")).permitAll() + .requestMatchers(mvc.pattern(HttpMethod.GET, "/**")).permitAll() .anyRequest().authenticated() ) .addFilter(new JwtAuthorizationFilter(authenticationManager, securityProperties)) @@ -77,8 +73,8 @@ MvcRequestMatcher.Builder mvc(HandlerMappingIntrospector introspector) { } @Bean - public InMemoryUserDetailsManager userDetailsService(PasswordEncoder passwordEncoder) { - UserDetails user = User.withDefaultPasswordEncoder() + public InMemoryUserDetailsManager userDetailsService(PasswordEncoder encoder) { + UserDetails user = User.builder().passwordEncoder(encoder::encode) .username(securityProperties.getDefaultUser()) .password(securityProperties.getDefaultPassword()) .authorities("ROLE_USER") @@ -101,19 +97,15 @@ public PasswordEncoder passwordEncoder() { } @Bean - public CorsConfigurationSource corsConfigurationSource() { + CorsConfigurationSource corsConfigurationSource() { + CorsConfiguration configuration = new CorsConfiguration(); + configuration.setAllowedOrigins(List.of("http://localhost:4200")); + configuration.setAllowedMethods(Arrays.asList("GET", "POST", "PUT", "DELETE")); + configuration.setAllowedHeaders(List.of("*")); + configuration.setAllowCredentials(true); + configuration.addExposedHeader(TOKEN_HEADER); UrlBasedCorsConfigurationSource source = new UrlBasedCorsConfigurationSource(); - - CorsConfiguration authConfig = new CorsConfiguration().applyPermitDefaultValues(); - authConfig.addExposedHeader(TOKEN_HEADER); - source.registerCorsConfiguration(SecurityConstants.AUTH_LOGIN_URL, authConfig); - - CorsConfiguration globalConfig = new CorsConfiguration().applyPermitDefaultValues(); - globalConfig.addAllowedMethod(HttpMethod.OPTIONS); - globalConfig.addAllowedMethod(HttpMethod.PUT); - globalConfig.addAllowedMethod(HttpMethod.DELETE); - source.registerCorsConfiguration("/**", globalConfig); - + source.registerCorsConfiguration("/**", configuration); return source; } diff --git a/datasafe-rest-impl/src/main/resources/application.properties b/datasafe-rest-impl/src/main/resources/application.properties index 0c7f28841..549395490 100644 --- a/datasafe-rest-impl/src/main/resources/application.properties +++ b/datasafe-rest-impl/src/main/resources/application.properties @@ -36,3 +36,11 @@ datasafe.encryption.keystore.pbkdf.scrypt.parallelization=1 datasafe.encryption.keystore.pbkdf.scrypt.saltLength=16 datasafe.encryption.keystore.macAlgo=HmacSHA3_512 datasafe.encryption.cms.algo=AES256_GCM + +#datasafe.encryption.keys.encrypting.algo=RSA +#datasafe.encryption.keys.encrypting.size=4096 +#datasafe.encryption.keys.encrypting.sigAlgo=SHA256withRSA + +#datasafe.encryption.keys.signing.algo=RSA +#datasafe.encryption.keys.signing.size=4096 +#datasafe.encryption.keys.signing.sigAlgo=SHA256withRSA diff --git a/datasafe-rest-impl/src/main/resources/jwt-config.properties b/datasafe-rest-impl/src/main/resources/jwt-config.properties index 97cd74c18..ac895cbbc 100644 --- a/datasafe-rest-impl/src/main/resources/jwt-config.properties +++ b/datasafe-rest-impl/src/main/resources/jwt-config.properties @@ -1,5 +1,7 @@ -jwt_secret=${JWT_SECRET} -default_user=${DEFAULT_USER} -default_password=${DEFAULT_PASSWORD} -#10 Days in ms -token_expiration=${TOKEN_EXPIRATION:864000000} +debug=false +management.endpoints.web.exposure.include=* + +jwt_secret=n2r5u8x/A%D*G-KaPdSgVkYp3s6v9y$B&E(H+MbQeThWmZq4t7w!z%C*F-J@NcRf +default_user=username +default_password=password +token_expiration=864000000 \ No newline at end of file diff --git a/datasafe-rest-impl/src/main/resources/static/index.html b/datasafe-rest-impl/src/main/resources/static/index.html new file mode 100644 index 000000000..c12debabd --- /dev/null +++ b/datasafe-rest-impl/src/main/resources/static/index.html @@ -0,0 +1,26 @@ + + + DataSafe + + + +
+
+

DataSafe

+
+
+ +
+ + +
+ + diff --git a/datasafe-runtime-delegate/pom.xml b/datasafe-runtime-delegate/pom.xml index e03d0fb4d..f1e6e5d9c 100644 --- a/datasafe-runtime-delegate/pom.xml +++ b/datasafe-runtime-delegate/pom.xml @@ -5,7 +5,7 @@ de.adorsys datasafe - 2.0.0 + 2.0.2 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 cc5f4a7f1..af5ce5a90 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 - 2.0.0 + 2.0.2 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 1c3cc9822..b75b2a192 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 - 2.0.0 + 2.0.2 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 b5131525b..e7e6b562b 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 - 2.0.0 + 2.0.2 4.0.0 diff --git a/datasafe-simple-adapter/pom.xml b/datasafe-simple-adapter/pom.xml index a6d5053b1..1db1b4c3c 100644 --- a/datasafe-simple-adapter/pom.xml +++ b/datasafe-simple-adapter/pom.xml @@ -5,7 +5,7 @@ datasafe de.adorsys - 2.0.0 + 2.0.2 4.0.0 diff --git a/datasafe-storage/datasafe-storage-api/pom.xml b/datasafe-storage/datasafe-storage-api/pom.xml index 9ea0879c3..640b8bb51 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 - 2.0.0 + 2.0.2 datasafe-storage-api diff --git a/datasafe-storage/datasafe-storage-impl-db/pom.xml b/datasafe-storage/datasafe-storage-impl-db/pom.xml index 5ac2af5c2..b54ca648e 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 - 2.0.0 + 2.0.2 4.0.0 diff --git a/datasafe-storage/datasafe-storage-impl-fs/pom.xml b/datasafe-storage/datasafe-storage-impl-fs/pom.xml index fbf20109c..5c38d1b0a 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 - 2.0.0 + 2.0.2 4.0.0 diff --git a/datasafe-storage/datasafe-storage-impl-s3/pom.xml b/datasafe-storage/datasafe-storage-impl-s3/pom.xml index 7335d35e7..c9bd41a17 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 - 2.0.0 + 2.0.2 4.0.0 diff --git a/datasafe-storage/pom.xml b/datasafe-storage/pom.xml index 6802e49cc..70881ff1e 100644 --- a/datasafe-storage/pom.xml +++ b/datasafe-storage/pom.xml @@ -5,7 +5,7 @@ datasafe de.adorsys - 2.0.0 + 2.0.2 4.0.0 diff --git a/datasafe-test-storages/pom.xml b/datasafe-test-storages/pom.xml index e4b819f4e..e0364c713 100644 --- a/datasafe-test-storages/pom.xml +++ b/datasafe-test-storages/pom.xml @@ -5,7 +5,7 @@ datasafe de.adorsys - 2.0.0 + 2.0.2 4.0.0 diff --git a/datasafe-types-api/pom.xml b/datasafe-types-api/pom.xml index c05645df0..97ceaa5d9 100644 --- a/datasafe-types-api/pom.xml +++ b/datasafe-types-api/pom.xml @@ -5,7 +5,7 @@ de.adorsys datasafe - 2.0.0 + 2.0.2 datasafe-types-api diff --git a/frontend/README.md b/frontend/README.md index ca8275e3a..174a51035 100644 --- a/frontend/README.md +++ b/frontend/README.md @@ -3,6 +3,8 @@ Use `npm run-script ng:serve:web` for local development Use `npm run-script start` for electron development +Use `ng serve -c dev` if you need to debug + ### Notes - API url and credentials are provided by env.js file (API_URL, API_USERNAME, API_PASSWORD). Credentials (API_USERNAME, API_PASSWORD) are intended for local use only. diff --git a/frontend/datasafe-ui/angular.json b/frontend/datasafe-ui/angular.json index 544edcee8..aa87436b0 100755 --- a/frontend/datasafe-ui/angular.json +++ b/frontend/datasafe-ui/angular.json @@ -40,7 +40,6 @@ "optimization": true, "outputHashing": "all", "sourceMap": false, - "extractCss": true, "namedChunks": false, "aot": true, "extractLicenses": true, @@ -53,6 +52,17 @@ "maximumError": "5mb" } ] + }, + "dev": { + "fileReplacements": [ + { + "replace": "src/environments/environment.ts", + "with": "src/environments/environment.dev.ts" + } + ], + "optimization": false, + "extractLicenses": false, + "sourceMap": true } } }, @@ -64,6 +74,9 @@ "configurations": { "production": { "browserTarget": "my-app:build:production" + }, + "dev": { + "browserTarget": "my-app:build:dev" } } }, @@ -105,5 +118,8 @@ } } }, - "defaultProject": "datasafe-ui" + "defaultProject": "datasafe-ui", + "cli": { + "analytics": "20286032-32be-477d-ab6f-007b4f4da792" + } } \ No newline at end of file diff --git a/frontend/datasafe-ui/main.js b/frontend/datasafe-ui/main.js index 49966638b..c6746dce1 100644 --- a/frontend/datasafe-ui/main.js +++ b/frontend/datasafe-ui/main.js @@ -21,7 +21,7 @@ function createWindow() { }); if (serve) { require('electron-reload')(__dirname, { - electron: require(__dirname + "/node_modules/electron") + electron: require("".concat(__dirname, "/node_modules/electron")) }); win.loadURL('http://localhost:4200'); } diff --git a/frontend/datasafe-ui/main.js.map b/frontend/datasafe-ui/main.js.map deleted file mode 100644 index f967e92ff..000000000 --- a/frontend/datasafe-ui/main.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"main.js","sourceRoot":"","sources":["main.ts"],"names":[],"mappings":";;AAAA,qCAAsD;AACtD,2BAA6B;AAC7B,yBAA2B;AAE3B,IAAI,GAAG,EAAE,KAAK,CAAC;AACf,IAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;AACnC,KAAK,GAAG,IAAI,CAAC,IAAI,CAAC,UAAA,GAAG,IAAI,OAAA,GAAG,KAAK,SAAS,EAAjB,CAAiB,CAAC,CAAC;AAE5C,SAAS,YAAY;IAEnB,IAAM,cAAc,GAAG,iBAAM,CAAC;IAC9B,IAAM,IAAI,GAAG,cAAc,CAAC,iBAAiB,EAAE,CAAC,YAAY,CAAC;IAE7D,6BAA6B;IAC7B,GAAG,GAAG,IAAI,wBAAa,CAAC;QACtB,CAAC,EAAE,CAAC;QACJ,CAAC,EAAE,CAAC;QACJ,KAAK,EAAE,IAAI,CAAC,KAAK;QACjB,MAAM,EAAE,IAAI,CAAC,MAAM;QACnB,cAAc,EAAE;YACd,eAAe,EAAE,IAAI;SACtB;KACF,CAAC,CAAC;IAEH,IAAI,KAAK,EAAE;QACT,OAAO,CAAC,iBAAiB,CAAC,CAAC,SAAS,EAAE;YACpC,QAAQ,EAAE,OAAO,CAAI,SAAS,2BAAwB,CAAC;SACxD,CAAC,CAAC;QACH,GAAG,CAAC,OAAO,CAAC,uBAAuB,CAAC,CAAC;KACtC;SAAM;QACL,GAAG,CAAC,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC;YACrB,QAAQ,EAAE,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,iBAAiB,CAAC;YACjD,QAAQ,EAAE,OAAO;YACjB,OAAO,EAAE,IAAI;SACd,CAAC,CAAC,CAAC;KACL;IAED,IAAI,KAAK,EAAE;QACT,GAAG,CAAC,WAAW,CAAC,YAAY,EAAE,CAAC;KAChC;IAED,qCAAqC;IACrC,GAAG,CAAC,EAAE,CAAC,QAAQ,EAAE;QACf,gEAAgE;QAChE,mEAAmE;QACnE,oDAAoD;QACpD,GAAG,GAAG,IAAI,CAAC;IACb,CAAC,CAAC,CAAC;AAEL,CAAC;AAED,IAAI;IAEF,wDAAwD;IACxD,yDAAyD;IACzD,sDAAsD;IACtD,cAAG,CAAC,EAAE,CAAC,OAAO,EAAE,YAAY,CAAC,CAAC;IAE9B,oCAAoC;IACpC,cAAG,CAAC,EAAE,CAAC,mBAAmB,EAAE;QAC1B,2DAA2D;QAC3D,8DAA8D;QAC9D,IAAI,OAAO,CAAC,QAAQ,KAAK,QAAQ,EAAE;YACjC,cAAG,CAAC,IAAI,EAAE,CAAC;SACZ;IACH,CAAC,CAAC,CAAC;IAEH,cAAG,CAAC,EAAE,CAAC,UAAU,EAAE;QACjB,gEAAgE;QAChE,4DAA4D;QAC5D,IAAI,GAAG,KAAK,IAAI,EAAE;YAChB,YAAY,EAAE,CAAC;SAChB;IACH,CAAC,CAAC,CAAC;CAEJ;AAAC,OAAO,CAAC,EAAE;IACV,cAAc;IACd,WAAW;CACZ"} \ No newline at end of file diff --git a/frontend/datasafe-ui/package.json b/frontend/datasafe-ui/package.json index 3195a72de..3fb060927 100644 --- a/frontend/datasafe-ui/package.json +++ b/frontend/datasafe-ui/package.json @@ -4,7 +4,7 @@ "description": "datasafe-ui with web and electron interface", "keywords": [ "angular", - "angular 8", + "angular 15", "electron", "typescript", "sass" @@ -40,7 +40,6 @@ "@angular/compiler": "15.2.9", "@angular/compiler-cli": "15.2.9", "@angular/core": "15.2.9", - "@angular/forms": "15.2.9", "@angular/material": "15.2.9", "@angular/material-moment-adapter": "15.2.9", @@ -53,7 +52,7 @@ "@types/node": "20.8.0", "codelyzer": "6.0.2", "core-js": "3.33.0", - "electron": "26.2.4", + "electron": "^26.2.4", "electron-builder": "24.7.0", "electron-reload": "1.5.0", "hammerjs": "2.0.8", @@ -75,7 +74,7 @@ "wait-on": "7.0.1", "web-animations-js": "2.3.2", "webdriver-manager": "13.0.2", - "zone.js": "0.14.0" + "zone.js": "0.13.0" }, "engines": { "node": ">=18.10.0" diff --git a/frontend/datasafe-ui/src/app/app.component.ts b/frontend/datasafe-ui/src/app/app.component.ts index 788f93502..852e4d829 100644 --- a/frontend/datasafe-ui/src/app/app.component.ts +++ b/frontend/datasafe-ui/src/app/app.component.ts @@ -1,5 +1,5 @@ import {Component, OnInit} from '@angular/core'; -import {ErrorStateMatcher} from "@angular/material"; +import {ErrorStateMatcher} from "@angular/material/core"; import {FormControl, FormGroupDirective, NgForm} from "@angular/forms"; export class Env { diff --git a/frontend/datasafe-ui/src/app/component/filetree/filetree.component.ts b/frontend/datasafe-ui/src/app/component/filetree/filetree.component.ts index 57aee9256..9269168d4 100644 --- a/frontend/datasafe-ui/src/app/component/filetree/filetree.component.ts +++ b/frontend/datasafe-ui/src/app/component/filetree/filetree.component.ts @@ -7,7 +7,7 @@ import {ApiService} from "../../service/api/api.service"; import {CredentialsService} from "../../service/credentials/credentials.service"; import {Router} from "@angular/router"; import {ErrorMessageUtil} from "../../app.component"; -import {MAT_DIALOG_DATA, MatDialog, MatDialogRef} from "@angular/material"; +import {MAT_DIALOG_DATA, MatDialog, MatDialogRef} from "@angular/material/dialog"; class UserFileSystem { @@ -39,6 +39,7 @@ class UserFileSystem { var fullPath = ""; var folder = ""; + path = (path.startsWith('/')) ? path.substring(1) : path; path.split("/").forEach(segment => { fullPath += segment; fullPath += (fullPath === path ? "" : "/"); @@ -302,7 +303,7 @@ export class FiletreeComponent { this.error = ''; this.removePathFromUiCreatedFolders(path); this.api.deleteDocument(path, this.creds.getCredentialsForApi()) - .then(res => this.loadTree()) + .then(_ => this.loadTree()) .catch(err => this.error = 'Delete failed: ' + ErrorMessageUtil.extract(err)); } @@ -316,7 +317,7 @@ export class FiletreeComponent { uploadFile(event) { this.error = ''; this.api.uploadDocument(event.target.files[0], event.target.files[0].name, this.creds.getCredentialsForApi()) - .then(res => this.loadTree()) + .then(_ => this.loadTree()) .catch(err => { this.error = 'Upload failed: ' + ErrorMessageUtil.extract(err); }); @@ -328,7 +329,7 @@ export class FiletreeComponent { event.currentTarget.files[0], event.currentTarget.name + event.currentTarget.files[0].name, this.creds.getCredentialsForApi()) - .then(res => this.loadTree()) + .then(_ => this.loadTree()) .catch(err => { this.error = 'Upload failed: ' + ErrorMessageUtil.extract(err); }); diff --git a/frontend/datasafe-ui/src/app/component/login/login.component.ts b/frontend/datasafe-ui/src/app/component/login/login.component.ts index f943deeff..b2c947f34 100644 --- a/frontend/datasafe-ui/src/app/component/login/login.component.ts +++ b/frontend/datasafe-ui/src/app/component/login/login.component.ts @@ -3,7 +3,7 @@ import {Router} from '@angular/router'; import {FormBuilder, FormControl, Validators} from '@angular/forms'; import {CredentialsService} from '../../service/credentials/credentials.service'; import {Env, FieldErrorStateMatcher} from '../../app.component'; -import {MAT_DIALOG_DATA, MatDialog, MatDialogRef} from '@angular/material'; +import {MAT_DIALOG_DATA, MatDialog, MatDialogRef} from '@angular/material/dialog'; export interface ApiConfigData { apiUrl: string; diff --git a/frontend/datasafe-ui/src/app/polyfills.ts b/frontend/datasafe-ui/src/app/polyfills.ts index 5134b24e9..203549750 100755 --- a/frontend/datasafe-ui/src/app/polyfills.ts +++ b/frontend/datasafe-ui/src/app/polyfills.ts @@ -1,5 +1,4 @@ -import 'core-js/es6/reflect'; -import 'core-js/es7/reflect'; +import 'core-js/features/reflect'; import 'zone.js/dist/zone'; import 'hammerjs'; import 'web-animations-js'; \ No newline at end of file diff --git a/frontend/datasafe-ui/src/env.js b/frontend/datasafe-ui/src/env.js index 6d0d1f1c2..5526ce23a 100644 --- a/frontend/datasafe-ui/src/env.js +++ b/frontend/datasafe-ui/src/env.js @@ -1,9 +1,9 @@ (function (window) { window.__env = window.__env || {}; - window.__env.apiUrl = '${API_URL}'; + window.__env.apiUrl = 'http://localhost:8080'; // ideally these are not necessary, but API is protected, so supplying it for docker-local deployment - window.__env.apiUsername = '${API_USERNAME}'; - window.__env.apiPassword = '${API_PASSWORD}'; + window.__env.apiUsername = 'username'; + window.__env.apiPassword = 'password'; }(this)); \ No newline at end of file diff --git a/last-module-codecoverage-check/pom.xml b/last-module-codecoverage-check/pom.xml index 5ebeee0ae..fd80ffd30 100644 --- a/last-module-codecoverage-check/pom.xml +++ b/last-module-codecoverage-check/pom.xml @@ -5,12 +5,16 @@ datasafe de.adorsys - 2.0.0 + 2.0.2 4.0.0 last-module-codecoverage-check + + 3.3.1 + + de.adorsys @@ -144,7 +148,7 @@ maven-resources-plugin - 3.3.1 + ${maven-resources-plugin.version} package diff --git a/pom.xml b/pom.xml index 172da127a..aa0fdcada 100644 --- a/pom.xml +++ b/pom.xml @@ -25,7 +25,7 @@ de.adorsys datasafe - 2.0.0 + 2.0.2 datasafe Datasafe https://github.com/adorsys/datasafe @@ -91,7 +91,7 @@ 5.10.0 3.12.2 5.5.0 - 2.22.1 + 3.1.2 1.21 UTF-8 false @@ -119,9 +119,18 @@ 1.4.4 2.12.7 2.12.7.1 - 0.0.7 + 0.0.11-SNAPSHOT 2.1.1 2.3.1 + 2.8.1 + 1.3 + 3.3.0 + 2.5.2 + 2.7 + 3.6.0 + 3.1.0 + 3.0.1 + 1.6.13 @@ -537,23 +546,23 @@ - - org.projectlombok - lombok-maven-plugin - ${lombok-maven-plugin.version} - - - generate-sources - - delombok - - - false - src/main/java - - - - + + + + + + + + + + + + + + + + + org.apache.maven.plugins maven-javadoc-plugin @@ -574,18 +583,20 @@ org.sonatype.plugins nexus-staging-maven-plugin - 1.6.8 + ${nexus-staging-maven-plugin.version} true sonatype https://oss.sonatype.org/ true + true + 30 org.apache.maven.plugins maven-source-plugin - 3.0.1 + ${maven-source-plugin.version} attach-sources @@ -598,8 +609,13 @@ org.apache.maven.plugins maven-gpg-plugin - 1.6 + ${maven-gpg-plugin.version} + opensource@adorsys.de + + --pinentry-mode + loopback + @@ -608,14 +624,21 @@ sign + + + --pinentry-mode + loopback + + org.apache.maven.plugins maven-javadoc-plugin + ${maven-javadoc-plugin.version} - -Xdoclint:none + -Xdoclint:none @@ -633,11 +656,11 @@ org.apache.maven.plugins maven-project-info-reports-plugin - 2.7 + ${maven-project-info-reports-plugin.version} maven-release-plugin - 2.5.2 + ${maven-release-plugin.version} release true @@ -647,7 +670,7 @@ org.apache.maven.plugins maven-jar-plugin - 2.6 + ${maven-jar-plugin.version} @@ -670,7 +693,7 @@ org.codehaus.mojo buildnumber-maven-plugin - 1.3 + ${buildnumber-maven-plugin.version} validate @@ -687,7 +710,7 @@ org.apache.maven.plugins maven-deploy-plugin - 2.8.1 + ${maven-deploy-plugin.version} ${deploy.disabled}