Skip to content

TheHive and Cortex Compose scripts #2652

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

Merged
merged 22 commits into from
Nov 8, 2022
Merged

Conversation

rdettai
Copy link
Contributor

@rdettai rdettai commented Oct 25, 2022

This is a complete revamp of the #2532 with a more stable init script.

📝 Reviewer Checklist

Review this pull request by ensuring the following items:

  • All user-facing changes have changelog entries
  • User-facing changes are reflected on vast.io

Todo:

  • Add TheHive orgadmin
  • Configure analyzer
  • replace pyvast with the new bindings To be done separately to close this off

@rdettai rdettai self-assigned this Oct 25, 2022
@rdettai rdettai added the feature New functionality label Oct 25, 2022
@rdettai rdettai changed the title Add init script that gets Cortex API key TheHive and Cortex Docker scripts Oct 25, 2022
@rdettai rdettai changed the title TheHive and Cortex Docker scripts TheHive and Cortex Compose scripts Oct 25, 2022
@rdettai rdettai force-pushed the story/sc-37376/thehive-init-revamp branch from c71d775 to 4b4ce3b Compare November 1, 2022 12:37
rdettai and others added 13 commits November 3, 2022 14:04
This almost works, however the container that runs the actual query
(tenzir/vast-neuron) doesn't find the `input.json` in the expected place
(`/job/input/input.json`). I checked that the `input.json` is correctly
creatd in the cortex container with proper contents, and when the
container is started an actual log message indicates that that very
volume is mounted to `/job` on the neuron.

```
thehive-cortex-1         |   timeout: 30 minutes
thehive-cortex-1         |   image  : tenzir/vast-neuron
thehive-cortex-1         |   volume : /opt/cortex/jobs/cortex-job-yfueFYQBc4_qCE3nWixQ-7660690682055716688:/job
```

However, when logging into the neuron /job is empty. I've run out of
ideas. It does seem to work for Kaans set of images, maybe some sort of
permission problem.
It works when running the neuron independently,
("./vast-cortex-neuron/tests/test service")
but fails when it is executed from Cortex
("Container could not be started")
@dispanser dispanser force-pushed the story/sc-37376/thehive-init-revamp branch from 9412983 to f6be72a Compare November 3, 2022 13:05
@rdettai rdettai marked this pull request as ready for review November 7, 2022 09:52
@rdettai rdettai requested a review from dispanser November 7, 2022 15:35
@rdettai
Copy link
Contributor Author

rdettai commented Nov 7, 2022

It will be easier to write some high level tests and documentation once the full usecase is implemented, so I think we can merge this now.

Copy link
Contributor

@dispanser dispanser left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested and we can successfully interact between VAST, Cortex, and TheHive.

I'm not a docker compose expert by any means, so take that approval with a grain of salt.

@rdettai rdettai merged commit 82d68e0 into master Nov 8, 2022
@rdettai rdettai deleted the story/sc-37376/thehive-init-revamp branch November 8, 2022 14:15
dominiklohmann added a commit that referenced this pull request Nov 25, 2022
This is addressing multiple issues that bubbled up after #2652
- There was a `$` missing before `exit_code`
- Lint issues
- A transient failure in the Cortex init script due to concurrent access 
  to a mounted volume
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants