掲示板

Virus Scanner

thumbnail
14年前 に Lisa Simpson によって更新されました。

Virus Scanner

Liferay Legend 投稿: 2034 参加年月日: 09/03/05 最新の投稿
Can we integrate some sort of virus scanning for uploads? I'm having bad visions of an infected word document in the document manager.....
thumbnail
14年前 に Amos Fong によって更新されました。

RE: Virus Scanner

Liferay Legend 投稿: 2047 参加年月日: 08/10/07 最新の投稿
Hi Lisa,

That sounds like a good idea. The best way to do it is to have an anti-virus program with a java API. Then you could run it in a model listener everytime it detects a document is uploaded.
thumbnail
14年前 に Lisa Simpson によって更新されました。

RE: Virus Scanner

Liferay Legend 投稿: 2034 参加年月日: 09/03/05 最新の投稿
Clam AV has a java API... It's an open source AV... not the most elegant solution, but... definitely workable on the *nix boxes... I don't don't if their sister project ClamWin has a Java API or not but it should be worth looking at since it would definitely be a selling point for you guys.
thumbnail
14年前 に Paul Martin によって更新されました。

RE: Virus Scanner

New Member 投稿: 11 参加年月日: 08/07/24 最新の投稿
Do you have anymore information on how to use ClamAv with the document library?
thumbnail
14年前 に Juan Fernández によって更新されました。

RE: Virus Scanner

Liferay Legend 投稿: 1261 参加年月日: 08/10/02 最新の投稿
Does anybody know an opensource antivirus library that we can add to the Document Library?
I think it would be a nice feature to add in the following releases
Regards
Juan Fernández

[update] As far as I know, the way to solve this problem is by running an antivirus in a (different) machine and communicating Liferay with it (for example via web services) when we want to upload or download a file, as Yahoo mail does.

The steps to do now are searching an AV to which we can send a file (it has to be opensource) and then develope the connector so that we can integrate it wherever we want in Liferay. An interesting candidate is ClaimAV, as Lisa said... let's study that
thumbnail
12年前 に Tapas Ranjan Patra によって更新されました。

RE: Virus Scanner

New Member 投稿: 19 参加年月日: 10/12/22 最新の投稿
Hi Juan Fernández,
Any update on virus scanner. Please let me know .
thumbnail
12年前 に Juan Fernández によって更新されました。

RE: Virus Scanner

Liferay Legend 投稿: 1261 参加年月日: 08/10/02 最新の投稿
Hi Tapas:
no updates at all. There hasn't been any response from the community, so I assume there's no much interest in developing this feature.
Are you interested? Can you describe your use case and the features you'd like Liferay to have?
thumbnail
12年前 に Tapas Ranjan Patra によって更新されました。

RE: Virus Scanner

New Member 投稿: 19 参加年月日: 10/12/22 最新の投稿
Hi Juan,
Thanks for your response.Please find below use case for virus scanning.

1. Attachments will be virus scanned at the point of upload. In addition to the real-time scan at upload, an existing process will virus scan files on the server on a periodic basis. The addional periodic scan could identify in cases where the virus defination has been updated etc.

2. Offending files will appear on scan report which will be emailed tp the portal team.An operational proces will need to be defined from the Portal support team to remove the file and contact the client/person who uploaded it.


Waiting for your response.
thumbnail
12年前 に Juan Fernández によって更新されました。

RE: Virus Scanner

Liferay Legend 投稿: 1261 参加年月日: 08/10/02 最新の投稿
Hi Tapas:
To implement what you need, some steps are required:

1) Look for an OpenSource antivirus that can run on the server and has an API/Web services so that we can send it a document and receive a report. I think ClaimAV is a good candidate.

2) Develop a plugin for Liferay that will be a Service Wrapper or a Model Listener for the document library. This will allow you to intercept the calls to the service and submit the document to the AV

3) Extend/modify the document library to show some messages (warnings for the users) and to allow enabling/disabling of the antivirus filter

Let me know if you start working on this to help you solve your doubts. This would be a cool feature for Liferay.
Regards!
thumbnail
12年前 に Juan Fernández によって更新されました。

RE: Virus Scanner

Liferay Legend 投稿: 1261 参加年月日: 08/10/02 最新の投稿
Well, some updates:

after discussing with two community members from the spanish community (Artiz and Albert), they've found this proposal quite interesting and may want to participate in the implementation of a new infrastructure to plugin anti viruses in to the liferay architecture.

We can make this a community project, and we can focus on creating a flexible interface in a plugin (quite similar to the sanitizers) so that it can grow in the future.

Share your thougths!
Regards
thumbnail
12年前 に Xavier Moreno によって更新されました。

RE: Virus Scanner

Junior Member 投稿: 29 参加年月日: 09/03/24 最新の投稿
Hi everyone,
I'd like to help if it's possible :-)
thumbnail
12年前 に Albert Coronado Calzada によって更新されました。

RE: Virus Scanner

Junior Member 投稿: 38 参加年月日: 09/02/10 最新の投稿
Interesting, I hope we can release a versión soon!!! Virus scanner in Liferay document library.

Regards,
thumbnail
12年前 に Aritz Galdos によって更新されました。

RE: Virus Scanner

Expert 投稿: 416 参加年月日: 07/05/15 最新の投稿
It will be a great experience. Community member developing together. Great!!
thumbnail
12年前 に Juan Fernández によって更新されました。

RE: Virus Scanner

Liferay Legend 投稿: 1261 参加年月日: 08/10/02 最新の投稿
Awesome, guys, you rock! emoticon

Well, let's see what infrastructure we need to do this.

1) Code Versioning System: Google Code, Sourceforge, GitHub? Tell me your preferences
2) Information exchange: I think forums are ok to discuss. When we have something stable we can create a wiki page to share experiences

Following steps:
1) Search for info about this AV (clamAV) and its API and search for others that may be more suitable to integrate
2) Design the best architecture for the plugin
thumbnail
12年前 に Aritz Galdos によって更新されました。

RE: Virus Scanner

Expert 投稿: 416 参加年月日: 07/05/15 最新の投稿
Hi
1)About code versioning. I have never used distributed code versioning systems and I feel like testing it. So my vote goes for GitHub
2) I think forums will do. And community can read here. Another option could be GitHub itself. I guess it has communication tools.
thumbnail
12年前 に Juan Fernández によって更新されました。

RE: Virus Scanner

Liferay Legend 投稿: 1261 参加年月日: 08/10/02 最新の投稿
I'm ok with github: would you manage the project creation, Artiz? (let's learn emoticon)
About communication, I think it's better to have a forum thread here, so more people can join us
thumbnail
12年前 に Aritz Galdos によって更新されました。

RE: Virus Scanner

Expert 投稿: 416 参加年月日: 07/05/15 最新の投稿
OK, I will create the project. I need some time to read about gitHub carefuly so I will create it this evening.
thumbnail
12年前 に Juan Fernández によって更新されました。

RE: Virus Scanner

Liferay Legend 投稿: 1261 参加年月日: 08/10/02 最新の投稿
No hurry! emoticon
Thanks Aritz
thumbnail
12年前 に Albert Coronado Calzada によって更新されました。

RE: Virus Scanner

Junior Member 投稿: 38 参加年月日: 09/02/10 最新の投稿
ok, I will be in holidays until 13th of July. I can start working with AV interfice and looking for a good AV. I would like found a solution for integrate any AV easy.

@Juan For me, the hardest work is indentify Model and Service methods to hook. Can you identify this methods?¿
thumbnail
12年前 に Juan Fernández によって更新されました。

RE: Virus Scanner

Liferay Legend 投稿: 1261 参加年月日: 08/10/02 最新の投稿
I'll think about a good architecture for this (it'll be in my spare time... from 2:00 to 3:00 AM, I guess emoticon)
I'll reach you soon
thumbnail
12年前 に Tapas Ranjan Patra によって更新されました。

RE: Virus Scanner

New Member 投稿: 19 参加年月日: 10/12/22 最新の投稿
Hi ,
Its good to see the responses. I think its a good start up .Soon i will start work on that.

Can you help me to get the library(.jar file), i got the api only.

Is this the correct api API ?
Apart from that it seems we need to pass command to do scanning
Command
thumbnail
12年前 に Juan Fernández によって更新されました。

RE: Virus Scanner

Liferay Legend 投稿: 1261 参加年月日: 08/10/02 最新の投稿
Hi guys:
After analyzing the problem, I think the best way to implement this is:

1) Create a hook plugin
2) Add a new service wrapper for DLFileEntryLocalService called DLFileEntryAntiVirusLocalService
3) In this class we have to extend the following methods
[indent]addFileEntry
updateFileEntry[/indent]
4) In both methods we should intercept the InputStream, analyze it (with the AV we will integrate) and then call parent method

That's a starting point
thumbnail
12年前 に Albert Coronado Calzada によって更新されました。

RE: Virus Scanner

Junior Member 投稿: 38 参加年月日: 09/02/10 最新の投稿
@Juan

I'm agree. I was thinking in a hook, thanks for indentify the methods and classes.

We can define an interfice who defines the method analyze(byte[] b), then we can create as classes as AV we integrate. We can define what AV we want throught portal-ex.properties parameter (For example).

Tomorrow I start my holidays, when I come back talk about implementation.
thumbnail
12年前 に Juan Fernández によって更新されました。

RE: Virus Scanner

Liferay Legend 投稿: 1261 参加年月日: 08/10/02 最新の投稿
@Tapas: I think this is a good example of how to use the API -> http://code.google.com/p/clamavj/
thumbnail
12年前 に Tapas Ranjan Patra によって更新されました。

RE: Virus Scanner

New Member 投稿: 19 参加年月日: 10/12/22 最新の投稿
ok.I will check and let you update. As there are different API available so i was bit confused.

Anyways thanks.
thumbnail
12年前 に Aritz Galdos によって更新されました。

RE: Virus Scanner

Expert 投稿: 416 参加年月日: 07/05/15 最新の投稿
Hi,
I'am about to create a repo in GitHub. Iam in doubt about project name.
Some ideas... Liferay AV service or Liferay AV Hook,
thumbnail
12年前 に Juan Fernández によって更新されました。

RE: Virus Scanner

Liferay Legend 投稿: 1261 参加年月日: 08/10/02 最新の投稿
What about "Liferay AntiVirus Plugin"? I like that one emoticon
thumbnail
12年前 に Aritz Galdos によって更新されました。

RE: Virus Scanner

Expert 投稿: 416 参加年月日: 07/05/15 最新の投稿
I agree, it is mor than a hook and AntiVirus is more descriptive.

I created the repo

https://github.com/aritzg/Liferay-AntiVirus-Plugin

What are your GitHub userIds guys so I can add you as collaborators
thumbnail
12年前 に Juan Fernández によって更新されました。

RE: Virus Scanner

Liferay Legend 投稿: 1261 参加年月日: 08/10/02 最新の投稿
Cool!
My user is juanferrub
Thanks, Aritz!
thumbnail
12年前 に Albert Coronado Calzada によって更新されました。

RE: Virus Scanner

Junior Member 投稿: 38 参加年月日: 09/02/10 最新の投稿
Perfect!!! I have registered to Github as 'acoronadoc'. Is the first time I use GitHub.
thumbnail
12年前 に Juan Fernández によって更新されました。

RE: Virus Scanner

Liferay Legend 投稿: 1261 参加年月日: 08/10/02 最新の投稿
Ok, guys: now we have to decide which version will we be developing for. I'd like to make this available for 6.1, but it is not really recommended to create plugins agains trunk (it's quite inestable lately, with the huge ammount of new features we're developing), so I think the best option is to start working on 6.0.6 and when we have a GA version for 6.1 we'll upgrade the plugin.
Are you ok with this? If so, let's start creating the service wrapper so that we have the infrastructure to start integrating the AV
thumbnail
12年前 に Tapas Ranjan Patra によって更新されました。

RE: Virus Scanner

New Member 投稿: 19 参加年月日: 10/12/22 最新の投稿
Can somebody tell me how to get the port number of ClamAV in windows.
thumbnail
12年前 に Aritz Galdos によって更新されました。

RE: Virus Scanner

Expert 投稿: 416 参加年月日: 07/05/15 最新の投稿
Hi guys:

I created a hook for the service wrapper for the DLFileEntry service and uploaded it to GitHub. I added the methods to be overriden the the class that implements the wrapper.

I am new to gitHub so... I hope it to be OK

Regards!
thumbnail
12年前 に Tapas Ranjan Patra によって更新されました。

RE: Virus Scanner

New Member 投稿: 19 参加年月日: 10/12/22 最新の投稿
Hi my user name is tapaspatra .I have only read acess.I do not have write acess.\

I am also new to github.
thumbnail
12年前 に Aritz Galdos によって更新されました。

RE: Virus Scanner

Expert 投稿: 416 参加年月日: 07/05/15 最新の投稿
Hi Tapas:
I just added you as collaborator.
thumbnail
12年前 に Tapas Ranjan Patra によって更新されました。

RE: Virus Scanner

New Member 投稿: 19 参加年月日: 10/12/22 最新の投稿
Hi Folks,
I got the port number which is 3310. Also i am able to scan the file using clamAV , by using ClamAV java API..Bit happy after struggling alot .....I have tested in Windows enviornment. I need to check in Linux enviornment..

After thats its easy to integrate with LR Document library ..
thumbnail
12年前 に Juan Fernández によって更新されました。

RE: Virus Scanner

Liferay Legend 投稿: 1261 参加年月日: 08/10/02 最新の投稿
That is awesome, Tapas!
Aritz has prepared the perfect environment to integrate with the document library, so after you're done with the testing, we can merge both projects into a hook and we'll be able to deploy it into a Liferay instance.
Guys, you're amazing: can you feel the good vibes that open source generates? emoticon
thumbnail
12年前 に Juan Fernández によって更新されました。

RE: Virus Scanner

Liferay Legend 投稿: 1261 参加年月日: 08/10/02 最新の投稿
Hi guys:
today a collegue sent me an email with some info we should take into account. I quote:
if it's synchronous then you're at the mercy of the antivirus performance when you upload a document so it can make things very slow for the end user (or fail completely). It's better to hold the document in quaratine and then make it available when antivirus passes. Thus, workflow...


We didn't have this into account, and I think it's quite important. Maybe we can do a first version as a wrapper, but it's true that this can affects the final user... I think that when we have this implemented we should convert it into a workflow status.

The cool thing here is that we can reuse all the code, so that changes/improvements wouldn't be that costly

What do you think?
thumbnail
12年前 に Aritz Galdos によって更新されました。

RE: Virus Scanner

Expert 投稿: 416 参加年月日: 07/05/15 最新の投稿
Hell.. thats true
I didn´t think about that. Clearly, It will have to be taken into account. But for a very first trial I think we should geet it working with the wrapper. I think that in some scenarios it can be a real solution. It will not be in vain.

Great to realize about that so soon.

Apart from that. We sould define an interface, after analizing diferent AV engines, which would be implemented for each engine.

Then, something like a Factory pattern, (based on properties to select the AV engine,) could instantiate the concrete implementation.

This is my approach

Great Juan. And thanks to your collegue!!
thumbnail
12年前 に Juan Fernández によって更新されました。

RE: Virus Scanner

Liferay Legend 投稿: 1261 参加年月日: 08/10/02 最新の投稿
Hi guys:
I've been thinking about the architecture for this. Here's a proposal, based on Aritz proposal:

- An antivirus.impl property
- AntivirusFactory (quite similar to HookFactory, with a getInstance() method that reads antivirus.impl and loads the class)
- Antivirus: a java interface with the methods we'll need
- AntivirusBaseImpl [implements Antivirus]: base implementation of the interface (it can be a dummy class)
- ClamAV [extends AntivirusBaseImpl], NortonAV [extends AntivirusBaseImpl]... concrete implementations of antivirus services

So in the wrapper (or in the workflow status) we can call something like this:

Antivirus antivirus = AntivirusFactory.getInstance();
antivirus.checkFile(dlFileEntry myFile);
thumbnail
12年前 に Aritz Galdos によって更新されました。

RE: Virus Scanner

Expert 投稿: 416 参加年月日: 07/05/15 最新の投稿
I do agree

Some research work will have to be done to define a general interface to fit as much AVs as possible.
I have been looking around, and there are not much AVs with an api, and not much info about creating third party integrations.

Not much open source in AVs world :S
thumbnail
12年前 に Juan Fernández によって更新されました。

RE: Virus Scanner

Liferay Legend 投稿: 1261 参加年月日: 08/10/02 最新の投稿
We can start with a generic interface based on clamAV and if somebody integrates other engines, he'll have to improve the interface.
We can not think about something we don't know...
thumbnail
12年前 に Tapas Ranjan Patra によって更新されました。

RE: Virus Scanner

New Member 投稿: 19 参加年月日: 10/12/22 最新の投稿
Hi Jaun & All,
I have integrated Av Scanner with LR. I have modefied addFileEntry(arg1, arg2 , ...) method. I have commited my code in "github". Please have a look once.

Now in addFileEntry() method if virus is detected i am just making the file as File file = new File(" ") and displaying liferay error message. Now how can set some valid message to show to the user.
thumbnail
12年前 に Juan Fernández によって更新されました。

RE: Virus Scanner

Liferay Legend 投稿: 1261 参加年月日: 08/10/02 最新の投稿
Hi guys!
Just committed some improvements to the repository.

@Tapas: I don't think it makes sense to add an empty file to the document library. It's better to throw an exception, alert the user and cancel the upload. What do you think?
thumbnail
12年前 に Tapas Ranjan Patra によって更新されました。

RE: Virus Scanner

New Member 投稿: 19 参加年月日: 10/12/22 最新の投稿
I agree, but i am stuck to proceed after virus detected. As we need to return the dlFileEnry object. and How can i set some valid message to show to the user.
12年前 に Tarkan Çorak によって更新されました。

RE: Virus Scanner

Regular Member 投稿: 141 参加年月日: 08/10/07 最新の投稿
Tapas Ranjan Patra:
I agree, but i am stuck to proceed after virus detected. As we need to return the dlFileEnry object. and How can i set some valid message to show to the user.


Hi,

I'm already using ClamAV as Virus Scanner for my Document Library. Just for testing create your Excpetion as subclass of FileSizeException, as this will be handled by edit_file_entry.jsp.

Then add these hooks:

JSP Hook (edit_file_entry.jsp)
<liferay-ui:error key="com.liferay.portlet.documentlibrary.antivirus.InfectedFileException" message="infected-file-exception" />

Langauge Hook (Language.properties)
infected-file-exception=[your error message]


Tarkan
thumbnail
12年前 に Tapas Ranjan Patra によって更新されました。

RE: Virus Scanner

New Member 投稿: 19 参加年月日: 10/12/22 最新の投稿
@Tarkan : Yeah i got your point.

But If you have implemented you could have reply When this Virus scanner blog feature stated bit earlier.

Anyways thanks alot.
12年前 に Tarkan Çorak によって更新されました。

RE: Virus Scanner

Regular Member 投稿: 141 参加年月日: 08/10/07 最新の投稿
Tapas Ranjan Patra:
But If you have implemented you could have reply When this Virus scanner blog feature stated bit earlier. Anyways thanks alot.

Since this week I didn't know this thread. Otherwise of course I'd have shared my knowledge with you earlier!
thumbnail
12年前 に Tapas Ranjan Patra によって更新されました。

RE: Virus Scanner

New Member 投稿: 19 参加年月日: 10/12/22 最新の投稿
Hi Tarak,
Ok no problem.
Now I am getting error "only type can be imported" while importing below package in edit_file_entry.jsp.

<%@page import="com.liferay.portlet.documentlibrary.antivirus.InfectedFileException" %>

I do not understand what is the problem.Any idea?
thumbnail
12年前 に Juan Fernández によって更新されました。

RE: Virus Scanner

Liferay Legend 投稿: 1261 参加年月日: 08/10/02 最新の投稿
Hi Tapas:
This usually happens when you import by mistake a package instead of a class.
Check the import route to verify that everything is fine
Good luck!

@Tarkan
Tarkan Çorak:

I'm already using ClamAV as Virus Scanner for my Document Library


Can you share your experience? How did you implement this? Was integrated with the workflow system or as a service wrapper?
Thanks!
thumbnail
12年前 に Aritz Galdos によって更新されました。

RE: Virus Scanner

Expert 投稿: 416 参加年月日: 07/05/15 最新の投稿
Hi guys:

I updated my source, and organized classes and so... I need to resolve this error before I commit.

08:46:28,847 ERROR [HotDeployUtil:112] com.liferay.portal.kernel.deploy.hot.HotDeployException: Error registering hook for Liferay-AntiVirus-hook
com.liferay.portal.kernel.deploy.hot.HotDeployException: Error registering hook for Liferay-AntiVirus-hook
at com.liferay.portal.kernel.deploy.hot.BaseHotDeployListener.throwHotDeployException(BaseHotDeployListener.java:45)
at com.liferay.portal.deploy.hot.HookHotDeployListener.invokeDeploy(HookHotDeployListener.java:221)
at com.liferay.portal.kernel.deploy.hot.HotDeployUtil._doFireDeployEvent(HotDeployUtil.java:109)
at com.liferay.portal.kernel.deploy.hot.HotDeployUtil._fireDeployEvent(HotDeployUtil.java:182)
at com.liferay.portal.kernel.deploy.hot.HotDeployUtil.fireDeployEvent(HotDeployUtil.java:38)
at com.liferay.portal.kernel.servlet.HookContextListener.contextInitialized(HookContextListener.java:36)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3972)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4467)
at org.apache.catalina.startup.HostConfig.checkResources(HostConfig.java:1244)
at org.apache.catalina.startup.HostConfig.check(HostConfig.java:1342)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:303)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
at org.apache.catalina.core.ContainerBase.backgroundProcess(ContainerBase.java:1337)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1601)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1610)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1590)
at java.lang.Thread.run(Thread.java:619)
Caused by: java.lang.NoSuchMethodException: com.liferay.portlet.documentlibrary.service.DLFileEntryAntiVirusLocalService.<init>(com.liferay.portlet.documentlibrary.service.DLFileEntryService)
at java.lang.Class.getConstructor0(Class.java:2706)
at java.lang.Class.getConstructor(Class.java:1657)
at com.liferay.portal.deploy.hot.HookHotDeployListener.doInvokeDeploy(HookHotDeployListener.java:575)
at com.liferay.portal.deploy.hot.HookHotDeployListener.invokeDeploy(HookHotDeployListener.java:218)
... 15 more



Any clue?

When I resolve this I will push it to gitHub and ask you all guys to update.

Regards!
thumbnail
12年前 に Tapas Ranjan Patra によって更新されました。

RE: Virus Scanner

New Member 投稿: 19 参加年月日: 10/12/22 最新の投稿
Hi Aritz,
open liferay-hook.xml and check there is space or not in com.liferay.portlet.documentlibrary.service.DLFileEntryAntiVirusLocalService.

<?xml version="1.0"?>
<!DOCTYPE hook PUBLIC "-//Liferay//DTD Hook 6.0.0//EN" "http://www.liferay.com/dtd/liferay-hook_6_0_0.dtd">

<hook>
<custom-jsp-dir>/custom_jsps</custom-jsp-dir>
<service>
<service-type>
com.liferay.portlet.documentlibrary.service.DLFileEntryLocalService
</service-type>
<service-impl>
com.liferay.portlet.documentlibrary.service.DLFileEntryAntiVirusLocalService
</service-impl>
</service>
</hook>

Hope this will resolve your issue.
thumbnail
12年前 に Aritz Galdos によって更新されました。

RE: Virus Scanner

Expert 投稿: 416 参加年月日: 07/05/15 最新の投稿
This is how it look like right now
<!--?xml version="1.0"?-->



<hook>
	<!-- 
	<portal-properties>content/antivirus.properties</portal-properties>
	 -->
	<service>
		<service-type>
			com.liferay.portlet.documentlibrary.service.DLFileEntryService
		</service-type>
		<service-impl>
			com.liferay.portlet.documentlibrary.service.DLFileEntryAntiVirusLocalService
		</service-impl>
	</service>
</hook>
thumbnail
12年前 に Tapas Ranjan Patra によって更新されました。

RE: Virus Scanner

New Member 投稿: 19 参加年月日: 10/12/22 最新の投稿
@Aritz: I faced same issue and resolved like that only.
thumbnail
12年前 に Tapas Ranjan Patra によって更新されました。

RE: Virus Scanner

New Member 投稿: 19 参加年月日: 10/12/22 最新の投稿
@Jaun : may package name inside the hook is com.liferay.portlet.documentlibrary.antivirus.

Trying to acess like <%@ page import="com.liferay.portlet.documentlibrary.antivirus.InfectedFileException" %>.

If i will use com.liferay.portlet.documentlibrary.antivirus.* then its not throwing any error but if i will use any of class from that package then its throwing error.
thumbnail
12年前 に Aritz Galdos によって更新されました。

RE: Virus Scanner

Expert 投稿: 416 参加年月日: 07/05/15 最新の投稿
Hi guys

1)I tried to tidy up the source a bit. Could you guys update to head revision?
2)I still have de same issue when deploying. even after updationg to 6.0.6
3) There are referenes to
import com.liferay.portlet.documentlibrary.service.ClamScan;
and
import com.liferay.portlet.documentlibrary.service.ScanResult;
But classes are not in repo. I guess Juan you added this references but not the casses to repo. Right?
So mean while, I commentedd out the references and commited.
12年前 に Tarkan Çorak によって更新されました。

RE: Virus Scanner

Regular Member 投稿: 141 参加年月日: 08/10/07 最新の投稿
Juan Fernández:
@Tarkan
Can you share your experience? How did you implement this? Was integrated with the workflow system or as a service wrapper?
Thanks!

Hi Juan,

As for me security was more important than (a little bit less) performance. Therefore I decided to implement it synchronous as a service wrapper, and not asynchronous with workflow. Similar to the solution above. The method addFileEntry is the perfect place, as at this point the (temporary) file has already been uploaded to the temp directory of the app server.

Tarkan
thumbnail
12年前 に Jonas Yuan によって更新されました。

RE: Virus Scanner

Liferay Master 投稿: 993 参加年月日: 07/04/27 最新の投稿
Hi Juan,

I guess it would be better to implement Virus Scanner in follows steps.

1) provide virus scanner interface in the portal core
like
 com.liferay.portal.kernel.virusscanner.VirusScanner


2) provide dummy implementation in the portal impl
add property
virusscanner.impl=com.liferay.portal.virusscanne.DummyVirusScannerImpl


3) call virus scanner when uploading documents based on the portal impl.

4) in any hook plugin - called AntiVirus plugin, virusscanner.imp could get overwritten.
use portal properties hooks like

virusscanner.impl=com.liferay.antivirus.hook.virusscanner.AntiVirusScannerImpl


Clam AntiVirus is an open source (GPL) anti-virus toolkit for UNIX, designed especially for e-mail scanning on mail gateways. It would be a good example to show this new feature - automatic antivirus scanner.

Thanks

Jonas Yuan
thumbnail
12年前 に Aritz Galdos によって更新されました。

RE: Virus Scanner

Expert 投稿: 416 参加年月日: 07/05/15 最新の投稿
Hi Jonas

As far as we are community menbers It is much easier for us to implement this as plugin. At least for a kick start.

What we are doing is a hook which implements a wrapper for DLFileEntry service.

Based on some properties such antivirus.impl we select the implementation. Which is inviked in execution time by a creator/Factory class.

We are testing it against ClamAV which looks like it fits best for our purpuse.

Some posts earlier juan stated a problem. Synchronous virus testing will be a locking task which can take user to a timeout or toa worse user experience at least. We will face this in a further phase I think.

You can have a look and contribute (of course) in this github project

https://github.com/aritzg/Liferay-AntiVirus-Plugin

Regards!!!
thumbnail
12年前 に Jonas Yuan によって更新されました。

RE: Virus Scanner

Liferay Master 投稿: 993 参加年月日: 07/04/27 最新の投稿
Hi Aritz,

The plugin looks good. Thanks, nice job!

In order to leverage more AntiVirus apps, it would be better to provide a generic interface in the portal core. Thus any specific antivirus app could be integrated in the hook plugin easily, as mentioned in the previous post.

Thanks

Jonas Yuan
thumbnail
12年前 に Albert Coronado Calzada によって更新されました。

RE: Virus Scanner

Junior Member 投稿: 38 参加年月日: 09/02/10 最新の投稿
Hi,

Can anyone explain me the state of the project? I have been in holidays and this week I had a lot of work.

Thanks,
thumbnail
12年前 に Tapas Ranjan Patra によって更新されました。

RE: Virus Scanner

New Member 投稿: 19 参加年月日: 10/12/22 最新の投稿
@Jaun : Tested in linux enviornment. Its working fine .
thumbnail
12年前 に Juan Fernández によって更新されました。

RE: Virus Scanner

Liferay Legend 投稿: 1261 参加年月日: 08/10/02 最新の投稿
@Tapas: awesome! Good news it works fine. Thanks, Tapas.

@Jonas: Aritz point is that before commiting this to trunk, we should look for a solution that is reliable and won't be a performance issue.

Right now, if there's a slow network, or if you send a big document, the user will have to wait for minuts till the AV sends its response, so it is much better to put the document into incubation state (via workflow), then send it to the AV services and after a response have been received, publish it.

We should definitely integrate this into the workflow system before thinking of comitting it to trunk, and we already have all the components needed to implement this, so it wouldn't be that difficult. I'm a bit overloaded right now, but if some of you can look at this, I can help you with the workflow definition.

Thanks, team! emoticon
thumbnail
12年前 に Juan Fernández によって更新されました。

RE: Virus Scanner

Liferay Legend 投稿: 1261 参加年月日: 08/10/02 最新の投稿
Hi Albert:
we have implemented the antivirus plugin already.
It is integrated with ClamAV and it scans the documents before submiting it.
The next step is to integrate it with the workflow system.
Will you dare to implement this feature? emoticon
Regards!
thumbnail
12年前 に Tapas Ranjan Patra によって更新されました。

RE: Virus Scanner

New Member 投稿: 19 参加年月日: 10/12/22 最新の投稿
@Jaun : Good news that we have implemented the Antivirus feature. Not sure what will be the approach to integrate with work flow .

Anyways "well begun is half done"..Thanks to all.
11年前 に Roshan Qureshi によって更新されました。

RE: Virus Scanner

Regular Member 投稿: 159 参加年月日: 10/08/24 最新の投稿
Hi All,

Can we get the plugin or it's not published yet?
If yes, can you share the path for it?

Thanks,
Roshan
thumbnail
11年前 に Aritz Galdos によって更新されました。

RE: Virus Scanner

Expert 投稿: 416 参加年月日: 07/05/15 最新の投稿
Hi,

https://github.com/aritzg/Liferay-AntiVirus-Plugin

Here is de url of the git hub repo were we developed de plugIn.

But check if new Liferay version provides anti-virus hooks.

Regards!
11年前 に Roshan Qureshi によって更新されました。

RE: Virus Scanner

Regular Member 投稿: 159 参加年月日: 10/08/24 最新の投稿
Thanks Aritz for quick reply.
In Liferay 6.1 I found this feature and also one of the properties for setting this antivirus
dl.store.antivirus.impl=com.liferay.portlet.documentlibrary.antivirus.ClamAntivirusScannerImpl

Here I have one question. Is any installation is required for Clam to work or it's shipped with Liferay-6.1 and just the properties settings will work?

Thanks,
Roshan
thumbnail
11年前 に Aritz Galdos によって更新されました。

RE: Virus Scanner

Expert 投稿: 416 参加年月日: 07/05/15 最新の投稿
Hi
I never tested this option. But I am preaty sure you have to install Clam AV separately.

Regards,
Aritz
11年前 に Roshan Qureshi によって更新されました。

RE: Virus Scanner

Regular Member 投稿: 159 参加年月日: 10/08/24 最新の投稿
Hi Aritz,

I think I have to install it on server.
I will test it. Can you please share your test environment for this.

Thanks.
11年前 に Roshan Qureshi によって更新されました。

RE: Virus Scanner

Regular Member 投稿: 159 参加年月日: 10/08/24 最新の投稿
Hi,

I installed the Clam AV for windows and also followed wiki link :
http://www.liferay.com/documentation/liferay-portal/6.1/user-guide/-/ai/document-library-portlet
I tested this on LR 6.1CE-ga1 but did not find anything at UI side like whether it's checking for virus or not.

How can one know whether Clam AV is successfully integrated with Liferay and working fine.

Thanks,
Roshan
thumbnail
11年前 に Hitoshi Ozawa によって更新されました。

RE: Virus Scanner

Liferay Legend 投稿: 7942 参加年月日: 10/03/24 最新の投稿
I'll also like to know how to remove infected file from the system.