File Repository issueshttps://gitlab.croptrust.org/genesys-pgr/file-repository/-/issues2017-04-03T18:48:53+02:00https://gitlab.croptrust.org/genesys-pgr/file-repository/-/issues/1Upgrade maven to multi-project setup2017-04-03T18:48:53+02:00Matija ObrezaUpgrade maven to multi-project setupWe intend to add modules to `file-repository` that are optional.
Introduce the parent POM, multi-project setup for this project:
* `file-repository-parent` will contain configuration for all modules, that's the primary `pom.xml`
*...We intend to add modules to `file-repository` that are optional.
Introduce the parent POM, multi-project setup for this project:
* `file-repository-parent` will contain configuration for all modules, that's the primary `pom.xml`
* `file-repository` will contain the current project code
* `file-repository-ftpserver` is the new module that adds FTP server support using Apache Mina https://mina.apache.org/ftpserver-project/embedding_ftpserver.html
1.0Matija ObrezaMatija Obrezahttps://gitlab.croptrust.org/genesys-pgr/file-repository/-/issues/2file-repository-ftpserver module2017-04-04T11:27:51+02:00Matija Obrezafile-repository-ftpserver moduleUse Apache Mina's https://mina.apache.org/ftpserver-project/embedding_ftpserver.html to add FTP support to the project.
Code goes to the `file-repository-ftpserver` module.Use Apache Mina's https://mina.apache.org/ftpserver-project/embedding_ftpserver.html to add FTP support to the project.
Code goes to the `file-repository-ftpserver` module.1.0Matija ObrezaMatija Obrezahttps://gitlab.croptrust.org/genesys-pgr/file-repository/-/issues/9(ftp) Serve files from repository2017-04-05T14:31:48+02:00Matija Obreza(ftp) Serve files from repositoryImplement serving of the file bytes from the repository.
Ideally this should support random access to file bytes.Implement serving of the file bytes from the repository.
Ideally this should support random access to file bytes.1.0https://gitlab.croptrust.org/genesys-pgr/file-repository/-/issues/8(ftp) RepositoryFilesystemView2017-04-06T14:47:36+02:00Matija Obreza(ftp) RepositoryFilesystemViewThe `FileSystemView createFileSystemView(User user)` method of the `RepositoryFileSystemFactory ` now creates a blank view.
Integrate the `org.genesys.filerepository.service.RepositoryService` to list and manage files from the repository.The `FileSystemView createFileSystemView(User user)` method of the `RepositoryFileSystemFactory ` now creates a blank view.
Integrate the `org.genesys.filerepository.service.RepositoryService` to list and manage files from the repository.1.0Matija ObrezaMatija Obrezahttps://gitlab.croptrust.org/genesys-pgr/file-repository/-/issues/11(ftp) Folders navigation2017-04-06T14:47:36+02:00Matija Obreza(ftp) Folders navigationUsing FileZilla with the local Repository FTP server shows that folder creation and navigation is messy.
Improve folder navigation, listing, creation and deletion.
Add unit tests.Using FileZilla with the local Repository FTP server shows that folder creation and navigation is messy.
Improve folder navigation, listing, creation and deletion.
Add unit tests.1.0https://gitlab.croptrust.org/genesys-pgr/file-repository/-/issues/19AWS V4 Signature2017-10-09T18:39:36+02:00Matija ObrezaAWS V4 SignatureImplement V4 signature algorithmImplement V4 signature algorithm1.0Matija ObrezaMatija Obrezahttps://gitlab.croptrust.org/genesys-pgr/file-repository/-/issues/3Dependency on application-blocks-core2017-10-27T16:21:20+02:00Matija ObrezaDependency on application-blocks-coreAdd dependency on genesys-pgr/application-blocks-core.
Rebrand package names from `org.genesys2.server.filerepository` to `org.gensys.filerepository`.Add dependency on genesys-pgr/application-blocks-core.
Rebrand package names from `org.genesys2.server.filerepository` to `org.gensys.filerepository`.1.0Matija ObrezaMatija Obrezahttps://gitlab.croptrust.org/genesys-pgr/file-repository/-/issues/4Include querydsl support2017-10-27T16:21:21+02:00Matija ObrezaInclude querydsl supportInclude querydsl support for file-repository-core moduleInclude querydsl support for file-repository-core module1.0Matija ObrezaMatija Obrezahttps://gitlab.croptrust.org/genesys-pgr/file-repository/-/issues/5(ftp) Require FTPS2017-10-27T16:21:21+02:00Matija Obreza(ftp) Require FTPSConfigure FTP server to require FTPS, plain-text FTP should not be enabled.Configure FTP server to require FTPS, plain-text FTP should not be enabled.1.0Maxym BorodenkoMaxym Borodenkohttps://gitlab.croptrust.org/genesys-pgr/file-repository/-/issues/6(ftp) Data ports range2017-10-27T16:21:21+02:00Matija Obreza(ftp) Data ports range[Background information](https://en.wikipedia.org/wiki/FTPS#Firewall_incompatibilities)
Make DATA port range configurable so that the firewall can be configured to open these ports.
Please see if the External IP can also be defined...[Background information](https://en.wikipedia.org/wiki/FTPS#Firewall_incompatibilities)
Make DATA port range configurable so that the firewall can be configured to open these ports.
Please see if the External IP can also be defined as a setting. This is because the FTP Control connection comes in through a load balancer and goes to one of the servers. The DATA connection must then be established to the correct server and we may need to tell the client the proper external IP.1.0Maxym BorodenkoMaxym Borodenkohttps://gitlab.croptrust.org/genesys-pgr/file-repository/-/issues/10(ftp) Upload bytes to repository2017-10-27T16:21:21+02:00Matija Obreza(ftp) Upload bytes to repositorySave uploaded data to the repository.
Ideally random access, appending and upload resuming should work.Save uploaded data to the repository.
Ideally random access, appending and upload resuming should work.1.0https://gitlab.croptrust.org/genesys-pgr/file-repository/-/issues/12(ftp) Document ftp code2017-10-27T16:21:21+02:00Matija Obreza(ftp) Document ftp codeReview the code, use sane method and variable names, add comments where required.Review the code, use sane method and variable names, add comments where required.1.0Matija ObrezaMatija Obrezahttps://gitlab.croptrust.org/genesys-pgr/file-repository/-/issues/13(ftp) keystore for tests2017-10-27T16:21:21+02:00Matija Obreza(ftp) keystore for testsJenkins build fails with
```
Key store could not be loaded from ftpserver.jks
```
Provide a default keystore for testing.Jenkins build fails with
```
Key store could not be loaded from ftpserver.jks
```
Provide a default keystore for testing.1.0Matija ObrezaMatija Obrezahttps://gitlab.croptrust.org/genesys-pgr/file-repository/-/issues/14Virus scanning2017-10-27T16:21:21+02:00Matija ObrezaVirus scanningBefore storing the data to `BytesStorage` the bytes must be scanned for viruses. Allow for configuration of ClamAV service (host and port) in the properties file.
When ClamAV daemon is configured, uploaded data is passed to the scanner ...Before storing the data to `BytesStorage` the bytes must be scanned for viruses. Allow for configuration of ClamAV service (host and port) in the properties file.
When ClamAV daemon is configured, uploaded data is passed to the scanner and if when clean, persisted to storage. In case of detected infection throw a new `VirusFoundException`.
The https://github.com/cdarras/clamav-client is MIT licensed and can be linked to in Apache v2 projects. Avoid GPL.
```xml
<dependency>
<groupId>xyz.capybara</groupId>
<artifactId>clamav-client</artifactId>
<version>1.0.4</version>
</dependency>
```1.0Matija ObrezaMatija Obrezahttps://gitlab.croptrust.org/genesys-pgr/file-repository/-/issues/15FTP tests fail at SSL2017-10-27T16:21:21+02:00Matija ObrezaFTP tests fail at SSLServer loads certificate from `ftpserver.jks`, client connection fails:
```
07:04:08,049 main DEBUG SslConfigurationFactory:323 - Loading key store from "/builds/genesys-pgr/file-repository/file-repository-ftpserver/target/test-classes/...Server loads certificate from `ftpserver.jks`, client connection fails:
```
07:04:08,049 main DEBUG SslConfigurationFactory:323 - Loading key store from "/builds/genesys-pgr/file-repository/file-repository-ftpserver/target/test-classes/ftpserver.jks", using the key store type "jks"
07:04:08,050 main DEBUG SslConfigurationFactory:293 - Trying to load store from file
07:04:08,307 main INFO RepositoryFtpServer:204 - Starting FTP server on port 8021
07:04:08,356 main DEBUG DefaultFtpServerContext:277 - Intializing shared thread pool executor with max threads of 20
07:04:08,404 main INFO DefaultFtpServer:89 - FTP server started
07:04:08,545 NioProcessor-1 INFO FtpLoggingFilter:186 - CREATED
07:04:08,559 pool-3-thread-1 INFO FtpLoggingFilter:186 - OPENED
07:04:08,867 pool-3-thread-1 WARN FtpLoggingFilter:130 - EXCEPTION :
javax.net.ssl.SSLHandshakeException: SSL handshake failed.
at org.apache.mina.filter.ssl.SslFilter.messageReceived(SslFilter.java:519)
at org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextMessageReceived(DefaultIoFilterChain.java:542)
at org.apache.mina.core.filterchain.DefaultIoFilterChain.access$1300(DefaultIoFilterChain.java:48)
at org.apache.mina.core.filterchain.DefaultIoFilterChain$EntryImpl$1.messageReceived(DefaultIoFilterChain.java:947)
at org.apache.mina.core.filterchain.IoFilterAdapter.messageReceived(IoFilterAdapter.java:109)
at org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextMessageReceived(DefaultIoFilterChain.java:542)
at org.apache.mina.core.filterchain.DefaultIoFilterChain.fireMessageReceived(DefaultIoFilterChain.java:535)
at org.apache.mina.core.polling.AbstractPollingIoProcessor.read(AbstractPollingIoProcessor.java:703)
at org.apache.mina.core.polling.AbstractPollingIoProcessor.process(AbstractPollingIoProcessor.java:659)
at org.apache.mina.core.polling.AbstractPollingIoProcessor.process(AbstractPollingIoProcessor.java:648)
at org.apache.mina.core.polling.AbstractPollingIoProcessor.access$600(AbstractPollingIoProcessor.java:68)
at org.apache.mina.core.polling.AbstractPollingIoProcessor$Processor.run(AbstractPollingIoProcessor.java:1120)
at org.apache.mina.util.NamePreservingRunnable.run(NamePreservingRunnable.java:64)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:748)
Caused by: javax.net.ssl.SSLException: Received fatal alert: certificate_unknown
at sun.security.ssl.Alerts.getSSLException(Alerts.java:208)
at sun.security.ssl.SSLEngineImpl.fatal(SSLEngineImpl.java:1666)
at sun.security.ssl.SSLEngineImpl.fatal(SSLEngineImpl.java:1634)
at sun.security.ssl.SSLEngineImpl.recvAlert(SSLEngineImpl.java:1800)
at sun.security.ssl.SSLEngineImpl.readRecord(SSLEngineImpl.java:1083)
at sun.security.ssl.SSLEngineImpl.readNetRecord(SSLEngineImpl.java:907)
at sun.security.ssl.SSLEngineImpl.unwrap(SSLEngineImpl.java:781)
at javax.net.ssl.SSLEngine.unwrap(SSLEngine.java:624)
at org.apache.mina.filter.ssl.SslHandler.unwrap(SslHandler.java:754)
at org.apache.mina.filter.ssl.SslHandler.unwrapHandshake(SslHandler.java:689)
at org.apache.mina.filter.ssl.SslHandler.handshake(SslHandler.java:575)
at org.apache.mina.filter.ssl.SslHandler.messageReceived(SslHandler.java:360)
at org.apache.mina.filter.ssl.SslFilter.messageReceived(SslFilter.java:500)
... 15 more
```1.0Matija ObrezaMatija Obrezahttps://gitlab.croptrust.org/genesys-pgr/file-repository/-/issues/16Bytes persistence2017-10-27T16:21:21+02:00Matija ObrezaBytes persistenceCurrent implementations of `BytesStorageService` store data at paths as specified in the repository. Methods `upsert`, `remove`, `get` generally accept `String path, String filename`. Folder structure of bytes persistence should not be d...Current implementations of `BytesStorageService` store data at paths as specified in the repository. Methods `upsert`, `remove`, `get` generally accept `String path, String filename`. Folder structure of bytes persistence should not be dependent on repository item `path`.
Instead of using the **repository path** as the path for bytes in storage, the bytes should be stored independently of the repository path and use the `UUID` of the item instead.1.0Matija ObrezaMatija Obrezahttps://gitlab.croptrust.org/genesys-pgr/file-repository/-/issues/17Write metadata with bytes2017-10-27T16:21:21+02:00Matija ObrezaWrite metadata with bytesOn update of repository file data also write this information as JSON to the `bytesStorage` along with the bytes.
This allows for reconstructing the repository database and serves as backup.On update of repository file data also write this information as JSON to the `bytesStorage` along with the bytes.
This allows for reconstructing the repository database and serves as backup.1.0Matija ObrezaMatija Obrezahttps://gitlab.croptrust.org/genesys-pgr/file-repository/-/issues/18Thumbnails storage2017-10-27T16:21:21+02:00Matija ObrezaThumbnails storageRelates to #16.
Image thumbnail bytes are now stored at `imageGallery2.getPath() + THUMB_PATH`. Considering #16, the thumbnails should be stored in `/_thumbs/` directory, excluding the gallery path.Relates to #16.
Image thumbnail bytes are now stored at `imageGallery2.getPath() + THUMB_PATH`. Considering #16, the thumbnails should be stored in `/_thumbs/` directory, excluding the gallery path.1.0Matija ObrezaMatija Obrezahttps://gitlab.croptrust.org/genesys-pgr/file-repository/-/issues/20Type modifier2017-10-27T16:21:21+02:00Maxym BorodenkoType modifierNeed to change type modifier for `uuid` setter in `RepositoryFile` model.
See comment https://gitlab.croptrust.org/genesys-pgr/genesys-server/issues/182#note_8032Need to change type modifier for `uuid` setter in `RepositoryFile` model.
See comment https://gitlab.croptrust.org/genesys-pgr/genesys-server/issues/182#note_80321.0Maxym BorodenkoMaxym Borodenkohttps://gitlab.croptrust.org/genesys-pgr/file-repository/-/issues/21Bug with updateImageMetadata2017-10-27T16:21:21+02:00Andrey Lugovskiya.lugovskiy@aimprosoft.comBug with updateImageMetadataorg.genesys.filerepository.service.impl.RepositoryServiceImpl#updateImageMetadata there are refreshed source model instead target.org.genesys.filerepository.service.impl.RepositoryServiceImpl#updateImageMetadata there are refreshed source model instead target.1.02017-10-24