Skip to content
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

[Storage] ConnectionString requires EndpointSuffix #21982

Closed
mikeharder opened this issue May 24, 2022 · 5 comments
Closed

[Storage] ConnectionString requires EndpointSuffix #21982

mikeharder opened this issue May 24, 2022 · 5 comments
Assignees
Labels
Client This issue points to a problem in the data-plane of the library. Storage Storage Service (Queues, Blobs, Files)

Comments

@mikeharder
Copy link
Member

I am trying to use the Blob connection string sample:

https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/storage/storage-blob/samples/v12/typescript/src/connectionStringAuth.ts

With the first example shown in the Storage Connection String docs:

DefaultEndpointsProtocol=https;AccountName=myAccountName;AccountKey=myAccountKey

https://docs.microsoft.com/en-us/azure/storage/common/storage-configure-connection-string#configure-a-connection-string-for-an-azure-storage-account

It fails with this error:

Error: Invalid EndpointSuffix in the provided Connection String

It works if I add the default EndpointSuffix:

DefaultEndpointsProtocol=https;AccountName=myAccountName;AccountKey=myAccountKey;EndpointSuffix=core.windows.net

But I do not believe the EndpointSuffix is required in most other languages.

@mikeharder mikeharder added the Storage Storage Service (Queues, Blobs, Files) label May 24, 2022
@mikeharder mikeharder changed the title [Storage] Invalid EndpointSuffix in the provided Connection String [Storage] ConnectionString requires EndpointSuffix May 25, 2022
@xirzec xirzec added the Client This issue points to a problem in the data-plane of the library. label May 25, 2022
@xirzec xirzec added this to the [2022] June milestone May 25, 2022
@xirzec
Copy link
Member

xirzec commented May 25, 2022

/cc @jeremymeng any thoughts on this one?

@jeremymeng
Copy link
Contributor

Looks that instead of throwing error, we could use a default value of "core.windows.net"?

endpointSuffix = getValueInConnString(connectionString, "EndpointSuffix");
if (!endpointSuffix) {
throw new Error("Invalid EndpointSuffix in the provided Connection String");
}
blobEndpoint = `${defaultEndpointsProtocol}://${accountName}.blob.${endpointSuffix}`;

@EmmaZhu
Copy link
Contributor

EmmaZhu commented May 26, 2022

I agree. We should have a default endpoint value. I'll fix it.

@xirzec xirzec modified the milestones: [2022] June, [2022] July Jun 13, 2022
@xirzec xirzec modified the milestones: 2022-07, 2022-08 Jul 8, 2022
@xirzec xirzec modified the milestones: 2022-08, 2022-09 Aug 9, 2022
@xirzec xirzec modified the milestones: 2022-09, 2022-12 Nov 1, 2022
@xirzec xirzec modified the milestones: 2022-12, 2023-02 Jan 11, 2023
@xirzec xirzec removed this from the 2023-02 milestone Mar 31, 2023
@JoostLambregts
Copy link

I would like to note that this is also an issue in the data-tables SDK, See line 46 in https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/tables/data-tables/src/utils/accountConnectionString.ts

    if (!endpointSuffix) {
      throw new Error("Invalid EndpointSuffix in the provided Connection String");
    }

Copy link

Hi @mikeharder, we deeply appreciate your input into this project. Regrettably, this issue has remained unresolved for over 2 years and inactive for 30 days, leading us to the decision to close it. We've implemented this policy to maintain the relevance of our issue queue and facilitate easier navigation for new contributors. If you still believe this topic requires attention, please feel free to create a new issue, referencing this one. Thank you for your understanding and ongoing support.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale May 24, 2024
@github-actions github-actions bot locked and limited conversation to collaborators May 24, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Client This issue points to a problem in the data-plane of the library. Storage Storage Service (Queues, Blobs, Files)
Projects
None yet
Development

No branches or pull requests

5 participants