Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions SUSE/docker-compose/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,13 @@ The initial user must be an email address associated with a valid remote account

When configuring the authentication service, the callback URI should be the same as `public_url` above but with `/auth/oidc/callback` appended. For example, `https://sensor-demo.dyn.cloud.suse.de/auth/oidc/callback`

The sensor frontend runs as user velociraptor in the container and needs permissions to some directories on the host. Find the ids that are baked into the image and chown the directories to those, e.g.:

# docker run --rm -t registry.opensuse.org/security/sensor/containers/linux-security-sensor:latest id velociraptor
uid=499(velociraptor) gid=486(velociraptor) groups=486(velociraptor)

# chown 499:486 config/velociraptor logs/velociraptor data/velociraptor artifacts

### Traefik

An example `traefik.toml` file is provided as `config/traefik/traefik.toml.example`. Several values must be filled in and the resultant file installed in `config/traefik/traefik.toml`.
Expand Down
4 changes: 4 additions & 0 deletions SUSE/docker-compose/artifacts/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Placeholder file
=

This file is a placeholder so that the artifacts directory exists in the Git repository.
7 changes: 4 additions & 3 deletions SUSE/docker-compose/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,10 @@ services:
- /var/lib/ca-certificates/ca-bundle.pem:/etc/ssl/certs/ca-certificates.crt:ro
restart: unless-stopped
sensor-frontend:
image: registry.opensuse.org/security/sensor/containers/linux-security-sensor:latest
image: ${SENSOR_IMAGE}
hostname: sensor-frontend
container_name: sensor-frontend
user: "1000:100"
user: "velociraptor:velociraptor"
ports:
- "8000:8000" # Frontend
# - "8003:8003" # Monitoring
Expand All @@ -44,6 +44,7 @@ services:
- ./config/velociraptor:/config
- ./data/velociraptor:/data
- ./logs/velociraptor:/logs
- ./artifacts:/artifacts
- /var/lib/ca-certificates/ca-bundle.pem:/etc/ssl/certs/ca-certificates.crt:ro
labels:
traefik.enable: "true"
Expand All @@ -61,7 +62,7 @@ services:
restart:
unless-stopped
sensor-client:
image: registry.opensuse.org/security/sensor/containers/linux-security-sensor:latest
image: ${SENSOR_IMAGE}
hostname: sensor-client
container_name: sensor-client
user: root
Expand Down
1 change: 1 addition & 0 deletions SUSE/docker-compose/env.example
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
SENSOR_GUI_HOSTNAME=<fully-qualified-domain-name-for-public-dns>
SENSOR_IMAGE=registry.opensuse.org/security/sensor/containers/linux-security-sensor:latest
1 change: 1 addition & 0 deletions SUSE/docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ LABEL org.opensuse.reference="registry.opensuse.org/security/sensor/containers/l
VOLUME /data
VOLUME /logs
VOLUME /config
VOLUME /artifacts

# API
EXPOSE 8801
Expand Down
8 changes: 7 additions & 1 deletion SUSE/docker/Dockerfile.devel
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
FROM opensuse/leap:15.4

ARG SENSOR_BIN=velociraptor-v0.7.0-4-linux-amd64

VOLUME /data
VOLUME /logs
VOLUME /config
VOLUME /artifacts

# API
EXPOSE 8801
Expand All @@ -20,6 +23,9 @@ COPY entry-point.sh generate-config.sh /
COPY init-config.json /etc/velociraptor/
RUN chmod a+x /entry-point.sh /generate-config.sh
RUN zypper -q --non-interactive install catatonit && zypper clean -a
COPY velociraptor-v0.6.4-2-linux-amd64 /usr/bin/velociraptor
COPY ${SENSOR_BIN} /usr/bin/velociraptor

RUN groupadd velociraptor && useradd -c "Velociraptor User" -g velociraptor -d /var/lib/velociraptor -s /sbin/nologin velociraptor
USER velociraptor:velociraptor

CMD ["/usr/bin/catatonit", "--", "/entry-point.sh" ]
1 change: 1 addition & 0 deletions SUSE/docker/Dockerfile.local
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ FROM opensuse/leap:15.4
VOLUME /data
VOLUME /logs
VOLUME /config
VOLUME /artifacts

# API
EXPOSE 8801
Expand Down
2 changes: 1 addition & 1 deletion SUSE/docker/entry-point.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ if test ! -e "${SERVER_CONFIG}"; then
/generate-config.sh
fi

exec velociraptor frontend -v --config "${SERVER_CONFIG}"
exec velociraptor frontend -v --config "${SERVER_CONFIG}" --definitions=/artifacts
2 changes: 1 addition & 1 deletion SUSE/docker/generate-config.sh
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,4 @@ awk "
{ if (seen_client == 1 && skip_record != 1) print \$0; }
" < "${SERVER_CONFIG}" > "${CLIENT_CONFIG}"

sed -e 's#https://sensor-frontend:8000/#https//velociraptor.fqdn:8000/' < "${CLIENT_CONFIG}" > "${CLIENT_CONFIG}.template"
sed -e 's#https://sensor-frontend:8000/#https//velociraptor.fqdn:8000/#' < "${CLIENT_CONFIG}" > "${CLIENT_CONFIG}.template"