Make TableService constructor usePathStyleURI setting smart about credentials #11

Closed
markcowl opened this Issue Dec 15, 2011 · 3 comments

Comments

Projects
None yet
3 participants
@markcowl
Member

markcowl commented Dec 15, 2011

When a user specifies cerdentials in the TableService constructor, but does not specify whether or not path style URIs should be used, the constructor should make the choice based on the credential provided, not based on the EMULATED variable.

Should still use the EMULATED variable when no credentials are provided

@ghost ghost assigned andrerod Dec 15, 2011

@markcowl

This comment has been minimized.

Show comment Hide comment
@markcowl

markcowl Dec 17, 2011

Member

Looking at the code path, if EMULATED=true, isEmulated returns true, even if your HOST setting doesn't match the devstorage hosts. Should use the credetnails instead to determine, and calculate the host URI and usePathStyleUri if they are not provided

Member

markcowl commented Dec 17, 2011

Looking at the code path, if EMULATED=true, isEmulated returns true, even if your HOST setting doesn't match the devstorage hosts. Should use the credetnails instead to determine, and calculate the host URI and usePathStyleUri if they are not provided

@markcowl

This comment has been minimized.

Show comment Hide comment
@markcowl

markcowl Oct 4, 2012

Member

parse credentials to decide what the uri style and uri should be

Member

markcowl commented Oct 4, 2012

parse credentials to decide what the uri style and uri should be

andrerod pushed a commit that referenced this issue Oct 15, 2012

christav added a commit that referenced this issue Apr 3, 2014

@perrysk-msft

This comment has been minimized.

Show comment Hide comment
@perrysk-msft

perrysk-msft Jun 27, 2014

Member

In our latest release there are convenience methods in azure.js that make creating a client easier through the new auth scheme.

Also note:

  • isEmulated is now removed (it was difficult to determine if the client was emulated if devstore credentials were directly passed).
  • In addition to the environment variable EMULATED, there is a convenience method to create dev store credentials to pass in.
  • The order in which credentials are assessed is consistent: If parameters are passed in, they and they alone are honored.
    o There is no mixing (For example, if you pass in host you won't get the access key from your environment variable).
    o If no parameters are passed in, the environment variables are used.
    Within both those strategies, the order of evaluation is emulator (in the case of EMULATED env var only), connection string, account/key or sas, anonymous.
    o If account/key and sas are passed in, an error is thrown indicating the credentials are invalid.

Please refer to the ChangeLog for a complete list of added features and fixes.
https://github.com/Azure/azure-storage-node/blob/master/ChangeLog.txt

Download the latest Node.js Module
https://www.npmjs.org/package/azure-storage

Get the source code
https://github.com/Azure/azure-storage-node

Read our blog post: Microsoft Azure Storage Client Module for Node.js v. 0.2.0 http://blogs.msdn.com/b/windowsazurestorage/archive/2014/06/26/microsoft-azure-storage-client-module-for-node-js-v-0-2-0.aspx

Member

perrysk-msft commented Jun 27, 2014

In our latest release there are convenience methods in azure.js that make creating a client easier through the new auth scheme.

Also note:

  • isEmulated is now removed (it was difficult to determine if the client was emulated if devstore credentials were directly passed).
  • In addition to the environment variable EMULATED, there is a convenience method to create dev store credentials to pass in.
  • The order in which credentials are assessed is consistent: If parameters are passed in, they and they alone are honored.
    o There is no mixing (For example, if you pass in host you won't get the access key from your environment variable).
    o If no parameters are passed in, the environment variables are used.
    Within both those strategies, the order of evaluation is emulator (in the case of EMULATED env var only), connection string, account/key or sas, anonymous.
    o If account/key and sas are passed in, an error is thrown indicating the credentials are invalid.

Please refer to the ChangeLog for a complete list of added features and fixes.
https://github.com/Azure/azure-storage-node/blob/master/ChangeLog.txt

Download the latest Node.js Module
https://www.npmjs.org/package/azure-storage

Get the source code
https://github.com/Azure/azure-storage-node

Read our blog post: Microsoft Azure Storage Client Module for Node.js v. 0.2.0 http://blogs.msdn.com/b/windowsazurestorage/archive/2014/06/26/microsoft-azure-storage-client-module-for-node-js-v-0-2-0.aspx

@andrerod andrerod closed this Jun 27, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment