-
Notifications
You must be signed in to change notification settings - Fork 132
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
pcap import fails on Windows with per-machine install #2715
pcap import fails on Windows with per-machine install #2715
Comments
The Windows Suricata runner fails on per-machine installs of the Zui app because it ignores the BRIM_SURICATA_USER_DIR environment variable and tries to write a Suricata configuration file to its own directory, which isn't writable by a non-Administrator on per-machine installs. Fix by writing the file to BRIM_SURICATA_USER_DIR if specified. The Windows runner also ignores the rules file that suricataupdater.exe generates at $BRIM_SURICATA_USER_DIR\rules\suricata.rules. Fix by using that file if it exists, falling back to the packaged rules file if it does not. For brimdata/zui#2715.
The Windows Suricata runner fails on per-machine installs of the Zui app because it ignores the BRIM_SURICATA_USER_DIR environment variable and tries to write a Suricata configuration file to its own directory, which isn't writable by a non-Administrator on per-machine installs. Fix by writing the file to BRIM_SURICATA_USER_DIR if specified. The Windows runner also ignores the rules file that suricataupdater.exe generates at $BRIM_SURICATA_USER_DIR\rules\suricata.rules. Fix by using that file if it exists, falling back to the packaged rules file if it does not. For brimdata/zui#2715.
Verified with Zui Insiders 1.0.1-9 which includes this fix. As shown in the attached video, now on a "per machine" install where the app binaries land in Verify.mp4Thanks @nwt! |
Repro is with Zui v1.0.0. This issue was first reported by a community user in a Slack thread.
The attached video shows a Windows 10 environment where Zui was installed with the "per-machine" option that was added in #2686. When a pcap is imported, an error pops up:
Media1.mp4
I think I see what the problem is. The Windows suricataupdater.exe makes use of the
BRIM_SURICATA_USER_DIR
environment variable that's sent down from Zui here:zui/src/plugins/brimcap/brimcap-plugin.ts
Line 78 in 904edcf
...wheres with suricatarunner.exe it seems like the creation of the
brim-conf-run.yaml
happens under the "zdeps" directory near where the binaries live and are intended to be read-only (https://zui.brimdata.io/docs/support/Filesystem-Paths#application-binaries). I can also see that the shell-script-based runner scripts we use on Linux/macOS do seem to make use ofBRIM_SURICATA_USER_DIR
so they end up writing theirbrim-conf-run.yaml
in the separate read/write "user data" area (https://zui.brimdata.io/docs/support/Filesystem-Paths#user-data).In conclusion, I think the
suricatarunner.exe
needs some enhancement to make use of theBRIM_SURICATA_USER_DIR
.The text was updated successfully, but these errors were encountered: