Skip to content

Commit 40aa583

Browse files
Merge pull request #635 from element-hq/gaelg/upgrade-lk-jwt
matrix-authorisation-service: upgrade lk-jwt-service
2 parents 54a7b31 + f76f4c6 commit 40aa583

File tree

8 files changed

+36
-2
lines changed

8 files changed

+36
-2
lines changed

charts/matrix-stack/configs/matrix-rtc/sfu/config-overrides.yaml.tpl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,4 +55,7 @@ key_file: /secrets/{{ (printf "/secrets/%s"
5555
key_file: /conf/keys.yaml
5656
{{- end }}
5757

58+
room:
59+
auto_create: false
60+
5861
{{ end }}

charts/matrix-stack/source/matrix-rtc.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@
66
"enabled": {
77
"type": "boolean"
88
},
9+
"restrictRoomCreationToLocalUsers": {
10+
"type": "boolean"
11+
},
912
"livekitAuth": {
1013
"type": "object",
1114
"oneOf": [

charts/matrix-stack/source/matrix-rtc.yaml.j2

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,11 @@ SPDX-License-Identifier: AGPL-3.0-only
77
{% import 'sub_schema_values.yaml.j2' as sub_schema_values -%}
88
enabled: true
99

10+
# Allows restricting room creation to local users only
11+
# Remote federated users can still join the room
12+
# Defaults to false for now until clients are upgraded to support the new mechanism
13+
restrictRoomCreationToLocalUsers: false
14+
1015
# LiveKit Authentication Configuration
1116
# This section allows you to configure authentication for the LiveKit SFU.
1217
# You can either use an existing keys.yaml file or provide a key and secret.
@@ -19,7 +24,7 @@ enabled: true
1924

2025
replicas: 1
2126
{{- sub_schema_values.ingress() }}
22-
{{- sub_schema_values.image(registry='ghcr.io', repository='element-hq/lk-jwt-service', tag='0.2.3') }}
27+
{{- sub_schema_values.image(registry='ghcr.io', repository='element-hq/lk-jwt-service', tag='0.3.0') }}
2328
{{- sub_schema_values.labels() }}
2429
{{- sub_schema_values.workloadAnnotations() }}
2530
{{- sub_schema_values.containersSecurityContext() }}

charts/matrix-stack/templates/matrix-rtc/_helpers.tpl

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,12 @@ env:
6969
{{- if .sfu.enabled }}
7070
- name: "LIVEKIT_URL"
7171
value: {{ printf "wss://%s" (tpl .ingress.host $root) }}
72+
{{- end }}
73+
- name: "LIVEKIT_FULL_ACCESS_HOMESERVERS"
74+
{{- if $root.Values.serverName }}
75+
value: {{ (.restrictRoomCreationToLocalUsers | ternary (tpl $root.Values.serverName $root) "*") | quote }}
76+
{{- else }}
77+
value: "*"
7278
{{- end -}}
7379
{{- end -}}
7480
{{- end -}}

charts/matrix-stack/values.schema.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -816,6 +816,9 @@
816816
"enabled": {
817817
"type": "boolean"
818818
},
819+
"restrictRoomCreationToLocalUsers": {
820+
"type": "boolean"
821+
},
819822
"livekitAuth": {
820823
"type": "object",
821824
"oneOf": [

charts/matrix-stack/values.yaml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -367,6 +367,11 @@ deploymentMarkers:
367367
matrixRTC:
368368
enabled: true
369369

370+
# Allows restricting room creation to local users only
371+
# Remote federated users can still join the room
372+
# Defaults to false for now until clients are upgraded to support the new mechanism
373+
restrictRoomCreationToLocalUsers: false
374+
370375
# LiveKit Authentication Configuration
371376
# This section allows you to configure authentication for the LiveKit SFU.
372377
# You can either use an existing keys.yaml file or provide a key and secret.
@@ -430,7 +435,7 @@ matrixRTC:
430435

431436
## The tag of the container image to use.
432437
## One of tag or digest must be provided.
433-
tag: "0.2.3"
438+
tag: "0.3.0"
434439

435440
## Container digest to use. Used to pull the image instead of the image tag if set
436441
## The tag will still be set as the app.kubernetes.io/version label

newsfragments/635.changed.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
Upgrade `lk-jwt-service` to 0.3.0.
2+
3+
Highlights:
4+
* Support restricting matrix room creation to local homeserver only.
5+
Configure this through `matrixRTC.restrictRoomCreationToLocalUsers`. Default to false for now until clients support this new feature.
6+
7+
Full Changelog:
8+
* [0.3.0](https://github.com/element-hq/lk-jwt-service/releases/tag/v0.3.0)

tests/integration/fixtures/helm.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,7 @@ async def matrix_stack(
163163
"ip": ingress,
164164
"hostnames": [
165165
generated_data.server_name,
166+
f"mrtc.{generated_data.server_name}",
166167
f"synapse.{generated_data.server_name}",
167168
],
168169
}

0 commit comments

Comments
 (0)