Skip to content

Commit

Permalink
Merge pull request #127 from hasonmsft/master
Browse files Browse the repository at this point in the history
0.9.0 release
  • Loading branch information
vinjiang committed Mar 9, 2016
2 parents 3b62207 + 77c6464 commit aced458
Show file tree
Hide file tree
Showing 39 changed files with 36,636 additions and 16,368 deletions.
6 changes: 5 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,9 @@ install:
- npm install -g [email protected]
- npm --version
- npm install


script:
# `nsp check` doesn't work on NodeJS 0.8*. Don't run `nsp check` against 0.8*
- case ${TRAVIS_NODE_VERSION} in 0.8*) npm run testwithoutcheck;; *) npm test;; esac

sudo: false
17 changes: 17 additions & 0 deletions ChangeLog.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,23 @@
Note: This is an Azure Storage only package. The all up Azure node sdk still has the old storage bits in there. In a future release, those storage bits will be removed and an npm dependency to this storage node sdk will
be taken. This is a CTP v1 release and the changes described below indicate the changes from the Azure node SDK 0.9.8 available here - https://github.com/Azure/azure-sdk-for-node.

2016.03 Version 0.9.0

ALL
* Updated storage service version to 2015-04-05. Fore more information, please see - https://msdn.microsoft.com/en-us/library/azure/dd894041.aspx
* Added support for Account SAS.
* Added support for IPACL and Protocols options for service SAS.
* Fixed the issue where the authentication may fail when a metadata key is in upper case.
* Added 'nsp check' task for security vulnerability check.
* Updated the dependency of the 'request' module to avoid the security vulnerability reported by the 'nsp' tool.

BLOB
* Added new permission 'ADD' for service SAS.

FILE
* Added support for metrics setting for service properties.


2016.01 Version 0.8.0

ALL
Expand Down
39 changes: 36 additions & 3 deletions lib/azure-storage.js
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,41 @@ exports.createQueueServiceWithSas = function(hostUri, sasToken) {
return new QueueService(null, null, hostUri, sasToken);
};

/**
* Account SAS
* @ignore
*/


var azureCommon = require('./common/common');
var StorageServiceClient = azureCommon.StorageServiceClient;
var SharedKey = azureCommon.SharedKey;
/**
* Generates an account shared access signature token
*
* @param {string} [storageAccountOrConnectionString] The storage account or the connection string.
* @param {string} [storageAccessKey] The storage access key.
* @param {object} sharedAccessPolicy The shared access policy.
* @param {SharedAccessServices} sharedAccessPolicy.AccessPolicy.Services The services (blob, file, queue, table) for a shared access signature associated with this shared access policy.
* Refer to `Constants.AccountSasConstants.Services`.
* @param {SharedAccessResourceTypes} sharedAccessPolicy.AccessPolicy.ResourceTypes The resource type for a shared access signature associated with this shared access policy.
* Refer to `Constants.AccountSasConstants.ResourceTypes`.
* @param {SharedAccessPermissions} sharedAccessPolicy.AccessPolicy.Permissions The permissions for a shared access signature.
* Refer to `Constants.AccountSasConstants.Permissions`.
* @param {date} sharedAccessPolicy.AccessPolicy.Start The time at which the Shared Access Signature becomes valid.
* @param {date} sharedAccessPolicy.AccessPolicy.Expiry The time at which the Shared Access Signature becomes expired.
* @param {string} sharedAccessPolicy.AccessPolicy.IPAddressOrRange The permission type. Refer to `Constants.AccountSasConstants.ResourceTypes`.
* @param {string} sharedAccessPolicy.AccessPolicy.Protocol The possible protocol. Refer to `Constants.AccountSasConstants.ResourceTypes`.
*/
exports.generateAccountSharedAccessSignature = function(storageAccountOrConnectionString, storageAccessKey, sharedAccessAccountPolicy)
{
var storageSettings = StorageServiceClient.getStorageSettings(storageAccountOrConnectionString, storageAccessKey);
var sharedKey = new SharedKey(storageSettings._name, storageSettings._key);

return sharedKey.generateAccountSignedQueryString(sharedAccessAccountPolicy);
};


/**
* A callback that returns a response object.
* @callback errorOrResponse
Expand All @@ -210,14 +245,12 @@ exports.createQueueServiceWithSas = function(hostUri, sasToken) {
* For example, HTTP status codes and headers.
*/

var azureCommon = require('./common/common');

exports.Constants = azureCommon.Constants;
exports.StorageUtilities = azureCommon.StorageUtilities;
exports.AccessCondition = azureCommon.AccessCondition;

exports.SR = azureCommon.SR;
exports.StorageServiceClient = azureCommon.StorageServiceClient;
exports.StorageServiceClient = StorageServiceClient;
exports.Logger = azureCommon.Logger;
exports.WebResource = azureCommon.WebResource;
exports.Validate = azureCommon.validate;
Expand Down
Loading

0 comments on commit aced458

Please sign in to comment.