azure-sdk-for-cpp
azure-sdk-for-cpp copied to clipboard
[Service Bus] Emulator connection string support
Summary
The Azure Messaging team is working on a service emulator intended to provide a local development experience. To reduce friction for developers, the emulator will be using connections without TLS so that certificates do not need to be managed. To support this flow, the emulator will emit a connection string that contains an identifying slug to indicate to clients that they should not use TLS and should restrict communication to the local environment.
Emulator connection string slug:
;UseDevelopmentEmulator=true
Full example:
Endpoint=localhost:6765;SharedAccessKeyName=<< REDACTED >>;SharedAccessKey=<< REDACTED >>;UseDevelopmentEmulator=true
Scope of work
- Update connection string parsing to recognize the emulator slug.
- When the emulator slug is present in a connection string, validate that the endpoint resolves to the local host.
- When the emulator slug is present in a connection string, do not use TLS for service operations.
- Do not allow non-TLS communication for non-local hosts.
Out of scope
- Support for validating that custom host names (via local DNS or hosts file) resolve to localhost
Success Criteria
- Connection string parsing recognizes the emulator slug.
- Connection string parsing preserves a custom port for the endpoint.
- When the emulator slug is present, connection string parsing validates that the endpoint resolves to local host.
- Local host validation allows for
localhost, IPv4, and IPv6 forms. - Clients support non-TLS communication for service operations.
- Clients require TLS communication for non-local hosts.
- New tests necessary to validate the feature have been created and pass reliably.
- The existing test suite continues to produce deterministic results and pass reliably.
References and related
//cc: @LarryOsterman