None of the existing environments deploy either client alongside MAS, so
browser login tests would be skipped everywhere in CI. Well-known
delegation is enabled as Element Admin discovers the homeserver from the
server name.
The browser is a headless Chromium shared across the session, with one
isolated context per test. Chromium resolves *.localhost to loopback on
its own so requests reach the k3d ingress the same way the aiohttp based
tests do, and certificate validation is disabled as the test CA isn't in
its trust store.
The body is created using the single-use async generator - on retries,
it re-uses the same (consumed) generator object. It caused the request
to abrutly stopped, resulting in Traefik returning HTTP 499 Client
Closed Connection.
The fix makes sure that a new generator is initialized if we have to
retry media upload.
The SFU declared its `rtc-muxed-udp` container port as TCP. With the
NodePort, LoadBalancer and ClusterIP port types this is only metadata,
because the Service carries the protocol. With `portType: HostPort`
there is no Service, and the container port's protocol decides what the
node forwards: UDP media sent to the host port never reached the SFU,
and clients fell back to the TCP port.
A manifest test now checks that every Service port uses the protocol of
the container port it targets. It fails without this fix for every
values file that exposes the muxed UDP port through a Service.
Assisted-by: AI
Signed-off-by: Christian Glombek <[email protected]>
Like the rest of the configuration provided in the values, the
registration can now refer to the release, e.g. for its proxy_url.
Co-authored-by: Ben Banfield-Zanin <[email protected]>
Like the media upload test in test_synapse.py, only skip in the first
step of the upgrade tests when it deploys a given release, rather than
any release. The release has to be updated before merging.
The homeserver the authorisation service is registered on doesn't have
to be deployed by the chart. Like Hookshot, generate the registration
whenever serverName is set, so that it can be copied from the generated
Secret to the homeserver.
The generated proxy_url only works for a homeserver in the same cluster.
The values comment says how to adapt the registration otherwise.
Add matrixRTC.user.localpart, like the other application services of
the chart (hookshot.user.localpart). It defaults to _lk_jwt_service, the
name used by the lk-jwt-service documentation, and is ignored when
matrixRTC.appserviceRegistration is provided.
The authorisation service only acts for users of the homeserver it is
registered on, so its namespace doesn't need to cover remote users.
This follows the registrations of the ESS Pro bots, which use the same
non-exclusive "@.*:<serverName>" regex.
Request a LiveKit token through the endpoint Synapse proxies to the
authorisation service (MSC4512), for a user joined to the room and for
one who isn't. This covers the generated registration being loaded by
Synapse, the proxying, and the room membership check the service makes
with its as_token (MSC4502).
Delegate a delayed leave event through the proxied endpoint for a user
who never connects to the SFU, and check the service sends it on the
user's behalf. This covers the MSC4140 management calls made as an
application service asserting the user.
Both are skipped in the first step of the upgrade tests, which deploys
the chart of the latest release.
Cover the generated registration and its contents, Synapse loading it
with the MSC4502 and MSC4512 experimental features, the authorisation
service environment, and registrations provided inline, via an existing
Secret, or without the chart's Synapse.
Add synapse-matrix-rtc-secrets-{in-helm,externally} values files so the
generic manifest tests also run with a provided registration.
The only MatrixRTC request covered so far was the deprecated /sfu/get.
Cover /get_token, together with the delegation of the MSC4140 delayed
leave event to the authorisation service, the way Element Call does it
today: with the token request. The user never connects to the SFU, so
the service gives up waiting after `delay_timeout` and sends the leave
event itself, which the test then finds in the room.
The service calls Synapse's delayed event management endpoints without
authentication here. This test will fail if the chart pins a Synapse
which requires authentication on them before the service is able to
authenticate.