Premium Feature — Available with all Premium Editions of LabKey Server. Learn more or contact LabKey.

File uploads, attachments, archives and other content imported through the pipeline or webdav can be scanned for viruses using ClamAV. This topic covers how to configure and use ClamAV antivirus protection.

Configure Antivirus Scanner

  • Select (Admin) > Site > Admin Console.
  • Click Settings.
  • Under Premium Features, click Antivirus.
  • Next to ClamAV Daemon, click Configure.
  • Provide the Endpoint for your ClamAV installation. Your endpoint will differ from this screenshot.
  • The Status message should show the current version and date time. If instead it reads "Connection refused: connect", check that you have provided the correct endpoint and that your service is running.
  • When ready, click Save. Then click Configure Antivirus scanner to return to the configuration page.
  • Select the radio button for ClamAV Daemon, then click Save.

Check Uploads for Viruses

When Antivirus protection is enabled, files uploaded via webdav or included as file attachments will be scanned by the configured provider, such as ClamAV. The process is:

  1. The file is uploaded to a protected "quarantine" location.
  2. The registered antivirus provider is sent a request and scans the file.
  3. If the antivirus provider determines the file is bad, it is deleted from the quarantine location and the user is notified.
  4. If the antivirus scan is successful, meaning no virus is detected, the file is uploaded from the quarantine location to the LabKey file system.
When virus checking is enabled, it is transparent to the users uploading virus-free files.

Virus Reporting

If the antivirus provider determines that the file contains a virus, an alert will be shown to the user either directly as an error message similar to "Unable to save attachments: A virus detected in file: <filename>", or a popup message similar to this:

Developer Notes

If a developer wishes to register and use a different virus checking service, they must do the following:

  • Create a LabKey module. (See Java Modules.)
  • Create an implementation of org.labkey.api.premium.PremiumService.AntiVirusProvider.
  • Register the implementation using PremiumService.get().registerAntiVirusProvider() when the module starts up.

Related Topics

Was this content helpful?

Log in or register an account to provide feedback

expand allcollapse all