-
Notifications
You must be signed in to change notification settings - Fork 1
Deploy a production instance of The Hive #1
Comments
I've extracted the Ansible role for Cassandra cluster configuration into a separate repo in https://github.com/status-im/infra-hq/commit/fb7efeb3: The ElasticSearch cluster role is already available: |
I figured it out. We had a bug in how we were attaching the data volume and I fixed it in: status-im/infra-tf-google-cloud@da60baab |
Our current role for Cassandra setup doesn't configure any authentication. But considering this will be handling more sensitive data it will make sense to change that. If we look at The Hive configuration we can see it allows for user/password auth:
And Cassandra allows for configuration including user/password auth by editing the config to include:
And then creating users using CQL commands:
https://cassandra.apache.org/doc/latest/operating/security.html#enabling-password-authentication |
Though apparently:
Which means:
https://cassandra.apache.org/doc/latest/operating/security.html#operation-roles |
While working on this I found a few other bugs I fixed:
|
I've adjusted the Cassandra role to handle user authentication too: |
Okay, we have a Cassandra cluster up with user auth:
|
What I would like to understand is how Cortex ties into The Hive, because the installation docs do not reference Cortex even once. Based on the Docker Compose they have in their repo TheHive uses Cortex. |
The config file contains a section for Cortex:
|
The ElasticSearch version in Cortex installation docs is |
The Cortex config does provide an option to setup ElasticSearch with auth:
But the Open Source version of ElasticSearch does not provide Auth, so we'll skip that. |
Another fix for file permissions: status-im/infra-role-elasticsearch@32ac6e39 |
we can handle cortex later. Getting TheHive up and running allows me to start inviting people and creating case templates, which I can add Cortex analyzers to later. You're planning on putting the Cortex instance on the same machine? |
Yes, that was the idea. |
I don't see any flags for specifying config location:
|
According to the doc:
|
According to Docker docs:
|
It appears there is no Docker image for The newest one there is is for |
There is a Dockerfile available tho: |
Building the image fails on downloading some JAR:
|
I fixed that by adding:
To the
I opened an issue about it: TheHive-Project/TheHive#1573 |
I guess I'm forced to use their APT repo:
|
They clearly have
So they don't consider I'm confused. |
They have a 3.5.1 Release release out, but if you look at the tag it's an They appear to be VERY sloppy with their versioning. |
When I look at config samples for TheHive But then why is the instance Corey configured using Cassandra? And why does the sample not contain a What the hell is going on? |
It does appear like the config on the hoist configured by Corey is using the |
Ooooh, it was never installed using APT:
|
It appears that the version available through the
|
But these |
Oh wait, I'm seeing something in Nginx logs:
|
My understanding is that the Web UI opens a stream at I've set it to 3600 seconds - 1 hour - in c12b93dc. |
We had issues with Corey logging in initially. He didn't have a public email on his GitHub profile and that might have been the issue. I had to re-create the account and create a fresh password too. |
Adjusted The Hive role to download specifically |
According to TheHive-Project/TheHive#1105 just removing these lines form service definition should fix logs:
Which I did: 891304ed
|
Looks like this needs the ES cluster to already have an index present:
|
I created the index and now I'm just getting some warnings:
And a search error that appears as a warning:
So I'm not sure if it's actually an error or a warning. |
And when trying to log in via WebUI I get:
This service produces a lot of errors for a brand new install... |
Opened an issue about lack of index: TheHive-Project/Cortex#305 |
Opened another issue about |
Configured and Nginx proxy for Cortex: 9ef85cee |
After a bunch of a research in TheHive-Project/Cortex#305 I realized that Cortex requires ElasticSearch Which is ridiculous because its end of life was in |
They do have have an |
There appears to be no binary release of This section of docs does say how to build the project:
|
I built it using an
And here it is: https://status-misc.ams3.digitaloceanspaces.com/cortex-3.1.0-RC1.zip |
But it's still failing with:
|
Okay, i created the index by hand and it starts now:
But when I try to open the side I get:
But logs show no error. So something is still wrong. |
For now I just added index creation to the role: 04699b5f |
I had a conversation with Jerome Leonard from the project in their Gitter and I was told that:
Which confirms my issues. He also said that:
And it's supposed to appear within days. So I think it would be sensible to take a break form this and wait for their stable release. |
I tried |
Based on TheHive-Project/Cortex#305 (comment) comment I opened the site available at
I cannot for the life of me comprehend why this software doesn't run the migration by itself at startup, but it doesn't. |
Applied a fix in: 6d25ba9c |
Opened an issue about automated creation of superuser: TheHive-Project/Cortex#316 |
There's this documentation for Cortex connector:
Based on the lack of error from the request and in the logs I assume it's working as intended.
|
Also added OAuth for good measure: d01e6f73 |
The instructions are available here:
https://github.com/TheHive-Project/TheHiveDocs/blob/master/TheHive4/Installation/Install_deb.md
https://github.com/TheHive-Project/CortexDocs/blob/master/installation/install-guide.md
@corpetty already configured a test instance at
master-01.gc-us-central1-a.thehive.misc
: https://github.com/status-im/infra-misc/commit/44e26d18Here are his notes: https://notes.status.im/1cGF__y4Q1GuKCt2OdONgw
Steps:
The text was updated successfully, but these errors were encountered: