Expand description
A configuration as it may be shown or sent (decision 122, the user’s requirement of 2026-10-31): masked by the node itself before it leaves the process, so no secret is stored or sent in clear.
Secrets come only from environment variables, never the configuration file; the masking is the second line, for what a URL or a setting carries anyway. It works on the serialized configuration, every string of it, so a field added later is covered without being named:
- A value under a key naming a secret is
****whole, whatever it is (text, a number, a list, an object). A name is compared without case and separators (api_key,apiKeyandAPI-KEYalike); a path to a secret file (token_file,[tls] keyholding a path) is shown: it is not the secret. - In any text, a password before
@is****, the user, host, port and path kept (postgres://schedr:****@db:5432/schedr): with a scheme or//or none (u:p@db), several in one text, a password holding@,:,/,'or parentheses. - In any text, a value after a name naming a secret and
=or:is****: a URL’s query (?password=…, the name percent-decoded:%70assword), a DSN (host=db password=…), a message (token: …).
Masking errs towards hiding: a port before @ may be hidden with a password, an email’s
name after mailto: too. Never the other way.
Constants§
- MASK
- What a masked secret is shown as.
Functions§
- mask
- Masks every secret in
value, in place. - mask_
data - Masks the secrets in
value, a task’s own data (its output), in place: every text as in a configuration, and a field whose name has a word naming a secret (password,api_key,clientSecret,access_token), by whole words, sopartition_keyorsort_keyis shown: a task names its fields as it likes (decision 131). - mask_
text textwith every secret in it masked: passwords before@, and values after a name naming a secret (see the module documentation). Its time grows with the text’s length, never faster.- mask_
text_ after textmasked asmask_textmasks it, read afterbefore, the text just before it, which is masked with it but not shown: a value begun inbefore(a quoted one going on over lines, a password whose name is there) is hidden intexttoo. A part of a log is masked so, the bytes before it asbefore.- masked
configserialized and masked (see the module documentation).- names_
secret_ in_ words - Whether a word of
namenames a secret: its words split at anything but a letter or a digit, before an upper-case letter following a lower-case one or a digit (apiKey:api,key), and before the last of a run of upper-case letters followed by a lower-case one (HTTPPassword:http,password;AWSAccessKeyId:aws,access,key,id).