> For the complete documentation index, see [llms.txt](https://vostok.gitbook.io/configuration/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://vostok.gitbook.io/configuration/basic-scenarios/make-settings-secret.md).

# Make settings secret

**Requires**: [abstractions module](/configuration/modules/abstractions.md).

By default settings are subject to [logging](/configuration/basic-scenarios/log-new-settings.md), which is generally not appropriate for secrets. This can be fixed either by disabling logging entirely on the [configuration provider](/configuration/concepts-and-basics/configuration-provider.md) 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; }
}
```

### Related pages

{% content-ref url="/pages/-M6UVoFcHYxcwBpGwH8S" %}
[Log settings updates](/configuration/basic-scenarios/log-new-settings.md)
{% endcontent-ref %}

{% content-ref url="/pages/-M6UVpnfClePaS7Lcfg9" %}
[Log errors](/configuration/basic-scenarios/log-errors.md)
{% endcontent-ref %}
