By default settings are subject to , which is generally not appropriate for secrets. This can be fixed either by disabling logging entirely on the or by annotating fields and properties of the model with [Secret] attribute:
class MySettings
{
[Secret]
public MySecrets Secrets { get; } = new MySecrets();
public TimeSpan Timeout { get; } = TimeSpan.FromSeconds(30);
[Secret]
public string EncryptionKey { get; }
}
class MySecrets
{
public string ApiKey { get; }
public string Login { get; }
public string Password { get; }
}