-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Implement a Service Bus Connection String Parser #11893
Comments
@jsquire Can you share the error message you are using so that we use similar verbiage for the below error scenarios:
|
We're using the same messages that we currently do during parsing.
The connection string used for an Event Hub client must specify the Event Hubs namespace host, and either a Shared Access Key (both the name and value) or Shared Access Signature to be valid. The path to an Event Hub must be included in the connection string or specified separately.
The authorization for a connection string may specify a shared key or pre-computed shared access signature, but not both. Please verify that your connection string does not have the Event Hub name specified in the connection string and also the constructor The path to an Event Hub may be specified as part of the connection string or as a separate value, but not both. Please verify that your connection string does not have the The endpoint token exists, but it's not a well-formed URL (or we couldn't override the scheme due to the weird formatting) The endpoint address could not be parsed; it was either malformed or not using the |
I am thinking of going with the below for JS:
|
Done with #11949 |
Summary
Service Bus allows for authorization using a shared key and shared access signature that is supported using a service-specific shared access key credential. It is common for the shared key or shared access signature to be passed with the service endpoint and entity path as part of a connection string. To align with best practices, we would like to guide library users to down the path of using credentials for authorization within production applications. In order to assist with transforming a connection string for use with credential-based client creation, a parsing utility is desirable.
Scope of Work
Design and implementation of a means for parsing a Service Bus connection string into its components. These should include:
The parser should adhere to the current validation rules for connection string correctness. For example:
Endpoint
must be presentEntityPath
is optionalThe host name of the
Endpoint
should be reflected as theFullyQualifiedNamespace
.Unknown tokens in the connection string are rejected or ignored; they are not reflected in the set of parsed tokens.
The parsed values should be treated as read-only, if idiomatic to the language.
The proposed surface area of the parser, as well as any associated types that change the public API surface should be reviewed with the language architect, and approval obtained. Full board review is not necessary.
Success Criteria
The design of a parser detailed by the scope has been completed and approved by the language architect.
The parser has been implemented according to the design and is exposed as part of the public API of the library.
The tests necessary for its validation have been created or adjusted and pass reliably.
The existing test suite continues to produce deterministic results and pass reliably.
References
The text was updated successfully, but these errors were encountered: