@slayzone/hub 0.36.0-beta.17 → 0.36.0-beta.18

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,20 +1,45 @@
1
1
  # @slayzone/hub (SlayZone hub)
2
2
 
3
3
  Headless SlayZone hub: owns the SQLite DB, tRPC/REST routers, auth, and the
4
- runner gateway that runners dial into.
4
+ computer gateway that computers dial into.
5
5
 
6
6
  SLAYZONE_ROOT=~/slayzone-hub \
7
7
  SLAYZONE_HUB_AUTH_SECRET=$(openssl rand -hex 32) slayzone-hub
8
8
 
9
- `SLAYZONE_ROOT` is the install anchor: all state (DB, artifacts, identity, logs)
9
+ `SLAYZONE_ROOT` is the install anchor: all state (DB, artifacts, logs)
10
10
  lives under `<ROOT>/storage`, and the DB filename is derived — not overridable.
11
11
  Omit it and the hub anchors to its launch directory.
12
12
 
13
- ## ⚠️ Security
13
+ ## Reaching it from other machines
14
14
 
15
- The client-facing `/trpc` socket is **unauthenticated** and binds `127.0.0.1`
16
- by default. Do **not** point `SLAYZONE_HUB_ADDRESS` at a non-loopback host to
17
- expose it beyond loopback except on a fully trusted network — user
18
- authentication on `/trpc` is not yet implemented. Runner traffic (`/runners`) is TLS + cert-pinned and safe to expose.
15
+ By default the hub listens on `127.0.0.1` and requires no login — the same hub the
16
+ desktop app runs. The hub itself serves plain http and never does TLS: to let other
17
+ machines in, put a TLS front end (Caddy, nginx, a cloud load balancer) in front of it
18
+ and tell the hub both addresses (`host[:port]`, no scheme):
19
+
20
+ SLAYZONE_HUB_LISTEN_ADDRESS=0.0.0.0:8788 # where the hub listens
21
+ SLAYZONE_HUB_PUBLIC_ADDRESS=hub.example.com # how clients and computers reach it
22
+ SLAYZONE_HUB_REQUIRE_LOGIN=1
23
+ SLAYZONE_HUB_AUTH_SECRET=$(openssl rand -hex 32)
24
+
25
+ A hub that other machines can reach (a listen address that is not loopback, or a public
26
+ address) **refuses to start** unless it requires login, has a public address and has
27
+ `SLAYZONE_HUB_AUTH_SECRET` in its environment — it never generates that key onto its own
28
+ disk. Clients dial the public address with `https://` / `wss://` (any host that is not
29
+ loopback); loopback is plain `http://` / `ws://`.
30
+
31
+ Switches (`0` or `1`; anything else refuses to start), each also a boolean in
32
+ `<ROOT>/hub.config.json` (env wins):
33
+
34
+ | Variable | Default | |
35
+ | --- | --- | --- |
36
+ | `SLAYZONE_HUB_REQUIRE_LOGIN` | `0` | every client must sign in |
37
+ | `SLAYZONE_HUB_ENABLE_PASSWORD` | `1` | email + password sign-in |
38
+ | `SLAYZONE_HUB_ENABLE_SSO` | `0` | Entra sign-in (needs `SLAYZONE_HUB_SSO_TENANT_ID`, `_CLIENT_ID`, `_CLIENT_SECRET`) |
39
+ | `SLAYZONE_HUB_ENABLE_PROCESSES` | `1` | hub-local processes |
40
+ | `SLAYZONE_HUB_ENABLE_INTEGRATIONS` | `1` | Linear / GitHub |
41
+
42
+ Today the hub validates and reports every switch (`/health`) and enforces
43
+ `REQUIRE_LOGIN`; enforcing the others follows.
19
44
 
20
45
  GPL-3.0-only. Source: https://github.com/debuglebowski/slayzone