Skip to content

[copilot-finds] Bug: Connection string parser uses case-sensitive key lookup #189

@github-actions

Description

@github-actions

Problem

DurableTaskAzureManagedConnectionString parses connection string property keys case-sensitively. It stores keys as-is during parsing and looks them up by exact case, so a connection string like:

endpoint=https://example.com;authentication=ManagedIdentity;taskhub=myHub

fails with: "The connection string must contain an Authentication property"

This violates the Azure SDK convention that connection string property names are case-insensitive. All other Azure SDKs (.NET, Python, Java) handle connection string keys case-insensitively.

File: packages/durabletask-js-azuremanaged/src/connection-string.ts, lines 89-91 and 105-112.

Root Cause

parseConnectionString() stores keys with their original casing (properties.set(key, value)), and getValue() performs a case-sensitive Map.get() lookup. Since the getRequiredValue() calls use PascalCase names ("Authentication", "Endpoint", "TaskHub"), any connection string with differently-cased keys fails validation.

Proposed Fix

Normalize keys to lowercase during parsing (properties.set(key.toLowerCase(), value)) and use lowercase in lookups (this.properties.get(name.toLowerCase())). This preserves value casing while making key matching case-insensitive.

Impact

Severity: Medium. Users who receive or copy connection strings with non-PascalCase keys (e.g., from environment variables, config files, or other tools) cannot connect to the Azure Durable Task Scheduler. The fix is backward-compatible — existing connection strings with PascalCase keys continue to work.

Metadata

Metadata

Assignees

No one assigned

    Labels

    copilot-findsFindings from daily automated code review agent

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions