When utilizing multiple Eureka server service URLs with basic auth and encountering an issue with fetching the service registry, an error is logged with the Eureka server service URLs but only the first URL is masked.
Package: Steeltoe.Discovery.Eureka
Package version: 3.2.1
Branch: "release/3.2"
File name: DiscoveryClient.cs
Line number: 325
Code in question: _logger.LogError(e, "FetchRegistry Failed for Eureka service urls: {EurekaServerServiceUrls}", new Uri(ClientConfig.EurekaServerServiceUrls).ToMaskedString());
Error message in logs: FetchRegistry Failed for Eureka service urls: https://****:****@eureka1.com:443/eureka,https://user:password@eureka2.com:443/eureka
I thought new Uri(clientOptions.EurekaServerServiceUrls)
would throw a UriFormatException
since there are multiple URLs but my logs are showing two URLs regardless.
FetchFullRegistryAsync
.Vulnerability: Credential leakage in the logs Who does it impact?: Users who are using peer awareness with Spring Eureka
{ "nvd_published_at": "2024-07-17T18:15:04Z", "cwe_ids": [ "CWE-532" ], "severity": "LOW", "github_reviewed": true, "github_reviewed_at": "2024-07-17T16:00:10Z" }