Skip to content

Commit 199ac87

Browse files
authored
Require LIVEKIT_FULL_ACCESS_HOMESERVERS explicitly; drop wildcard default (#184)
Security: harden `LIVEKIT_FULL_ACCESS_HOMESERVERS` configuration - Drop the insecure `*` default; the service now refuses to start unless `LIVEKIT_FULL_ACCESS_HOMESERVERS` is set explicitly (explicit `*` still works). - Remove the long-deprecated `LIVEKIT_LOCAL_HOMESERVERS` fallback env variable for `LIVEKIT_FULL_ACCESS_HOMESERVERS`. ⚠️BREAKING CHANGE⚠️: Deployments that relied on the implicit `*` default or on `LIVEKIT_LOCAL_HOMESERVERS` must set `LIVEKIT_FULL_ACCESS_HOMESERVERS` explicitly.
1 parent 33dd029 commit 199ac87

3 files changed

Lines changed: 210 additions & 219 deletions

File tree

README.md

Lines changed: 16 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -124,20 +124,23 @@ Set environment variables to configure the service:
124124
| `LIVEKIT_KEY_FILE` | File path with `APIkey: secret` format | ⚠️ mutually exclusive with <code>LIVEKIT_{KEY&#124;SECRET}</code> | |
125125
| `LIVEKIT_JWT_BIND` | Address to bind the server to | ❌ No, ⚠️ mutually exclusive with `LIVEKIT_JWT_PORT` | `:8080` |
126126
| `LIVEKIT_JWT_PORT` | ⚠️ Deprecated Port to bind the server to | ❌ No, ⚠️ mutually exclusive with `LIVEKIT_JWT_BIND` | |
127-
| `LIVEKIT_FULL_ACCESS_HOMESERVERS` | Comma-separated list of full-access homeservers (`*` for all) | ❌ No | `*` |
127+
| `LIVEKIT_FULL_ACCESS_HOMESERVERS` | Comma-separated list of full-access homeservers (`*` for all — see security note below) | ✅ Yes | |
128128

129-
> [!IMPORTANT]
130-
> By default, the LiveKit SFU auto-creates rooms for all users. To ensure proper
131-
> access control, update your LiveKit
132-
> [config.yaml](https://github.com/livekit/livekit/blob/7350e9933107ecdea4ada8f8bcb0d6ca78b3f8f7/config-sample.yaml#L170)
133-
> to **disable automatic room creation**.
134-
135-
**LiveKit SFU config should include:**
136-
137-
```yaml
138-
room:
139-
auto_create: false
140-
```
129+
> [!WARNING]
130+
> **Restricting room creation** requires two pieces working together:
131+
>
132+
> 1. `LIVEKIT_FULL_ACCESS_HOMESERVERS` is matched against the requesting
133+
> user's Matrix server name (origin). Listed origins may trigger
134+
> LiveKit room creation on your SFU. `*` grants this to *any* user
135+
> whose homeserver can reach this service; list the Matrix server
136+
> name(s) of the homeserver(s) you intend to serve.
137+
> 2. LiveKit SFU [config.yaml](https://github.com/livekit/livekit/blob/7350e9933107ecdea4ada8f8bcb0d6ca78b3f8f7/config-sample.yaml#L170)
138+
> must **disable auto-create**, otherwise LiveKit SFU will create rooms
139+
> for any user regardless of what this service decides:
140+
> ```yaml
141+
> room:
142+
> auto_create: false
143+
> ```
141144
142145
## 🔒 Transport Layer Security (TLS) Setup Using a Reverse Proxy
143146

0 commit comments

Comments
 (0)