azure-sign
Azure signing utilities for node (just table service right now)
The goal is to provide a way to grant access keys to your azure resources (like querying a table from the browser) with a very small footprint.
Configuration
Like the node azure client(s) the credentials are taken from environment variables by default:
AZURE_STORAGE_ACCOUNT
: used in the "resource" parameterAZURE_STORAGE_ACCESS_KEY
: used to generatesig
query parameter and sign the other params
See the azure docs for more details
Usage
The tests are written in an end-to-end style see them for actual usage (making calls to azure)
sas
var signTable = ; var expires = ;// good for an hourexpires; // sign a table resourcevar queryParams = table; // query params is suitable for use in any table query that is supported// via reads // a quick example using superagent var superagent = ; superagent // turn on json mode ; ;
sharedKey
var superagent = ; var now = ;var url = 'https://' + tableServicehost + '/' + tableName + '()';var req = ; // These are all required headersreq;reqreqreq; var headers = 'Content-Type': req 'Date': req; var signed = subject; req; // now your request is authenticated go for it!// ... yay
TODO
- add SAS signing for blobs
- add SAS signing for queue