Skip to content

feat(graphql-actions): support a password-protected Redis - #26110

Merged
TiagoJacobs merged 2 commits into
bigbluebutton:v4.0.x-developfrom
imdt-claudiop:feat/graphql-actions-redis-password
Oct 21, 2026
Merged

TiagoJacobs merged 2 commits into
bigbluebutton:v4.0.x-developfrom
imdt-claudiop:feat/graphql-actions-redis-password

Conversation

@imdt-claudiop

@imdt-claudiop imdt-claudiop commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

What does this PR do?

Lets bbb-graphql-actions connect to a Redis that requires a password.

  • src/config.ts: new optional BBB_REDIS_PASSWORD (empty by default, so nothing changes for existing installs).
  • src/imports/redis.ts: when set, the password is passed to createClient as the password option, apart from the connection URL, so no encoding is needed and the secret stays out of the URL string.
  • bbb-graphql-actions.service: optional EnvironmentFile=-/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 requirepass set on Redis, bbb-graphql-actions never connects and every client action fails with ClientOfflineError: The client is offline, so the meeting UI cannot change anything.

How to test

  1. Set a password on Redis (in redis.conf: 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.
  2. Create /etc/bigbluebutton/bbb-graphql-actions.env with BBB_REDIS_PASSWORD=p@ss/w#rd 1 and restart bbb-graphql-actions.
    • Before: an action (e.g. setting yourself away) returns {"message":"userSetAway: Internal Server Error"} and the log shows ClientOfflineError: The client is offline.
    • After: the log shows Connected with Redis, the action returns true and the message reaches to-akka-apps-redis-channel.
  3. Without a password on Redis and without the env file, the service behaves as before (connects and publishes).

More

npm ci && npm run build (tsc) is clean. Tested with Redis 7.4 against both a password-protected Redis (password p@ss/w#rd 1) and an open Redis.

@coderabbitai

coderabbitai Bot commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: a1292aea-4efd-4961-8c06-8960f5e33cb4
📥 Commits

Reviewing files that changed from the base of the PR and between b7a3f64 and d2ddbf5.

📒 Files selected for processing: 4
  • bbb-graphql-actions/src/config.ts
  • bbb-graphql-actions/src/imports/redis.ts
  • build/packages-template/bbb-graphql-actions/bbb-graphql-actions.service
  • docs/docs/administration/configuration-files.md

Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 6 remain after this review.

Walkthrough

The GraphQL Actions service now reads BBB_REDIS_PASSWORD and passes a configured value to its Redis client. Its systemd service template supports an optional environment file. The configuration guide documents that override file and describes configuring Redis authentication across the listed BigBlueButton services.

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
Loading

Suggested reviewers: antobinary

Merge Risk: ⚪ Minimal · up to d2ddb

The Redis password configuration is mergeable with no established blocking risk.

Pre-merge checks: Passed 5
Check name Status Explanation
Title check Passed The title clearly and concisely describes the main change: support for password-protected Redis in bbb-graphql-actions.
Description check Passed The description directly explains the Redis password support, service configuration, documentation changes, motivation, and testing.
Docstring Coverage Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 2…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 2 files. (2 skipped: 2 unsupported.)

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@TiagoJacobs TiagoJacobs left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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)}@` : '';

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@antobinary antobinary added this to the Release 4.0 milestone Oct 20, 2026
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.
@imdt-claudiop
imdt-claudiop force-pushed the feat/graphql-actions-redis-password branch from 013bb94 to da694f2 Compare October 20, 2026 22:06

@TiagoJacobs TiagoJacobs left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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) |

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.yml with redis.password.
  • LiveKit (livekit-server and livekit-sip): both default to 127.0.0.1:6379, and the units merge /etc/bigbluebutton/livekit.yaml and /etc/bigbluebutton/livekit-sip.yaml over the packaged defaults. The key is redis.password in each file.

Without these, an admin following this section loses transcription and all LiveKit media.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.service sets NODE_CONFIG_DIR with /etc/bigbluebutton/bbb-transcription-controller/ first, so production.yml there is the override; redis.password is present (commented) in its pinned default.example.yml.
  • Both LiveKit units merge /etc/bigbluebutton/livekit.yaml / livekit-sip.yaml over the packaged defaults (which point at 127.0.0.1:6379 / localhost:6379), and the binaries share LiveKit's RedisConfig with the password field.

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.
@imdt-claudiop
imdt-claudiop force-pushed the feat/graphql-actions-redis-password branch from da694f2 to d2ddbf5 Compare October 20, 2026 23:17

@TiagoJacobs TiagoJacobs left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@github-actions

Copy link
Copy Markdown

✅ Automated tests have passed!

@TiagoJacobs
TiagoJacobs marked this pull request as ready for review October 21, 2026 00:33
@TiagoJacobs
TiagoJacobs merged commit a8c48ca into bigbluebutton:v4.0.x-develop Oct 21, 2026
33 checks passed
TiagoJacobs added a commit that referenced this pull request Oct 21, 2026
…-graphql-41

[4.1 port] recording and GraphQL Redis fixes from v4.0.x-develop (#26109 #26110 #26111 #26112)
antobinary added a commit that referenced this pull request Oct 28, 2026
* 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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants