Conversation
Assisted-by: copilot with mai-code-1.1-flash model
|
Thanks for the PR! A maintainer will review it. While you wait, make sure these pass locally: just validate # element graph check
just build default # build the image
just boot-test # confirm the desktop boots (exits 0 = pass)
just lint # bootc container lintIf this PR fixes a bug, add verify steps to the linked issue so users can confirm the fix on their hardware after the next nightly ships: ```verify
ujust <something> # what users should run to confirm the fix
``` |
|
@rapenne-s I am still thinking about adding this, I'll let you know when I think we can land it. Also, for future reference, if I attach myself to the issue, it means I'd like to take a closer look because we have other planned pieces in a similar area and I want to make sure we don't have a conflict. |
|
@rapenne-s Looks like we need to add in some eBBF items for this to work properly. I'll have an actual review ready in a little bit here. |
Indeed, eBPF support would increase opensnitch efficiency (as explained on their wiki). But this requires adding their kernel module https://github.com/evilsocket/opensnitch/tree/master/ebpf_prog The fallback is using audit mode as I understand. |
ahmedadan
left a comment
There was a problem hiding this comment.
Thanks @rapenne-s for working through the packaging. I built the unchanged daemon package on x86_64. Please address the inline packaging and integration points and add runtime coverage for the supported architectures.
| go build -mod=vendor -o opensnitchd . | ||
|
|
||
| install-commands: | ||
| - | | ||
| install -Dm755 daemon/opensnitchd "%{install-root}%{bindir}/opensnitchd" |
There was a problem hiding this comment.
This builds the daemon but not its eBPF programs. Please also build and install opensnitch.o, opensnitch-procs.o, and opensnitch-dns.o under /usr/lib/opensnitchd/ebpf/, using the same source revision. Dakota’s existing SDK LLVM can supply the build tools; no global toolchain pin is needed.
| - | | ||
| install -d "%{install-root}%{sysconfdir}/opensnitchd/rules" | ||
| install -d "%{install-root}%{sysconfdir}/opensnitchd/tasks" | ||
| install -Dm644 daemon/data/default-config.json "%{install-root}%{sysconfdir}/opensnitchd/default-config.json" |
There was a problem hiding this comment.
This configuration selects eBPF, but full process-event monitoring also requires CONFIG_FTRACE_SYSCALLS. It is disabled in both inspected Dakota kernel configurations, so we need a coordinated change in files/linux/dakota-config.sh and runtime verification before treating this mode as supported.
| sed -i 's|"Address":"unix:///tmp/osui.sock"|"Address":"127.0.0.1:50051"|g' \ | ||
| "%{install-root}%{sysconfdir}/opensnitchd/default-config.json" |
There was a problem hiding this comment.
Could we use a private runtime Unix socket instead? The Flatpak manifest already exposes xdg-run/opensnitch, and I verified that this transport works without network sharing. That avoids trusting whichever local process binds this unauthenticated TCP port; the GUI launcher and explicit user setup would need to configure matching endpoints.
| - kind: git_repo | ||
| url: github:evilsocket/opensnitch.git | ||
| track: master | ||
| ref: a1353848ba1b660320e90cefea782c3fba272c00 |
There was a problem hiding this comment.
This revision identifies as OpenSnitch 1.9.0, while the linked Flatpak manifest pins UI 1.8.0. Please coordinate a matched daemon/UI version and test it together, rather than make cross-version compatibility part of the supported setup.
| sed -e 's|/usr/local/bin/opensnitchd|/usr/bin/opensnitchd|g' \ | ||
| daemon/data/init/opensnitchd.service > opensnitchd.service.patched | ||
| install -Dm644 opensnitchd.service.patched \ | ||
| "%{install-root}%{indep-libdir}/systemd/system/opensnitchd.service" |
There was a problem hiding this comment.
For Dakota’s proposed session-scoped behavior, this service also needs logout lifecycle integration. Upstream has graceful cleanup, but this unit does not connect shutdown to the controlling desktop session. Please verify that logout removes OpenSnitch’s active rules and probes without touching other firewall rules, and test crash recovery separately.
|
Thanks for packaging this, and for the clear write-up of the Flatpak trade-offs. I went through the element while ahmedadan works through the eBPF and socket questions. Things that look right to me: every source is pinned to a commit, the preset ships One small thing on top of ahmedadan's points: upstream is GPL-3.0, and other elements here ( Whether this lands is ahmedadan's call given the related work he mentioned; I just wanted you to know it is being looked at. |
|
Thank you both for your reviews, I'll sort this out, it may take me some time. |
Assisted-by: copilot with mai-code-1.1-flash model
What problem are you solving?
This implements opensnitch daemon to fix #1583
Changes
This adds dependencies for the daemon of opensnitch github.com/evilsocket/opensnitch
The default configuration file is patched as this make it easier to use the flatpak version I made for the GUI in https://git.coopix.eu/public/flatpak-opensnitch-ui , otherwise the default unix socket is created by the GUI in /tmp/ which is forbidden by flatpak sandboxing, so I defaulted to using TCP to make the setup easier.
I am using it on my system, it is working fine, but although the daemon is packaged correctly, the extra flatpak program (that will never make it to flathub because they forbid this kind of GUI that depend on another service to be useful) feels clunky. I tried to package the UI in dakota, but I didn't succeed.
Honestly, I don't even know if there is an interest, in such situation I'd prefer to know it clearly, so I could stop spending hours on this :)
Testing
just validatepassesjust boot-testpasses (automated boot smoke test)just lintpasses on a built imagejust boot-fastorjust boot-vm— desktop comes up, no regressionsChecklist
deps.bstpatches/regenerated if junction refs changed