FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Split ursadb and mquery repo (#277) · CKWebProject/mquery@e31c1f7 · GitHub

Repository navigation

Commit e31c1f7

Browse files
andauthored
Split ursadb and mquery repo (CERT-Polska#277)
* Split ursadb and mquery repo * Migrate the last docker-compose * Add a basic security documentation * Consult grammarly for random commas and articles * Update docs/README.md Co-authored-by: Michał Praszmo <michalpr@cert.pl> Co-authored-by: Michał Praszmo <michalpr@cert.pl>
1 parent 526dc08 commit e31c1f7

6 files changed

Lines changed: 54 additions & 11 deletions

File tree

‎docker-compose.dev.yml‎

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,18 +42,17 @@ services:
4242
environment:
4343
- "MQUERY_PLUGINS=${MQUERY_PLUGINS}"
4444
ursadb:
45-
build:
46-
context: ursadb/
47-
dockerfile: Dockerfile
45+
image: mqueryci/ursadb:v1.5.0
4846
ports:
4947
- "9281:9281"
5048
volumes:
5149
- "${SAMPLES_DIR}:/mnt/samples"
5250
- "${INDEX_DIR}:/var/lib/ursadb"
51+
user: "0:0"
5352
keycloak:
5453
image: quay.io/keycloak/keycloak:15.1.0
5554
ports:
56-
- 8080:8080
55+
- "8080:8080"
5756
environment:
5857
- KEYCLOAK_USER=admin
5958
- KEYCLOAK_PASSWORD=admin

‎docker-compose.e2etests-local.yml‎

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,14 +39,13 @@ services:
3939
- "redis"
4040
- "ursadb"
4141
ursadb:
42-
build:
43-
context: ursadb/
44-
dockerfile: Dockerfile
42+
image: mqueryci/ursadb:v1.5.0
4543
ports:
4644
- "9281:9281"
4745
volumes:
4846
- "./e2e-state/samples:/mnt/samples"
4947
- "./e2e-state/index:/var/lib/ursadb"
48+
user: "0:0"
5049
redis:
5150
restart: always
5251
image: redis

‎docker-compose.yml‎

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,14 +31,13 @@ services:
3131
- "MQUERY_PLUGINS=${MQUERY_PLUGINS}"
3232
ursadb:
3333
restart: always
34-
build:
35-
context: ursadb/
36-
dockerfile: Dockerfile
34+
image: mqueryci/ursadb:v1.5.0
3735
ports:
3836
- "127.0.0.1:9281:9281"
3937
volumes:
4038
- "${SAMPLES_DIR}:/mnt/samples"
4139
- "${INDEX_DIR}:/var/lib/ursadb"
40+
user: "0:0"
4241
redis:
4342
restart: always
4443
image: redis

‎docs/README.md‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,9 @@ many things in mquery.
3131

3232
## Advanced topics
3333

34+
Relevant for people who want to run mquery in production or on a a bigger scale.
35+
36+
- [Security](./security.md): Security considerations for hardening your mquery instance.
3437
- [Distributed mquery](./distributed.md): For users that want to run mquery on
3538
more than one machine.
3639
- [On-disk format](./ondiskformat.md): Read if you want to understand ursadb's on

‎docs/security.md‎

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
# security
2+
3+
## Secure Deployment
4+
5+
There are multiple components necessary to have a working Mquery instance.
6+
Some of them require special care from a security standpoint.
7+
8+
### Mquery
9+
10+
Mquery is a standard web application written in Python. By default, everyone has permission to do everything.
11+
This default configuration is unsuitable for bigger organisations or public instances.
12+
In such cases, it's recommended to enable user accounts (see [users.md](./users.md)),
13+
and disallow anonymous users or at least don't give them admin rights.
14+
15+
### Mquery daemon (agent)
16+
17+
No special considerations.
18+
19+
### Redis
20+
21+
Mquery web and daemon should have network access to Redis. No other access to
22+
the Redis database is necessary. There is no support for securing Redis with a password in the current version, so network isolation is the only way to
23+
prevent attacks. Most importantly, Redis must not be available from the
24+
public network.
25+
26+
### Ursadb
27+
28+
Mquery daemons must have network access to their respective ursadb instances.
29+
Similarly to Redis, it's best to restrict network access to the ursadb instance. Ursadb protocol does not take malicious actors into account, and
30+
unauthenticated users can, for example, remove indexed data from the database,
31+
or cause a denial of service.
32+
33+
In the provided docker-compose files, the ursadb user is overridden to root by
34+
default. This is for
35+
backwards compatibility, and to simplify deployment. For production instances
36+
consider running ursadb with the default user (`ursa`, UID 1000). This means
37+
that the shared index volume must be writable by UID 1000, and samples must
38+
be readable by UID 1000.
39+
40+
## How to report a vulnerability
41+
42+
There is no dedicated email for reporting a security vulnerability. Please reach out
43+
to cert@cert.pl or one of the maintainers directly. If the vulnerability is not
44+
critical, the best way to report is via a GitHub issue.

‎ursadb‎

Submodule ursadb deleted from afe5144

0 commit comments

Comments
 (0)

Back | FazBrowse Home | New Git URL