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] JS does not support all connection strings supported by .NET #5081

Closed
mikeharder opened this issue Sep 10, 2019 · 8 comments
Closed
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

The following connection string works in the latest builds of both .NET and JS:

DefaultEndpointsProtocol=http;AccountName=devstoreaccount1;
AccountKey=Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==;
BlobEndpoint=http://127.0.0.1:10000/devstoreaccount1;
TableEndpoint=http://127.0.0.1:10002/devstoreaccount1;
QueueEndpoint=http://127.0.0.1:10001/devstoreaccount1;

However, if this is reduced to a more minimal connection string:

BlobEndpoint=http://127.0.0.1:10000/devstoreaccount1;

It still works in .NET (you can verify with an HTTP debugger like Fiddler), but it fails in JS with:

Invalid SharedAccessSignature in the provided SAS Connection String

It appears the JS SDK is more strict about connection string parsing than the .NET SDK. I'm not sure which is more correct or how important this is, but ideally the SDKs would be consistent across languages.

@mikeharder mikeharder added the Storage Storage Service (Queues, Blobs, Files) label Sep 10, 2019
@HarshaNalluru
Copy link
Member

Thanks, Mike.
Currently, JS SDK expects DefaultEndpointsProtocol and AccountKey to be present in an Account Connection String.

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

And the Development Connection String support is currently being added - #5004

We need to have a discussion and decide which fields are mandatory.

@jeremymeng
Copy link
Member

@XiaoningLiu do you know where we can find a specification for all the formats of supported connection strings?

@XiaoningLiu
Copy link
Member

@XiaoningLiu do you know where we can find a specification for all the formats of supported connection strings?

Just like the doc link Harsha pasted https://docs.microsoft.com/en-us/azure/storage/common/storage-configure-connection-string#configure-a-connection-string-for-an-azure-storage-account

@jeremymeng
Copy link
Member

I couldn't find any spec on the minimal format

BlobEndpoint=http://127.0.0.1:10000/devstoreaccount1;

@jeremymeng jeremymeng added the Client This issue points to a problem in the data-plane of the library. label Oct 9, 2019
@jeremymeng jeremymeng added MQ-Storage Client This issue points to a problem in the data-plane of the library. and removed Client This issue points to a problem in the data-plane of the library. labels Nov 26, 2019
@HarshaNalluru
Copy link
Member

@XiaoningLiu, please add support for more kinds of connection strings if required, to be in sync with the .NET sdk.

@XiaoningLiu
Copy link
Member

XiaoningLiu commented Dec 31, 2019

If a connection string doesn't mentioned in the doc, it should not be a official standard.

BlobEndpoint=http://127.0.0.1:10000/devstoreaccount1; doesn't include required account name, at least account key, which cannot make it a compelete connection string.

@ramya-rao-a
Copy link
Contributor

@XiaoningLiu Are there any planned next steps here? If not, then can we close this issue?

@XiaoningLiu
Copy link
Member

I think we can close this. JS already supports short cut connection string for emulator account UseDevelopmentStorage=true.

@github-actions github-actions bot locked and limited conversation to collaborators Apr 12, 2023
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

6 participants