Synapse's own media-scanning module (Issue #19) can never see E2EE attachment content - a structural limit, not a bug. This adds a small standalone HTTP wrapper around the same ClamAV instance, reachable from browser JS at /_scan, so the ThreadNet-Web client fork can scan plaintext both before encrypting/uploading and after downloading/ decrypting - covering both directions regardless of room encryption. Auth via Synapse's own /whoami endpoint, no separate auth system.
62 lines
1.5 KiB
YAML
62 lines
1.5 KiB
YAML
apiVersion: v1
|
|
kind: Service
|
|
metadata:
|
|
name: clamav-http-scanner
|
|
namespace: matrix
|
|
spec:
|
|
type: ClusterIP
|
|
selector:
|
|
app.kubernetes.io/name: clamav-http-scanner
|
|
ports:
|
|
- name: http
|
|
port: 8090
|
|
protocol: TCP
|
|
---
|
|
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: clamav-http-scanner
|
|
namespace: matrix
|
|
spec:
|
|
replicas: 1
|
|
strategy:
|
|
type: RollingUpdate
|
|
selector:
|
|
matchLabels:
|
|
app.kubernetes.io/name: clamav-http-scanner
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app.kubernetes.io/name: clamav-http-scanner
|
|
spec:
|
|
containers:
|
|
- name: clamav-http-scanner
|
|
image: rohana.axion1337.de/sorb/clamav-http-scanner:v1.0.0
|
|
imagePullPolicy: IfNotPresent
|
|
ports:
|
|
- name: http
|
|
containerPort: 8090
|
|
env:
|
|
- name: CLAMD_HOST
|
|
value: "clamav.matrix.svc.cluster.local"
|
|
- name: CLAMD_PORT
|
|
value: "3310"
|
|
- name: SYNAPSE_WHOAMI_URL
|
|
value: "http://matrix-stack-synapse.matrix.svc.cluster.local:8008/_matrix/client/v3/account/whoami"
|
|
resources:
|
|
requests:
|
|
cpu: 50m
|
|
memory: 64Mi
|
|
limits:
|
|
memory: 128Mi
|
|
livenessProbe:
|
|
tcpSocket:
|
|
port: http
|
|
initialDelaySeconds: 10
|
|
periodSeconds: 15
|
|
readinessProbe:
|
|
tcpSocket:
|
|
port: http
|
|
initialDelaySeconds: 5
|
|
periodSeconds: 10
|