| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 526dc08 commit e31c1f7
6 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -42,18 +42,17 @@ services: | |||
| 42 | 42 | environment: | |
| 43 | 43 | - "MQUERY_PLUGINS=${MQUERY_PLUGINS}" | |
| 44 | 44 | ursadb: | |
| 45 | - build: | ||
| 46 | - context: ursadb/ | ||
| 47 | - dockerfile: Dockerfile | ||
| 45 | + image: mqueryci/ursadb:v1.5.0 | ||
| 48 | 46 | ports: | |
| 49 | 47 | - "9281:9281" | |
| 50 | 48 | volumes: | |
| 51 | 49 | - "${SAMPLES_DIR}:/mnt/samples" | |
| 52 | 50 | - "${INDEX_DIR}:/var/lib/ursadb" | |
| 51 | + user: "0:0" | ||
| 53 | 52 | keycloak: | |
| 54 | 53 | image: quay.io/keycloak/keycloak:15.1.0 | |
| 55 | 54 | ports: | |
| 56 | - - 8080:8080 | ||
| 55 | + - "8080:8080" | ||
| 57 | 56 | environment: | |
| 58 | 57 | - KEYCLOAK_USER=admin | |
| 59 | 58 | - KEYCLOAK_PASSWORD=admin | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -39,14 +39,13 @@ services: | |||
| 39 | 39 | - "redis" | |
| 40 | 40 | - "ursadb" | |
| 41 | 41 | ursadb: | |
| 42 | - build: | ||
| 43 | - context: ursadb/ | ||
| 44 | - dockerfile: Dockerfile | ||
| 42 | + image: mqueryci/ursadb:v1.5.0 | ||
| 45 | 43 | ports: | |
| 46 | 44 | - "9281:9281" | |
| 47 | 45 | volumes: | |
| 48 | 46 | - "./e2e-state/samples:/mnt/samples" | |
| 49 | 47 | - "./e2e-state/index:/var/lib/ursadb" | |
| 48 | + user: "0:0" | ||
| 50 | 49 | redis: | |
| 51 | 50 | restart: always | |
| 52 | 51 | image: redis | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -31,14 +31,13 @@ services: | |||
| 31 | 31 | - "MQUERY_PLUGINS=${MQUERY_PLUGINS}" | |
| 32 | 32 | ursadb: | |
| 33 | 33 | restart: always | |
| 34 | - build: | ||
| 35 | - context: ursadb/ | ||
| 36 | - dockerfile: Dockerfile | ||
| 34 | + image: mqueryci/ursadb:v1.5.0 | ||
| 37 | 35 | ports: | |
| 38 | 36 | - "127.0.0.1:9281:9281" | |
| 39 | 37 | volumes: | |
| 40 | 38 | - "${SAMPLES_DIR}:/mnt/samples" | |
| 41 | 39 | - "${INDEX_DIR}:/var/lib/ursadb" | |
| 40 | + user: "0:0" | ||
| 42 | 41 | redis: | |
| 43 | 42 | restart: always | |
| 44 | 43 | image: redis | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -31,6 +31,9 @@ many things in mquery. | |||
| 31 | 31 | ||
| 32 | 32 | ## Advanced topics | |
| 33 | 33 | ||
| 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. | ||
| 34 | 37 | - [Distributed mquery](./distributed.md): For users that want to run mquery on | |
| 35 | 38 | more than one machine. | |
| 36 | 39 | - [On-disk format](./ondiskformat.md): Read if you want to understand ursadb's on | |
| Original file line number | Diff line number | Diff 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. | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments