Secret settings are stored in plaintext

Open
#3,270 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
48/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Active
Tech stack
csharp
Domain
backend, security

Research direction

Start with SettingsService.StoreAsync and the code that resolves settings, especially handling of [SettingsSecret] values such as AiSettings.ApiKey. Trace how the startup report is built and how settings are written to cms_setting.json; the proposal specifies the protection purpose and when existing values should be migrated. Done means stored secrets are protected, existing plaintext values still resolve and become protected on their next write, and unprotected secrets are reported at startup.

Written by the indexing model from the issue text.

Description

area:settings security type:bug

Problem

[SettingsSecret] values such as AiSettings.ApiKey are written as is to cms_setting.json (SettingsService.StoreAsync); only Management API reads redact them. A database reader, a backup or a replica gets third-party API keys, even on a host with a certificate-protected key ring.

Proposal

Protect secrets with IDataProtector (purpose settings:{area}:{key}) on write and unprotect on resolve; report unprotected secrets in the startup report; migrate existing values on first write.

Acceptance

  • A secret setting is not readable from the database
  • Existing plaintext values keep working and are protected on their next write

Found in the code review of 17 Nov 2026 (S4).

Dominant language
C#
Stars
569
Forks
107
Avg merge
2h 49m
Merged PRs (30d)
397

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from fluentcms/FluentCMS

All issues in fluentcms/FluentCMS

Similar issues

More C# issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.