@azure/msal-node 2.13.0 → 2.14.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (418) hide show
  1. package/dist/cache/ITokenCache.d.ts +1 -1
  2. package/dist/cache/ITokenCache.d.ts.map +1 -1
  3. package/dist/cache/NodeStorage.d.ts +1 -1
  4. package/dist/cache/NodeStorage.d.ts.map +1 -1
  5. package/dist/cache/NodeStorage.mjs +2 -2
  6. package/dist/cache/TokenCache.d.ts +1 -1
  7. package/dist/cache/TokenCache.d.ts.map +1 -1
  8. package/dist/cache/TokenCache.mjs +2 -2
  9. package/dist/cache/distributed/DistributedCachePlugin.d.ts +1 -1
  10. package/dist/cache/distributed/DistributedCachePlugin.d.ts.map +1 -1
  11. package/dist/cache/distributed/DistributedCachePlugin.mjs +2 -2
  12. package/dist/cache/distributed/IPartitionManager.d.ts +1 -1
  13. package/dist/cache/distributed/IPartitionManager.d.ts.map +1 -1
  14. package/dist/cache/serializer/Deserializer.d.ts +1 -1
  15. package/dist/cache/serializer/Deserializer.d.ts.map +1 -1
  16. package/dist/cache/serializer/Deserializer.mjs +2 -2
  17. package/dist/cache/serializer/Serializer.d.ts +1 -1
  18. package/dist/cache/serializer/Serializer.d.ts.map +1 -1
  19. package/dist/cache/serializer/Serializer.mjs +1 -1
  20. package/dist/cache/serializer/SerializerTypes.d.ts +1 -1
  21. package/dist/cache/serializer/SerializerTypes.d.ts.map +1 -1
  22. package/dist/client/ClientApplication.d.ts +1 -1
  23. package/dist/client/ClientApplication.d.ts.map +1 -1
  24. package/dist/client/ClientApplication.mjs +2 -2
  25. package/dist/client/ClientAssertion.mjs +2 -2
  26. package/dist/client/ClientCredentialClient.d.ts +2 -2
  27. package/dist/client/ClientCredentialClient.d.ts.map +1 -1
  28. package/dist/client/ClientCredentialClient.mjs +2 -2
  29. package/dist/client/ConfidentialClientApplication.d.ts +1 -1
  30. package/dist/client/ConfidentialClientApplication.d.ts.map +1 -1
  31. package/dist/client/ConfidentialClientApplication.mjs +3 -2
  32. package/dist/client/ConfidentialClientApplication.mjs.map +1 -1
  33. package/dist/client/DeviceCodeClient.d.ts +1 -1
  34. package/dist/client/DeviceCodeClient.d.ts.map +1 -1
  35. package/dist/client/DeviceCodeClient.mjs +2 -2
  36. package/dist/client/IConfidentialClientApplication.d.ts +1 -1
  37. package/dist/client/IConfidentialClientApplication.d.ts.map +1 -1
  38. package/dist/client/IPublicClientApplication.d.ts +1 -1
  39. package/dist/client/IPublicClientApplication.d.ts.map +1 -1
  40. package/dist/client/ManagedIdentityApplication.d.ts +4 -4
  41. package/dist/client/ManagedIdentityApplication.d.ts.map +1 -1
  42. package/dist/client/ManagedIdentityApplication.mjs +2 -2
  43. package/dist/client/ManagedIdentityClient.d.ts +6 -6
  44. package/dist/client/ManagedIdentityClient.d.ts.map +1 -1
  45. package/dist/client/ManagedIdentityClient.mjs +1 -1
  46. package/dist/client/ManagedIdentitySources/AppService.d.ts +6 -6
  47. package/dist/client/ManagedIdentitySources/AppService.d.ts.map +1 -1
  48. package/dist/client/ManagedIdentitySources/AppService.mjs +2 -2
  49. package/dist/client/ManagedIdentitySources/AzureArc.d.ts +7 -7
  50. package/dist/client/ManagedIdentitySources/AzureArc.d.ts.map +1 -1
  51. package/dist/client/ManagedIdentitySources/AzureArc.mjs +2 -2
  52. package/dist/client/ManagedIdentitySources/BaseManagedIdentitySource.d.ts +8 -8
  53. package/dist/client/ManagedIdentitySources/BaseManagedIdentitySource.d.ts.map +1 -1
  54. package/dist/client/ManagedIdentitySources/BaseManagedIdentitySource.mjs +2 -2
  55. package/dist/client/ManagedIdentitySources/CloudShell.d.ts +6 -6
  56. package/dist/client/ManagedIdentitySources/CloudShell.d.ts.map +1 -1
  57. package/dist/client/ManagedIdentitySources/CloudShell.mjs +2 -2
  58. package/dist/client/ManagedIdentitySources/Imds.d.ts +6 -6
  59. package/dist/client/ManagedIdentitySources/Imds.d.ts.map +1 -1
  60. package/dist/client/ManagedIdentitySources/Imds.mjs +2 -2
  61. package/dist/client/ManagedIdentitySources/ServiceFabric.d.ts +6 -6
  62. package/dist/client/ManagedIdentitySources/ServiceFabric.d.ts.map +1 -1
  63. package/dist/client/ManagedIdentitySources/ServiceFabric.mjs +2 -2
  64. package/dist/client/OnBehalfOfClient.d.ts +1 -1
  65. package/dist/client/OnBehalfOfClient.d.ts.map +1 -1
  66. package/dist/client/OnBehalfOfClient.mjs +2 -2
  67. package/dist/client/PublicClientApplication.d.ts +1 -1
  68. package/dist/client/PublicClientApplication.d.ts.map +1 -1
  69. package/dist/client/PublicClientApplication.mjs +2 -2
  70. package/dist/client/UsernamePasswordClient.d.ts +1 -1
  71. package/dist/client/UsernamePasswordClient.d.ts.map +1 -1
  72. package/dist/client/UsernamePasswordClient.mjs +2 -2
  73. package/dist/config/Configuration.d.ts +3 -3
  74. package/dist/config/Configuration.d.ts.map +1 -1
  75. package/dist/config/Configuration.mjs +2 -2
  76. package/dist/config/ManagedIdentityId.d.ts +2 -2
  77. package/dist/config/ManagedIdentityId.d.ts.map +1 -1
  78. package/dist/config/ManagedIdentityId.mjs +1 -1
  79. package/dist/config/ManagedIdentityRequestParameters.d.ts +1 -1
  80. package/dist/config/ManagedIdentityRequestParameters.d.ts.map +1 -1
  81. package/dist/config/ManagedIdentityRequestParameters.mjs +2 -2
  82. package/dist/crypto/CryptoProvider.d.ts +1 -1
  83. package/dist/crypto/CryptoProvider.d.ts.map +1 -1
  84. package/dist/crypto/CryptoProvider.mjs +1 -1
  85. package/dist/crypto/GuidGenerator.d.ts +1 -1
  86. package/dist/crypto/GuidGenerator.d.ts.map +1 -1
  87. package/dist/crypto/GuidGenerator.mjs +1 -1
  88. package/dist/crypto/HashUtils.d.ts +1 -1
  89. package/dist/crypto/HashUtils.mjs +1 -1
  90. package/dist/crypto/PkceGenerator.d.ts +1 -1
  91. package/dist/crypto/PkceGenerator.d.ts.map +1 -1
  92. package/dist/crypto/PkceGenerator.mjs +2 -2
  93. package/dist/error/ManagedIdentityError.d.ts +2 -2
  94. package/dist/error/ManagedIdentityError.d.ts.map +1 -1
  95. package/dist/error/ManagedIdentityError.mjs +2 -2
  96. package/dist/error/ManagedIdentityErrorCodes.mjs +1 -1
  97. package/dist/error/NodeAuthError.d.ts +1 -1
  98. package/dist/error/NodeAuthError.d.ts.map +1 -1
  99. package/dist/error/NodeAuthError.mjs +2 -2
  100. package/dist/index.d.ts +1 -1
  101. package/dist/index.d.ts.map +1 -1
  102. package/dist/index.mjs +2 -2
  103. package/dist/internals.mjs +5 -1
  104. package/dist/internals.mjs.map +1 -1
  105. package/dist/network/HttpClient.d.ts +3 -3
  106. package/dist/network/HttpClient.d.ts.map +1 -1
  107. package/dist/network/HttpClient.mjs +2 -2
  108. package/dist/network/HttpClientWithRetries.d.ts +2 -2
  109. package/dist/network/HttpClientWithRetries.d.ts.map +1 -1
  110. package/dist/network/HttpClientWithRetries.mjs +2 -2
  111. package/dist/network/ILoopbackClient.d.ts +1 -1
  112. package/dist/network/ILoopbackClient.d.ts.map +1 -1
  113. package/dist/network/LoopbackClient.d.ts +1 -1
  114. package/dist/network/LoopbackClient.d.ts.map +1 -1
  115. package/dist/network/LoopbackClient.mjs +3 -3
  116. package/dist/network/LoopbackClient.mjs.map +1 -1
  117. package/dist/packageMetadata.d.ts +1 -1
  118. package/dist/packageMetadata.mjs +2 -2
  119. package/dist/request/AuthorizationCodeRequest.d.ts +1 -1
  120. package/dist/request/AuthorizationCodeRequest.d.ts.map +1 -1
  121. package/dist/request/AuthorizationUrlRequest.d.ts +1 -1
  122. package/dist/request/AuthorizationUrlRequest.d.ts.map +1 -1
  123. package/dist/request/ClientCredentialRequest.d.ts +1 -1
  124. package/dist/request/ClientCredentialRequest.d.ts.map +1 -1
  125. package/dist/request/DeviceCodeRequest.d.ts +1 -1
  126. package/dist/request/DeviceCodeRequest.d.ts.map +1 -1
  127. package/dist/request/InteractiveRequest.d.ts +1 -1
  128. package/dist/request/ManagedIdentityRequest.d.ts +2 -2
  129. package/dist/request/ManagedIdentityRequest.d.ts.map +1 -1
  130. package/dist/request/OnBehalfOfRequest.d.ts +1 -1
  131. package/dist/request/OnBehalfOfRequest.d.ts.map +1 -1
  132. package/dist/request/RefreshTokenRequest.d.ts +1 -1
  133. package/dist/request/RefreshTokenRequest.d.ts.map +1 -1
  134. package/dist/request/SignOutRequest.d.ts +1 -1
  135. package/dist/request/SignOutRequest.d.ts.map +1 -1
  136. package/dist/request/SilentFlowRequest.d.ts +1 -1
  137. package/dist/request/SilentFlowRequest.d.ts.map +1 -1
  138. package/dist/request/UsernamePasswordRequest.d.ts +1 -1
  139. package/dist/request/UsernamePasswordRequest.d.ts.map +1 -1
  140. package/dist/response/ManagedIdentityTokenResponse.d.ts +1 -1
  141. package/dist/response/ManagedIdentityTokenResponse.d.ts.map +1 -1
  142. package/dist/retry/IHttpRetryPolicy.d.ts +1 -1
  143. package/dist/retry/LinearRetryPolicy.d.ts +2 -2
  144. package/dist/retry/LinearRetryPolicy.d.ts.map +1 -1
  145. package/dist/retry/LinearRetryPolicy.mjs +1 -1
  146. package/dist/utils/Constants.mjs +2 -2
  147. package/dist/utils/EncodingUtils.d.ts +1 -1
  148. package/dist/utils/EncodingUtils.mjs +2 -2
  149. package/dist/utils/NetworkUtils.d.ts +1 -1
  150. package/dist/utils/NetworkUtils.d.ts.map +1 -1
  151. package/dist/utils/NetworkUtils.mjs +1 -1
  152. package/dist/utils/NetworkUtils.mjs.map +1 -1
  153. package/lib/msal-node.cjs +12362 -0
  154. package/lib/msal-node.cjs.map +1 -0
  155. package/lib/package.json +1 -0
  156. package/lib/types/cache/ITokenCache.d.ts +16 -0
  157. package/lib/types/cache/ITokenCache.d.ts.map +1 -0
  158. package/lib/types/cache/NodeStorage.d.ts +194 -0
  159. package/lib/types/cache/NodeStorage.d.ts.map +1 -0
  160. package/lib/types/cache/TokenCache.d.ts +91 -0
  161. package/lib/types/cache/TokenCache.d.ts.map +1 -0
  162. package/lib/types/cache/distributed/DistributedCachePlugin.d.ts +11 -0
  163. package/lib/types/cache/distributed/DistributedCachePlugin.d.ts.map +1 -0
  164. package/lib/types/cache/distributed/ICacheClient.d.ts +18 -0
  165. package/lib/types/cache/distributed/ICacheClient.d.ts.map +1 -0
  166. package/lib/types/cache/distributed/IPartitionManager.d.ts +29 -0
  167. package/lib/types/cache/distributed/IPartitionManager.d.ts.map +1 -0
  168. package/lib/types/cache/serializer/Deserializer.d.ts +43 -0
  169. package/lib/types/cache/serializer/Deserializer.d.ts.map +1 -0
  170. package/lib/types/cache/serializer/Serializer.d.ts +40 -0
  171. package/lib/types/cache/serializer/Serializer.d.ts.map +1 -0
  172. package/lib/types/cache/serializer/SerializerTypes.d.ts +103 -0
  173. package/lib/types/cache/serializer/SerializerTypes.d.ts.map +1 -0
  174. package/lib/types/client/ClientApplication.d.ts +144 -0
  175. package/lib/types/client/ClientApplication.d.ts.map +1 -0
  176. package/lib/types/client/ClientAssertion.d.ts +56 -0
  177. package/lib/types/client/ClientAssertion.d.ts.map +1 -0
  178. package/lib/types/client/ClientCredentialClient.d.ts +34 -0
  179. package/lib/types/client/ClientCredentialClient.d.ts.map +1 -0
  180. package/lib/types/client/ConfidentialClientApplication.d.ts +59 -0
  181. package/lib/types/client/ConfidentialClientApplication.d.ts.map +1 -0
  182. package/lib/types/client/DeviceCodeClient.d.ts +54 -0
  183. package/lib/types/client/DeviceCodeClient.d.ts.map +1 -0
  184. package/lib/types/client/IConfidentialClientApplication.d.ts +40 -0
  185. package/lib/types/client/IConfidentialClientApplication.d.ts.map +1 -0
  186. package/lib/types/client/IPublicClientApplication.d.ts +43 -0
  187. package/lib/types/client/IPublicClientApplication.d.ts.map +1 -0
  188. package/lib/types/client/ManagedIdentityApplication.d.ts +31 -0
  189. package/lib/types/client/ManagedIdentityApplication.d.ts.map +1 -0
  190. package/lib/types/client/ManagedIdentityClient.d.ts +28 -0
  191. package/lib/types/client/ManagedIdentityClient.d.ts.map +1 -0
  192. package/lib/types/client/ManagedIdentitySources/AppService.d.ts +18 -0
  193. package/lib/types/client/ManagedIdentitySources/AppService.d.ts.map +1 -0
  194. package/lib/types/client/ManagedIdentitySources/AzureArc.d.ts +28 -0
  195. package/lib/types/client/ManagedIdentitySources/AzureArc.d.ts.map +1 -0
  196. package/lib/types/client/ManagedIdentitySources/BaseManagedIdentitySource.d.ts +31 -0
  197. package/lib/types/client/ManagedIdentitySources/BaseManagedIdentitySource.d.ts.map +1 -0
  198. package/lib/types/client/ManagedIdentitySources/CloudShell.d.ts +17 -0
  199. package/lib/types/client/ManagedIdentitySources/CloudShell.d.ts.map +1 -0
  200. package/lib/types/client/ManagedIdentitySources/Imds.d.ts +13 -0
  201. package/lib/types/client/ManagedIdentitySources/Imds.d.ts.map +1 -0
  202. package/lib/types/client/ManagedIdentitySources/ServiceFabric.d.ts +18 -0
  203. package/lib/types/client/ManagedIdentitySources/ServiceFabric.d.ts.map +1 -0
  204. package/lib/types/client/OnBehalfOfClient.d.ts +48 -0
  205. package/lib/types/client/OnBehalfOfClient.d.ts.map +1 -0
  206. package/lib/types/client/PublicClientApplication.d.ts +73 -0
  207. package/lib/types/client/PublicClientApplication.d.ts.map +1 -0
  208. package/lib/types/client/UsernamePasswordClient.d.ts +26 -0
  209. package/lib/types/client/UsernamePasswordClient.d.ts.map +1 -0
  210. package/lib/types/config/Configuration.d.ts +132 -0
  211. package/lib/types/config/Configuration.d.ts.map +1 -0
  212. package/lib/types/config/ManagedIdentityId.d.ts +12 -0
  213. package/lib/types/config/ManagedIdentityId.d.ts.map +1 -0
  214. package/lib/types/config/ManagedIdentityRequestParameters.d.ts +12 -0
  215. package/lib/types/config/ManagedIdentityRequestParameters.d.ts.map +1 -0
  216. package/lib/types/crypto/CryptoProvider.d.ts +63 -0
  217. package/lib/types/crypto/CryptoProvider.d.ts.map +1 -0
  218. package/lib/types/crypto/GuidGenerator.d.ts +15 -0
  219. package/lib/types/crypto/GuidGenerator.d.ts.map +1 -0
  220. package/lib/types/crypto/HashUtils.d.ts +9 -0
  221. package/lib/types/crypto/HashUtils.d.ts.map +1 -0
  222. package/lib/types/crypto/PkceGenerator.d.ts +23 -0
  223. package/lib/types/crypto/PkceGenerator.d.ts.map +1 -0
  224. package/lib/types/error/ManagedIdentityError.d.ts +31 -0
  225. package/lib/types/error/ManagedIdentityError.d.ts.map +1 -0
  226. package/lib/types/error/ManagedIdentityErrorCodes.d.ts +23 -0
  227. package/lib/types/error/ManagedIdentityErrorCodes.d.ts.map +1 -0
  228. package/lib/types/error/NodeAuthError.d.ts +74 -0
  229. package/lib/types/error/NodeAuthError.d.ts.map +1 -0
  230. package/lib/types/index.d.ts +46 -0
  231. package/lib/types/index.d.ts.map +1 -0
  232. package/lib/types/internals.d.ts +7 -0
  233. package/lib/types/internals.d.ts.map +1 -0
  234. package/lib/types/network/HttpClient.d.ts +26 -0
  235. package/lib/types/network/HttpClient.d.ts.map +1 -0
  236. package/lib/types/network/HttpClientWithRetries.d.ts +12 -0
  237. package/lib/types/network/HttpClientWithRetries.d.ts.map +1 -0
  238. package/lib/types/network/ILoopbackClient.d.ts +11 -0
  239. package/lib/types/network/ILoopbackClient.d.ts.map +1 -0
  240. package/lib/types/network/LoopbackClient.d.ts +22 -0
  241. package/lib/types/network/LoopbackClient.d.ts.map +1 -0
  242. package/lib/types/packageMetadata.d.ts +3 -0
  243. package/lib/types/packageMetadata.d.ts.map +1 -0
  244. package/lib/types/request/AuthorizationCodeRequest.d.ts +22 -0
  245. package/lib/types/request/AuthorizationCodeRequest.d.ts.map +1 -0
  246. package/lib/types/request/AuthorizationUrlRequest.d.ts +34 -0
  247. package/lib/types/request/AuthorizationUrlRequest.d.ts.map +1 -0
  248. package/lib/types/request/ClientCredentialRequest.d.ts +15 -0
  249. package/lib/types/request/ClientCredentialRequest.d.ts.map +1 -0
  250. package/lib/types/request/DeviceCodeRequest.d.ts +16 -0
  251. package/lib/types/request/DeviceCodeRequest.d.ts.map +1 -0
  252. package/lib/types/request/InteractiveRequest.d.ts +23 -0
  253. package/lib/types/request/InteractiveRequest.d.ts.map +1 -0
  254. package/lib/types/request/ManagedIdentityRequest.d.ts +9 -0
  255. package/lib/types/request/ManagedIdentityRequest.d.ts.map +1 -0
  256. package/lib/types/request/ManagedIdentityRequestParams.d.ts +10 -0
  257. package/lib/types/request/ManagedIdentityRequestParams.d.ts.map +1 -0
  258. package/lib/types/request/OnBehalfOfRequest.d.ts +15 -0
  259. package/lib/types/request/OnBehalfOfRequest.d.ts.map +1 -0
  260. package/lib/types/request/RefreshTokenRequest.d.ts +18 -0
  261. package/lib/types/request/RefreshTokenRequest.d.ts.map +1 -0
  262. package/lib/types/request/SignOutRequest.d.ts +6 -0
  263. package/lib/types/request/SignOutRequest.d.ts.map +1 -0
  264. package/lib/types/request/SilentFlowRequest.d.ts +17 -0
  265. package/lib/types/request/SilentFlowRequest.d.ts.map +1 -0
  266. package/lib/types/request/UsernamePasswordRequest.d.ts +20 -0
  267. package/lib/types/request/UsernamePasswordRequest.d.ts.map +1 -0
  268. package/lib/types/response/ManagedIdentityTokenResponse.d.ts +35 -0
  269. package/lib/types/response/ManagedIdentityTokenResponse.d.ts.map +1 -0
  270. package/lib/types/retry/IHttpRetryPolicy.d.ts +6 -0
  271. package/lib/types/retry/IHttpRetryPolicy.d.ts.map +1 -0
  272. package/lib/types/retry/LinearRetryPolicy.d.ts +12 -0
  273. package/lib/types/retry/LinearRetryPolicy.d.ts.map +1 -0
  274. package/lib/types/utils/Constants.d.ts +142 -0
  275. package/lib/types/utils/Constants.d.ts.map +1 -0
  276. package/lib/types/utils/EncodingUtils.d.ts +27 -0
  277. package/lib/types/utils/EncodingUtils.d.ts.map +1 -0
  278. package/lib/types/utils/NetworkUtils.d.ts +6 -0
  279. package/lib/types/utils/NetworkUtils.d.ts.map +1 -0
  280. package/package.json +13 -10
  281. package/src/cache/ITokenCache.ts +1 -1
  282. package/src/cache/NodeStorage.ts +1 -1
  283. package/src/cache/TokenCache.ts +1 -1
  284. package/src/cache/distributed/DistributedCachePlugin.ts +1 -1
  285. package/src/cache/distributed/IPartitionManager.ts +1 -1
  286. package/src/cache/serializer/Deserializer.ts +1 -1
  287. package/src/cache/serializer/Serializer.ts +1 -1
  288. package/src/cache/serializer/SerializerTypes.ts +1 -1
  289. package/src/client/ClientApplication.ts +1 -1
  290. package/src/client/ClientAssertion.ts +1 -1
  291. package/src/client/ClientCredentialClient.ts +2 -2
  292. package/src/client/ConfidentialClientApplication.ts +1 -1
  293. package/src/client/DeviceCodeClient.ts +1 -1
  294. package/src/client/IConfidentialClientApplication.ts +1 -1
  295. package/src/client/IPublicClientApplication.ts +5 -1
  296. package/src/client/ManagedIdentityApplication.ts +9 -9
  297. package/src/client/ManagedIdentityClient.ts +13 -13
  298. package/src/client/ManagedIdentitySources/AppService.ts +7 -7
  299. package/src/client/ManagedIdentitySources/AzureArc.ts +9 -9
  300. package/src/client/ManagedIdentitySources/BaseManagedIdentitySource.ts +9 -9
  301. package/src/client/ManagedIdentitySources/CloudShell.ts +8 -8
  302. package/src/client/ManagedIdentitySources/Imds.ts +7 -7
  303. package/src/client/ManagedIdentitySources/ServiceFabric.ts +7 -7
  304. package/src/client/OnBehalfOfClient.ts +2 -2
  305. package/src/client/PublicClientApplication.ts +2 -2
  306. package/src/client/UsernamePasswordClient.ts +1 -1
  307. package/src/config/Configuration.ts +1 -1
  308. package/src/config/ManagedIdentityId.ts +3 -3
  309. package/src/config/ManagedIdentityRequestParameters.ts +2 -2
  310. package/src/crypto/CryptoProvider.ts +1 -1
  311. package/src/crypto/GuidGenerator.ts +1 -1
  312. package/src/crypto/PkceGenerator.ts +1 -1
  313. package/src/error/ManagedIdentityError.ts +3 -3
  314. package/src/error/ManagedIdentityErrorCodes.ts +1 -1
  315. package/src/error/NodeAuthError.ts +1 -1
  316. package/src/index.ts +1 -1
  317. package/src/network/HttpClient.ts +1 -1
  318. package/src/network/HttpClientWithRetries.ts +3 -3
  319. package/src/network/ILoopbackClient.ts +1 -1
  320. package/src/network/LoopbackClient.ts +2 -2
  321. package/src/packageMetadata.ts +1 -1
  322. package/src/request/AuthorizationCodeRequest.ts +1 -1
  323. package/src/request/AuthorizationUrlRequest.ts +1 -1
  324. package/src/request/ClientCredentialRequest.ts +1 -1
  325. package/src/request/DeviceCodeRequest.ts +1 -1
  326. package/src/request/ManagedIdentityRequest.ts +2 -2
  327. package/src/request/OnBehalfOfRequest.ts +1 -1
  328. package/src/request/RefreshTokenRequest.ts +1 -1
  329. package/src/request/SignOutRequest.ts +1 -1
  330. package/src/request/SilentFlowRequest.ts +1 -1
  331. package/src/request/UsernamePasswordRequest.ts +1 -1
  332. package/src/response/ManagedIdentityTokenResponse.ts +1 -1
  333. package/src/retry/LinearRetryPolicy.ts +1 -1
  334. package/src/utils/Constants.ts +1 -1
  335. package/src/utils/EncodingUtils.ts +1 -1
  336. package/src/utils/NetworkUtils.ts +4 -1
  337. package/dist/cache/NodeStorage.cjs +0 -436
  338. package/dist/cache/NodeStorage.cjs.map +0 -1
  339. package/dist/cache/TokenCache.cjs +0 -278
  340. package/dist/cache/TokenCache.cjs.map +0 -1
  341. package/dist/cache/distributed/DistributedCachePlugin.cjs +0 -37
  342. package/dist/cache/distributed/DistributedCachePlugin.cjs.map +0 -1
  343. package/dist/cache/serializer/Deserializer.cjs +0 -178
  344. package/dist/cache/serializer/Deserializer.cjs.map +0 -1
  345. package/dist/cache/serializer/Serializer.cjs +0 -146
  346. package/dist/cache/serializer/Serializer.cjs.map +0 -1
  347. package/dist/client/ClientApplication.cjs +0 -354
  348. package/dist/client/ClientApplication.cjs.map +0 -1
  349. package/dist/client/ClientAssertion.cjs +0 -161
  350. package/dist/client/ClientAssertion.cjs.map +0 -1
  351. package/dist/client/ClientCredentialClient.cjs +0 -205
  352. package/dist/client/ClientCredentialClient.cjs.map +0 -1
  353. package/dist/client/ConfidentialClientApplication.cjs +0 -184
  354. package/dist/client/ConfidentialClientApplication.cjs.map +0 -1
  355. package/dist/client/DeviceCodeClient.cjs +0 -218
  356. package/dist/client/DeviceCodeClient.cjs.map +0 -1
  357. package/dist/client/ManagedIdentityApplication.cjs +0 -102
  358. package/dist/client/ManagedIdentityApplication.cjs.map +0 -1
  359. package/dist/client/ManagedIdentityClient.cjs +0 -78
  360. package/dist/client/ManagedIdentityClient.cjs.map +0 -1
  361. package/dist/client/ManagedIdentitySources/AppService.cjs +0 -58
  362. package/dist/client/ManagedIdentitySources/AppService.cjs.map +0 -1
  363. package/dist/client/ManagedIdentitySources/AzureArc.cjs +0 -179
  364. package/dist/client/ManagedIdentitySources/AzureArc.cjs.map +0 -1
  365. package/dist/client/ManagedIdentitySources/BaseManagedIdentitySource.cjs +0 -137
  366. package/dist/client/ManagedIdentitySources/BaseManagedIdentitySource.cjs.map +0 -1
  367. package/dist/client/ManagedIdentitySources/CloudShell.cjs +0 -53
  368. package/dist/client/ManagedIdentitySources/CloudShell.cjs.map +0 -1
  369. package/dist/client/ManagedIdentitySources/Imds.cjs +0 -56
  370. package/dist/client/ManagedIdentitySources/Imds.cjs.map +0 -1
  371. package/dist/client/ManagedIdentitySources/ServiceFabric.cjs +0 -67
  372. package/dist/client/ManagedIdentitySources/ServiceFabric.cjs.map +0 -1
  373. package/dist/client/OnBehalfOfClient.cjs +0 -214
  374. package/dist/client/OnBehalfOfClient.cjs.map +0 -1
  375. package/dist/client/PublicClientApplication.cjs +0 -254
  376. package/dist/client/PublicClientApplication.cjs.map +0 -1
  377. package/dist/client/UsernamePasswordClient.cjs +0 -106
  378. package/dist/client/UsernamePasswordClient.cjs.map +0 -1
  379. package/dist/config/Configuration.cjs +0 -124
  380. package/dist/config/Configuration.cjs.map +0 -1
  381. package/dist/config/ManagedIdentityId.cjs +0 -61
  382. package/dist/config/ManagedIdentityId.cjs.map +0 -1
  383. package/dist/config/ManagedIdentityRequestParameters.cjs +0 -39
  384. package/dist/config/ManagedIdentityRequestParameters.cjs.map +0 -1
  385. package/dist/crypto/CryptoProvider.cjs +0 -103
  386. package/dist/crypto/CryptoProvider.cjs.map +0 -1
  387. package/dist/crypto/GuidGenerator.cjs +0 -33
  388. package/dist/crypto/GuidGenerator.cjs.map +0 -1
  389. package/dist/crypto/HashUtils.cjs +0 -29
  390. package/dist/crypto/HashUtils.cjs.map +0 -1
  391. package/dist/crypto/PkceGenerator.cjs +0 -68
  392. package/dist/crypto/PkceGenerator.cjs.map +0 -1
  393. package/dist/error/ManagedIdentityError.cjs +0 -56
  394. package/dist/error/ManagedIdentityError.cjs.map +0 -1
  395. package/dist/error/ManagedIdentityErrorCodes.cjs +0 -49
  396. package/dist/error/ManagedIdentityErrorCodes.cjs.map +0 -1
  397. package/dist/error/NodeAuthError.cjs +0 -107
  398. package/dist/error/NodeAuthError.cjs.map +0 -1
  399. package/dist/index.cjs +0 -125
  400. package/dist/index.cjs.map +0 -1
  401. package/dist/internals.cjs +0 -17
  402. package/dist/internals.cjs.map +0 -1
  403. package/dist/network/HttpClient.cjs +0 -301
  404. package/dist/network/HttpClient.cjs.map +0 -1
  405. package/dist/network/HttpClientWithRetries.cjs +0 -46
  406. package/dist/network/HttpClientWithRetries.cjs.map +0 -1
  407. package/dist/network/LoopbackClient.cjs +0 -99
  408. package/dist/network/LoopbackClient.cjs.map +0 -1
  409. package/dist/packageMetadata.cjs +0 -13
  410. package/dist/packageMetadata.cjs.map +0 -1
  411. package/dist/retry/LinearRetryPolicy.cjs +0 -49
  412. package/dist/retry/LinearRetryPolicy.cjs.map +0 -1
  413. package/dist/utils/Constants.cjs +0 -172
  414. package/dist/utils/Constants.cjs.map +0 -1
  415. package/dist/utils/EncodingUtils.cjs +0 -55
  416. package/dist/utils/EncodingUtils.cjs.map +0 -1
  417. package/dist/utils/NetworkUtils.cjs +0 -47
  418. package/dist/utils/NetworkUtils.cjs.map +0 -1
@@ -1,102 +0,0 @@
1
- /*! @azure/msal-node v2.13.0 2024-08-13 */
2
- 'use strict';
3
- 'use strict';
4
-
5
- Object.defineProperty(exports, '__esModule', { value: true });
6
-
7
- var msalCommon = require('@azure/msal-common');
8
- var Configuration = require('../config/Configuration.cjs');
9
- var packageMetadata = require('../packageMetadata.cjs');
10
- var CryptoProvider = require('../crypto/CryptoProvider.cjs');
11
- var ClientCredentialClient = require('./ClientCredentialClient.cjs');
12
- var ManagedIdentityClient = require('./ManagedIdentityClient.cjs');
13
- var NodeStorage = require('../cache/NodeStorage.cjs');
14
- var Constants = require('../utils/Constants.cjs');
15
-
16
- /*
17
- * Copyright (c) Microsoft Corporation. All rights reserved.
18
- * Licensed under the MIT License.
19
- */
20
- /**
21
- * Class to initialize a managed identity and identify the service
22
- * @public
23
- */
24
- class ManagedIdentityApplication {
25
- constructor(configuration) {
26
- // undefined config means the managed identity is system-assigned
27
- this.config = Configuration.buildManagedIdentityConfiguration(configuration || {});
28
- this.logger = new msalCommon.Logger(this.config.system.loggerOptions, packageMetadata.name, packageMetadata.version);
29
- const fakeStatusAuthorityOptions = {
30
- canonicalAuthority: msalCommon.Constants.DEFAULT_AUTHORITY,
31
- };
32
- if (!ManagedIdentityApplication.nodeStorage) {
33
- ManagedIdentityApplication.nodeStorage = new NodeStorage.NodeStorage(this.logger, this.config.managedIdentityId.id, msalCommon.DEFAULT_CRYPTO_IMPLEMENTATION, fakeStatusAuthorityOptions);
34
- }
35
- this.networkClient = this.config.system.networkClient;
36
- this.cryptoProvider = new CryptoProvider.CryptoProvider();
37
- const fakeAuthorityOptions = {
38
- protocolMode: msalCommon.ProtocolMode.AAD,
39
- knownAuthorities: [Constants.DEFAULT_AUTHORITY_FOR_MANAGED_IDENTITY],
40
- cloudDiscoveryMetadata: "",
41
- authorityMetadata: "",
42
- };
43
- this.fakeAuthority = new msalCommon.Authority(Constants.DEFAULT_AUTHORITY_FOR_MANAGED_IDENTITY, this.networkClient, ManagedIdentityApplication.nodeStorage, fakeAuthorityOptions, this.logger, this.cryptoProvider.createNewGuid(), // correlationID
44
- undefined, true);
45
- this.fakeClientCredentialClient = new ClientCredentialClient.ClientCredentialClient({
46
- authOptions: {
47
- clientId: this.config.managedIdentityId.id,
48
- authority: this.fakeAuthority,
49
- },
50
- });
51
- this.managedIdentityClient = new ManagedIdentityClient.ManagedIdentityClient(this.logger, ManagedIdentityApplication.nodeStorage, this.networkClient, this.cryptoProvider);
52
- }
53
- /**
54
- * Acquire an access token from the cache or the managed identity
55
- * @param managedIdentityRequest - the ManagedIdentityRequestParams object passed in by the developer
56
- * @returns the access token
57
- */
58
- async acquireToken(managedIdentityRequestParams) {
59
- if (!managedIdentityRequestParams.resource) {
60
- throw msalCommon.createClientConfigurationError(msalCommon.ClientConfigurationErrorCodes.urlEmptyError);
61
- }
62
- const managedIdentityRequest = {
63
- forceRefresh: managedIdentityRequestParams.forceRefresh,
64
- resource: managedIdentityRequestParams.resource.replace("/.default", ""),
65
- scopes: [
66
- managedIdentityRequestParams.resource.replace("/.default", ""),
67
- ],
68
- authority: this.fakeAuthority.canonicalAuthority,
69
- correlationId: this.cryptoProvider.createNewGuid(),
70
- };
71
- if (managedIdentityRequest.forceRefresh) {
72
- // make a network call to the managed identity source
73
- return this.managedIdentityClient.sendManagedIdentityTokenRequest(managedIdentityRequest, this.config.managedIdentityId, this.fakeAuthority);
74
- }
75
- const [cachedAuthenticationResult, lastCacheOutcome] = await this.fakeClientCredentialClient.getCachedAuthenticationResult(managedIdentityRequest, this.config, this.cryptoProvider, this.fakeAuthority, ManagedIdentityApplication.nodeStorage);
76
- if (cachedAuthenticationResult) {
77
- // if the token is not expired but must be refreshed; get a new one in the background
78
- if (lastCacheOutcome === msalCommon.CacheOutcome.PROACTIVELY_REFRESHED) {
79
- this.logger.info("ClientCredentialClient:getCachedAuthenticationResult - Cached access token's refreshOn property has been exceeded'. It's not expired, but must be refreshed.");
80
- // make a network call to the managed identity source; refresh the access token in the background
81
- const refreshAccessToken = true;
82
- await this.managedIdentityClient.sendManagedIdentityTokenRequest(managedIdentityRequest, this.config.managedIdentityId, this.fakeAuthority, refreshAccessToken);
83
- }
84
- return cachedAuthenticationResult;
85
- }
86
- else {
87
- // make a network call to the managed identity source
88
- return this.managedIdentityClient.sendManagedIdentityTokenRequest(managedIdentityRequest, this.config.managedIdentityId, this.fakeAuthority);
89
- }
90
- }
91
- /**
92
- * Determine the Managed Identity Source based on available environment variables. This API is consumed by Azure Identity SDK.
93
- * @returns ManagedIdentitySourceNames - The Managed Identity source's name
94
- */
95
- getManagedIdentitySource() {
96
- return (ManagedIdentityClient.ManagedIdentityClient.sourceName ||
97
- this.managedIdentityClient.getManagedIdentitySource());
98
- }
99
- }
100
-
101
- exports.ManagedIdentityApplication = ManagedIdentityApplication;
102
- //# sourceMappingURL=ManagedIdentityApplication.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ManagedIdentityApplication.cjs","sources":["../../src/client/ManagedIdentityApplication.ts"],"sourcesContent":[null],"names":["buildManagedIdentityConfiguration","Logger","name","version","Constants","NodeStorage","DEFAULT_CRYPTO_IMPLEMENTATION","CryptoProvider","ProtocolMode","DEFAULT_AUTHORITY_FOR_MANAGED_IDENTITY","Authority","ClientCredentialClient","ManagedIdentityClient","createClientConfigurationError","ClientConfigurationErrorCodes","CacheOutcome"],"mappings":";;;;;;;;;;;;;;;AAAA;;;AAGG;AAmCH;;;AAGG;MACU,0BAA0B,CAAA;AAgBnC,IAAA,WAAA,CAAY,aAA4C,EAAA;;QAEpD,IAAI,CAAC,MAAM,GAAGA,+CAAiC,CAAC,aAAa,IAAI,EAAE,CAAC,CAAC;AAErE,QAAA,IAAI,CAAC,MAAM,GAAG,IAAIC,iBAAM,CACpB,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,aAAa,EAChCC,oBAAI,EACJC,uBAAO,CACV,CAAC;AAEF,QAAA,MAAM,0BAA0B,GAA2B;YACvD,kBAAkB,EAAEC,oBAAS,CAAC,iBAAiB;SAClD,CAAC;AAEF,QAAA,IAAI,CAAC,0BAA0B,CAAC,WAAW,EAAE;YACzC,0BAA0B,CAAC,WAAW,GAAG,IAAIC,uBAAW,CACpD,IAAI,CAAC,MAAM,EACX,IAAI,CAAC,MAAM,CAAC,iBAAiB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IAAI,CAAC,qBAAqB,CAAC,+BAA+B,CAC7D,sBAAsB,EACtB,IAAI,CAAC,MAAM,CAAC,iBAAiB,EAC7B,IAAI,CAAC,aAAa,CACrB,CAAC;AACL,SAAA;KACJ;AAED;;;AAGG;IACI,wBAAwB,GAAA;QAC3B,QACIH,2CAAqB,CAAC,UAAU;AAChC,YAAA,IAAI,CAAC,qBAAqB,CAAC,wBAAwB,EAAE,EACvD;KACL;AACJ;;;;"}
@@ -1,78 +0,0 @@
1
- /*! @azure/msal-node v2.13.0 2024-08-13 */
2
- 'use strict';
3
- 'use strict';
4
-
5
- Object.defineProperty(exports, '__esModule', { value: true });
6
-
7
- var AppService = require('./ManagedIdentitySources/AppService.cjs');
8
- var AzureArc = require('./ManagedIdentitySources/AzureArc.cjs');
9
- var CloudShell = require('./ManagedIdentitySources/CloudShell.cjs');
10
- var Imds = require('./ManagedIdentitySources/Imds.cjs');
11
- var ServiceFabric = require('./ManagedIdentitySources/ServiceFabric.cjs');
12
- var ManagedIdentityError = require('../error/ManagedIdentityError.cjs');
13
- var Constants = require('../utils/Constants.cjs');
14
- var ManagedIdentityErrorCodes = require('../error/ManagedIdentityErrorCodes.cjs');
15
-
16
- /*
17
- * Copyright (c) Microsoft Corporation. All rights reserved.
18
- * Licensed under the MIT License.
19
- */
20
- /*
21
- * Class to initialize a managed identity and identify the service.
22
- * Original source of code: https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/identity/Azure.Identity/src/ManagedIdentityClient.cs
23
- */
24
- class ManagedIdentityClient {
25
- constructor(logger, nodeStorage, networkClient, cryptoProvider) {
26
- this.logger = logger;
27
- this.nodeStorage = nodeStorage;
28
- this.networkClient = networkClient;
29
- this.cryptoProvider = cryptoProvider;
30
- }
31
- async sendManagedIdentityTokenRequest(managedIdentityRequest, managedIdentityId, fakeAuthority, refreshAccessToken) {
32
- if (!ManagedIdentityClient.identitySource) {
33
- ManagedIdentityClient.identitySource =
34
- this.selectManagedIdentitySource(this.logger, this.nodeStorage, this.networkClient, this.cryptoProvider, managedIdentityId);
35
- }
36
- return ManagedIdentityClient.identitySource.acquireTokenWithManagedIdentity(managedIdentityRequest, managedIdentityId, fakeAuthority, refreshAccessToken);
37
- }
38
- allEnvironmentVariablesAreDefined(environmentVariables) {
39
- return Object.values(environmentVariables).every((environmentVariable) => {
40
- return environmentVariable !== undefined;
41
- });
42
- }
43
- /**
44
- * Determine the Managed Identity Source based on available environment variables. This API is consumed by ManagedIdentityApplication's getManagedIdentitySource.
45
- * @returns ManagedIdentitySourceNames - The Managed Identity source's name
46
- */
47
- getManagedIdentitySource() {
48
- ManagedIdentityClient.sourceName =
49
- this.allEnvironmentVariablesAreDefined(ServiceFabric.ServiceFabric.getEnvironmentVariables())
50
- ? Constants.ManagedIdentitySourceNames.SERVICE_FABRIC
51
- : this.allEnvironmentVariablesAreDefined(AppService.AppService.getEnvironmentVariables())
52
- ? Constants.ManagedIdentitySourceNames.APP_SERVICE
53
- : this.allEnvironmentVariablesAreDefined(CloudShell.CloudShell.getEnvironmentVariables())
54
- ? Constants.ManagedIdentitySourceNames.CLOUD_SHELL
55
- : this.allEnvironmentVariablesAreDefined(AzureArc.AzureArc.getEnvironmentVariables())
56
- ? Constants.ManagedIdentitySourceNames.AZURE_ARC
57
- : Constants.ManagedIdentitySourceNames.DEFAULT_TO_IMDS;
58
- return ManagedIdentityClient.sourceName;
59
- }
60
- /**
61
- * Tries to create a managed identity source for all sources
62
- * @returns the managed identity Source
63
- */
64
- selectManagedIdentitySource(logger, nodeStorage, networkClient, cryptoProvider, managedIdentityId) {
65
- const source = ServiceFabric.ServiceFabric.tryCreate(logger, nodeStorage, networkClient, cryptoProvider, managedIdentityId) ||
66
- AppService.AppService.tryCreate(logger, nodeStorage, networkClient, cryptoProvider) ||
67
- CloudShell.CloudShell.tryCreate(logger, nodeStorage, networkClient, cryptoProvider, managedIdentityId) ||
68
- AzureArc.AzureArc.tryCreate(logger, nodeStorage, networkClient, cryptoProvider, managedIdentityId) ||
69
- Imds.Imds.tryCreate(logger, nodeStorage, networkClient, cryptoProvider);
70
- if (!source) {
71
- throw ManagedIdentityError.createManagedIdentityError(ManagedIdentityErrorCodes.unableToCreateSource);
72
- }
73
- return source;
74
- }
75
- }
76
-
77
- exports.ManagedIdentityClient = ManagedIdentityClient;
78
- //# sourceMappingURL=ManagedIdentityClient.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ManagedIdentityClient.cjs","sources":["../../src/client/ManagedIdentityClient.ts"],"sourcesContent":[null],"names":["ServiceFabric","ManagedIdentitySourceNames","AppService","CloudShell","AzureArc","Imds","createManagedIdentityError","ManagedIdentityErrorCodes.unableToCreateSource"],"mappings":";;;;;;;;;;;;;;;AAAA;;;AAGG;AAwBH;;;AAGG;MACU,qBAAqB,CAAA;AAS9B,IAAA,WAAA,CACI,MAAc,EACd,WAAwB,EACxB,aAA6B,EAC7B,cAA8B,EAAA;AAE9B,QAAA,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;AACrB,QAAA,IAAI,CAAC,WAAW,GAAG,WAAW,CAAC;AAC/B,QAAA,IAAI,CAAC,aAAa,GAAG,aAAa,CAAC;AACnC,QAAA,IAAI,CAAC,cAAc,GAAG,cAAc,CAAC;KACxC;IAEM,MAAM,+BAA+B,CACxC,sBAA8C,EAC9C,iBAAoC,EACpC,aAAwB,EACxB,kBAA4B,EAAA;AAE5B,QAAA,IAAI,CAAC,qBAAqB,CAAC,cAAc,EAAE;AACvC,YAAA,qBAAqB,CAAC,cAAc;gBAChC,IAAI,CAAC,2BAA2B,CAC5B,IAAI,CAAC,MAAM,EACX,IAAI,CAAC,WAAW,EAChB,IAAI,CAAC,aAAa,EAClB,IAAI,CAAC,cAAc,EACnB,iBAAiB,CACpB,CAAC;AACT,SAAA;AAED,QAAA,OAAO,qBAAqB,CAAC,cAAc,CAAC,+BAA+B,CACvE,sBAAsB,EACtB,iBAAiB,EACjB,aAAa,EACb,kBAAkB,CACrB,CAAC;KACL;AAEO,IAAA,iCAA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AC,SAAS,CAAC,MAAM,EAAE,WAAW,EAAE,aAAa,EAAE,cAAc,CAAC,CAAC;QACvE,IAAI,CAAC,MAAM,EAAE;AACT,YAAA,MAAMC,+CAA0B,CAC5BC,8CAA8C,CACjD,CAAC;AACL,SAAA;AACD,QAAA,OAAO,MAAM,CAAC;KACjB;AACJ;;;;"}
@@ -1,58 +0,0 @@
1
- /*! @azure/msal-node v2.13.0 2024-08-13 */
2
- 'use strict';
3
- 'use strict';
4
-
5
- Object.defineProperty(exports, '__esModule', { value: true });
6
-
7
- var BaseManagedIdentitySource = require('./BaseManagedIdentitySource.cjs');
8
- var Constants = require('../../utils/Constants.cjs');
9
- var ManagedIdentityRequestParameters = require('../../config/ManagedIdentityRequestParameters.cjs');
10
-
11
- /*
12
- * Copyright (c) Microsoft Corporation. All rights reserved.
13
- * Licensed under the MIT License.
14
- */
15
- // MSI Constants. Docs for MSI are available here https://docs.microsoft.com/azure/app-service/overview-managed-identity
16
- const APP_SERVICE_MSI_API_VERSION = "2019-08-01";
17
- /**
18
- * Original source of code: https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/identity/Azure.Identity/src/AppServiceManagedIdentitySource.cs
19
- */
20
- class AppService extends BaseManagedIdentitySource.BaseManagedIdentitySource {
21
- constructor(logger, nodeStorage, networkClient, cryptoProvider, identityEndpoint, identityHeader) {
22
- super(logger, nodeStorage, networkClient, cryptoProvider);
23
- this.identityEndpoint = identityEndpoint;
24
- this.identityHeader = identityHeader;
25
- }
26
- static getEnvironmentVariables() {
27
- const identityEndpoint = process.env[Constants.ManagedIdentityEnvironmentVariableNames.IDENTITY_ENDPOINT];
28
- const identityHeader = process.env[Constants.ManagedIdentityEnvironmentVariableNames.IDENTITY_HEADER];
29
- return [identityEndpoint, identityHeader];
30
- }
31
- static tryCreate(logger, nodeStorage, networkClient, cryptoProvider) {
32
- const [identityEndpoint, identityHeader] = AppService.getEnvironmentVariables();
33
- // if either of the identity endpoint or identity header variables are undefined, this MSI provider is unavailable.
34
- if (!identityEndpoint || !identityHeader) {
35
- logger.info(`[Managed Identity] ${Constants.ManagedIdentitySourceNames.APP_SERVICE} managed identity is unavailable because one or both of the '${Constants.ManagedIdentityEnvironmentVariableNames.IDENTITY_HEADER}' and '${Constants.ManagedIdentityEnvironmentVariableNames.IDENTITY_ENDPOINT}' environment variables are not defined.`);
36
- return null;
37
- }
38
- const validatedIdentityEndpoint = AppService.getValidatedEnvVariableUrlString(Constants.ManagedIdentityEnvironmentVariableNames.IDENTITY_ENDPOINT, identityEndpoint, Constants.ManagedIdentitySourceNames.APP_SERVICE, logger);
39
- logger.info(`[Managed Identity] Environment variables validation passed for ${Constants.ManagedIdentitySourceNames.APP_SERVICE} managed identity. Endpoint URI: ${validatedIdentityEndpoint}. Creating ${Constants.ManagedIdentitySourceNames.APP_SERVICE} managed identity.`);
40
- return new AppService(logger, nodeStorage, networkClient, cryptoProvider, identityEndpoint, identityHeader);
41
- }
42
- createRequest(resource, managedIdentityId) {
43
- const request = new ManagedIdentityRequestParameters.ManagedIdentityRequestParameters(Constants.HttpMethod.GET, this.identityEndpoint);
44
- request.headers[Constants.APP_SERVICE_SECRET_HEADER_NAME] = this.identityHeader;
45
- request.queryParameters[Constants.API_VERSION_QUERY_PARAMETER_NAME] =
46
- APP_SERVICE_MSI_API_VERSION;
47
- request.queryParameters[Constants.RESOURCE_BODY_OR_QUERY_PARAMETER_NAME] =
48
- resource;
49
- if (managedIdentityId.idType !== Constants.ManagedIdentityIdType.SYSTEM_ASSIGNED) {
50
- request.queryParameters[this.getManagedIdentityUserAssignedIdQueryParameterKey(managedIdentityId.idType)] = managedIdentityId.id;
51
- }
52
- // bodyParameters calculated in BaseManagedIdentity.acquireTokenWithManagedIdentity
53
- return request;
54
- }
55
- }
56
-
57
- exports.AppService = AppService;
58
- //# sourceMappingURL=AppService.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"AppService.cjs","sources":["../../../src/client/ManagedIdentitySources/AppService.ts"],"sourcesContent":[null],"names":["BaseManagedIdentitySource","ManagedIdentityEnvironmentVariableNames","ManagedIdentitySourceNames","ManagedIdentityRequestParameters","HttpMethod","APP_SERVICE_SECRET_HEADER_NAME","API_VERSION_QUERY_PARAMETER_NAME","RESOURCE_BODY_OR_QUERY_PARAMETER_NAME","ManagedIdentityIdType"],"mappings":";;;;;;;;;;AAAA;;;AAGG;AAkBH;AACA,MAAM,2BAA2B,GAAW,YAAY,CAAC;AAEzD;;AAEG;AACG,MAAO,UAAW,SAAQA,mDAAyB,CAAA;IAIrD,WACI,CAAA,MAAc,EACd,WAAwB,EACxB,aAA6B,EAC7B,cAA8B,EAC9B,gBAAwB,EACxB,cAAsB,EAAA;QAEtB,KAAK,CAAC,MAAM,EAAE,WAAW,EAAE,aAAa,EAAE,cAAc,CAAC,CAAC;AAE1D,QAAA,IAAI,CAAC,gBAAgB,GAAG,gBAAgB,CAAC;AACzC,QAAA,IAAI,CAAC,cAAc,GAAG,cAAc,CAAC;KACxC;AAEM,IAAA,OAAO,uBAAuB,GAAA;QACjC,MAAM,gBAAgB,GAClB,OAAO,CAAC,GAAG,CACPC,iDAAuC,CAAC,iBAAiB,CAC5D,CAAC;QACN,MAAM,cAAc,GAChB,OAAO,CAAC,GAAG,CACPA,iDAAuC,CAAC,eAAe,CAC1D,CAAC;AAEN,QAAA,OAAO,CAAC,gBAAgB,EAAE,cAAc,CAAC,CAAC;KAC7C;IAEM,OAAO,SAAS,CACnB,MAAc,EACd,WAAwB,EACxB,aAA6B,EAC7B,cAA8B,EAAA;QAE9B,MAAM,CAAC,gBAAgB,EAAE,cAAc,CAAC,GACpC,UAAU,CAAC,uBAAuB,EAAE,CAAC;;AAGzC,QAAA,IAAI,CAAC,gBAAgB,IAAI,CAAC,cAAc,EAAE;AACtC,YAAA,MAAM,CAAC,IAAI,CACP,CAAsB,mBAAA,EAAAC,oCAA0B,CAAC,WAAW,CAAA,6DAAA,EAAgED,iDAAuC,CAAC,eAAe,CAAU,OAAA,EAAAA,iDAAuC,C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- 'use strict';
4
-
5
- Object.defineProperty(exports, '__esModule', { value: true });
6
-
7
- var msalCommon = require('@azure/msal-common');
8
- var ManagedIdentityRequestParameters = require('../../config/ManagedIdentityRequestParameters.cjs');
9
- var BaseManagedIdentitySource = require('./BaseManagedIdentitySource.cjs');
10
- var ManagedIdentityError = require('../../error/ManagedIdentityError.cjs');
11
- var Constants = require('../../utils/Constants.cjs');
12
- var fs = require('fs');
13
- var path = require('path');
14
- var ManagedIdentityErrorCodes = require('../../error/ManagedIdentityErrorCodes.cjs');
15
-
16
- function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
17
-
18
- var path__default = /*#__PURE__*/_interopDefaultLegacy(path);
19
-
20
- /*
21
- * Copyright (c) Microsoft Corporation. All rights reserved.
22
- * Licensed under the MIT License.
23
- */
24
- const ARC_API_VERSION = "2019-11-01";
25
- const DEFAULT_AZURE_ARC_IDENTITY_ENDPOINT = "http://127.0.0.1:40342/metadata/identity/oauth2/token";
26
- const HIMDS_EXECUTABLE_HELPER_STRING = "N/A: himds executable exists";
27
- const SUPPORTED_AZURE_ARC_PLATFORMS = {
28
- win32: `${process.env["ProgramData"]}\\AzureConnectedMachineAgent\\Tokens\\`,
29
- linux: "/var/opt/azcmagent/tokens/",
30
- };
31
- const AZURE_ARC_FILE_DETECTION = {
32
- win32: `${process.env["ProgramFiles"]}\\AzureConnectedMachineAgent\\himds.exe`,
33
- linux: "/opt/azcmagent/bin/himds",
34
- };
35
- /**
36
- * Original source of code: https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/identity/Azure.Identity/src/AzureArcManagedIdentitySource.cs
37
- */
38
- class AzureArc extends BaseManagedIdentitySource.BaseManagedIdentitySource {
39
- constructor(logger, nodeStorage, networkClient, cryptoProvider, identityEndpoint) {
40
- super(logger, nodeStorage, networkClient, cryptoProvider);
41
- this.identityEndpoint = identityEndpoint;
42
- }
43
- static getEnvironmentVariables() {
44
- let identityEndpoint = process.env[Constants.ManagedIdentityEnvironmentVariableNames.IDENTITY_ENDPOINT];
45
- let imdsEndpoint = process.env[Constants.ManagedIdentityEnvironmentVariableNames.IMDS_ENDPOINT];
46
- // if either of the identity or imds endpoints are undefined, check if the himds executable exists
47
- if (!identityEndpoint || !imdsEndpoint) {
48
- // get the expected Windows or Linux file path of the himds executable
49
- const fileDetectionPath = AZURE_ARC_FILE_DETECTION[process.platform];
50
- try {
51
- /*
52
- * check if the himds executable exists and its permissions allow it to be read
53
- * returns undefined if true, throws an error otherwise
54
- */
55
- fs.accessSync(fileDetectionPath, fs.constants.F_OK | fs.constants.R_OK);
56
- identityEndpoint = DEFAULT_AZURE_ARC_IDENTITY_ENDPOINT;
57
- imdsEndpoint = HIMDS_EXECUTABLE_HELPER_STRING;
58
- }
59
- catch (err) {
60
- /*
61
- * do nothing
62
- * accessSync returns undefined on success, and throws an error on failure
63
- */
64
- }
65
- }
66
- return [identityEndpoint, imdsEndpoint];
67
- }
68
- static tryCreate(logger, nodeStorage, networkClient, cryptoProvider, managedIdentityId) {
69
- const [identityEndpoint, imdsEndpoint] = AzureArc.getEnvironmentVariables();
70
- // if either of the identity or imds endpoints are undefined (even after himds file detection)
71
- if (!identityEndpoint || !imdsEndpoint) {
72
- logger.info(`[Managed Identity] ${Constants.ManagedIdentitySourceNames.AZURE_ARC} managed identity is unavailable through environment variables because one or both of '${Constants.ManagedIdentityEnvironmentVariableNames.IDENTITY_ENDPOINT}' and '${Constants.ManagedIdentityEnvironmentVariableNames.IMDS_ENDPOINT}' are not defined. ${Constants.ManagedIdentitySourceNames.AZURE_ARC} managed identity is also unavailable through file detection.`);
73
- return null;
74
- }
75
- // check if the imds endpoint is set to the default for file detection
76
- if (imdsEndpoint === HIMDS_EXECUTABLE_HELPER_STRING) {
77
- logger.info(`[Managed Identity] ${Constants.ManagedIdentitySourceNames.AZURE_ARC} managed identity is available through file detection. Defaulting to known ${Constants.ManagedIdentitySourceNames.AZURE_ARC} endpoint: ${DEFAULT_AZURE_ARC_IDENTITY_ENDPOINT}. Creating ${Constants.ManagedIdentitySourceNames.AZURE_ARC} managed identity.`);
78
- }
79
- else {
80
- // otherwise, both the identity and imds endpoints are defined without file detection; validate them
81
- const validatedIdentityEndpoint = AzureArc.getValidatedEnvVariableUrlString(Constants.ManagedIdentityEnvironmentVariableNames.IDENTITY_ENDPOINT, identityEndpoint, Constants.ManagedIdentitySourceNames.AZURE_ARC, logger);
82
- // remove trailing slash
83
- validatedIdentityEndpoint.endsWith("/")
84
- ? validatedIdentityEndpoint.slice(0, -1)
85
- : validatedIdentityEndpoint;
86
- AzureArc.getValidatedEnvVariableUrlString(Constants.ManagedIdentityEnvironmentVariableNames.IMDS_ENDPOINT, imdsEndpoint, Constants.ManagedIdentitySourceNames.AZURE_ARC, logger);
87
- logger.info(`[Managed Identity] Environment variables validation passed for ${Constants.ManagedIdentitySourceNames.AZURE_ARC} managed identity. Endpoint URI: ${validatedIdentityEndpoint}. Creating ${Constants.ManagedIdentitySourceNames.AZURE_ARC} managed identity.`);
88
- }
89
- if (managedIdentityId.idType !== Constants.ManagedIdentityIdType.SYSTEM_ASSIGNED) {
90
- throw ManagedIdentityError.createManagedIdentityError(ManagedIdentityErrorCodes.unableToCreateAzureArc);
91
- }
92
- return new AzureArc(logger, nodeStorage, networkClient, cryptoProvider, identityEndpoint);
93
- }
94
- createRequest(resource) {
95
- const request = new ManagedIdentityRequestParameters.ManagedIdentityRequestParameters(Constants.HttpMethod.GET, this.identityEndpoint.replace("localhost", "127.0.0.1"));
96
- request.headers[Constants.METADATA_HEADER_NAME] = "true";
97
- request.queryParameters[Constants.API_VERSION_QUERY_PARAMETER_NAME] =
98
- ARC_API_VERSION;
99
- request.queryParameters[Constants.RESOURCE_BODY_OR_QUERY_PARAMETER_NAME] =
100
- resource;
101
- // bodyParameters calculated in BaseManagedIdentity.acquireTokenWithManagedIdentity
102
- return request;
103
- }
104
- async getServerTokenResponseAsync(originalResponse, networkClient, networkRequest, networkRequestOptions) {
105
- let retryResponse;
106
- if (originalResponse.status === msalCommon.HttpStatus.UNAUTHORIZED) {
107
- const wwwAuthHeader = originalResponse.headers["www-authenticate"];
108
- if (!wwwAuthHeader) {
109
- throw ManagedIdentityError.createManagedIdentityError(ManagedIdentityErrorCodes.wwwAuthenticateHeaderMissing);
110
- }
111
- if (!wwwAuthHeader.includes("Basic realm=")) {
112
- throw ManagedIdentityError.createManagedIdentityError(ManagedIdentityErrorCodes.wwwAuthenticateHeaderUnsupportedFormat);
113
- }
114
- const secretFilePath = wwwAuthHeader.split("Basic realm=")[1];
115
- // throw an error if the managed identity application is not being run on Windows or Linux
116
- if (!SUPPORTED_AZURE_ARC_PLATFORMS.hasOwnProperty(process.platform)) {
117
- throw ManagedIdentityError.createManagedIdentityError(ManagedIdentityErrorCodes.platformNotSupported);
118
- }
119
- // get the expected Windows or Linux file path
120
- const expectedSecretFilePath = SUPPORTED_AZURE_ARC_PLATFORMS[process.platform];
121
- // throw an error if the file in the file path is not a .key file
122
- const fileName = path__default["default"].basename(secretFilePath);
123
- if (!fileName.endsWith(".key")) {
124
- throw ManagedIdentityError.createManagedIdentityError(ManagedIdentityErrorCodes.invalidFileExtension);
125
- }
126
- /*
127
- * throw an error if the file path from the www-authenticate header does not match the
128
- * expected file path for the platform (Windows or Linux) the managed identity application
129
- * is running on
130
- */
131
- if (expectedSecretFilePath + fileName !== secretFilePath) {
132
- throw ManagedIdentityError.createManagedIdentityError(ManagedIdentityErrorCodes.invalidFilePath);
133
- }
134
- let secretFileSize;
135
- // attempt to get the secret file's size, in bytes
136
- try {
137
- secretFileSize = await fs.statSync(secretFilePath).size;
138
- }
139
- catch (e) {
140
- throw ManagedIdentityError.createManagedIdentityError(ManagedIdentityErrorCodes.unableToReadSecretFile);
141
- }
142
- // throw an error if the secret file's size is greater than 4096 bytes
143
- if (secretFileSize > Constants.AZURE_ARC_SECRET_FILE_MAX_SIZE_BYTES) {
144
- throw ManagedIdentityError.createManagedIdentityError(ManagedIdentityErrorCodes.invalidSecret);
145
- }
146
- // attempt to read the contents of the secret file
147
- let secret;
148
- try {
149
- secret = fs.readFileSync(secretFilePath, "utf-8");
150
- }
151
- catch (e) {
152
- throw ManagedIdentityError.createManagedIdentityError(ManagedIdentityErrorCodes.unableToReadSecretFile);
153
- }
154
- const authHeaderValue = `Basic ${secret}`;
155
- this.logger.info(`[Managed Identity] Adding authorization header to the request.`);
156
- networkRequest.headers[Constants.AUTHORIZATION_HEADER_NAME] = authHeaderValue;
157
- try {
158
- retryResponse =
159
- await networkClient.sendGetRequestAsync(networkRequest.computeUri(), networkRequestOptions);
160
- }
161
- catch (error) {
162
- if (error instanceof msalCommon.AuthError) {
163
- throw error;
164
- }
165
- else {
166
- throw msalCommon.createClientAuthError(msalCommon.ClientAuthErrorCodes.networkError);
167
- }
168
- }
169
- }
170
- return this.getServerTokenResponse(retryResponse || originalResponse);
171
- }
172
- }
173
-
174
- exports.ARC_API_VERSION = ARC_API_VERSION;
175
- exports.AZURE_ARC_FILE_DETECTION = AZURE_ARC_FILE_DETECTION;
176
- exports.AzureArc = AzureArc;
177
- exports.DEFAULT_AZURE_ARC_IDENTITY_ENDPOINT = DEFAULT_AZURE_ARC_IDENTITY_ENDPOINT;
178
- exports.SUPPORTED_AZURE_ARC_PLATFORMS = SUPPORTED_AZURE_ARC_PLATFORMS;
179
- //# sourceMappingURL=AzureArc.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"AzureArc.cjs","sources":["../../../src/client/ManagedIdentitySources/AzureArc.ts"],"sourcesContent":[null],"names":["BaseManagedIdentitySource","ManagedIdentityEnvironmentVariableNames","accessSync","fsConstants","ManagedIdentitySourceNames","ManagedIdentityIdType","createManagedIdentityError","ManagedIdentityErrorCodes.unableToCreateAzureArc","ManagedIdentityRequestParameters","HttpMethod","METADATA_HEADER_NAME","API_VERSION_QUERY_PARAMETER_NAME","RESOURCE_BODY_OR_QUERY_PARAMETER_NAME","HttpStatus","ManagedIdentityErrorCodes.wwwAuthenticateHeaderMissing","ManagedIdentityErrorCodes.wwwAuthenticateHeaderUnsupportedFormat","ManagedIdentityErrorCodes.platformNotSupported","path","ManagedIdentityErrorCodes.invalidFileExtension","ManagedIdentityErrorCodes.invalidFilePath","statSync","ManagedIdentityErrorCodes.unableToReadSecretFile","AZURE_ARC_SECRET_FILE_MAX_SIZE_BYTES","ManagedIdentityErrorCodes.invalidSecret","readFileSync","AUTHORIZATION_HEADER_NAME","AuthError","createClientAuthError","ClientAuthErrorCodes"],"mappings":";;;;;;;;;;;;;;;;;;;AAAA;;;AAGG;AA0CI,MAAM,eAAe,GAAW,aAAa;AAC7C,MAAM,mCAAmC,GAC5C,wDAAwD;AAC5D,MAAM,8BAA8B,GAAG,8BAA8B,CAAC;AAOzD,MAAA,6BAA6B,GAAgB;IACtD,KAAK,EAAE,GAAG,OAAO,CAAC,GAAG,CAAC,aAAa,CAAC,CAAwC,sCAAA,CAAA;AAC5E,IAAA,KAAK,EAAE,4BAA4B;EACrC;AAEW,MAAA,wBAAwB,GAAgB;IACjD,KAAK,EAAE,GAAG,OAAO,CAAC,GAAG,CAAC,cAAc,CAAC,CAAyC,uCAAA,CAAA;AAC9E,IAAA,KAAK,EAAE,0BAA0B;EACnC;AAEF;;AAEG;AACG,MAAO,QAAS,SAAQA,mDAAyB,CAAA;IAGnD,WACI,CAAA,MAAc,EACd,WAAwB,EACxB,aAA6B,EAC7B,cAA8B,EAC9B,gBAAwB,EAAA;QAExB,KAAK,CAAC,MAAM,EAAE,WAAW,EAAE,aAAa,EAAE,cAAc,CAAC,CAAC;AAE1D,QAAA,IAAI,CAAC,gBAAgB,GAAG,gBAAgB,CAAC;KAC5C;AAEM,IAAA,OAAO,uBAAuB,GAAA;QACjC,IAAI,gBAAgB,GAChB,OAAO,CAAC,GAAG,CACPC,iDAAuC,CAAC,iBAAiB,CAC5D,CAAC;QACN,IAAI,YAAY,GACZ,OAAO,CAAC,GAAG,CAACA,iDAAuC,CAAC,aAAa,CAAC,CAAC;;AAGvE,QAAA,IAAI,C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.defineProperty(exports, '__esModule', { value: true });
6
-
7
- var msalCommon = require('@azure/msal-common');
8
- var Constants = require('../../utils/Constants.cjs');
9
- var ManagedIdentityError = require('../../error/ManagedIdentityError.cjs');
10
- var ManagedIdentityErrorCodes = require('../../error/ManagedIdentityErrorCodes.cjs');
11
-
12
- /*
13
- * Copyright (c) Microsoft Corporation. All rights reserved.
14
- * Licensed under the MIT License.
15
- */
16
- /**
17
- * Managed Identity User Assigned Id Query Parameter Names
18
- */
19
- const ManagedIdentityUserAssignedIdQueryParameterNames = {
20
- MANAGED_IDENTITY_CLIENT_ID: "client_id",
21
- MANAGED_IDENTITY_OBJECT_ID: "object_id",
22
- MANAGED_IDENTITY_RESOURCE_ID: "mi_res_id",
23
- };
24
- class BaseManagedIdentitySource {
25
- constructor(logger, nodeStorage, networkClient, cryptoProvider) {
26
- this.logger = logger;
27
- this.nodeStorage = nodeStorage;
28
- this.networkClient = networkClient;
29
- this.cryptoProvider = cryptoProvider;
30
- }
31
- async getServerTokenResponseAsync(response,
32
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
33
- _networkClient,
34
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
35
- _networkRequest,
36
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
37
- _networkRequestOptions) {
38
- return this.getServerTokenResponse(response);
39
- }
40
- getServerTokenResponse(response) {
41
- let refreshIn, expiresIn;
42
- if (response.body.expires_on) {
43
- expiresIn = response.body.expires_on - msalCommon.TimeUtils.nowSeconds();
44
- // compute refresh_in as 1/2 of expires_in, but only if expires_in > 2h
45
- if (expiresIn > 2 * 3600) {
46
- refreshIn = expiresIn / 2;
47
- }
48
- }
49
- const serverTokenResponse = {
50
- status: response.status,
51
- // success
52
- access_token: response.body.access_token,
53
- expires_in: expiresIn,
54
- scope: response.body.resource,
55
- token_type: response.body.token_type,
56
- refresh_in: refreshIn,
57
- // error
58
- correlation_id: response.body.correlation_id || response.body.correlationId,
59
- error: typeof response.body.error === "string"
60
- ? response.body.error
61
- : response.body.error?.code,
62
- error_description: response.body.message ||
63
- (typeof response.body.error === "string"
64
- ? response.body.error_description
65
- : response.body.error?.message),
66
- error_codes: response.body.error_codes,
67
- timestamp: response.body.timestamp,
68
- trace_id: response.body.trace_id,
69
- };
70
- return serverTokenResponse;
71
- }
72
- async acquireTokenWithManagedIdentity(managedIdentityRequest, managedIdentityId, fakeAuthority, refreshAccessToken) {
73
- const networkRequest = this.createRequest(managedIdentityRequest.resource, managedIdentityId);
74
- const headers = networkRequest.headers;
75
- headers[msalCommon.HeaderNames.CONTENT_TYPE] = msalCommon.Constants.URL_FORM_CONTENT_TYPE;
76
- const networkRequestOptions = { headers };
77
- if (Object.keys(networkRequest.bodyParameters).length) {
78
- networkRequestOptions.body =
79
- networkRequest.computeParametersBodyString();
80
- }
81
- const reqTimestamp = msalCommon.TimeUtils.nowSeconds();
82
- let response;
83
- try {
84
- // Sources that send POST requests: Cloud Shell
85
- if (networkRequest.httpMethod === Constants.HttpMethod.POST) {
86
- response =
87
- await this.networkClient.sendPostRequestAsync(networkRequest.computeUri(), networkRequestOptions);
88
- // Sources that send GET requests: App Service, Azure Arc, IMDS, Service Fabric
89
- }
90
- else {
91
- response =
92
- await this.networkClient.sendGetRequestAsync(networkRequest.computeUri(), networkRequestOptions);
93
- }
94
- }
95
- catch (error) {
96
- if (error instanceof msalCommon.AuthError) {
97
- throw error;
98
- }
99
- else {
100
- throw msalCommon.createClientAuthError(msalCommon.ClientAuthErrorCodes.networkError);
101
- }
102
- }
103
- const responseHandler = new msalCommon.ResponseHandler(managedIdentityId.id, this.nodeStorage, this.cryptoProvider, this.logger, null, null);
104
- const serverTokenResponse = await this.getServerTokenResponseAsync(response, this.networkClient, networkRequest, networkRequestOptions);
105
- responseHandler.validateTokenResponse(serverTokenResponse, refreshAccessToken);
106
- // caches the token
107
- return responseHandler.handleServerTokenResponse(serverTokenResponse, fakeAuthority, reqTimestamp, managedIdentityRequest);
108
- }
109
- getManagedIdentityUserAssignedIdQueryParameterKey(managedIdentityIdType) {
110
- switch (managedIdentityIdType) {
111
- case Constants.ManagedIdentityIdType.USER_ASSIGNED_CLIENT_ID:
112
- this.logger.info("[Managed Identity] Adding user assigned client id to the request.");
113
- return ManagedIdentityUserAssignedIdQueryParameterNames.MANAGED_IDENTITY_CLIENT_ID;
114
- case Constants.ManagedIdentityIdType.USER_ASSIGNED_RESOURCE_ID:
115
- this.logger.info("[Managed Identity] Adding user assigned resource id to the request.");
116
- return ManagedIdentityUserAssignedIdQueryParameterNames.MANAGED_IDENTITY_RESOURCE_ID;
117
- case Constants.ManagedIdentityIdType.USER_ASSIGNED_OBJECT_ID:
118
- this.logger.info("[Managed Identity] Adding user assigned object id to the request.");
119
- return ManagedIdentityUserAssignedIdQueryParameterNames.MANAGED_IDENTITY_OBJECT_ID;
120
- default:
121
- throw ManagedIdentityError.createManagedIdentityError(ManagedIdentityErrorCodes.invalidManagedIdentityIdType);
122
- }
123
- }
124
- }
125
- BaseManagedIdentitySource.getValidatedEnvVariableUrlString = (envVariableStringName, envVariable, sourceName, logger) => {
126
- try {
127
- return new msalCommon.UrlString(envVariable).urlString;
128
- }
129
- catch (error) {
130
- logger.info(`[Managed Identity] ${sourceName} managed identity is unavailable because the '${envVariableStringName}' environment variable is malformed.`);
131
- throw ManagedIdentityError.createManagedIdentityError(ManagedIdentityErrorCodes.MsiEnvironmentVariableUrlMalformedErrorCodes[envVariableStringName]);
132
- }
133
- };
134
-
135
- exports.BaseManagedIdentitySource = BaseManagedIdentitySource;
136
- exports.ManagedIdentityUserAssignedIdQueryParameterNames = ManagedIdentityUserAssignedIdQueryParameterNames;
137
- //# sourceMappingURL=BaseManagedIdentitySource.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"BaseManagedIdentitySource.cjs","sources":["../../../src/client/ManagedIdentitySources/BaseManagedIdentitySource.ts"],"sourcesContent":[null],"names":["TimeUtils","HeaderNames","Constants","HttpMethod","AuthError","createClientAuthError","ClientAuthErrorCodes","ResponseHandler","ManagedIdentityIdType","createManagedIdentityError","ManagedIdentityErrorCodes.invalidManagedIdentityIdType","UrlString","ManagedIdentityErrorCodes\r\n .MsiEnvironmentVariableUrlMalformedErrorCodes"],"mappings":";;;;;;;;;;;AAAA;;;AAGG;AA+BH;;AAEG;AACU,MAAA,gDAAgD,GAAG;AAC5D,IAAA,0BAA0B,EAAE,WAAW;AACvC,IAAA,0BAA0B,EAAE,WAAW;AACvC,IAAA,4BAA4B,EAAE,WAAW;EAClC;MAIW,yBAAyB,CAAA;AAM3C,IAAA,WAAA,CACI,MAAc,EACd,WAAwB,EACxB,aAA6B,EAC7B,cAA8B,EAAA;AAE9B,QAAA,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;AACrB,QAAA,IAAI,CAAC,WAAW,GAAG,WAAW,CAAC;AAC/B,QAAA,IAAI,CAAC,aAAa,GAAG,aAAa,CAAC;AACnC,QAAA,IAAI,CAAC,cAAc,GAAG,cAAc,CAAC;KACxC;IAOM,MAAM,2BAA2B,CACpC,QAAuD;;IAEvD,cAA8B;;IAE9B,eAAiD;;IAEjD,sBAA6C,EAAA;AAE7C,QAAA,OAAO,IAAI,CAAC,sBAAsB,CAAC,QAAQ,CAAC,CAAC;KAChD;AAEM,IAAA,sBAAsB,CACzB,QAAuD,EAAA;QAEvD,IAAI,SAAS,EAAE,SAA6B,CAAC;AAC7C,QAAA,IAAI,QAAQ,CAAC,IAAI,CAAC,UAAU,EAAE;YAC1B,SAAS,GAAG,QAAQ,CAAC,IAAI,CAAC,UAAU,GAAGA,oBAAS,CAAC,UAAU,EAAE,CAAC;;AAG9D,YAAA,IAAI,SAAS,GAAG,CAAC,GAAG,IAAI,EAAE;AACtB,gBAAA,SAAS,GAAG,SAAS,GAAG,CAAC,CAAC;AAC7B,aAAA;AACJ,SAAA;AAED,QAAA,MAAM,mBAAmB,GAAqC;YAC1D,MAAM,EAAE,QAAQ,CAAC,MAAM;;AAGvB,YAAA,YAAY,EAAE,QAAQ,CAAC,IAAI,CA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