CDM icon indicating copy to clipboard operation
CDM copied to clipboard

TypeScript SDK: Fixes sharedKey signature creation for ADLS access

Open jho1203 opened this issue 4 years ago • 1 comments

Fixes a number of issues as reported yesterday in #159 with generating signatures when using shared key to access Azure Datalake Gen2 which in turn leads to all requests using the CDM ADLS adapter being denied.

401 Unauthorized Errors are not straightforward to recognize, as there seems to be unhandled promise rejections: (node:24839) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'defaultShortestTimeWait' of undefined at defaultWaitTimeCallback (/Users/jho/BuildingMinds/BMCL_Adf/CDM/Typescript/bmcl_cdm/libs/CDM-master/objectModel/TypeScript/lib/Storage/NetworkAdapter.js:123:66) at CdmHttpClient.<anonymous> (/Users/jho/BuildingMinds/BMCL_Adf/CDM-Typescript/bmcl_cdm/libs/CDM-master/objectModel/TypeScript/lib/Utilities/Network/CdmHttpClient.js:106:48) at Generator.next (<anonymous>) at fulfilled (/Users/jho/BuildingMinds/BMCL_Adf/CDM-Typescript/bmcl_cdm/libs/CDM-master/objectModel/TypeScript/lib/Utilities/Network/CdmHttpClient.js:7:58) at process._tickCallback (internal/process/next_tick.js:68:7)

When debugging one quickly comes to a point where the builtin retry policy of the SDK reaches the maximum number of retries (due to all requests being denied as unauthorized due to invalid signature). Future improvement to retry policy should probably exclude requests which result in 401/Unauthorized responses.

jho1203 avatar Jun 18 '20 19:06 jho1203

CLA assistant check
All CLA requirements met.

ghost avatar Jun 18 '20 19:06 ghost