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.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/services/antivirus.md
+48-18Lines changed: 48 additions & 18 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,19 +5,22 @@ tags: [explanation, services]
5
5
6
6
# Anti-Virus Scanning
7
7
8
-
## Getting started
8
+
## What is ClamAV
9
9
10
10
[ClamAV][clamav] is an open source antivirus engine for detecting trojans, viruses, malware and other malicious threats.
11
11
It is used in a variety of situations including file scanning, email scanning, web scanning and end point security.
12
12
13
-
This feature is installed on all Nais clusters.
14
-
ClamAV runs with one daemon pod and one pod running the REST api the applications use.
15
-
There is a service set up so all applications will be able to talk to the REST api using [http://clamav.nais-system/scan](http://clamav.nais-system/scan).
16
-
The REST api supports PUT or POST and can be tested using curl as well:
13
+
## Where is it available
14
+
This feature is installed on all nais clusters if the feature is enabled in the tenant.
15
+
ClamAV has a REST API applications in the cluster can use for scanning files and urls.
17
16
18
-
ClamAV has a REST API applications can use for scanning files and urls.
17
+
There is a service set up so all applications will be able to talk to the REST api using either
18
+
- V1 API: http://clamav.nais-system/scan
19
+
- V2 API: http://clamav.nais-system/api/v2/scan
19
20
20
-
The REST API has one endpoint `/scan` that supports PUT or POST with form-data. It can be tested using curl as well:
21
+
The service can only be used from inside the cluster and the APIs support PUT with a request body or POST with form-data.
See [ClamAV documentation][clamav-docs] and [ClamAV REST API][clamav-api] for more information.
30
-
31
-
[clamav]: https://www.clamav.net/
32
-
[clamav-docs]: https://docs.clamav.net/
33
-
[clamav-api]: https://github.com/navikt/muescheli
34
-
35
-
## Access Policy
32
+
### Access Policy
36
33
37
34
When using ClamAV on GCP, remember to add an [outbound access policy](../workloads/how-to/access-policies.md):
38
35
@@ -43,21 +40,54 @@ metadata:
43
40
name: myapp
44
41
...
45
42
spec:
46
-
...
47
43
accessPolicy:
48
44
outbound:
49
45
rules:
50
46
- application: clamav
51
47
namespace: nais-system
52
48
```
53
49
54
-
## Support
50
+
## What is returned from the API
51
+
52
+
The response returns a JSON result that differs slightly based on which version of the API you're using:
53
+
54
+
V1 (will return HTTP/500 if any error occurs):
55
+
```
56
+
[
57
+
{
58
+
"Filename": "yourfile.txt",
59
+
"Result": "OK"
60
+
}
61
+
]
62
+
```
55
63
56
-
If you have any questions about ClamAV please contact the Nais team on Slack, [#nais](https://nav-it.slack.com/messages/C5KUST8N6) or contact [@Sten.Ivar.Røkke](https://nav-it.slack.com/archives/D5KP2068Z) directly.
64
+
V2 (will return HTTP/200 with error message):
65
+
```
66
+
[
67
+
{
68
+
"filename": "yourfile.txt",
69
+
"result": "OK",
70
+
"virus": "",
71
+
"error": ""
72
+
}
73
+
]
74
+
```
75
+
76
+
77
+
See [ClamAV documentation][clamav-docs] and [ClamAV REST API][clamav-rest] for more information.
0 commit comments