-
Notifications
You must be signed in to change notification settings - Fork 142
Add comprehensive validation for DTS connection strings including empty Authentication values #4624
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Co-authored-by: alexweininger <[email protected]>
@copilot Remove any changes to |
This might work, I'll need test it later to verify |
Co-authored-by: MicroFish91 <[email protected]>
I've updated the implementation to better use Changes in commit 493681b:
Warning Firewall rules blocked me from connecting to one or more addressesI tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
} | ||
|
||
// Check if the connection string contains an Authentication parameter | ||
if (!connectionString.match(/Authentication=/)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@copilot Make sure to check after the suffix Authentication=
to make sure there is actually a value on the other side of the equal sign. An empty equals value should not pass validation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added validation for empty Authentication parameter values. The validation now checks that there's a non-empty value after Authentication=
and provides the error message "DTS Authentication parameter cannot be empty" when the value is missing or whitespace-only. Commit ea72aa6.
…ction strings Co-authored-by: MicroFish91 <[email protected]>
When debugging Azure Functions projects with Durable Task Scheduler (DTS) storage type, users can click "Manually Set a Connection String" to provide a custom DTS connection string. Previously, there was no validation on this input, allowing users to enter invalid strings like "abc" or incomplete strings with empty Authentication values, which would cause issues later during debugging.
Changes Made
Enhanced the validation logic in
DTSConnectionCustomPromptStep.ts
to include comprehensive DTS connection string validation:Endpoint=
parameterAuthentication=
parameter is presentBefore/After
Before: Users could enter "abc" or connection strings with empty Authentication values and the system would accept them without validation:
After: Invalid input now shows helpful validation errors explaining the expected format, including detection of empty Authentication values.
Expected Connection String Format
Valid DTS connection strings must follow this pattern:
Examples of valid connection strings:
Endpoint=http://localhost:55053/;Authentication=None
(Local emulator)Endpoint=https://example.durabletask.io;Authentication=ManagedIdentity;ClientID=12345
(Remote)Examples that will now fail validation:
abc
(Missing required parameters)Endpoint=http://localhost:55053/;Authentication=
(Empty authentication value)Endpoint=invalid-url;Authentication=None
(Invalid URL format)Endpoint=ftp://localhost;Authentication=None
(Invalid protocol)This change improves the user experience by catching configuration errors early and providing clear guidance on the correct format, preventing runtime debugging issues.
Fixes #4604.
💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.