Skip to content

fix: add new settings keys and add a test to show that keys are not m… - #8583

Merged
SamTV12345 merged 1 commit into
developfrom
8574-settingsjsondocker-not-including-new-features
Nov 27, 2026
Merged

SamTV12345 merged 1 commit into
developfrom
8574-settingsjsondocker-not-including-new-features

Conversation

@SamTV12345

Copy link
Copy Markdown
Member

…issing

UI changes

  • This PR doesn't add or change anything users see or interact with.
  • This PR changes the UI, and I clicked through it myself in a browser and I'm happy with the UI/UX. If an AI tool wrote any of it, only tick this after you've tried it yourself.

@SamTV12345 SamTV12345 linked an issue Nov 27, 2026 that may be closed by this pull request
@qodo-code-review

Copy link
Copy Markdown

ⓘ Qodo reviews are paused because the subscription is no longer active. Ask your workspace admin to reactivate the subscription to resume reviews. Manage billing

@qodo-free-for-open-source-projects

qodo-free-for-open-source-projects Bot commented Nov 27, 2026 •

Copy link
Copy Markdown

PR Summary by Qodo

Restore Docker settings parity with the source template

🐞 Bug fix 🧪 Tests ⚙️ Configuration changes 🕐 10-20 Minutes

Grey Divider

AI Description

• Add missing Docker settings for retention, admin APIs, sockets, security, logging, and other
 features.
• Preserve environment-variable overrides for the new Docker settings.
• Add a regression test that detects template setting paths missing from Docker configuration.
Merge Risk 🟡 Medium

Blast radius 🔴 High 💥 6 capabilities

  • 6 affected capabilities span independent functional scopes: OIDC authentication integration, admin API tooling integration, pad collaboration access control, pad document export, pad lifecycle retention, pad settings plugin integration.
  • The configuration feeds the retention scheduler and pad-open retention check, whose end-to-end outcome is deletion or preservation of inactive pads and their associated stored history.
  • The settings are consumed by pad-socket origin middleware that decides whether a cross-origin page receives visitor credentials, an anonymous socket, or a rejection.
  • These outcomes form one collaboration access capability.
  • The setting controls whether the existing admin OpenAPI document is served for third-party tooling.
  • It is a bounded administrative integration distinct from pad editing and storage.
  • The setting gates plugin-namespaced pad-wide options on the existing pad broadcast and persistence rail.
  • It affects plugin-driven pad settings as one bounded integration behavior.
  • The setting supplies operator-controlled font mappings to the existing native PDF export path.
  • It changes one export outcome rather than creating a separate storage or editing capability.
  • The setting supplies operator-controlled OIDC cookie keys to the existing authentication provider.
  • It affects the authentication integration's session verification behavior, independent of pad content and export flows.
Sources

settings.json.docker[239-241]

  "adminOpenAPI": {
    "enabled": "${ADMIN_OPENAPI_ENABLED:false}"
  },

settings.json.docker[320-321]

  "enablePadWideSettings": "${ENABLE_PAD_WIDE_SETTINGS:true}",
  "enablePluginPadOptions": "${ENABLE_PLUGIN_PAD_OPTIONS:true}",

settings.json.docker[775-777]

    "allowedOrigins": "${SOCKETIO_ALLOWED_ORIGINS:}",
    "padAllowedOrigins": "${SOCKETIO_PAD_ALLOWED_ORIGINS:}",
    "crossOriginPadSockets": "${SOCKETIO_CROSS_ORIGIN_PAD_SOCKETS:anonymous}"
Behavioral complexity 🟢 Low 🧩 Straightforward

  • Before, the Docker configuration omitted several settings present in the source-install template.
  • After, it maps environment variables or literal defaults directly into existing settings structures.
  • The new correctness condition is parity of Docker keys, defaults, and environment substitution with the already-existing consumers.
  • No new algorithm, state machine, concurrency protocol, or validation pipeline is introduced by this PR.
Sources

settings.json.docker[239-241]

  "adminOpenAPI": {
    "enabled": "${ADMIN_OPENAPI_ENABLED:false}"
  },

settings.json.docker[775-777]

    "allowedOrigins": "${SOCKETIO_ALLOWED_ORIGINS:}",
    "padAllowedOrigins": "${SOCKETIO_PAD_ALLOWED_ORIGINS:}",
    "crossOriginPadSockets": "${SOCKETIO_CROSS_ORIGIN_PAD_SOCKETS:anonymous}"

settings.json.docker[320-321]

  "enablePadWideSettings": "${ENABLE_PAD_WIDE_SETTINGS:true}",
  "enablePluginPadOptions": "${ENABLE_PLUGIN_PAD_OPTIONS:true}",
Potential damage 🔴 High 🩹 Data loss

  • If activated with deletion enabled and the eligibility or exclusion behavior is wrong, pads and associated revisions, chat, and read-only links can be permanently deleted.
  • Reverting the configuration stops future deletions but cannot restore already deleted data without an independent backup.
  • Recovery requires backups or other external copies; the changed file provides no automatic restoration path.
Assessed commit dd0c6d6
Diagram

graph TD
  D["Docker config"] --> P["Settings parser"] --> R["Etherpad runtime"]
  T["Source template"] --> P --> C["Parity test"]
  E["Environment vars"] --> P
Loading
High-Level Assessment

The following are alternative approaches to this PR:

1. Generate Docker settings from a shared schema
  • ➕ Could prevent key drift without relying on a regression test.
  • ➖ Requires a generation workflow and must preserve Docker-specific defaults and environment-variable mappings.

Recommendation: Keep the explicit Docker configuration and parity test for this focused fix. Shared generation could reduce long-term drift, but its added workflow is not justified by this two-file change. Note that the test checks key presence, not whether each new environment override works.

Files changed (2) +72 / -3

Bug fix (1) +47 / -3
settings.json.dockerAdd Docker settings missing from the source template +47/-3

Add Docker settings missing from the source template

• Adds settings for admin OpenAPI, pad retention, plugin options, catalog behavior, PDF fonts, session cleanup, socket origins, burst limits, frame ancestors, logging layout, and SSO cookie keys. New scalar options generally retain Docker environment-variable overrides, with defaults for the added feature flags.

settings.json.docker

Tests (1) +25 / -0
settings.tsGuard against missing Docker setting paths +25/-0

Guard against missing Docker setting paths

• Adds a regression test that parses both shipped settings files, recursively collects object-key paths, and fails when a template path is absent from Docker settings. It does not verify values or environment-variable override behavior.

src/tests/backend/specs/settings.ts

@SamTV12345
SamTV12345 enabled auto-merge (squash) November 27, 2026 20:45
@qodo-free-for-open-source-projects

qodo-free-for-open-source-projects Bot commented Nov 27, 2026 •

Copy link
Copy Markdown

Code Review by Qodo

🐞 Bugs (1) 📘 Rule violations (0) 📎 Requirement gaps (0) 🎨 UX issues (0) 🔗 Cross-repo conflicts (0) 📜 Skill insights (0)

Grey Divider


Remediation recommended

1. Docker ignores numeric cookie signing keys 🐞 Bug ≡ Correctness
Description
The new sso.cookieKeys placeholder passes OIDC_COOKIE_KEY through coerceValue(), which
converts numeric and boolean-looking secrets to non-string values that resolveOidcCookieKeys()
discards. When a Docker operator sets a key such as 12345 or true, the OIDC provider uses
fallback signing keys instead of the configured secret.
Code

settings.json.docker[898]

+      "cookieKeys": ["${OIDC_COOKIE_KEY:}"],
Evidence
The added Docker placeholder is resolved by the settings parser's environment substitution, which
calls coerceValue(); that function converts numeric strings and true/false to numbers and
booleans. The OIDC resolver filters the resulting array to nonempty strings and otherwise selects
fallback keys.

settings.json.docker[895-900]
src/node/utils/Settings.ts[1100-1138]
src/node/utils/Settings.ts[1250-1257]
src/node/security/OidcProviderSecurity.ts[44-68]
src/node/security/OAuth2Provider.ts[94-124]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
Docker's `OIDC_COOKIE_KEY` substitution converts numeric and boolean-looking secrets to non-strings, so the OIDC provider silently ignores them.
## Fix Focus Areas
- settings.json.docker[898-898]
- src/node/utils/Settings.ts[1229-1256]
- src/tests/backend/specs/settings.ts[324-347]
## Recommended Fix
Preserve the original environment-variable string for OIDC cookie keys without coercion, including leading zeros. Add a test that parses the Docker configuration with a numeric-looking key and verifies that the resulting cookie key is that exact string.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


Grey Divider

Tip of the day
💡 Did you know, you can commit Qodo's fix in one click with committable suggestions (GitHub & GitLab)

More tips ↗ | Customize Qodo ↗ | Qodo docs ↗

Grey Divider

Qodo Logo

@SamTV12345
SamTV12345 merged commit b2081fd into develop Nov 27, 2026
40 checks passed
@SamTV12345
SamTV12345 deleted the 8574-settingsjsondocker-not-including-new-features branch November 27, 2026 20:46
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.

settings.json.docker not including new features

1 participant