Skip to content

OptionsDescription audit: clean transport rendering + secret-safe connection info#2549

Merged
jeremydmiller merged 2 commits into
mainfrom
descriptors
Apr 20, 2026
Merged

OptionsDescription audit: clean transport rendering + secret-safe connection info#2549
jeremydmiller merged 2 commits into
mainfrom
descriptors

Conversation

@jeremydmiller

Copy link
Copy Markdown
Member

Summary

Sweeps every Endpoint and ITransport implementation so that wolverine describe output (and anything that consumes the OptionsDescription tree, e.g. CritterWatch) renders cleanly instead of leaking raw ToString() class names, dumping null as "None" for nested objects, or silently skipping structured config as "generic enumerable."

Two commits, each independently reviewable:

  1. OptionsDescription audit across all transports — 40 files. Every transport's public properties now have one of [IgnoreDescription] / [ChildDescription] / [DescribeAsStringArray] / [DescribeAsConfigurationState], plus ToString() overrides on mappers, DeadLetterQueue, AzureServiceBusTopic, the Pulsar dead/retry topic types, and AmazonSnsSubscription. FailureRule gets a readable ToString() and SendingFailurePolicies implements IOptionsValueAsStringArray so failure policies render as one entry per rule.

  2. Render connection credentials safely in OptionsDescription (GH-2547, GH-2548) — 5 files.

Bumps JasperFx to 1.26.0, which brings IOptionsValueAsStringArray + [DescribeAsStringArray] (1.25.0) and [DescribeAsConfigurationState] (1.26.0). The Spectre.Console 0.55 transitive required two small fixups: Table.Alignment removal in BrokerResource, and AnsiConsole.RenderAnsiConsole.Write in HandlerGraph.ISystemDescribedPart.

Closes GH-2547.
Closes GH-2548.

Test plan

  • dotnet build wolverine_slim.slnx — 0 errors
  • CoreTests Descriptors suite in JasperFx — 22/22 pass × net8/net9/net10
  • Manual: run wolverine describe against a sample app with each transport configured; verify:
    • No connection-string secrets in the output for ASB / Redis / RabbitMQ
    • Nested ChildDescription blocks appear for BufferingLimits, CircuitBreakerOptions, ClientOptions, ConnectionDescription, etc.
    • SendingFailurePolicies renders as one string per rule, not as a class name
    • Delegate-valued properties (CredentialSource, DefaultConsumerNameSelector, AccessTokenProvider) render as "Configured" or "Default"
    • AmazonSnsTopic.TopicSubscriptions renders as a string array
  • CritterWatch UI smoke: endpoint detail pages render the new Children / StringArray values correctly (the OptionsDescriptionView recurses generically — no frontend changes needed)

🤖 Generated with Claude Code

jeremydmiller and others added 2 commits April 20, 2026 17:07
Clean up how Endpoint and ITransport implementations render in
OptionsDescription so that `wolverine describe` output and the
CritterWatch diagnostic UI no longer show raw ToString() noise
or silently drop useful structure.

Transport + base changes:
- RabbitMQ, Kafka, SQS, SNS, Azure Service Bus, Redis, Pulsar,
  SignalR, MQTT, NATS — attribute-decorated every public property
  with [IgnoreDescription] (internal/runtime), [ChildDescription]
  (structured nested config), [DescribeAsStringArray]
  (AmazonSnsTopic.TopicSubscriptions), or
  [DescribeAsConfigurationState] (nullable delegate hooks:
  Redis DefaultConsumerNameSelector, SignalR AccessTokenProvider,
  SQS/SNS CredentialSource).
- Envelope mappers, DeadLetterQueue, AzureServiceBusTopic, Pulsar
  DeadLetterTopic/RetryLetterTopic, AmazonSnsSubscription all got
  clean ToString() overrides so the default Text fallback is
  human-readable.

Error handling:
- FailureRule.ToString() now returns "On {match} — attempt N: {slot};
  then repeat: {source}" for the StringArray renderer.
- SendingFailurePolicies : IOptionsValueAsStringArray — renders its
  Failures as a per-rule string array instead of a class-name blob.

Bumps JasperFx to 1.26.0, which brings [DescribeAsStringArray] /
IOptionsValueAsStringArray (1.25.0) and [DescribeAsConfigurationState]
(1.26.0), plus the Spectre.Console 0.55 transitive that required
two call-site fixups (Table.Alignment removal in BrokerResource,
AnsiConsole.Render → AnsiConsole.Write in HandlerGraph).

Follow-ups filed as separate issues:
- GH-2547 — secret-safe rendering for transport connection strings
- GH-2548 — RabbitMQ ConnectionFactory as a redacted child description

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…H-2548)

Replaces the bare [IgnoreDescription] escape hatch for credential-bearing
transport config with targeted secret-safe rendering so `wolverine describe`
and the CritterWatch diagnostic UI can show connection info without leaking
passwords or shared access keys.

- GH-2547: Wolverine.Transports.ConnectionStringRedactor masks known
  secret keys (case-insensitive) in semicolon-delimited connection strings.
  * AzureServiceBusTransport exposes ConnectionSummary and
    ManagementConnectionSummary with SharedAccessKey masked as ****.
  * RedisTransport exposes ConnectionSummary via the existing
    StackExchange.Redis ConfigurationOptions.Password-masking helper.
  The raw ConnectionString / ManagementConnectionString properties remain
  [IgnoreDescription] so the secret never appears in the rendered output.

- GH-2548: RabbitMqConnectionDescription is an IDescribeMyself wrapper
  exposing non-secret ConnectionFactory fields (HostName, Port, VirtualHost,
  UserName, heartbeat, SSL settings). RabbitMqTransport surfaces it as
  ConnectionDescription with [ChildDescription]; the raw ConnectionFactory
  remains [IgnoreDescription].

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@jeremydmiller jeremydmiller merged commit 2cac338 into main Apr 20, 2026
17 of 19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Render RabbitMQ ConnectionFactory as a secret-safe child description Secret-safe rendering for transport connection strings in OptionsDescription

1 participant