Skip to content

BrokerDescription: add a sanitized, credential-free connection summary per transport #3269

Closed

Description

@jeremydmiller

Summary

BrokerDescription (src/Wolverine/Configuration/Capabilities/BrokerDescription.cs), built from ITransport in TransportBase.cs:22, currently captures only ProtocolName (subject.Protocol), Name, and ReplyUri. Diagnostic consumers (e.g. CritterWatch's messaging topology) want a human-readable "what is this broker pointing to" summary — but the transport, not the consumer, is the only place that knows the connection target.

Proposal

Add a sanitized, credential-free connection summary to BrokerDescription, populated per transport. Suggested per-transport format:

  • RabbitMQ → host + port + virtual host, e.g. broker.example.com:5672 (vhost: /prod)
  • Azure Service Bus → fully-qualified namespace, e.g. myns.servicebus.windows.net
  • Amazon SQS/SNS → region (+ account id if non-sensitive), e.g. us-east-1
  • Kafka → bootstrap servers, e.g. broker1:9092, broker2:9092
  • NATS / Pulsar / Redis / MQTT → host:port of the configured endpoint
  • Default (base) → null (or derived from ReplyUri host)

Mechanism: a new overridable member on ITransport / TransportBase (e.g. string? DescribeEndpoint() or a Uri? SafeUri), default null, overridden by each concrete transport. BrokerDescription(ITransport) captures it into a new property (e.g. Endpoint / Description).

Hard requirement — no credentials, ever

The summary MUST be built from parsed connection components (host, port, vhost, namespace), never from the raw connection string. No usernames, passwords, SAS keys, or connection strings. Add a per-transport test asserting the description contains no credential substrings.

Security catch to audit while here

BrokerDescription : OptionsDescription, and OptionsDescription(subject) reflects subject.GetType().GetProperties() into a diagnostic tree. If any transport exposes a credential-bearing property (e.g. ConnectionString), it may already be leaking through that reflected tree to diagnostic consumers. Audit each transport's public properties and redact/suppress any that carry secrets.

Consumer

CritterWatch renders this in the Messaging Explorer topology broker column (paired issue: JasperFx/CritterWatch). Today it can only show "RabbitMQ: "; with this field it can show the actual sanitized target.

Activity

  1. jeremydmiller commented on Jun 28, 2026

    @jeremydmiller
    MemberAuthor

    Paired consumer issue: JasperFx/CritterWatch#660 (renders this in the Messaging topology broker column).

  2. added a commit that references this issue on Jun 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions