Class ConfigRedactor

Assembly: redb.Tsak.Core.dll

Redacts secrets from effective-configuration output (GET /api/system/config).

Three layers, applied in order:
Sensitive key — the value is masked wholesale when any segment of the key path
(not just the leaf) looks sensitive: password / secret / token / apikey / authorization /
webhook / … . A webhook URL is itself a bearer credential, so the whole value goes.Embedded connection-string password — a Password=/Pwd= segment is
masked inside any value, not only under the ConnectionStrings: prefix, so the
host/database stay visible for diagnostics while the password does not.URI userinfo — scheme://user:pass@host in any value has its userinfo masked
(scheme://***@host), catching broker/endpoint URIs like amqp://u:p@host.
Fail-closed bias: the key-path check errs toward over-masking (a benign value under a sensitive-
looking path is masked) rather than leaking.

public static class ConfigRedactor

Inheritance

Object→ConfigRedactor

Methods

Redact(string, string?)

Redacts one key/value pair. Returns (value, wasRedacted).

public static (string? value, bool redacted) Redact(string key, string? value)