@azure/msal-node 2.13.1 → 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 (415) 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 +2 -2
  32. package/dist/client/DeviceCodeClient.d.ts +1 -1
  33. package/dist/client/DeviceCodeClient.d.ts.map +1 -1
  34. package/dist/client/DeviceCodeClient.mjs +2 -2
  35. package/dist/client/IConfidentialClientApplication.d.ts +1 -1
  36. package/dist/client/IConfidentialClientApplication.d.ts.map +1 -1
  37. package/dist/client/IPublicClientApplication.d.ts +1 -1
  38. package/dist/client/IPublicClientApplication.d.ts.map +1 -1
  39. package/dist/client/ManagedIdentityApplication.d.ts +4 -4
  40. package/dist/client/ManagedIdentityApplication.d.ts.map +1 -1
  41. package/dist/client/ManagedIdentityApplication.mjs +2 -2
  42. package/dist/client/ManagedIdentityClient.d.ts +6 -6
  43. package/dist/client/ManagedIdentityClient.d.ts.map +1 -1
  44. package/dist/client/ManagedIdentityClient.mjs +1 -1
  45. package/dist/client/ManagedIdentitySources/AppService.d.ts +6 -6
  46. package/dist/client/ManagedIdentitySources/AppService.d.ts.map +1 -1
  47. package/dist/client/ManagedIdentitySources/AppService.mjs +1 -1
  48. package/dist/client/ManagedIdentitySources/AzureArc.d.ts +7 -7
  49. package/dist/client/ManagedIdentitySources/AzureArc.d.ts.map +1 -1
  50. package/dist/client/ManagedIdentitySources/AzureArc.mjs +2 -2
  51. package/dist/client/ManagedIdentitySources/BaseManagedIdentitySource.d.ts +8 -8
  52. package/dist/client/ManagedIdentitySources/BaseManagedIdentitySource.d.ts.map +1 -1
  53. package/dist/client/ManagedIdentitySources/BaseManagedIdentitySource.mjs +2 -2
  54. package/dist/client/ManagedIdentitySources/CloudShell.d.ts +6 -6
  55. package/dist/client/ManagedIdentitySources/CloudShell.d.ts.map +1 -1
  56. package/dist/client/ManagedIdentitySources/CloudShell.mjs +1 -1
  57. package/dist/client/ManagedIdentitySources/Imds.d.ts +6 -6
  58. package/dist/client/ManagedIdentitySources/Imds.d.ts.map +1 -1
  59. package/dist/client/ManagedIdentitySources/Imds.mjs +1 -1
  60. package/dist/client/ManagedIdentitySources/ServiceFabric.d.ts +6 -6
  61. package/dist/client/ManagedIdentitySources/ServiceFabric.d.ts.map +1 -1
  62. package/dist/client/ManagedIdentitySources/ServiceFabric.mjs +1 -1
  63. package/dist/client/OnBehalfOfClient.d.ts +1 -1
  64. package/dist/client/OnBehalfOfClient.d.ts.map +1 -1
  65. package/dist/client/OnBehalfOfClient.mjs +2 -2
  66. package/dist/client/PublicClientApplication.d.ts +1 -1
  67. package/dist/client/PublicClientApplication.d.ts.map +1 -1
  68. package/dist/client/PublicClientApplication.mjs +2 -2
  69. package/dist/client/UsernamePasswordClient.d.ts +1 -1
  70. package/dist/client/UsernamePasswordClient.d.ts.map +1 -1
  71. package/dist/client/UsernamePasswordClient.mjs +2 -2
  72. package/dist/config/Configuration.d.ts +3 -3
  73. package/dist/config/Configuration.d.ts.map +1 -1
  74. package/dist/config/Configuration.mjs +2 -2
  75. package/dist/config/ManagedIdentityId.d.ts +2 -2
  76. package/dist/config/ManagedIdentityId.d.ts.map +1 -1
  77. package/dist/config/ManagedIdentityId.mjs +1 -1
  78. package/dist/config/ManagedIdentityRequestParameters.d.ts +1 -1
  79. package/dist/config/ManagedIdentityRequestParameters.d.ts.map +1 -1
  80. package/dist/config/ManagedIdentityRequestParameters.mjs +2 -2
  81. package/dist/crypto/CryptoProvider.d.ts +1 -1
  82. package/dist/crypto/CryptoProvider.d.ts.map +1 -1
  83. package/dist/crypto/CryptoProvider.mjs +1 -1
  84. package/dist/crypto/GuidGenerator.d.ts +1 -1
  85. package/dist/crypto/GuidGenerator.d.ts.map +1 -1
  86. package/dist/crypto/GuidGenerator.mjs +1 -1
  87. package/dist/crypto/HashUtils.d.ts +1 -1
  88. package/dist/crypto/HashUtils.mjs +1 -1
  89. package/dist/crypto/PkceGenerator.d.ts +1 -1
  90. package/dist/crypto/PkceGenerator.d.ts.map +1 -1
  91. package/dist/crypto/PkceGenerator.mjs +2 -2
  92. package/dist/error/ManagedIdentityError.d.ts +2 -2
  93. package/dist/error/ManagedIdentityError.d.ts.map +1 -1
  94. package/dist/error/ManagedIdentityError.mjs +2 -2
  95. package/dist/error/ManagedIdentityErrorCodes.mjs +1 -1
  96. package/dist/error/NodeAuthError.d.ts +1 -1
  97. package/dist/error/NodeAuthError.d.ts.map +1 -1
  98. package/dist/error/NodeAuthError.mjs +2 -2
  99. package/dist/index.d.ts +1 -1
  100. package/dist/index.d.ts.map +1 -1
  101. package/dist/index.mjs +2 -2
  102. package/dist/internals.mjs +1 -1
  103. package/dist/network/HttpClient.d.ts +3 -3
  104. package/dist/network/HttpClient.d.ts.map +1 -1
  105. package/dist/network/HttpClient.mjs +2 -2
  106. package/dist/network/HttpClientWithRetries.d.ts +2 -2
  107. package/dist/network/HttpClientWithRetries.d.ts.map +1 -1
  108. package/dist/network/HttpClientWithRetries.mjs +2 -2
  109. package/dist/network/ILoopbackClient.d.ts +1 -1
  110. package/dist/network/ILoopbackClient.d.ts.map +1 -1
  111. package/dist/network/LoopbackClient.d.ts +1 -1
  112. package/dist/network/LoopbackClient.d.ts.map +1 -1
  113. package/dist/network/LoopbackClient.mjs +2 -2
  114. package/dist/packageMetadata.d.ts +1 -1
  115. package/dist/packageMetadata.mjs +2 -2
  116. package/dist/request/AuthorizationCodeRequest.d.ts +1 -1
  117. package/dist/request/AuthorizationCodeRequest.d.ts.map +1 -1
  118. package/dist/request/AuthorizationUrlRequest.d.ts +1 -1
  119. package/dist/request/AuthorizationUrlRequest.d.ts.map +1 -1
  120. package/dist/request/ClientCredentialRequest.d.ts +1 -1
  121. package/dist/request/ClientCredentialRequest.d.ts.map +1 -1
  122. package/dist/request/DeviceCodeRequest.d.ts +1 -1
  123. package/dist/request/DeviceCodeRequest.d.ts.map +1 -1
  124. package/dist/request/InteractiveRequest.d.ts +1 -1
  125. package/dist/request/ManagedIdentityRequest.d.ts +2 -2
  126. package/dist/request/ManagedIdentityRequest.d.ts.map +1 -1
  127. package/dist/request/OnBehalfOfRequest.d.ts +1 -1
  128. package/dist/request/OnBehalfOfRequest.d.ts.map +1 -1
  129. package/dist/request/RefreshTokenRequest.d.ts +1 -1
  130. package/dist/request/RefreshTokenRequest.d.ts.map +1 -1
  131. package/dist/request/SignOutRequest.d.ts +1 -1
  132. package/dist/request/SignOutRequest.d.ts.map +1 -1
  133. package/dist/request/SilentFlowRequest.d.ts +1 -1
  134. package/dist/request/SilentFlowRequest.d.ts.map +1 -1
  135. package/dist/request/UsernamePasswordRequest.d.ts +1 -1
  136. package/dist/request/UsernamePasswordRequest.d.ts.map +1 -1
  137. package/dist/response/ManagedIdentityTokenResponse.d.ts +1 -1
  138. package/dist/response/ManagedIdentityTokenResponse.d.ts.map +1 -1
  139. package/dist/retry/IHttpRetryPolicy.d.ts +1 -1
  140. package/dist/retry/LinearRetryPolicy.d.ts +2 -2
  141. package/dist/retry/LinearRetryPolicy.d.ts.map +1 -1
  142. package/dist/retry/LinearRetryPolicy.mjs +1 -1
  143. package/dist/utils/Constants.mjs +2 -2
  144. package/dist/utils/EncodingUtils.d.ts +1 -1
  145. package/dist/utils/EncodingUtils.mjs +2 -2
  146. package/dist/utils/NetworkUtils.d.ts +1 -1
  147. package/dist/utils/NetworkUtils.d.ts.map +1 -1
  148. package/dist/utils/NetworkUtils.mjs +1 -1
  149. package/dist/utils/NetworkUtils.mjs.map +1 -1
  150. package/lib/msal-node.cjs +12362 -0
  151. package/lib/msal-node.cjs.map +1 -0
  152. package/lib/package.json +1 -0
  153. package/lib/types/cache/ITokenCache.d.ts +16 -0
  154. package/lib/types/cache/ITokenCache.d.ts.map +1 -0
  155. package/lib/types/cache/NodeStorage.d.ts +194 -0
  156. package/lib/types/cache/NodeStorage.d.ts.map +1 -0
  157. package/lib/types/cache/TokenCache.d.ts +91 -0
  158. package/lib/types/cache/TokenCache.d.ts.map +1 -0
  159. package/lib/types/cache/distributed/DistributedCachePlugin.d.ts +11 -0
  160. package/lib/types/cache/distributed/DistributedCachePlugin.d.ts.map +1 -0
  161. package/lib/types/cache/distributed/ICacheClient.d.ts +18 -0
  162. package/lib/types/cache/distributed/ICacheClient.d.ts.map +1 -0
  163. package/lib/types/cache/distributed/IPartitionManager.d.ts +29 -0
  164. package/lib/types/cache/distributed/IPartitionManager.d.ts.map +1 -0
  165. package/lib/types/cache/serializer/Deserializer.d.ts +43 -0
  166. package/lib/types/cache/serializer/Deserializer.d.ts.map +1 -0
  167. package/lib/types/cache/serializer/Serializer.d.ts +40 -0
  168. package/lib/types/cache/serializer/Serializer.d.ts.map +1 -0
  169. package/lib/types/cache/serializer/SerializerTypes.d.ts +103 -0
  170. package/lib/types/cache/serializer/SerializerTypes.d.ts.map +1 -0
  171. package/lib/types/client/ClientApplication.d.ts +144 -0
  172. package/lib/types/client/ClientApplication.d.ts.map +1 -0
  173. package/lib/types/client/ClientAssertion.d.ts +56 -0
  174. package/lib/types/client/ClientAssertion.d.ts.map +1 -0
  175. package/lib/types/client/ClientCredentialClient.d.ts +34 -0
  176. package/lib/types/client/ClientCredentialClient.d.ts.map +1 -0
  177. package/lib/types/client/ConfidentialClientApplication.d.ts +59 -0
  178. package/lib/types/client/ConfidentialClientApplication.d.ts.map +1 -0
  179. package/lib/types/client/DeviceCodeClient.d.ts +54 -0
  180. package/lib/types/client/DeviceCodeClient.d.ts.map +1 -0
  181. package/lib/types/client/IConfidentialClientApplication.d.ts +40 -0
  182. package/lib/types/client/IConfidentialClientApplication.d.ts.map +1 -0
  183. package/lib/types/client/IPublicClientApplication.d.ts +43 -0
  184. package/lib/types/client/IPublicClientApplication.d.ts.map +1 -0
  185. package/lib/types/client/ManagedIdentityApplication.d.ts +31 -0
  186. package/lib/types/client/ManagedIdentityApplication.d.ts.map +1 -0
  187. package/lib/types/client/ManagedIdentityClient.d.ts +28 -0
  188. package/lib/types/client/ManagedIdentityClient.d.ts.map +1 -0
  189. package/lib/types/client/ManagedIdentitySources/AppService.d.ts +18 -0
  190. package/lib/types/client/ManagedIdentitySources/AppService.d.ts.map +1 -0
  191. package/lib/types/client/ManagedIdentitySources/AzureArc.d.ts +28 -0
  192. package/lib/types/client/ManagedIdentitySources/AzureArc.d.ts.map +1 -0
  193. package/lib/types/client/ManagedIdentitySources/BaseManagedIdentitySource.d.ts +31 -0
  194. package/lib/types/client/ManagedIdentitySources/BaseManagedIdentitySource.d.ts.map +1 -0
  195. package/lib/types/client/ManagedIdentitySources/CloudShell.d.ts +17 -0
  196. package/lib/types/client/ManagedIdentitySources/CloudShell.d.ts.map +1 -0
  197. package/lib/types/client/ManagedIdentitySources/Imds.d.ts +13 -0
  198. package/lib/types/client/ManagedIdentitySources/Imds.d.ts.map +1 -0
  199. package/lib/types/client/ManagedIdentitySources/ServiceFabric.d.ts +18 -0
  200. package/lib/types/client/ManagedIdentitySources/ServiceFabric.d.ts.map +1 -0
  201. package/lib/types/client/OnBehalfOfClient.d.ts +48 -0
  202. package/lib/types/client/OnBehalfOfClient.d.ts.map +1 -0
  203. package/lib/types/client/PublicClientApplication.d.ts +73 -0
  204. package/lib/types/client/PublicClientApplication.d.ts.map +1 -0
  205. package/lib/types/client/UsernamePasswordClient.d.ts +26 -0
  206. package/lib/types/client/UsernamePasswordClient.d.ts.map +1 -0
  207. package/lib/types/config/Configuration.d.ts +132 -0
  208. package/lib/types/config/Configuration.d.ts.map +1 -0
  209. package/lib/types/config/ManagedIdentityId.d.ts +12 -0
  210. package/lib/types/config/ManagedIdentityId.d.ts.map +1 -0
  211. package/lib/types/config/ManagedIdentityRequestParameters.d.ts +12 -0
  212. package/lib/types/config/ManagedIdentityRequestParameters.d.ts.map +1 -0
  213. package/lib/types/crypto/CryptoProvider.d.ts +63 -0
  214. package/lib/types/crypto/CryptoProvider.d.ts.map +1 -0
  215. package/lib/types/crypto/GuidGenerator.d.ts +15 -0
  216. package/lib/types/crypto/GuidGenerator.d.ts.map +1 -0
  217. package/lib/types/crypto/HashUtils.d.ts +9 -0
  218. package/lib/types/crypto/HashUtils.d.ts.map +1 -0
  219. package/lib/types/crypto/PkceGenerator.d.ts +23 -0
  220. package/lib/types/crypto/PkceGenerator.d.ts.map +1 -0
  221. package/lib/types/error/ManagedIdentityError.d.ts +31 -0
  222. package/lib/types/error/ManagedIdentityError.d.ts.map +1 -0
  223. package/lib/types/error/ManagedIdentityErrorCodes.d.ts +23 -0
  224. package/lib/types/error/ManagedIdentityErrorCodes.d.ts.map +1 -0
  225. package/lib/types/error/NodeAuthError.d.ts +74 -0
  226. package/lib/types/error/NodeAuthError.d.ts.map +1 -0
  227. package/lib/types/index.d.ts +46 -0
  228. package/lib/types/index.d.ts.map +1 -0
  229. package/lib/types/internals.d.ts +7 -0
  230. package/lib/types/internals.d.ts.map +1 -0
  231. package/lib/types/network/HttpClient.d.ts +26 -0
  232. package/lib/types/network/HttpClient.d.ts.map +1 -0
  233. package/lib/types/network/HttpClientWithRetries.d.ts +12 -0
  234. package/lib/types/network/HttpClientWithRetries.d.ts.map +1 -0
  235. package/lib/types/network/ILoopbackClient.d.ts +11 -0
  236. package/lib/types/network/ILoopbackClient.d.ts.map +1 -0
  237. package/lib/types/network/LoopbackClient.d.ts +22 -0
  238. package/lib/types/network/LoopbackClient.d.ts.map +1 -0
  239. package/lib/types/packageMetadata.d.ts +3 -0
  240. package/lib/types/packageMetadata.d.ts.map +1 -0
  241. package/lib/types/request/AuthorizationCodeRequest.d.ts +22 -0
  242. package/lib/types/request/AuthorizationCodeRequest.d.ts.map +1 -0
  243. package/lib/types/request/AuthorizationUrlRequest.d.ts +34 -0
  244. package/lib/types/request/AuthorizationUrlRequest.d.ts.map +1 -0
  245. package/lib/types/request/ClientCredentialRequest.d.ts +15 -0
  246. package/lib/types/request/ClientCredentialRequest.d.ts.map +1 -0
  247. package/lib/types/request/DeviceCodeRequest.d.ts +16 -0
  248. package/lib/types/request/DeviceCodeRequest.d.ts.map +1 -0
  249. package/lib/types/request/InteractiveRequest.d.ts +23 -0
  250. package/lib/types/request/InteractiveRequest.d.ts.map +1 -0
  251. package/lib/types/request/ManagedIdentityRequest.d.ts +9 -0
  252. package/lib/types/request/ManagedIdentityRequest.d.ts.map +1 -0
  253. package/lib/types/request/ManagedIdentityRequestParams.d.ts +10 -0
  254. package/lib/types/request/ManagedIdentityRequestParams.d.ts.map +1 -0
  255. package/lib/types/request/OnBehalfOfRequest.d.ts +15 -0
  256. package/lib/types/request/OnBehalfOfRequest.d.ts.map +1 -0
  257. package/lib/types/request/RefreshTokenRequest.d.ts +18 -0
  258. package/lib/types/request/RefreshTokenRequest.d.ts.map +1 -0
  259. package/lib/types/request/SignOutRequest.d.ts +6 -0
  260. package/lib/types/request/SignOutRequest.d.ts.map +1 -0
  261. package/lib/types/request/SilentFlowRequest.d.ts +17 -0
  262. package/lib/types/request/SilentFlowRequest.d.ts.map +1 -0
  263. package/lib/types/request/UsernamePasswordRequest.d.ts +20 -0
  264. package/lib/types/request/UsernamePasswordRequest.d.ts.map +1 -0
  265. package/lib/types/response/ManagedIdentityTokenResponse.d.ts +35 -0
  266. package/lib/types/response/ManagedIdentityTokenResponse.d.ts.map +1 -0
  267. package/lib/types/retry/IHttpRetryPolicy.d.ts +6 -0
  268. package/lib/types/retry/IHttpRetryPolicy.d.ts.map +1 -0
  269. package/lib/types/retry/LinearRetryPolicy.d.ts +12 -0
  270. package/lib/types/retry/LinearRetryPolicy.d.ts.map +1 -0
  271. package/lib/types/utils/Constants.d.ts +142 -0
  272. package/lib/types/utils/Constants.d.ts.map +1 -0
  273. package/lib/types/utils/EncodingUtils.d.ts +27 -0
  274. package/lib/types/utils/EncodingUtils.d.ts.map +1 -0
  275. package/lib/types/utils/NetworkUtils.d.ts +6 -0
  276. package/lib/types/utils/NetworkUtils.d.ts.map +1 -0
  277. package/package.json +13 -10
  278. package/src/cache/ITokenCache.ts +1 -1
  279. package/src/cache/NodeStorage.ts +1 -1
  280. package/src/cache/TokenCache.ts +1 -1
  281. package/src/cache/distributed/DistributedCachePlugin.ts +1 -1
  282. package/src/cache/distributed/IPartitionManager.ts +1 -1
  283. package/src/cache/serializer/Deserializer.ts +1 -1
  284. package/src/cache/serializer/Serializer.ts +1 -1
  285. package/src/cache/serializer/SerializerTypes.ts +1 -1
  286. package/src/client/ClientApplication.ts +1 -1
  287. package/src/client/ClientAssertion.ts +1 -1
  288. package/src/client/ClientCredentialClient.ts +2 -2
  289. package/src/client/ConfidentialClientApplication.ts +1 -1
  290. package/src/client/DeviceCodeClient.ts +1 -1
  291. package/src/client/IConfidentialClientApplication.ts +1 -1
  292. package/src/client/IPublicClientApplication.ts +5 -1
  293. package/src/client/ManagedIdentityApplication.ts +9 -9
  294. package/src/client/ManagedIdentityClient.ts +13 -13
  295. package/src/client/ManagedIdentitySources/AppService.ts +7 -7
  296. package/src/client/ManagedIdentitySources/AzureArc.ts +9 -9
  297. package/src/client/ManagedIdentitySources/BaseManagedIdentitySource.ts +9 -9
  298. package/src/client/ManagedIdentitySources/CloudShell.ts +8 -8
  299. package/src/client/ManagedIdentitySources/Imds.ts +7 -7
  300. package/src/client/ManagedIdentitySources/ServiceFabric.ts +7 -7
  301. package/src/client/OnBehalfOfClient.ts +2 -2
  302. package/src/client/PublicClientApplication.ts +2 -2
  303. package/src/client/UsernamePasswordClient.ts +1 -1
  304. package/src/config/Configuration.ts +1 -1
  305. package/src/config/ManagedIdentityId.ts +3 -3
  306. package/src/config/ManagedIdentityRequestParameters.ts +2 -2
  307. package/src/crypto/CryptoProvider.ts +1 -1
  308. package/src/crypto/GuidGenerator.ts +1 -1
  309. package/src/crypto/PkceGenerator.ts +1 -1
  310. package/src/error/ManagedIdentityError.ts +3 -3
  311. package/src/error/ManagedIdentityErrorCodes.ts +1 -1
  312. package/src/error/NodeAuthError.ts +1 -1
  313. package/src/index.ts +1 -1
  314. package/src/network/HttpClient.ts +1 -1
  315. package/src/network/HttpClientWithRetries.ts +3 -3
  316. package/src/network/ILoopbackClient.ts +1 -1
  317. package/src/network/LoopbackClient.ts +1 -1
  318. package/src/packageMetadata.ts +1 -1
  319. package/src/request/AuthorizationCodeRequest.ts +1 -1
  320. package/src/request/AuthorizationUrlRequest.ts +1 -1
  321. package/src/request/ClientCredentialRequest.ts +1 -1
  322. package/src/request/DeviceCodeRequest.ts +1 -1
  323. package/src/request/ManagedIdentityRequest.ts +2 -2
  324. package/src/request/OnBehalfOfRequest.ts +1 -1
  325. package/src/request/RefreshTokenRequest.ts +1 -1
  326. package/src/request/SignOutRequest.ts +1 -1
  327. package/src/request/SilentFlowRequest.ts +1 -1
  328. package/src/request/UsernamePasswordRequest.ts +1 -1
  329. package/src/response/ManagedIdentityTokenResponse.ts +1 -1
  330. package/src/retry/LinearRetryPolicy.ts +1 -1
  331. package/src/utils/Constants.ts +1 -1
  332. package/src/utils/EncodingUtils.ts +1 -1
  333. package/src/utils/NetworkUtils.ts +4 -1
  334. package/dist/cache/NodeStorage.cjs +0 -434
  335. package/dist/cache/NodeStorage.cjs.map +0 -1
  336. package/dist/cache/TokenCache.cjs +0 -276
  337. package/dist/cache/TokenCache.cjs.map +0 -1
  338. package/dist/cache/distributed/DistributedCachePlugin.cjs +0 -35
  339. package/dist/cache/distributed/DistributedCachePlugin.cjs.map +0 -1
  340. package/dist/cache/serializer/Deserializer.cjs +0 -176
  341. package/dist/cache/serializer/Deserializer.cjs.map +0 -1
  342. package/dist/cache/serializer/Serializer.cjs +0 -144
  343. package/dist/cache/serializer/Serializer.cjs.map +0 -1
  344. package/dist/client/ClientApplication.cjs +0 -352
  345. package/dist/client/ClientApplication.cjs.map +0 -1
  346. package/dist/client/ClientAssertion.cjs +0 -155
  347. package/dist/client/ClientAssertion.cjs.map +0 -1
  348. package/dist/client/ClientCredentialClient.cjs +0 -203
  349. package/dist/client/ClientCredentialClient.cjs.map +0 -1
  350. package/dist/client/ConfidentialClientApplication.cjs +0 -183
  351. package/dist/client/ConfidentialClientApplication.cjs.map +0 -1
  352. package/dist/client/DeviceCodeClient.cjs +0 -216
  353. package/dist/client/DeviceCodeClient.cjs.map +0 -1
  354. package/dist/client/ManagedIdentityApplication.cjs +0 -100
  355. package/dist/client/ManagedIdentityApplication.cjs.map +0 -1
  356. package/dist/client/ManagedIdentityClient.cjs +0 -76
  357. package/dist/client/ManagedIdentityClient.cjs.map +0 -1
  358. package/dist/client/ManagedIdentitySources/AppService.cjs +0 -56
  359. package/dist/client/ManagedIdentitySources/AppService.cjs.map +0 -1
  360. package/dist/client/ManagedIdentitySources/AzureArc.cjs +0 -173
  361. package/dist/client/ManagedIdentitySources/AzureArc.cjs.map +0 -1
  362. package/dist/client/ManagedIdentitySources/BaseManagedIdentitySource.cjs +0 -135
  363. package/dist/client/ManagedIdentitySources/BaseManagedIdentitySource.cjs.map +0 -1
  364. package/dist/client/ManagedIdentitySources/CloudShell.cjs +0 -51
  365. package/dist/client/ManagedIdentitySources/CloudShell.cjs.map +0 -1
  366. package/dist/client/ManagedIdentitySources/Imds.cjs +0 -54
  367. package/dist/client/ManagedIdentitySources/Imds.cjs.map +0 -1
  368. package/dist/client/ManagedIdentitySources/ServiceFabric.cjs +0 -65
  369. package/dist/client/ManagedIdentitySources/ServiceFabric.cjs.map +0 -1
  370. package/dist/client/OnBehalfOfClient.cjs +0 -212
  371. package/dist/client/OnBehalfOfClient.cjs.map +0 -1
  372. package/dist/client/PublicClientApplication.cjs +0 -252
  373. package/dist/client/PublicClientApplication.cjs.map +0 -1
  374. package/dist/client/UsernamePasswordClient.cjs +0 -104
  375. package/dist/client/UsernamePasswordClient.cjs.map +0 -1
  376. package/dist/config/Configuration.cjs +0 -122
  377. package/dist/config/Configuration.cjs.map +0 -1
  378. package/dist/config/ManagedIdentityId.cjs +0 -59
  379. package/dist/config/ManagedIdentityId.cjs.map +0 -1
  380. package/dist/config/ManagedIdentityRequestParameters.cjs +0 -37
  381. package/dist/config/ManagedIdentityRequestParameters.cjs.map +0 -1
  382. package/dist/crypto/CryptoProvider.cjs +0 -101
  383. package/dist/crypto/CryptoProvider.cjs.map +0 -1
  384. package/dist/crypto/GuidGenerator.cjs +0 -31
  385. package/dist/crypto/GuidGenerator.cjs.map +0 -1
  386. package/dist/crypto/HashUtils.cjs +0 -23
  387. package/dist/crypto/HashUtils.cjs.map +0 -1
  388. package/dist/crypto/PkceGenerator.cjs +0 -62
  389. package/dist/crypto/PkceGenerator.cjs.map +0 -1
  390. package/dist/error/ManagedIdentityError.cjs +0 -54
  391. package/dist/error/ManagedIdentityError.cjs.map +0 -1
  392. package/dist/error/ManagedIdentityErrorCodes.cjs +0 -47
  393. package/dist/error/ManagedIdentityErrorCodes.cjs.map +0 -1
  394. package/dist/error/NodeAuthError.cjs +0 -105
  395. package/dist/error/NodeAuthError.cjs.map +0 -1
  396. package/dist/index.cjs +0 -123
  397. package/dist/index.cjs.map +0 -1
  398. package/dist/internals.cjs +0 -19
  399. package/dist/internals.cjs.map +0 -1
  400. package/dist/network/HttpClient.cjs +0 -294
  401. package/dist/network/HttpClient.cjs.map +0 -1
  402. package/dist/network/HttpClientWithRetries.cjs +0 -44
  403. package/dist/network/HttpClientWithRetries.cjs.map +0 -1
  404. package/dist/network/LoopbackClient.cjs +0 -93
  405. package/dist/network/LoopbackClient.cjs.map +0 -1
  406. package/dist/packageMetadata.cjs +0 -11
  407. package/dist/packageMetadata.cjs.map +0 -1
  408. package/dist/retry/LinearRetryPolicy.cjs +0 -47
  409. package/dist/retry/LinearRetryPolicy.cjs.map +0 -1
  410. package/dist/utils/Constants.cjs +0 -170
  411. package/dist/utils/Constants.cjs.map +0 -1
  412. package/dist/utils/EncodingUtils.cjs +0 -53
  413. package/dist/utils/EncodingUtils.cjs.map +0 -1
  414. package/dist/utils/NetworkUtils.cjs +0 -45
  415. package/dist/utils/NetworkUtils.cjs.map +0 -1
@@ -1,100 +0,0 @@
1
- /*! @azure/msal-node v2.13.1 2024-08-29 */
2
- 'use strict';
3
- 'use strict';
4
-
5
- var msalCommon = require('@azure/msal-common');
6
- var Configuration = require('../config/Configuration.cjs');
7
- var packageMetadata = require('../packageMetadata.cjs');
8
- var CryptoProvider = require('../crypto/CryptoProvider.cjs');
9
- var ClientCredentialClient = require('./ClientCredentialClient.cjs');
10
- var ManagedIdentityClient = require('./ManagedIdentityClient.cjs');
11
- var NodeStorage = require('../cache/NodeStorage.cjs');
12
- var Constants = require('../utils/Constants.cjs');
13
-
14
- /*
15
- * Copyright (c) Microsoft Corporation. All rights reserved.
16
- * Licensed under the MIT License.
17
- */
18
- /**
19
- * Class to initialize a managed identity and identify the service
20
- * @public
21
- */
22
- class ManagedIdentityApplication {
23
- constructor(configuration) {
24
- // undefined config means the managed identity is system-assigned
25
- this.config = Configuration.buildManagedIdentityConfiguration(configuration || {});
26
- this.logger = new msalCommon.Logger(this.config.system.loggerOptions, packageMetadata.name, packageMetadata.version);
27
- const fakeStatusAuthorityOptions = {
28
- canonicalAuthority: msalCommon.Constants.DEFAULT_AUTHORITY,
29
- };
30
- if (!ManagedIdentityApplication.nodeStorage) {
31
- ManagedIdentityApplication.nodeStorage = new NodeStorage.NodeStorage(this.logger, this.config.managedIdentityId.id, msalCommon.DEFAULT_CRYPTO_IMPLEMENTATION, fakeStatusAuthorityOptions);
32
- }
33
- this.networkClient = this.config.system.networkClient;
34
- this.cryptoProvider = new CryptoProvider.CryptoProvider();
35
- const fakeAuthorityOptions = {
36
- protocolMode: msalCommon.ProtocolMode.AAD,
37
- knownAuthorities: [Constants.DEFAULT_AUTHORITY_FOR_MANAGED_IDENTITY],
38
- cloudDiscoveryMetadata: "",
39
- authorityMetadata: "",
40
- };
41
- this.fakeAuthority = new msalCommon.Authority(Constants.DEFAULT_AUTHORITY_FOR_MANAGED_IDENTITY, this.networkClient, ManagedIdentityApplication.nodeStorage, fakeAuthorityOptions, this.logger, this.cryptoProvider.createNewGuid(), // correlationID
42
- undefined, true);
43
- this.fakeClientCredentialClient = new ClientCredentialClient.ClientCredentialClient({
44
- authOptions: {
45
- clientId: this.config.managedIdentityId.id,
46
- authority: this.fakeAuthority,
47
- },
48
- });
49
- this.managedIdentityClient = new ManagedIdentityClient.ManagedIdentityClient(this.logger, ManagedIdentityApplication.nodeStorage, this.networkClient, this.cryptoProvider);
50
- }
51
- /**
52
- * Acquire an access token from the cache or the managed identity
53
- * @param managedIdentityRequest - the ManagedIdentityRequestParams object passed in by the developer
54
- * @returns the access token
55
- */
56
- async acquireToken(managedIdentityRequestParams) {
57
- if (!managedIdentityRequestParams.resource) {
58
- throw msalCommon.createClientConfigurationError(msalCommon.ClientConfigurationErrorCodes.urlEmptyError);
59
- }
60
- const managedIdentityRequest = {
61
- forceRefresh: managedIdentityRequestParams.forceRefresh,
62
- resource: managedIdentityRequestParams.resource.replace("/.default", ""),
63
- scopes: [
64
- managedIdentityRequestParams.resource.replace("/.default", ""),
65
- ],
66
- authority: this.fakeAuthority.canonicalAuthority,
67
- correlationId: this.cryptoProvider.createNewGuid(),
68
- };
69
- if (managedIdentityRequest.forceRefresh) {
70
- // make a network call to the managed identity source
71
- return this.managedIdentityClient.sendManagedIdentityTokenRequest(managedIdentityRequest, this.config.managedIdentityId, this.fakeAuthority);
72
- }
73
- const [cachedAuthenticationResult, lastCacheOutcome] = await this.fakeClientCredentialClient.getCachedAuthenticationResult(managedIdentityRequest, this.config, this.cryptoProvider, this.fakeAuthority, ManagedIdentityApplication.nodeStorage);
74
- if (cachedAuthenticationResult) {
75
- // if the token is not expired but must be refreshed; get a new one in the background
76
- if (lastCacheOutcome === msalCommon.CacheOutcome.PROACTIVELY_REFRESHED) {
77
- this.logger.info("ClientCredentialClient:getCachedAuthenticationResult - Cached access token's refreshOn property has been exceeded'. It's not expired, but must be refreshed.");
78
- // make a network call to the managed identity source; refresh the access token in the background
79
- const refreshAccessToken = true;
80
- await this.managedIdentityClient.sendManagedIdentityTokenRequest(managedIdentityRequest, this.config.managedIdentityId, this.fakeAuthority, refreshAccessToken);
81
- }
82
- return cachedAuthenticationResult;
83
- }
84
- else {
85
- // make a network call to the managed identity source
86
- return this.managedIdentityClient.sendManagedIdentityTokenRequest(managedIdentityRequest, this.config.managedIdentityId, this.fakeAuthority);
87
- }
88
- }
89
- /**
90
- * Determine the Managed Identity Source based on available environment variables. This API is consumed by Azure Identity SDK.
91
- * @returns ManagedIdentitySourceNames - The Managed Identity source's name
92
- */
93
- getManagedIdentitySource() {
94
- return (ManagedIdentityClient.ManagedIdentityClient.sourceName ||
95
- this.managedIdentityClient.getManagedIdentitySource());
96
- }
97
- }
98
-
99
- exports.ManagedIdentityApplication = ManagedIdentityApplication;
100
- //# 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,CAAC,EAAE,EAChCC,wCAA6B,EAC7B,0BAA0B,CAC7B,CAAC;AACL,SAAA;QAED,IAAI,CAAC,aAAa,GAAG,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,aAAa,C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;AAED;;;AAGG;IACI,wBAAwB,GAAA;QAC3B,QACIH,2CAAqB,CAAC,UAAU;AAChC,YAAA,IAAI,CAAC,qBAAqB,CAAC,wBAAwB,EAAE,EACvD;KACL;AACJ;;;;"}
@@ -1,76 +0,0 @@
1
- /*! @azure/msal-node v2.13.1 2024-08-29 */
2
- 'use strict';
3
- 'use strict';
4
-
5
- var AppService = require('./ManagedIdentitySources/AppService.cjs');
6
- var AzureArc = require('./ManagedIdentitySources/AzureArc.cjs');
7
- var CloudShell = require('./ManagedIdentitySources/CloudShell.cjs');
8
- var Imds = require('./ManagedIdentitySources/Imds.cjs');
9
- var ServiceFabric = require('./ManagedIdentitySources/ServiceFabric.cjs');
10
- var ManagedIdentityError = require('../error/ManagedIdentityError.cjs');
11
- var Constants = require('../utils/Constants.cjs');
12
- var ManagedIdentityErrorCodes = require('../error/ManagedIdentityErrorCodes.cjs');
13
-
14
- /*
15
- * Copyright (c) Microsoft Corporation. All rights reserved.
16
- * Licensed under the MIT License.
17
- */
18
- /*
19
- * Class to initialize a managed identity and identify the service.
20
- * Original source of code: https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/identity/Azure.Identity/src/ManagedIdentityClient.cs
21
- */
22
- class ManagedIdentityClient {
23
- constructor(logger, nodeStorage, networkClient, cryptoProvider) {
24
- this.logger = logger;
25
- this.nodeStorage = nodeStorage;
26
- this.networkClient = networkClient;
27
- this.cryptoProvider = cryptoProvider;
28
- }
29
- async sendManagedIdentityTokenRequest(managedIdentityRequest, managedIdentityId, fakeAuthority, refreshAccessToken) {
30
- if (!ManagedIdentityClient.identitySource) {
31
- ManagedIdentityClient.identitySource =
32
- this.selectManagedIdentitySource(this.logger, this.nodeStorage, this.networkClient, this.cryptoProvider, managedIdentityId);
33
- }
34
- return ManagedIdentityClient.identitySource.acquireTokenWithManagedIdentity(managedIdentityRequest, managedIdentityId, fakeAuthority, refreshAccessToken);
35
- }
36
- allEnvironmentVariablesAreDefined(environmentVariables) {
37
- return Object.values(environmentVariables).every((environmentVariable) => {
38
- return environmentVariable !== undefined;
39
- });
40
- }
41
- /**
42
- * Determine the Managed Identity Source based on available environment variables. This API is consumed by ManagedIdentityApplication's getManagedIdentitySource.
43
- * @returns ManagedIdentitySourceNames - The Managed Identity source's name
44
- */
45
- getManagedIdentitySource() {
46
- ManagedIdentityClient.sourceName =
47
- this.allEnvironmentVariablesAreDefined(ServiceFabric.ServiceFabric.getEnvironmentVariables())
48
- ? Constants.ManagedIdentitySourceNames.SERVICE_FABRIC
49
- : this.allEnvironmentVariablesAreDefined(AppService.AppService.getEnvironmentVariables())
50
- ? Constants.ManagedIdentitySourceNames.APP_SERVICE
51
- : this.allEnvironmentVariablesAreDefined(CloudShell.CloudShell.getEnvironmentVariables())
52
- ? Constants.ManagedIdentitySourceNames.CLOUD_SHELL
53
- : this.allEnvironmentVariablesAreDefined(AzureArc.AzureArc.getEnvironmentVariables())
54
- ? Constants.ManagedIdentitySourceNames.AZURE_ARC
55
- : Constants.ManagedIdentitySourceNames.DEFAULT_TO_IMDS;
56
- return ManagedIdentityClient.sourceName;
57
- }
58
- /**
59
- * Tries to create a managed identity source for all sources
60
- * @returns the managed identity Source
61
- */
62
- selectManagedIdentitySource(logger, nodeStorage, networkClient, cryptoProvider, managedIdentityId) {
63
- const source = ServiceFabric.ServiceFabric.tryCreate(logger, nodeStorage, networkClient, cryptoProvider, managedIdentityId) ||
64
- AppService.AppService.tryCreate(logger, nodeStorage, networkClient, cryptoProvider) ||
65
- CloudShell.CloudShell.tryCreate(logger, nodeStorage, networkClient, cryptoProvider, managedIdentityId) ||
66
- AzureArc.AzureArc.tryCreate(logger, nodeStorage, networkClient, cryptoProvider, managedIdentityId) ||
67
- Imds.Imds.tryCreate(logger, nodeStorage, networkClient, cryptoProvider);
68
- if (!source) {
69
- throw ManagedIdentityError.createManagedIdentityError(ManagedIdentityErrorCodes.unableToCreateSource);
70
- }
71
- return source;
72
- }
73
- }
74
-
75
- exports.ManagedIdentityClient = ManagedIdentityClient;
76
- //# 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,iCAAiC,CACrC,oBAA+C,EAAA;AAE/C,QAAA,OAAO,MAAM,CAAC,MAAM,CAAC,oBAAoB,CAAC,CAAC,KAAK,CAC5C,CAAC,mBAAmB,KAAI;YACpB,OAAO,mBAAmB,KAAK,SAAS,CAAC;AAC7C,SAAC,CACJ,C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O,MAAM,CAAC;KACjB;AACJ;;;;"}
@@ -1,56 +0,0 @@
1
- /*! @azure/msal-node v2.13.1 2024-08-29 */
2
- 'use strict';
3
- 'use strict';
4
-
5
- var BaseManagedIdentitySource = require('./BaseManagedIdentitySource.cjs');
6
- var Constants = require('../../utils/Constants.cjs');
7
- var ManagedIdentityRequestParameters = require('../../config/ManagedIdentityRequestParameters.cjs');
8
-
9
- /*
10
- * Copyright (c) Microsoft Corporation. All rights reserved.
11
- * Licensed under the MIT License.
12
- */
13
- // MSI Constants. Docs for MSI are available here https://docs.microsoft.com/azure/app-service/overview-managed-identity
14
- const APP_SERVICE_MSI_API_VERSION = "2019-08-01";
15
- /**
16
- * Original source of code: https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/identity/Azure.Identity/src/AppServiceManagedIdentitySource.cs
17
- */
18
- class AppService extends BaseManagedIdentitySource.BaseManagedIdentitySource {
19
- constructor(logger, nodeStorage, networkClient, cryptoProvider, identityEndpoint, identityHeader) {
20
- super(logger, nodeStorage, networkClient, cryptoProvider);
21
- this.identityEndpoint = identityEndpoint;
22
- this.identityHeader = identityHeader;
23
- }
24
- static getEnvironmentVariables() {
25
- const identityEndpoint = process.env[Constants.ManagedIdentityEnvironmentVariableNames.IDENTITY_ENDPOINT];
26
- const identityHeader = process.env[Constants.ManagedIdentityEnvironmentVariableNames.IDENTITY_HEADER];
27
- return [identityEndpoint, identityHeader];
28
- }
29
- static tryCreate(logger, nodeStorage, networkClient, cryptoProvider) {
30
- const [identityEndpoint, identityHeader] = AppService.getEnvironmentVariables();
31
- // if either of the identity endpoint or identity header variables are undefined, this MSI provider is unavailable.
32
- if (!identityEndpoint || !identityHeader) {
33
- 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.`);
34
- return null;
35
- }
36
- const validatedIdentityEndpoint = AppService.getValidatedEnvVariableUrlString(Constants.ManagedIdentityEnvironmentVariableNames.IDENTITY_ENDPOINT, identityEndpoint, Constants.ManagedIdentitySourceNames.APP_SERVICE, logger);
37
- 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.`);
38
- return new AppService(logger, nodeStorage, networkClient, cryptoProvider, identityEndpoint, identityHeader);
39
- }
40
- createRequest(resource, managedIdentityId) {
41
- const request = new ManagedIdentityRequestParameters.ManagedIdentityRequestParameters(Constants.HttpMethod.GET, this.identityEndpoint);
42
- request.headers[Constants.APP_SERVICE_SECRET_HEADER_NAME] = this.identityHeader;
43
- request.queryParameters[Constants.API_VERSION_QUERY_PARAMETER_NAME] =
44
- APP_SERVICE_MSI_API_VERSION;
45
- request.queryParameters[Constants.RESOURCE_BODY_OR_QUERY_PARAMETER_NAME] =
46
- resource;
47
- if (managedIdentityId.idType !== Constants.ManagedIdentityIdType.SYSTEM_ASSIGNED) {
48
- request.queryParameters[this.getManagedIdentityUserAssignedIdQueryParameterKey(managedIdentityId.idType)] = managedIdentityId.id;
49
- }
50
- // bodyParameters calculated in BaseManagedIdentity.acquireTokenWithManagedIdentity
51
- return request;
52
- }
53
- }
54
-
55
- exports.AppService = AppService;
56
- //# 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;;;A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M,CACT,CAAC;AAEN,QAAA,MAAM,CAAC,IAAI,CACP,CAAA,+DAAA,EAAkEA,oCAA0B,CAAC,WAAW,CAAoC,iCAAA,EAAA,yBAAyB,cAAcA,oCAA0B,CAAC,WAAW,CAAA,kBAAA,CAAoB,CAChP,CAAC;AAEF,QAAA,OAAO,IAAI,UAAU,CACjB,MAAM,EACN,WAAW,EACX,aAAa,EACb,cAAc,EACd,gBAAgB,EAChB,cAAc,CACjB,CAAC;KACL;IAEM,aAAa,CAChB,QAAgB,EAChB,iBAAoC,EAAA;AAEpC,QAAA,MAAM,OAAO,GACT,IAAIC,iEAAgC,CAChCC,oBAAU,CAAC,GAAG,EACd,IAAI,CAAC,gBAAgB,CACxB,CAAC;QAEN,OAAO,CAAC,OAAO,CAACC,wCAA8B,CAAC,GAAG,IAAI,CAAC,cAAc,CAAC;AAEtE,QAAA,OAAO,CAAC,eAAe,CAACC,0CAAgC,CAAC;AACrD,YAAA,2BAA2B,CAAC;AAChC,QAAA,OAAO,CAAC,eAAe,CAACC,+CAAqC,CAAC;AAC1D,YAAA,QAAQ,CAAC;AAEb,QAAA,IACI,iBAAiB,CAAC,MAAM,KAAKC,+BAAqB,CAAC,eAAe,EACpE;AACE,YAAA,OAAO,CAAC,eAAe,CACnB,IAAI,CAAC,iDAAiD,CAClD,iBAAiB,CAAC,MAAM,CAC3B,CACJ,GAAG,iBAAiB,CAAC,EAAE,CAAC;AAC5B,SAAA;;AAID,QAAA,OAAO,OAAO,CAAC;KAClB;AACJ;;;;"}
@@ -1,173 +0,0 @@
1
- /*! @azure/msal-node v2.13.1 2024-08-29 */
2
- 'use strict';
3
- 'use strict';
4
-
5
- var msalCommon = require('@azure/msal-common');
6
- var ManagedIdentityRequestParameters = require('../../config/ManagedIdentityRequestParameters.cjs');
7
- var BaseManagedIdentitySource = require('./BaseManagedIdentitySource.cjs');
8
- var ManagedIdentityError = require('../../error/ManagedIdentityError.cjs');
9
- var Constants = require('../../utils/Constants.cjs');
10
- var fs = require('fs');
11
- var path = require('path');
12
- var ManagedIdentityErrorCodes = require('../../error/ManagedIdentityErrorCodes.cjs');
13
-
14
- /*
15
- * Copyright (c) Microsoft Corporation. All rights reserved.
16
- * Licensed under the MIT License.
17
- */
18
- const ARC_API_VERSION = "2019-11-01";
19
- const DEFAULT_AZURE_ARC_IDENTITY_ENDPOINT = "http://127.0.0.1:40342/metadata/identity/oauth2/token";
20
- const HIMDS_EXECUTABLE_HELPER_STRING = "N/A: himds executable exists";
21
- const SUPPORTED_AZURE_ARC_PLATFORMS = {
22
- win32: `${process.env["ProgramData"]}\\AzureConnectedMachineAgent\\Tokens\\`,
23
- linux: "/var/opt/azcmagent/tokens/",
24
- };
25
- const AZURE_ARC_FILE_DETECTION = {
26
- win32: `${process.env["ProgramFiles"]}\\AzureConnectedMachineAgent\\himds.exe`,
27
- linux: "/opt/azcmagent/bin/himds",
28
- };
29
- /**
30
- * Original source of code: https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/identity/Azure.Identity/src/AzureArcManagedIdentitySource.cs
31
- */
32
- class AzureArc extends BaseManagedIdentitySource.BaseManagedIdentitySource {
33
- constructor(logger, nodeStorage, networkClient, cryptoProvider, identityEndpoint) {
34
- super(logger, nodeStorage, networkClient, cryptoProvider);
35
- this.identityEndpoint = identityEndpoint;
36
- }
37
- static getEnvironmentVariables() {
38
- let identityEndpoint = process.env[Constants.ManagedIdentityEnvironmentVariableNames.IDENTITY_ENDPOINT];
39
- let imdsEndpoint = process.env[Constants.ManagedIdentityEnvironmentVariableNames.IMDS_ENDPOINT];
40
- // if either of the identity or imds endpoints are undefined, check if the himds executable exists
41
- if (!identityEndpoint || !imdsEndpoint) {
42
- // get the expected Windows or Linux file path of the himds executable
43
- const fileDetectionPath = AZURE_ARC_FILE_DETECTION[process.platform];
44
- try {
45
- /*
46
- * check if the himds executable exists and its permissions allow it to be read
47
- * returns undefined if true, throws an error otherwise
48
- */
49
- fs.accessSync(fileDetectionPath, fs.constants.F_OK | fs.constants.R_OK);
50
- identityEndpoint = DEFAULT_AZURE_ARC_IDENTITY_ENDPOINT;
51
- imdsEndpoint = HIMDS_EXECUTABLE_HELPER_STRING;
52
- }
53
- catch (err) {
54
- /*
55
- * do nothing
56
- * accessSync returns undefined on success, and throws an error on failure
57
- */
58
- }
59
- }
60
- return [identityEndpoint, imdsEndpoint];
61
- }
62
- static tryCreate(logger, nodeStorage, networkClient, cryptoProvider, managedIdentityId) {
63
- const [identityEndpoint, imdsEndpoint] = AzureArc.getEnvironmentVariables();
64
- // if either of the identity or imds endpoints are undefined (even after himds file detection)
65
- if (!identityEndpoint || !imdsEndpoint) {
66
- 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.`);
67
- return null;
68
- }
69
- // check if the imds endpoint is set to the default for file detection
70
- if (imdsEndpoint === HIMDS_EXECUTABLE_HELPER_STRING) {
71
- 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.`);
72
- }
73
- else {
74
- // otherwise, both the identity and imds endpoints are defined without file detection; validate them
75
- const validatedIdentityEndpoint = AzureArc.getValidatedEnvVariableUrlString(Constants.ManagedIdentityEnvironmentVariableNames.IDENTITY_ENDPOINT, identityEndpoint, Constants.ManagedIdentitySourceNames.AZURE_ARC, logger);
76
- // remove trailing slash
77
- validatedIdentityEndpoint.endsWith("/")
78
- ? validatedIdentityEndpoint.slice(0, -1)
79
- : validatedIdentityEndpoint;
80
- AzureArc.getValidatedEnvVariableUrlString(Constants.ManagedIdentityEnvironmentVariableNames.IMDS_ENDPOINT, imdsEndpoint, Constants.ManagedIdentitySourceNames.AZURE_ARC, logger);
81
- 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.`);
82
- }
83
- if (managedIdentityId.idType !== Constants.ManagedIdentityIdType.SYSTEM_ASSIGNED) {
84
- throw ManagedIdentityError.createManagedIdentityError(ManagedIdentityErrorCodes.unableToCreateAzureArc);
85
- }
86
- return new AzureArc(logger, nodeStorage, networkClient, cryptoProvider, identityEndpoint);
87
- }
88
- createRequest(resource) {
89
- const request = new ManagedIdentityRequestParameters.ManagedIdentityRequestParameters(Constants.HttpMethod.GET, this.identityEndpoint.replace("localhost", "127.0.0.1"));
90
- request.headers[Constants.METADATA_HEADER_NAME] = "true";
91
- request.queryParameters[Constants.API_VERSION_QUERY_PARAMETER_NAME] =
92
- ARC_API_VERSION;
93
- request.queryParameters[Constants.RESOURCE_BODY_OR_QUERY_PARAMETER_NAME] =
94
- resource;
95
- // bodyParameters calculated in BaseManagedIdentity.acquireTokenWithManagedIdentity
96
- return request;
97
- }
98
- async getServerTokenResponseAsync(originalResponse, networkClient, networkRequest, networkRequestOptions) {
99
- let retryResponse;
100
- if (originalResponse.status === msalCommon.HttpStatus.UNAUTHORIZED) {
101
- const wwwAuthHeader = originalResponse.headers["www-authenticate"];
102
- if (!wwwAuthHeader) {
103
- throw ManagedIdentityError.createManagedIdentityError(ManagedIdentityErrorCodes.wwwAuthenticateHeaderMissing);
104
- }
105
- if (!wwwAuthHeader.includes("Basic realm=")) {
106
- throw ManagedIdentityError.createManagedIdentityError(ManagedIdentityErrorCodes.wwwAuthenticateHeaderUnsupportedFormat);
107
- }
108
- const secretFilePath = wwwAuthHeader.split("Basic realm=")[1];
109
- // throw an error if the managed identity application is not being run on Windows or Linux
110
- if (!SUPPORTED_AZURE_ARC_PLATFORMS.hasOwnProperty(process.platform)) {
111
- throw ManagedIdentityError.createManagedIdentityError(ManagedIdentityErrorCodes.platformNotSupported);
112
- }
113
- // get the expected Windows or Linux file path
114
- const expectedSecretFilePath = SUPPORTED_AZURE_ARC_PLATFORMS[process.platform];
115
- // throw an error if the file in the file path is not a .key file
116
- const fileName = path.basename(secretFilePath);
117
- if (!fileName.endsWith(".key")) {
118
- throw ManagedIdentityError.createManagedIdentityError(ManagedIdentityErrorCodes.invalidFileExtension);
119
- }
120
- /*
121
- * throw an error if the file path from the www-authenticate header does not match the
122
- * expected file path for the platform (Windows or Linux) the managed identity application
123
- * is running on
124
- */
125
- if (expectedSecretFilePath + fileName !== secretFilePath) {
126
- throw ManagedIdentityError.createManagedIdentityError(ManagedIdentityErrorCodes.invalidFilePath);
127
- }
128
- let secretFileSize;
129
- // attempt to get the secret file's size, in bytes
130
- try {
131
- secretFileSize = await fs.statSync(secretFilePath).size;
132
- }
133
- catch (e) {
134
- throw ManagedIdentityError.createManagedIdentityError(ManagedIdentityErrorCodes.unableToReadSecretFile);
135
- }
136
- // throw an error if the secret file's size is greater than 4096 bytes
137
- if (secretFileSize > Constants.AZURE_ARC_SECRET_FILE_MAX_SIZE_BYTES) {
138
- throw ManagedIdentityError.createManagedIdentityError(ManagedIdentityErrorCodes.invalidSecret);
139
- }
140
- // attempt to read the contents of the secret file
141
- let secret;
142
- try {
143
- secret = fs.readFileSync(secretFilePath, "utf-8");
144
- }
145
- catch (e) {
146
- throw ManagedIdentityError.createManagedIdentityError(ManagedIdentityErrorCodes.unableToReadSecretFile);
147
- }
148
- const authHeaderValue = `Basic ${secret}`;
149
- this.logger.info(`[Managed Identity] Adding authorization header to the request.`);
150
- networkRequest.headers[Constants.AUTHORIZATION_HEADER_NAME] = authHeaderValue;
151
- try {
152
- retryResponse =
153
- await networkClient.sendGetRequestAsync(networkRequest.computeUri(), networkRequestOptions);
154
- }
155
- catch (error) {
156
- if (error instanceof msalCommon.AuthError) {
157
- throw error;
158
- }
159
- else {
160
- throw msalCommon.createClientAuthError(msalCommon.ClientAuthErrorCodes.networkError);
161
- }
162
- }
163
- }
164
- return this.getServerTokenResponse(retryResponse || originalResponse);
165
- }
166
- }
167
-
168
- exports.ARC_API_VERSION = ARC_API_VERSION;
169
- exports.AZURE_ARC_FILE_DETECTION = AZURE_ARC_FILE_DETECTION;
170
- exports.AzureArc = AzureArc;
171
- exports.DEFAULT_AZURE_ARC_IDENTITY_ENDPOINT = DEFAULT_AZURE_ARC_IDENTITY_ENDPOINT;
172
- exports.SUPPORTED_AZURE_ARC_PLATFORMS = SUPPORTED_AZURE_ARC_PLATFORMS;
173
- //# 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","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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OAAO,CAAC,EAAE;AACR,gBAAA,MAAMjB,+CAA0B,CAC5Bc,gDAAgD,CACnD,CAAC;AACL,aAAA;AACD,YAAA,MAAM,eAAe,GAAG,CAAS,MAAA,EAAA,MAAM,EAAE,CAAC;AAE1C,YAAA,IAAI,CAAC,MAAM,CAAC,IAAI,CACZ,CAAA,8DAAA,CAAgE,CACnE,CAAC;AACF,YAAA,cAAc,CAAC,OAAO,CAACI,mCAAyB,CAAC,GAAG,eAAe,CAAC;YAEpE,IAAI;gBACA,aAAa;oBACT,MAAM,aAAa,CAAC,mBAAmB,CACnC,cAAc,CAAC,UAAU,EAAE,EAC3B,qBAAqB,CACxB,CAAC;AACT,aAAA;AAAC,YAAA,OAAO,KAAK,EAAE;gBACZ,IAAI,KAAK,YAAYC,oBAAS,EAAE;AAC5B,oBAAA,MAAM,KAAK,CAAC;AACf,iBAAA;AAAM,qBAAA;AACH,oBAAA,MAAMC,gCAAqB,CACvBC,+BAAoB,CAAC,YAAY,CACpC,CAAC;AACL,iBAAA;AACJ,aAAA;AACJ,SAAA;QAED,OAAO,IAAI,CAAC,sBAAsB,CAAC,aAAa,IAAI,gBAAgB,CAAC,CAAC;KACzE;AACJ;;;;;;;;"}
@@ -1,135 +0,0 @@
1
- /*! @azure/msal-node v2.13.1 2024-08-29 */
2
- 'use strict';
3
- 'use strict';
4
-
5
- var msalCommon = require('@azure/msal-common');
6
- var Constants = require('../../utils/Constants.cjs');
7
- var ManagedIdentityError = require('../../error/ManagedIdentityError.cjs');
8
- var ManagedIdentityErrorCodes = require('../../error/ManagedIdentityErrorCodes.cjs');
9
-
10
- /*
11
- * Copyright (c) Microsoft Corporation. All rights reserved.
12
- * Licensed under the MIT License.
13
- */
14
- /**
15
- * Managed Identity User Assigned Id Query Parameter Names
16
- */
17
- const ManagedIdentityUserAssignedIdQueryParameterNames = {
18
- MANAGED_IDENTITY_CLIENT_ID: "client_id",
19
- MANAGED_IDENTITY_OBJECT_ID: "object_id",
20
- MANAGED_IDENTITY_RESOURCE_ID: "mi_res_id",
21
- };
22
- class BaseManagedIdentitySource {
23
- constructor(logger, nodeStorage, networkClient, cryptoProvider) {
24
- this.logger = logger;
25
- this.nodeStorage = nodeStorage;
26
- this.networkClient = networkClient;
27
- this.cryptoProvider = cryptoProvider;
28
- }
29
- async getServerTokenResponseAsync(response,
30
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
31
- _networkClient,
32
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
33
- _networkRequest,
34
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
35
- _networkRequestOptions) {
36
- return this.getServerTokenResponse(response);
37
- }
38
- getServerTokenResponse(response) {
39
- let refreshIn, expiresIn;
40
- if (response.body.expires_on) {
41
- expiresIn = response.body.expires_on - msalCommon.TimeUtils.nowSeconds();
42
- // compute refresh_in as 1/2 of expires_in, but only if expires_in > 2h
43
- if (expiresIn > 2 * 3600) {
44
- refreshIn = expiresIn / 2;
45
- }
46
- }
47
- const serverTokenResponse = {
48
- status: response.status,
49
- // success
50
- access_token: response.body.access_token,
51
- expires_in: expiresIn,
52
- scope: response.body.resource,
53
- token_type: response.body.token_type,
54
- refresh_in: refreshIn,
55
- // error
56
- correlation_id: response.body.correlation_id || response.body.correlationId,
57
- error: typeof response.body.error === "string"
58
- ? response.body.error
59
- : response.body.error?.code,
60
- error_description: response.body.message ||
61
- (typeof response.body.error === "string"
62
- ? response.body.error_description
63
- : response.body.error?.message),
64
- error_codes: response.body.error_codes,
65
- timestamp: response.body.timestamp,
66
- trace_id: response.body.trace_id,
67
- };
68
- return serverTokenResponse;
69
- }
70
- async acquireTokenWithManagedIdentity(managedIdentityRequest, managedIdentityId, fakeAuthority, refreshAccessToken) {
71
- const networkRequest = this.createRequest(managedIdentityRequest.resource, managedIdentityId);
72
- const headers = networkRequest.headers;
73
- headers[msalCommon.HeaderNames.CONTENT_TYPE] = msalCommon.Constants.URL_FORM_CONTENT_TYPE;
74
- const networkRequestOptions = { headers };
75
- if (Object.keys(networkRequest.bodyParameters).length) {
76
- networkRequestOptions.body =
77
- networkRequest.computeParametersBodyString();
78
- }
79
- const reqTimestamp = msalCommon.TimeUtils.nowSeconds();
80
- let response;
81
- try {
82
- // Sources that send POST requests: Cloud Shell
83
- if (networkRequest.httpMethod === Constants.HttpMethod.POST) {
84
- response =
85
- await this.networkClient.sendPostRequestAsync(networkRequest.computeUri(), networkRequestOptions);
86
- // Sources that send GET requests: App Service, Azure Arc, IMDS, Service Fabric
87
- }
88
- else {
89
- response =
90
- await this.networkClient.sendGetRequestAsync(networkRequest.computeUri(), networkRequestOptions);
91
- }
92
- }
93
- catch (error) {
94
- if (error instanceof msalCommon.AuthError) {
95
- throw error;
96
- }
97
- else {
98
- throw msalCommon.createClientAuthError(msalCommon.ClientAuthErrorCodes.networkError);
99
- }
100
- }
101
- const responseHandler = new msalCommon.ResponseHandler(managedIdentityId.id, this.nodeStorage, this.cryptoProvider, this.logger, null, null);
102
- const serverTokenResponse = await this.getServerTokenResponseAsync(response, this.networkClient, networkRequest, networkRequestOptions);
103
- responseHandler.validateTokenResponse(serverTokenResponse, refreshAccessToken);
104
- // caches the token
105
- return responseHandler.handleServerTokenResponse(serverTokenResponse, fakeAuthority, reqTimestamp, managedIdentityRequest);
106
- }
107
- getManagedIdentityUserAssignedIdQueryParameterKey(managedIdentityIdType) {
108
- switch (managedIdentityIdType) {
109
- case Constants.ManagedIdentityIdType.USER_ASSIGNED_CLIENT_ID:
110
- this.logger.info("[Managed Identity] Adding user assigned client id to the request.");
111
- return ManagedIdentityUserAssignedIdQueryParameterNames.MANAGED_IDENTITY_CLIENT_ID;
112
- case Constants.ManagedIdentityIdType.USER_ASSIGNED_RESOURCE_ID:
113
- this.logger.info("[Managed Identity] Adding user assigned resource id to the request.");
114
- return ManagedIdentityUserAssignedIdQueryParameterNames.MANAGED_IDENTITY_RESOURCE_ID;
115
- case Constants.ManagedIdentityIdType.USER_ASSIGNED_OBJECT_ID:
116
- this.logger.info("[Managed Identity] Adding user assigned object id to the request.");
117
- return ManagedIdentityUserAssignedIdQueryParameterNames.MANAGED_IDENTITY_OBJECT_ID;
118
- default:
119
- throw ManagedIdentityError.createManagedIdentityError(ManagedIdentityErrorCodes.invalidManagedIdentityIdType);
120
- }
121
- }
122
- }
123
- BaseManagedIdentitySource.getValidatedEnvVariableUrlString = (envVariableStringName, envVariable, sourceName, logger) => {
124
- try {
125
- return new msalCommon.UrlString(envVariable).urlString;
126
- }
127
- catch (error) {
128
- logger.info(`[Managed Identity] ${sourceName} managed identity is unavailable because the '${envVariableStringName}' environment variable is malformed.`);
129
- throw ManagedIdentityError.createManagedIdentityError(ManagedIdentityErrorCodes.MsiEnvironmentVariableUrlMalformedErrorCodes[envVariableStringName]);
130
- }
131
- };
132
-
133
- exports.BaseManagedIdentitySource = BaseManagedIdentitySource;
134
- exports.ManagedIdentityUserAssignedIdQueryParameterNames = ManagedIdentityUserAssignedIdQueryParameterNames;
135
- //# 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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