Azure / Azure/azure-sdk-for-rust
[Service Bus] Add connection string and shared access signature credentials
- Dominant language
- Rust
- Stars
- 884
- Forks
- 365
- Avg merge
- 2d 19h
- Merged PRs (30d)
- 112
Description
## Summary
The client accepts only a `TokenCredential`. There is no connection string constructor and no shared access signature or named key credential.
## Motivation
A connection string is how most Service Bus samples, tutorials, and existing applications authenticate. .NET offers a connection string constructor, a named key credential, and a shared access signature credential alongside the token credential, and it parses the string into `ServiceBusConnectionStringProperties`.
`#2293` records a connection string remnant left in the crate, so the surface was started and then removed.
Event Hubs added the same feature in this repository in PR #4587, and its shared access signature signer is already live tested, so the signing code and the parser can be reused.
## Proposal
- Parse a connection string into an endpoint, an entity path, a key name, a key, and an optional signature.
- Add a shared access signature credential and a named key credential.
- Reuse the Event Hubs signer from PR #4587 rather than writing a second one.
- Make sure an entity path in the connection string is reconciled against the entity name passed to the sender or the receiver.
## Dependencies
Blocked by:
- #4938 [Service Bus] Replace ServiceBusError with azure_core::Error and a failure reason
Sub-issue of #4934.
Contributor guide
Research direction
Start by checking the Service Bus error change in blocked issue #4938 and the Event Hubs implementation in PR #4587 for the parser and signer to reuse. The work is done when connection strings parse the specified properties, the named key and shared access signature credentials are supported, and an entity path is reconciled with the sender or receiver entity name.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- backend-api-design
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100