Repository navigation
feat(graphql-actions): support a password-protected Redis - #26110
TiagoJacobs merged 2 commits into
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
WalkthroughThe GraphQL Actions service now reads Priority: ⬇️ Low Estimated code review effort: 2 (Simple) | ~10 minutes Change: Feature Sequence Diagram(s)sequenceDiagram
participant EnvironmentFile
participant Systemd
participant GraphQLActions
participant RedisServer
EnvironmentFile->>Systemd: Provide BBB_REDIS_PASSWORD override
Systemd->>GraphQLActions: Load optional environment file
GraphQLActions->>RedisServer: Connect with configured password
Suggested reviewers: Merge Risk: ⚪ Minimal · up to
|
TiagoJacobs
left a comment
There was a problem hiding this comment.
Logic looks correct (node-redis 4.x decodes the URL credentials, nothing logs the URL, env file convention matches the other units). Two small requests before approving.
| Group=bigbluebutton | ||
| Environment=NODE_ENV=production | ||
| # Optional overrides, e.g. BBB_REDIS_PASSWORD when Redis requires authentication. | ||
| EnvironmentFile=-/etc/bigbluebutton/bbb-graphql-actions.env |
There was a problem hiding this comment.
Please add this file to the table in docs/docs/administration/configuration-files.md (same request as in #25179; the bbb-graphql-server.env row is the reference). A short note on how to enable a Redis password end to end would also help, since the docs currently don't mention requirepass or redisPassword anywhere.
There was a problem hiding this comment.
Added in da694f2: /etc/bigbluebutton/bbb-graphql-actions.env is now a row in the overrides table in docs/docs/administration/configuration-files.md, next to the bbb-graphql-server.env row. There is no packaged config file, so the Package column points to the unit that reads it. I also added a short "Using a password-protected Redis" section right after the overrides: requirepass in redis.conf, then a table of the file and setting where each service reads the password (bbb-web, both akka apps, graphql-middleware, graphql-actions, shared notes, webrtc-sfu, recording, export-annotations, webrtc-recorder and webhooks). It also marks the two whose files are rewritten by package upgrades.
|
|
||
| export const createRedisClient = () => { | ||
| // The password is optional; it is URL-encoded so characters such as @, / or # survive. | ||
| const credentials = REDIS_PASSWORD ? `:${encodeURIComponent(REDIS_PASSWORD)}@` : ''; |
There was a problem hiding this comment.
Optional simplification: node-redis accepts password as a direct option alongside url (it does Object.assign(options, parsed), so the explicit option survives when the URL has no credentials). Passing password: REDIS_PASSWORD || undefined avoids the encoding step and keeps the secret out of the URL string. The current version works, so no blocker.
There was a problem hiding this comment.
Applied in da694f2: the URL is back to redis://host:port and the password goes as password: REDIS_PASSWORD || undefined, so there is no encoding step and the secret stays out of the URL. I re-ran the same check against Redis 7.4 with requirepass "p@ss/w#rd 1": it connects and the action reaches to-akka-apps-redis-channel. Without a password it behaves as before.
akka-apps, bbb-web and bbb-graphql-middleware can all authenticate to Redis, but bbb-graphql-actions only took a host and a port: with requirepass set it never connected and every client mutation failed with 'The client is offline'. BBB_REDIS_PASSWORD (optional, empty by default) is added to the connection URL, URL-encoded so characters such as @, / or # work, and the service unit reads optional overrides from /etc/bigbluebutton/bbb-graphql-actions.env.
013bb94 to
da694f2
Compare
TiagoJacobs
left a comment
There was a problem hiding this comment.
Thanks, both points addressed. The code is good to go. I checked every row of the new table against the sources and they are correct, but two Redis consumers are missing; with requirepass set they stop working unless they get the password too.
| | bbb-export-annotations | /usr/local/bigbluebutton/bbb-export-annotations/config/settings.json | `redis.password` (no override file; reapply after package upgrades) | | ||
| | bbb-webrtc-recorder | /etc/bbb-webrtc-recorder/bbb-webrtc-recorder.yml | `pubsub.adapters.redis.password` | | ||
| | bbb-webhooks (if installed) | /usr/local/bigbluebutton/bbb-webhooks/config/default.yml | `redis.password` (regenerated on package upgrades) | | ||
|
|
There was a problem hiding this comment.
Two more rows are needed:
- bbb-transcription-controller: packaged in 4.0 and connects to the local Redis. Its unit sets
NODE_CONFIG_DIR=/etc/bigbluebutton/bbb-transcription-controller/:..., so the override is/etc/bigbluebutton/bbb-transcription-controller/production.ymlwithredis.password. - LiveKit (livekit-server and livekit-sip): both default to
127.0.0.1:6379, and the units merge/etc/bigbluebutton/livekit.yamland/etc/bigbluebutton/livekit-sip.yamlover the packaged defaults. The key isredis.passwordin each file.
Without these, an admin following this section loses transcription and all LiveKit media.
There was a problem hiding this comment.
Added the three missing rows (bbb-transcription-controller, livekit-server, livekit-sip) with the override paths and redis.password keys exactly as you described, verified against the packaged units and config handling:
bbb-transcription-controller.servicesetsNODE_CONFIG_DIRwith/etc/bigbluebutton/bbb-transcription-controller/first, soproduction.ymlthere is the override;redis.passwordis present (commented) in its pinneddefault.example.yml.- Both LiveKit units merge
/etc/bigbluebutton/livekit.yaml/livekit-sip.yamlover the packaged defaults (which point at127.0.0.1:6379/localhost:6379), and the binaries share LiveKit'sRedisConfigwith thepasswordfield.
One row per service/file, matching the table's granularity; CRLF endings preserved.
Pass BBB_REDIS_PASSWORD to createClient as the password option instead of URL-encoding it into the connection URL, so the secret stays out of the URL string (node-redis merges the explicit option with the parsed URL). Docs: add /etc/bigbluebutton/bbb-graphql-actions.env to the table of configuration overrides, and a section on using a password-protected Redis listing where each service reads the password.
da694f2 to
d2ddbf5
Compare
TiagoJacobs
left a comment
There was a problem hiding this comment.
LGTM. Code is minimal and correct (password passed as a node-redis option, nothing logged, env file follows the existing unit convention). I checked every row of the Redis password table against the packaged units and configs, including the new bbb-transcription-controller, livekit-server and livekit-sip rows. Thanks for the quick turnaround.
✅ Automated tests have passed! |
* docs: doc sync for 4.0 since 4.0.0-rc.5 Range v4.0.0-rc.5..v4.0.x-develop 0f90159 (52 commits). No changes to bigbluebutton.properties, settings.yml, akka-apps application.conf, ApiParams, the create/join tables, resources.xml or bbb-conf. The Grails 8 upgrade (#25466) brought its own docs; its "Upgraded components" list was checked against the Spring Boot 4.1.1 and Grails 8.0.0 BOMs and the build files (Spring Framework 7.0.9, Groovy 5.1.3, Tomcat 11.0.26, Gradle 9.8.0). administration/customize.md, "Configuration of gladia.io": - #26010 moved bbb-transcription-controller from v0.2.10 to v0.4.0, which talks to Gladia's v2 live API and reads the key from gladia.key (gladia-proxy.js); nothing reads x_gladia_key in gladia.startMessage any more, so the documented command left the server without a key. Set gladia.key instead, and drop the "3.0 or higher, use >0.3.x" paragraph and its startMessage (bit_depth and endpointing are now gladia.bitDepth and gladia.endpointing). Mention the translation options. - Warn that the package's after-install.sh copies default.example.yml over default.yml on every install and upgrade, and every BigBlueButton upgrade reinstalls the package (its version comes from bigbluebutton-release). That removes the key and the ESL password bbb-conf --setip writes, and the service then crash-loops with "FSESL connection authentication error". - Say up front which service applies: 4.0 defaults to the LiveKit audio bridge, where bbb-livekit-stt (not packaged; uv or Docker) does the work; bbb-transcription-controller forks audio from FreeSWITCH and only covers audioBridge=bbb-webrtc-sfu. The client settings (audioCaptions enabled, provider gladia) apply to both: bbb-livekit-stt starts on the speech-locale event that carries the provider. new-features.md: - "bbb-transcription-controller 0.4.0 (Gladia v2)" under Other notable changes, as the upgrade note for the above (rc.1 to rc.5 shipped v0.2.10). - "Learning Dashboard: polls and quizzes numbered in the order they were asked" (#25988): untitled polls are numbered chronologically, the header tooltip shows when they were asked, and the Download Session Data CSV uses the same order. Not documented: the UI fixes (#25942, #25993, #25974), the recording panzoom fix (#25991), the bbb-ui-components-react and MUI bumps, the pres-checker build cleanup, the Tomcat parameter limit and upload limits (moved to Spring Boot keys in bbb-web's application.properties with the same values), and the Jackson string limit (raised and dropped again). (cherry picked from commit bcaed58) * docs: iteration doc sync for 4.0.1 Documents the v4.0.0..v4.0.x-develop (cd89568) delta that the per-PR docs commits in the range did not cover. new-features.md - Usability: "Live captions transcribed on the user's device" for public.app.audioCaptions.speechProcessing (#26179) - Dedicated Audio settings tab: the processing pick is now scoped to the browser session and the meeting, public.app.audioFilterStorage (#25744) - Behind the scenes: fewer video-grid re-renders (#26096), lock settings changes without reconnecting viewers (#26004), client modals on BBBModal (#25829), bbb-web Grails 2 cleanup (#26002) - Media: "Last-N audio for the LiveKit bridge (experimental)" (#26211) - Other notable changes: component versions in 4.0.1 (LiveKit stack #25912, bbb-webrtc-recorder 0.18.0, bbb-webrtc-sfu 2.25.0-beta.3, bbb-playback 5.4.8, Tomcat 11.0.27 #26241, Gradle 9.8.1 #26259, FreeSWITCH rtp-port-usage-robustness, livekit-sip rtp_port default), minimum Safari 14.1 (WeakRef, #25912), password-protected Redis for bbb-graphql-actions (#26110) - Upgraded components list: Gradle 9.8.1, Tomcat 11.0.27 - Recent releases: 4.0.1 (the tag does not exist yet) - Client settings / Added: speechProcessing, audioFilterStorage, public.chat.announceUserAwayStatusInChat (#26090), public.media.livekit.selectiveSubscription.lastN; the existing paginationToggleModeratorOnly bullet is tagged 4.0.1 customize.md - speechProcessing was added in 4.0.1, not 4.0 - Advanced Filtering: paragraph on audioFilterStorage - Audio: new section "Play only the most relevant microphones (Last-N)" api.md - New "Updated in 4.0.1" block. The userdata-bbb_parent_room_moderator removal (#26087) moves there from the 4.0 block: it landed after v4.0.0. Left out on purpose: fixes (#26269, #26250, #26118, #26085, #26212 and the rest), the presenter authorization change (#25887), test/CI work and dependency bumps belong in the release notes, not in the docs. akka-apps application.conf, ApiParams.java and LockSettingsParams.java did not change in the range. * docs: keep the 4.0.1 join note in the 4.0 block, drop four sections api.md - userdata-bbb_parent_room_moderator stays in the 4.0 "Removed parameters" line, marked "removed in 4.0.1", instead of a separate "Updated in 4.0.1" block. new-features.md - Drop the 4.0.1 "Behind the scenes" subsections (video-grid re-renders, lock settings without reconnects, BBBModal, bbb-web cleanup): release-notes material, not documentation. - Drop "Learning Dashboard: polls and quizzes numbered in the order they were asked", carried over from the rc.5 sync. * docs: drop the "Other notable changes" entries added for 4.0.1 new-features.md - Drop "Component versions in 4.0.1", "Minimum Safari version is 14.1", "Password-protected Redis for bbb-graphql-actions" and the "bbb-transcription-controller 0.4.0 (Gladia v2)" note carried over from the rc.5 sync. The Safari floor and the Redis password are already documented on their own pages; the version bumps belong in the release notes. * docs: drop the customize.md changes from the 4.0.1 sync customize.md - Back to its v4.0.x-develop content: no Last-N section, no audioFilterStorage paragraph, speechProcessing stays "added in 4.0", and the Gladia v2 edits from the rc.5 sync cherry-pick are gone too. new-features.md - The Last-N section no longer links to the dropped customize.md section; the client-settings bullet still links to it.
What does this PR do?
Lets bbb-graphql-actions connect to a Redis that requires a password.
src/config.ts: new optionalBBB_REDIS_PASSWORD(empty by default, so nothing changes for existing installs).src/imports/redis.ts: when set, the password is passed tocreateClientas thepasswordoption, apart from the connection URL, so no encoding is needed and the secret stays out of the URL string.bbb-graphql-actions.service: optionalEnvironmentFile=-/etc/bigbluebutton/bbb-graphql-actions.env, so a package install can set the variable without editing the unit (the leading-keeps the service starting when the file does not exist).docs/docs/administration/configuration-files.md: the env file is added to the table of overrides, and a new section lists where each service reads the Redis password, so a password can be enabled end to end.Closes Issue(s)
None. The same gap was raised in the closed test PR #25179, where it was noted that the issue itself is significant: since the move to Ubuntu 24 (Redis 7), protected mode can no longer be relied on to be bypassed, so a Redis password becomes the safer setup, and bbb-graphql-actions is the only component of the GraphQL path that cannot use one (akka-apps, bbb-web and bbb-graphql-middleware already can).
Motivation
With
requirepassset on Redis, bbb-graphql-actions never connects and every client action fails withClientOfflineError: The client is offline, so the meeting UI cannot change anything.How to test
requirepass "p@ss/w#rd 1"- the quotes matter because of the space; or run redis-server with--requirepass "p@ss/w#rd 1"), restart it, and configure the other components as usual./etc/bigbluebutton/bbb-graphql-actions.envwithBBB_REDIS_PASSWORD=p@ss/w#rd 1and restartbbb-graphql-actions.{"message":"userSetAway: Internal Server Error"}and the log showsClientOfflineError: The client is offline.Connected with Redis, the action returnstrueand the message reachesto-akka-apps-redis-channel.More
npm ci && npm run build(tsc) is clean. Tested with Redis 7.4 against both a password-protected Redis (passwordp@ss/w#rd 1) and an open Redis.