Skip to Main Content

C-ICAP and ClamAV for ORDS

Oracle REST Data Service (ORDS) has feature to scan uploaded files for viruses. You can install e.g. C-ICAP and ClamAV for that purpose. Here are steps how to do that on Ubuntu 18.04 server assuming you have already working ORDS installation on same or different server.

First install needed packages and dependencies.

sudo apt install libc-icap-mod-virus-scan libclamunrar9

After packages are installed, edit file /etc/default/c-icap to allow C-ICAP start

sudo sed -i 's/START=no/START=yes/g' /etc/default/c-icap

Edit file /etc/c-icap/c-icap.conf and add below lines to end of file

Include virus_scan.conf
Include clamav_mod.conf
virus_scan.DefaultEngine clamav
virus_scan.ScanFileTypes TEXT DATA EXECUTABLE ARCHIVE GRAPHICS STREAM DOCUMENT
ServiceAlias AVSCAN virus_scan?allow204=on&sizelimit=off&mode=simple

Restart C-ICAP server

sudo systemctl restart c-icap

Next edit ORDS configuration file default.xml and add below lines to it before closing properties tag

<entry key="icap.port">1344</entry>
<entry key="icap.server">127.0.0.1</entry>

Change key icap.server value to point server where you did install C-ICAP if ORDS is running on different server.

After you have modify ORDS configuration, restart ORDS standalone or web server where ORDS is deployed.

With your own risk, you can try virus scanner with test files from www.eicar.org. Please read instructions, before downloading test files.

Comments

  • Benny Tate 26-JAN-24 09.18.17.784365 PM

    This was perfect and worked awesome.

  • Jari Laine 01-MAR-23 05.33.47.027692 AM

    Hi Kody,

    I couldn't find from ORDS documentation option to change ICAP url path (service name).
    Is there specific reason you need to change that?

    Regards,
    Jari

  • Kody 28-FEB-23 10.26.25.894918 PM

    Have any one been able to figure out of ORDS has the ability to change the service name? Without C-ICAP Alias?
    Or where is the AVSCAN service name being hardcoded?

  • Jari Laine 23-JAN-23 11.59.08.667622 AM

    Hi Steffen,

    I don't understand what you mean with below

    do you have an integration with APEX too?

    When you configure virus scanning for ORDS, it automatically scans files you upload using APEX.

    Regards,
    Jari

  • Steffen 23-JAN-23 11.53.06.832245 AM

    Hi Jari,
    very nice - it works for me on Oracle Linux 8 - do you have an integration with APEX too?

  • Jari Laine 16-AUG-22 05.13.04.596786 PM

    Hi Nikolay,

    Yes I did test with eicar test malware when posted instructions.

    Have you install C-ICAP according this blog post and using same Ubuntu version?

    Regards,
    Jari

  • Nikolay 15-AUG-22 07.03.07.993561 PM

    Have you tested this with eicar test malware file at seems to not work?

  • Jon 10-MAR-22 11.38.56.118690 PM

    Thanks for this!

  • Llinda 03-NOV-21 06.55.35.137931 PM

    Very useful post, thank you very much!