You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix: add new settings keys and add a test to show that keys are not m… - #8583
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.
ⓘ Qodo reviews are paused because the subscription is no longer active. Ask your workspace admin to reactivate the subscription to resume reviews. Manage billing
• 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.
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.
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.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.
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.
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.
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
Tip of the day
💡 Did you know, you can commit Qodo's fix in one click with committable suggestions (GitHub & GitLab)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
…issing
UI changes