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

  • Jari Laine

    Hi Rashiq,

    You need install and use “Customer Managed ORDS”.

    Regards, Jari

  • Rashiq

    How We will do it in autonomous data base ORDS?

  • Benny Tate

    This was perfect and worked awesome.

  • Jari Laine

    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

    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

    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

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

  • Jari Laine

    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

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

  • Jon

    Thanks for this!