Class SensitiveAttribute

Namespace: redb.Route.Core
Assembly: redb.Route.dll

Marks an endpoint option as a credential, so its value is redacted wherever the endpoint URI is
rendered — logs, OpenTelemetry tags, metric labels, health checks, and the Tsak dashboard.

This is the source of truth for what counts as a secret: masking is driven by an explicit
declaration on the property rather than by guessing from the parameter name. The name-keyword
heuristic in remains only as a backstop for
URIs whose options type has not been bound yet.


The mechanism mirrors Apache Camel, where @UriParam(secret = true) on the option field is
the declaration and the runtime keyword list (SensitiveUtils.SENSITIVE_KEYS) is generated
from those annotations rather than hand-maintained. Camel harvests them with a build plugin;
here harvests them by reflection, once per options
type, and feeds . Either way the list is
never written by hand, so a new credential option cannot be forgotten.


public sealed class LdapEndpointOptions : EndpointOptions
{
public string Server { get; set; } = "localhost"; // printed in logs

[Sensitive]
public string? BindPassword { get; set; } // always rendered as ****
}

[AttributeUsage(AttributeTargets.Property, Inherited = true)]
public sealed class SensitiveAttribute : Attribute

Inheritance

Object→Attribute→SensitiveAttribute