Peter Gallagher edited this page Feb 14, 2017 · 13 revisions

Alfviral is a module created for Alfresco which uses an antivirus software to scan documents.

Introduction

Alfviral is a module installable in Alfresco (Repository and Share) that uses an antivirus software (currently ClamAV) to scan both new uploaded documents and those already present in the repository.

Details

Alfviral works in two different modes --one of them works by calling the system to run the virus scan program with the defined parameters, and the other one by sending the document data flow to an antivirus port.

The diagram below illustrates how the module works:

Installation

To install the module, you need to unzip the package (.zip file) and then install the AMP module in the repository and the JAR library in any library directory accesible by Share.

Installation example:

To unzip the package:

unzip fegorsoft-alfviral-1.0-beta.zip

To install the AMP module:

java -jar alfresco-mmt.jar install fegorsoft-alfviral-alfresco-1.0-beta.amp alfresco.war -verbose

To install the JAR library:

cp fegorsoft-alfviral-share-1.0-beta.jar tomcat/shared/classes/lib

Configuration

Configuration is done via alfviral.properties, a file that is contained in the module (e.g. in tomcat/webapps/alfresco/WEB-INF/classes/alfresco/extension directory) and can be copied to tomcat/shared/classes/alfresco/extension.

File: alfviral.properties

# Command to exec, i.e. clamscan, alfviral.sh, etc. (COMMAND)
alfviral.command=C\:\\Users\\fegor\\Documents\\alfviral.bat

# Config for ClamAV in stream data (INSTREAM)
alfviral.timeout=30000
alfviral.host=192.168.1.11
alfviral.port=3310
alfviral.chunkSize=1024

# Config for VIRUSTOTAL
vt.key=
vt.url=https://www.virustotal.com/vtapi/v2/file/scan

# Config for ICAP protocol
alfviral.icap.host=192.168.56.101
alfviral.icap.port=1344
alfviral.icap.service=srv_clamav

# Modes: COMMAND, INSTREAM, VIRUSTOTAL, ICAP
alfviral.mode=ICAP

# Events
alfviral.on_update=TRUE
alfviral.on_read=FALSE

# Scheduled action
alfviral.scheduled.pathQuery=/app:company_home/st:sites
alfviral.scheduled.cronExpression=* * * * * ? 2099

# List of file exceptions
alfviral.file.exceptions=text/html|text/xml|application/pdf|image/jpeg|text/plain
Clone this wiki locally
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.