ibm-cloud-sdk-core 5.1.2 → 5.1.3

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 (246) hide show
  1. package/package.json +60 -90
  2. package/.cra/.cveignore +0 -2
  3. package/.secrets.baseline +0 -694
  4. package/Authentication.md +0 -725
  5. package/CHANGELOG.md +0 -947
  6. package/LICENSE.md +0 -201
  7. package/MIGRATION-V4.md +0 -54
  8. package/MIGRATION-V5.md +0 -15
  9. package/README.md +0 -118
  10. package/api-extractor.json +0 -39
  11. package/appscan-config.xml +0 -8
  12. package/build/docs/ibm-cloud-sdk-core.atleastone.md +0 -55
  13. package/build/docs/ibm-cloud-sdk-core.atmostone.md +0 -55
  14. package/build/docs/ibm-cloud-sdk-core.authenticator._constructor_.md +0 -18
  15. package/build/docs/ibm-cloud-sdk-core.authenticator.authenticate.md +0 -57
  16. package/build/docs/ibm-cloud-sdk-core.authenticator.authenticationtype.md +0 -19
  17. package/build/docs/ibm-cloud-sdk-core.authenticator.authtype_basic.md +0 -13
  18. package/build/docs/ibm-cloud-sdk-core.authenticator.authtype_bearertoken.md +0 -11
  19. package/build/docs/ibm-cloud-sdk-core.authenticator.authtype_container.md +0 -11
  20. package/build/docs/ibm-cloud-sdk-core.authenticator.authtype_cp4d.md +0 -11
  21. package/build/docs/ibm-cloud-sdk-core.authenticator.authtype_iam.md +0 -11
  22. package/build/docs/ibm-cloud-sdk-core.authenticator.authtype_iam_assume.md +0 -11
  23. package/build/docs/ibm-cloud-sdk-core.authenticator.authtype_mcsp.md +0 -11
  24. package/build/docs/ibm-cloud-sdk-core.authenticator.authtype_noauth.md +0 -11
  25. package/build/docs/ibm-cloud-sdk-core.authenticator.authtype_unknown.md +0 -11
  26. package/build/docs/ibm-cloud-sdk-core.authenticator.authtype_vpc.md +0 -11
  27. package/build/docs/ibm-cloud-sdk-core.authenticator.md +0 -313
  28. package/build/docs/ibm-cloud-sdk-core.authenticatorinterface.authenticate.md +0 -53
  29. package/build/docs/ibm-cloud-sdk-core.authenticatorinterface.authenticationtype.md +0 -17
  30. package/build/docs/ibm-cloud-sdk-core.authenticatorinterface.md +0 -50
  31. package/build/docs/ibm-cloud-sdk-core.baseservice._constructor_.md +0 -49
  32. package/build/docs/ibm-cloud-sdk-core.baseservice.baseoptions.md +0 -11
  33. package/build/docs/ibm-cloud-sdk-core.baseservice.configureservice.md +0 -53
  34. package/build/docs/ibm-cloud-sdk-core.baseservice.convertmodel.md +0 -85
  35. package/build/docs/ibm-cloud-sdk-core.baseservice.createrequest.md +0 -55
  36. package/build/docs/ibm-cloud-sdk-core.baseservice.createrequestanddeserializeresponse.md +0 -87
  37. package/build/docs/ibm-cloud-sdk-core.baseservice.default_service_name.md +0 -11
  38. package/build/docs/ibm-cloud-sdk-core.baseservice.default_service_url.md +0 -11
  39. package/build/docs/ibm-cloud-sdk-core.baseservice.disableretries.md +0 -17
  40. package/build/docs/ibm-cloud-sdk-core.baseservice.enableretries.md +0 -53
  41. package/build/docs/ibm-cloud-sdk-core.baseservice.getauthenticator.md +0 -19
  42. package/build/docs/ibm-cloud-sdk-core.baseservice.gethttpclient.md +0 -17
  43. package/build/docs/ibm-cloud-sdk-core.baseservice.md +0 -313
  44. package/build/docs/ibm-cloud-sdk-core.baseservice.setdefaultheaders.md +0 -53
  45. package/build/docs/ibm-cloud-sdk-core.baseservice.setenablegzipcompression.md +0 -53
  46. package/build/docs/ibm-cloud-sdk-core.baseservice.setserviceurl.md +0 -53
  47. package/build/docs/ibm-cloud-sdk-core.basicauthenticator._constructor_.md +0 -54
  48. package/build/docs/ibm-cloud-sdk-core.basicauthenticator.authenticate.md +0 -55
  49. package/build/docs/ibm-cloud-sdk-core.basicauthenticator.authenticationtype.md +0 -19
  50. package/build/docs/ibm-cloud-sdk-core.basicauthenticator.authheader.md +0 -13
  51. package/build/docs/ibm-cloud-sdk-core.basicauthenticator.md +0 -165
  52. package/build/docs/ibm-cloud-sdk-core.basicauthenticator.requiredoptions.md +0 -11
  53. package/build/docs/ibm-cloud-sdk-core.bearertokenauthenticator._constructor_.md +0 -54
  54. package/build/docs/ibm-cloud-sdk-core.bearertokenauthenticator.authenticate.md +0 -55
  55. package/build/docs/ibm-cloud-sdk-core.bearertokenauthenticator.authenticationtype.md +0 -19
  56. package/build/docs/ibm-cloud-sdk-core.bearertokenauthenticator.md +0 -160
  57. package/build/docs/ibm-cloud-sdk-core.bearertokenauthenticator.requiredoptions.md +0 -11
  58. package/build/docs/ibm-cloud-sdk-core.bearertokenauthenticator.setbearertoken.md +0 -53
  59. package/build/docs/ibm-cloud-sdk-core.buildrequestfileobject.md +0 -55
  60. package/build/docs/ibm-cloud-sdk-core.checkcredentials.md +0 -71
  61. package/build/docs/ibm-cloud-sdk-core.cloudpakfordataauthenticator._constructor_.md +0 -54
  62. package/build/docs/ibm-cloud-sdk-core.cloudpakfordataauthenticator.authenticationtype.md +0 -19
  63. package/build/docs/ibm-cloud-sdk-core.cloudpakfordataauthenticator.md +0 -149
  64. package/build/docs/ibm-cloud-sdk-core.cloudpakfordataauthenticator.requiredoptions.md +0 -11
  65. package/build/docs/ibm-cloud-sdk-core.cloudpakfordataauthenticator.tokenmanager.md +0 -11
  66. package/build/docs/ibm-cloud-sdk-core.computebasicauthheader.md +0 -71
  67. package/build/docs/ibm-cloud-sdk-core.constructfilepath.md +0 -49
  68. package/build/docs/ibm-cloud-sdk-core.constructserviceurl.md +0 -87
  69. package/build/docs/ibm-cloud-sdk-core.containerauthenticator._constructor_.md +0 -54
  70. package/build/docs/ibm-cloud-sdk-core.containerauthenticator.authenticationtype.md +0 -19
  71. package/build/docs/ibm-cloud-sdk-core.containerauthenticator.getrefreshtoken.md +0 -19
  72. package/build/docs/ibm-cloud-sdk-core.containerauthenticator.md +0 -186
  73. package/build/docs/ibm-cloud-sdk-core.containerauthenticator.setcrtokenfilename.md +0 -53
  74. package/build/docs/ibm-cloud-sdk-core.containerauthenticator.setiamprofileid.md +0 -53
  75. package/build/docs/ibm-cloud-sdk-core.containerauthenticator.setiamprofilename.md +0 -53
  76. package/build/docs/ibm-cloud-sdk-core.containerauthenticator.tokenmanager.md +0 -11
  77. package/build/docs/ibm-cloud-sdk-core.containertokenmanager._constructor_.md +0 -54
  78. package/build/docs/ibm-cloud-sdk-core.containertokenmanager.getcrtoken.md +0 -19
  79. package/build/docs/ibm-cloud-sdk-core.containertokenmanager.getrefreshtoken.md +0 -19
  80. package/build/docs/ibm-cloud-sdk-core.containertokenmanager.md +0 -156
  81. package/build/docs/ibm-cloud-sdk-core.containertokenmanager.requesttoken.md +0 -17
  82. package/build/docs/ibm-cloud-sdk-core.containertokenmanager.setcrtokenfilename.md +0 -53
  83. package/build/docs/ibm-cloud-sdk-core.containertokenmanager.setiamprofileid.md +0 -53
  84. package/build/docs/ibm-cloud-sdk-core.containertokenmanager.setiamprofilename.md +0 -53
  85. package/build/docs/ibm-cloud-sdk-core.contenttype.md +0 -14
  86. package/build/docs/ibm-cloud-sdk-core.cp4dtokenmanager._constructor_.md +0 -54
  87. package/build/docs/ibm-cloud-sdk-core.cp4dtokenmanager.md +0 -128
  88. package/build/docs/ibm-cloud-sdk-core.cp4dtokenmanager.requesttoken.md +0 -15
  89. package/build/docs/ibm-cloud-sdk-core.cp4dtokenmanager.requiredoptions.md +0 -11
  90. package/build/docs/ibm-cloud-sdk-core.fileexistsatpath.md +0 -49
  91. package/build/docs/ibm-cloud-sdk-core.fileobject.md +0 -80
  92. package/build/docs/ibm-cloud-sdk-core.fileobject.options.md +0 -11
  93. package/build/docs/ibm-cloud-sdk-core.fileobject.value.md +0 -11
  94. package/build/docs/ibm-cloud-sdk-core.fileoptions.contenttype.md +0 -11
  95. package/build/docs/ibm-cloud-sdk-core.fileoptions.filename.md +0 -11
  96. package/build/docs/ibm-cloud-sdk-core.fileoptions.md +0 -74
  97. package/build/docs/ibm-cloud-sdk-core.filestream.md +0 -54
  98. package/build/docs/ibm-cloud-sdk-core.filestream.path.md +0 -11
  99. package/build/docs/ibm-cloud-sdk-core.filewithmetadata.contenttype.md +0 -11
  100. package/build/docs/ibm-cloud-sdk-core.filewithmetadata.data.md +0 -11
  101. package/build/docs/ibm-cloud-sdk-core.filewithmetadata.filename.md +0 -11
  102. package/build/docs/ibm-cloud-sdk-core.filewithmetadata.md +0 -87
  103. package/build/docs/ibm-cloud-sdk-core.getauthenticatorfromenvironment.md +0 -55
  104. package/build/docs/ibm-cloud-sdk-core.getcontenttype.md +0 -55
  105. package/build/docs/ibm-cloud-sdk-core.getcurrenttime.md +0 -19
  106. package/build/docs/ibm-cloud-sdk-core.getformat.md +0 -69
  107. package/build/docs/ibm-cloud-sdk-core.getmissingparams.md +0 -73
  108. package/build/docs/ibm-cloud-sdk-core.getnewlogger.md +0 -59
  109. package/build/docs/ibm-cloud-sdk-core.getqueryparam.md +0 -71
  110. package/build/docs/ibm-cloud-sdk-core.iamassumeauthenticator._constructor_.md +0 -54
  111. package/build/docs/ibm-cloud-sdk-core.iamassumeauthenticator.authenticationtype.md +0 -19
  112. package/build/docs/ibm-cloud-sdk-core.iamassumeauthenticator.md +0 -130
  113. package/build/docs/ibm-cloud-sdk-core.iamassumeauthenticator.tokenmanager.md +0 -11
  114. package/build/docs/ibm-cloud-sdk-core.iamassumetokenmanager._constructor_.md +0 -54
  115. package/build/docs/ibm-cloud-sdk-core.iamassumetokenmanager.md +0 -200
  116. package/build/docs/ibm-cloud-sdk-core.iamassumetokenmanager.requesttoken.md +0 -17
  117. package/build/docs/ibm-cloud-sdk-core.iamassumetokenmanager.requiredoptions.md +0 -11
  118. package/build/docs/ibm-cloud-sdk-core.iamassumetokenmanager.savetokeninfo.md +0 -53
  119. package/build/docs/ibm-cloud-sdk-core.iamassumetokenmanager.setclientidandsecret.md +0 -69
  120. package/build/docs/ibm-cloud-sdk-core.iamassumetokenmanager.setdisablesslverification.md +0 -53
  121. package/build/docs/ibm-cloud-sdk-core.iamassumetokenmanager.setheaders.md +0 -53
  122. package/build/docs/ibm-cloud-sdk-core.iamassumetokenmanager.setscope.md +0 -53
  123. package/build/docs/ibm-cloud-sdk-core.iamauthenticator._constructor_.md +0 -54
  124. package/build/docs/ibm-cloud-sdk-core.iamauthenticator.authenticationtype.md +0 -19
  125. package/build/docs/ibm-cloud-sdk-core.iamauthenticator.getrefreshtoken.md +0 -19
  126. package/build/docs/ibm-cloud-sdk-core.iamauthenticator.md +0 -163
  127. package/build/docs/ibm-cloud-sdk-core.iamauthenticator.requiredoptions.md +0 -11
  128. package/build/docs/ibm-cloud-sdk-core.iamauthenticator.tokenmanager.md +0 -11
  129. package/build/docs/ibm-cloud-sdk-core.iamrequestbasedauthenticator.md +0 -90
  130. package/build/docs/ibm-cloud-sdk-core.iamrequestbasedauthenticator.setclientidandsecret.md +0 -69
  131. package/build/docs/ibm-cloud-sdk-core.iamrequestbasedauthenticator.setdisablesslverification.md +0 -53
  132. package/build/docs/ibm-cloud-sdk-core.iamrequestbasedauthenticator.setheaders.md +0 -53
  133. package/build/docs/ibm-cloud-sdk-core.iamrequestbasedauthenticator.setscope.md +0 -53
  134. package/build/docs/ibm-cloud-sdk-core.iamrequestbasedtokenmanager._constructor_.md +0 -54
  135. package/build/docs/ibm-cloud-sdk-core.iamrequestbasedtokenmanager.clientid.md +0 -11
  136. package/build/docs/ibm-cloud-sdk-core.iamrequestbasedtokenmanager.clientsecret.md +0 -11
  137. package/build/docs/ibm-cloud-sdk-core.iamrequestbasedtokenmanager.formdata.md +0 -11
  138. package/build/docs/ibm-cloud-sdk-core.iamrequestbasedtokenmanager.istokenexpired.md +0 -19
  139. package/build/docs/ibm-cloud-sdk-core.iamrequestbasedtokenmanager.md +0 -264
  140. package/build/docs/ibm-cloud-sdk-core.iamrequestbasedtokenmanager.refreshtoken.md +0 -11
  141. package/build/docs/ibm-cloud-sdk-core.iamrequestbasedtokenmanager.requesttoken.md +0 -19
  142. package/build/docs/ibm-cloud-sdk-core.iamrequestbasedtokenmanager.savetokeninfo.md +0 -53
  143. package/build/docs/ibm-cloud-sdk-core.iamrequestbasedtokenmanager.scope.md +0 -11
  144. package/build/docs/ibm-cloud-sdk-core.iamrequestbasedtokenmanager.setclientidandsecret.md +0 -69
  145. package/build/docs/ibm-cloud-sdk-core.iamrequestbasedtokenmanager.setscope.md +0 -53
  146. package/build/docs/ibm-cloud-sdk-core.iamrequestoptions.clientid.md +0 -11
  147. package/build/docs/ibm-cloud-sdk-core.iamrequestoptions.clientsecret.md +0 -11
  148. package/build/docs/ibm-cloud-sdk-core.iamrequestoptions.md +0 -96
  149. package/build/docs/ibm-cloud-sdk-core.iamrequestoptions.scope.md +0 -11
  150. package/build/docs/ibm-cloud-sdk-core.iamtokenmanager._constructor_.md +0 -54
  151. package/build/docs/ibm-cloud-sdk-core.iamtokenmanager.getrefreshtoken.md +0 -19
  152. package/build/docs/ibm-cloud-sdk-core.iamtokenmanager.md +0 -126
  153. package/build/docs/ibm-cloud-sdk-core.iamtokenmanager.requiredoptions.md +0 -11
  154. package/build/docs/ibm-cloud-sdk-core.isemptyobject.md +0 -49
  155. package/build/docs/ibm-cloud-sdk-core.isfiledata.md +0 -49
  156. package/build/docs/ibm-cloud-sdk-core.isfilewithmetadata.md +0 -49
  157. package/build/docs/ibm-cloud-sdk-core.ishtml.md +0 -55
  158. package/build/docs/ibm-cloud-sdk-core.isjsonmimetype.md +0 -55
  159. package/build/docs/ibm-cloud-sdk-core.jwttokenmanager._constructor_.md +0 -49
  160. package/build/docs/ibm-cloud-sdk-core.jwttokenmanager.md +0 -163
  161. package/build/docs/ibm-cloud-sdk-core.jwttokenmanager.requesttoken.md +0 -19
  162. package/build/docs/ibm-cloud-sdk-core.jwttokenmanager.savetokeninfo.md +0 -53
  163. package/build/docs/ibm-cloud-sdk-core.jwttokenmanager.tokeninfo.md +0 -11
  164. package/build/docs/ibm-cloud-sdk-core.jwttokenmanager.tokenname.md +0 -11
  165. package/build/docs/ibm-cloud-sdk-core.jwttokenmanageroptions.md +0 -15
  166. package/build/docs/ibm-cloud-sdk-core.mcspauthenticator._constructor_.md +0 -54
  167. package/build/docs/ibm-cloud-sdk-core.mcspauthenticator.authenticationtype.md +0 -19
  168. package/build/docs/ibm-cloud-sdk-core.mcspauthenticator.md +0 -145
  169. package/build/docs/ibm-cloud-sdk-core.mcspauthenticator.requiredoptions.md +0 -11
  170. package/build/docs/ibm-cloud-sdk-core.mcspauthenticator.tokenmanager.md +0 -11
  171. package/build/docs/ibm-cloud-sdk-core.mcsptokenmanager._constructor_.md +0 -54
  172. package/build/docs/ibm-cloud-sdk-core.mcsptokenmanager.md +0 -128
  173. package/build/docs/ibm-cloud-sdk-core.mcsptokenmanager.requesttoken.md +0 -15
  174. package/build/docs/ibm-cloud-sdk-core.mcsptokenmanager.requiredoptions.md +0 -11
  175. package/build/docs/ibm-cloud-sdk-core.md +0 -820
  176. package/build/docs/ibm-cloud-sdk-core.noauthauthenticator.authenticate.md +0 -49
  177. package/build/docs/ibm-cloud-sdk-core.noauthauthenticator.authenticationtype.md +0 -19
  178. package/build/docs/ibm-cloud-sdk-core.noauthauthenticator.md +0 -60
  179. package/build/docs/ibm-cloud-sdk-core.onlyone.md +0 -55
  180. package/build/docs/ibm-cloud-sdk-core.qs.md +0 -21
  181. package/build/docs/ibm-cloud-sdk-core.readcredentialsfile.md +0 -17
  182. package/build/docs/ibm-cloud-sdk-core.readcrtokenfile.md +0 -49
  183. package/build/docs/ibm-cloud-sdk-core.readexternalsources.md +0 -55
  184. package/build/docs/ibm-cloud-sdk-core.removesuffix.md +0 -71
  185. package/build/docs/ibm-cloud-sdk-core.sdklogger.debug.md +0 -11
  186. package/build/docs/ibm-cloud-sdk-core.sdklogger.error.md +0 -11
  187. package/build/docs/ibm-cloud-sdk-core.sdklogger.info.md +0 -11
  188. package/build/docs/ibm-cloud-sdk-core.sdklogger.md +0 -121
  189. package/build/docs/ibm-cloud-sdk-core.sdklogger.verbose.md +0 -11
  190. package/build/docs/ibm-cloud-sdk-core.sdklogger.warn.md +0 -11
  191. package/build/docs/ibm-cloud-sdk-core.streamtopromise.md +0 -55
  192. package/build/docs/ibm-cloud-sdk-core.striptrailingslash.md +0 -55
  193. package/build/docs/ibm-cloud-sdk-core.tokenmanager._constructor_.md +0 -49
  194. package/build/docs/ibm-cloud-sdk-core.tokenmanager.accesstoken.md +0 -11
  195. package/build/docs/ibm-cloud-sdk-core.tokenmanager.disablesslverification.md +0 -11
  196. package/build/docs/ibm-cloud-sdk-core.tokenmanager.expiretime.md +0 -11
  197. package/build/docs/ibm-cloud-sdk-core.tokenmanager.gettoken.md +0 -17
  198. package/build/docs/ibm-cloud-sdk-core.tokenmanager.headers.md +0 -11
  199. package/build/docs/ibm-cloud-sdk-core.tokenmanager.istokenexpired.md +0 -17
  200. package/build/docs/ibm-cloud-sdk-core.tokenmanager.md +0 -352
  201. package/build/docs/ibm-cloud-sdk-core.tokenmanager.pacedrequesttoken.md +0 -19
  202. package/build/docs/ibm-cloud-sdk-core.tokenmanager.refreshtime.md +0 -11
  203. package/build/docs/ibm-cloud-sdk-core.tokenmanager.requesttoken.md +0 -19
  204. package/build/docs/ibm-cloud-sdk-core.tokenmanager.requestwrapperinstance.md +0 -11
  205. package/build/docs/ibm-cloud-sdk-core.tokenmanager.savetokeninfo.md +0 -53
  206. package/build/docs/ibm-cloud-sdk-core.tokenmanager.setdisablesslverification.md +0 -53
  207. package/build/docs/ibm-cloud-sdk-core.tokenmanager.setheaders.md +0 -53
  208. package/build/docs/ibm-cloud-sdk-core.tokenmanager.url.md +0 -11
  209. package/build/docs/ibm-cloud-sdk-core.tokenmanager.useragent.md +0 -11
  210. package/build/docs/ibm-cloud-sdk-core.tokenmanageroptions.md +0 -18
  211. package/build/docs/ibm-cloud-sdk-core.tokenrequestbasedauthenticator.md +0 -66
  212. package/build/docs/ibm-cloud-sdk-core.tokenrequestbasedauthenticator.setdisablesslverification.md +0 -53
  213. package/build/docs/ibm-cloud-sdk-core.tokenrequestbasedauthenticator.setheaders.md +0 -53
  214. package/build/docs/ibm-cloud-sdk-core.tolowerkeys.md +0 -55
  215. package/build/docs/ibm-cloud-sdk-core.useroptions.authenticator.md +0 -13
  216. package/build/docs/ibm-cloud-sdk-core.useroptions.disablesslverification.md +0 -13
  217. package/build/docs/ibm-cloud-sdk-core.useroptions.headers.md +0 -13
  218. package/build/docs/ibm-cloud-sdk-core.useroptions.jar.md +0 -13
  219. package/build/docs/ibm-cloud-sdk-core.useroptions.md +0 -171
  220. package/build/docs/ibm-cloud-sdk-core.useroptions.serviceurl.md +0 -13
  221. package/build/docs/ibm-cloud-sdk-core.useroptions.url.md +0 -13
  222. package/build/docs/ibm-cloud-sdk-core.useroptions.version.md +0 -13
  223. package/build/docs/ibm-cloud-sdk-core.validateinput.md +0 -73
  224. package/build/docs/ibm-cloud-sdk-core.validateparams.md +0 -89
  225. package/build/docs/ibm-cloud-sdk-core.vpcinstanceauthenticator._constructor_.md +0 -54
  226. package/build/docs/ibm-cloud-sdk-core.vpcinstanceauthenticator.authenticationtype.md +0 -19
  227. package/build/docs/ibm-cloud-sdk-core.vpcinstanceauthenticator.md +0 -158
  228. package/build/docs/ibm-cloud-sdk-core.vpcinstanceauthenticator.setiamprofilecrn.md +0 -53
  229. package/build/docs/ibm-cloud-sdk-core.vpcinstanceauthenticator.setiamprofileid.md +0 -53
  230. package/build/docs/ibm-cloud-sdk-core.vpcinstanceauthenticator.tokenmanager.md +0 -11
  231. package/build/docs/ibm-cloud-sdk-core.vpcinstancetokenmanager._constructor_.md +0 -54
  232. package/build/docs/ibm-cloud-sdk-core.vpcinstancetokenmanager.istokenexpired.md +0 -19
  233. package/build/docs/ibm-cloud-sdk-core.vpcinstancetokenmanager.md +0 -126
  234. package/build/docs/ibm-cloud-sdk-core.vpcinstancetokenmanager.requesttoken.md +0 -15
  235. package/build/docs/ibm-cloud-sdk-core.vpcinstancetokenmanager.setiamprofilecrn.md +0 -53
  236. package/build/docs/ibm-cloud-sdk-core.vpcinstancetokenmanager.setiamprofileid.md +0 -53
  237. package/build/docs/index.md +0 -29
  238. package/es/tsdoc-metadata.json +0 -11
  239. package/etc/ibm-cloud-sdk-core.api.md +0 -505
  240. package/sdk-test-utilities/README.md +0 -8
  241. package/sdk-test-utilities/index.js +0 -111
  242. package/sdk-test-utilities/package-lock.json +0 -519
  243. package/sdk-test-utilities/package.json +0 -20
  244. package/temp/ibm-cloud-sdk-core.api.json +0 -8646
  245. package/temp/ibm-cloud-sdk-core.api.md +0 -505
  246. package/tsconfig-es6.json +0 -9
package/Authentication.md DELETED
@@ -1,725 +0,0 @@
1
- # Authentication
2
- The node-sdk-core project supports the following types of authentication:
3
- - Basic Authentication
4
- - Bearer Token Authentication
5
- - Identity and Access Management (IAM) Authentication (grant type: apikey)
6
- - Identity and Access Management (IAM) Authentication (grant type: assume)
7
- - Container Authentication
8
- - VPC Instance Authentication
9
- - Cloud Pak for Data Authentication
10
- - Multi-Cloud Saas Platform (MCSP) Authentication
11
- - No Authentication (for testing)
12
-
13
- The SDK user configures the appropriate type of authentication for use with service instances.
14
- The authentication types that are appropriate for a particular service may vary from service to service,
15
- so it is important for the SDK user to consult with the appropriate service documentation to understand
16
- which authentication types are supported for that service.
17
-
18
- The node-sdk-core allows an authenticator to be specified in one of two ways:
19
- 1. programmatically - the SDK user invokes the appropriate function(s) to create an instance of the
20
- desired authenticator and then passes the authenticator instance when constructing an instance of the service client.
21
- 2. configuration - the SDK user provides external configuration information (in the form of environment variables
22
- or a credentials file) to indicate the type of authenticator, along with the configuration of the necessary properties
23
- for that authenticator. The SDK user then invokes the configuration-based authenticator factory to construct an instance
24
- of the authenticator that is described in the external configuration information.
25
-
26
- The sections below will provide detailed information for each authenticator
27
- which will include the following:
28
- - A description of the authenticator
29
- - The properties associated with the authenticator
30
- - An example of how to construct the authenticator programmatically
31
- - An example of how to configure the authenticator through the use of external
32
- configuration information. The configuration examples below will use
33
- environment variables, although the same properties could be specified in a
34
- credentials file instead.
35
-
36
-
37
- ## Basic Authentication
38
- The `BasicAuthenticator` is used to add Basic Authentication information to
39
- each outbound request in the `Authorization` header in the form:
40
-
41
- ```
42
- Authorization: Basic <encoded username and password>
43
- ```
44
-
45
- ### Properties
46
-
47
- - username: (required) the basic auth username
48
-
49
- - password: (required) the basic auth password
50
-
51
- ### Programming example
52
- ```js
53
- const { BasicAuthenticator } = require('ibm-cloud-sdk-core');
54
- const ExampleServiceV1 = require('<sdk-package-name>/example-service/v1');
55
-
56
- const authenticator = new BasicAuthenticator({
57
- username: 'myuser',
58
- password: 'mypassword',
59
- });
60
-
61
- const options = {
62
- authenticator,
63
- };
64
-
65
- const service = new ExampleServiceV1(options);
66
-
67
- // 'service' can now be used to invoke operations.
68
- ```
69
-
70
- ### Configuration example
71
- External configuration:
72
- ```
73
- export EXAMPLE_SERVICE_AUTH_TYPE=basic
74
- export EXAMPLE_SERVICE_USERNAME=myuser
75
- export EXAMPLE_SERVICE_PASSWORD=mypassword
76
- ```
77
- Application code:
78
- ```js
79
- const ExampleServiceV1 = require('<sdk-package-name>/example-service/v1');
80
-
81
- const options = {
82
- serviceName: 'example_service',
83
- };
84
-
85
- const service = ExampleServiceV1.newInstance(options);
86
-
87
- // 'service' can now be used to invoke operations.
88
- ```
89
-
90
-
91
- ## Bearer Token Authentication
92
- The `BearerTokenAuthenticator` will add a user-supplied bearer token to
93
- each outbound request in the `Authorization` header in the form:
94
-
95
- ```
96
- Authorization: Bearer <bearer-token>
97
- ```
98
-
99
- ### Properties
100
-
101
- - bearerToken: (required) the bearer token value
102
-
103
- ### Programming example
104
- ```js
105
- const { BearerTokenAuthenticator } = require('ibm-cloud-sdk-core');
106
- const ExampleServiceV1 = require('<sdk-package-name>/example-service/v1');
107
-
108
- const bearerToken = // ... obtain bearer token value ...
109
- const authenticator = new BearerTokenAuthenticator({
110
- bearerToken: bearerToken,
111
- });
112
-
113
- const options = {
114
- authenticator,
115
- };
116
-
117
- const service = new ExampleServiceV1(options);
118
-
119
- // 'service' can now be used to invoke operations.
120
- ...
121
- // Later, if your bearer token value expires, you can set a new one like this:
122
- newToken = // ... obtain new bearer token value
123
- authenticator.bearerToken = newToken;
124
- ```
125
-
126
- ### Configuration example
127
- External configuration:
128
- ```
129
- export EXAMPLE_SERVICE_AUTH_TYPE=bearertoken
130
- export EXAMPLE_SERVICE_BEARER_TOKEN=<the bearer token value>
131
- ```
132
- Application code:
133
- ```js
134
- const ExampleServiceV1 = require('<sdk-package-name>/example-service/v1');
135
-
136
- const options = {
137
- serviceName: 'example_service',
138
- };
139
-
140
- const service = ExampleServiceV1.newInstance(options);
141
-
142
- // 'service' can now be used to invoke operations.
143
- ```
144
-
145
- Note that the use of external configuration is not as useful with the `BearerTokenAuthenticator` as it
146
- is for other authenticator types because bearer tokens typically need to be obtained and refreshed
147
- programmatically since they normally have a relatively short lifespan before they expire. This
148
- authenticator type is intended for situations in which the application will be managing the bearer
149
- token itself in terms of initial acquisition and refreshing as needed.
150
-
151
-
152
- ## Identity and Access Management (IAM) Authentication (grant type: apikey)
153
- The `IamAuthenticator` will accept a user-supplied apikey and will perform
154
- the necessary interactions with the IAM token service to obtain a suitable
155
- bearer token for the specified apikey. The authenticator will also obtain
156
- a new bearer token when the current token expires. The bearer token is
157
- then added to each outbound request in the `Authorization` header in the
158
- form:
159
- ```
160
- Authorization: Bearer <bearer-token>
161
- ```
162
-
163
- ### Properties
164
-
165
- - apikey: (required) the IAM apikey to be used to obtain an IAM access token.
166
-
167
- - url: (optional) The base endpoint URL of the IAM token service.
168
- The default value of this property is the "prod" IAM token service endpoint
169
- (`https://iam.cloud.ibm.com`).
170
- Make sure that you use an IAM token service endpoint that is appropriate for the
171
- location of the service being used by your application.
172
- For example, if you are using an instance of a service in the "production" environment
173
- (e.g. `https://resource-controller.cloud.ibm.com`),
174
- then the default "prod" IAM token service endpoint should suffice.
175
- However, if your application is using an instance of a service in the "staging" environment
176
- (e.g. `https://resource-controller.test.cloud.ibm.com`),
177
- then you would also need to configure the authenticator to use the IAM token service "staging"
178
- endpoint as well (`https://iam.test.cloud.ibm.com`).
179
-
180
- - clientId/clientSecret: (optional) The `clientId` and `clientSecret` fields are used to form a
181
- "basic auth" Authorization header for interactions with the IAM token server. If neither field
182
- is specified, then no Authorization header will be sent with token server requests. These fields
183
- are optional, but must be specified together.
184
-
185
- - scope: (optional) the scope to be associated with the IAM access token.
186
- If not specified, then no scope wil be associated with the access token.
187
-
188
- - disableSslVerification: (optional) A flag that indicates whether verification of the server's SSL
189
- certificate should be disabled or not. The default value is `false`.
190
-
191
- - headers: (optional) A set of key/value pairs that will be sent as HTTP headers in requests
192
- made to the IAM token service.
193
-
194
- ### Programming example
195
- ```js
196
- const { IamAuthenticator } = require('ibm-cloud-sdk-core');
197
- const ExampleServiceV1 = require('<sdk-package-name>/example-service/v1');
198
-
199
- const authenticator = new IamAuthenticator({
200
- apikey: 'myapikey',
201
- });
202
-
203
- const options = {
204
- authenticator,
205
- };
206
-
207
- const service = new ExampleServiceV1(options);
208
-
209
- // 'service' can now be used to invoke operations.
210
- ```
211
-
212
- ### Configuration example
213
- External configuration:
214
- ```
215
- export EXAMPLE_SERVICE_AUTH_TYPE=iam
216
- export EXAMPLE_SERVICE_APIKEY=myapikey
217
- ```
218
- Application code:
219
- ```js
220
- const ExampleServiceV1 = require('<sdk-package-name>/example-service/v1');
221
-
222
- const options = {
223
- serviceName: 'example_service',
224
- };
225
-
226
- const service = ExampleServiceV1.newInstance(options);
227
-
228
- // 'service' can now be used to invoke operations.
229
- ```
230
-
231
-
232
- ## Identity and Access Management (IAM) Authentication (grant type: assume)
233
- The `IamAssumeAuthenticator` performs a two-step token fetch sequence to obtain
234
- a bearer token that allows the application to assume the identity of a trusted profile:
235
- 1. First, the authenticator obtains an initial bearer token using grant type
236
- `urn:ibm:params:oauth:grant-type:apikey`.
237
- This initial token will reflect the identity associated with the input apikey.
238
- 2. Second, the authenticator uses the grant type `urn:ibm:params:oauth:grant-type:assume` to obtain a bearer token
239
- that reflects the identity of the trusted profile, passing in the initial bearer token
240
- from the first step, along with the trusted profile-related inputs.
241
-
242
- The authenticator will also obtain a new bearer token when the current token expires.
243
- The bearer token is then added to each outbound request in the `Authorization` header in the
244
- form:
245
- ```
246
- Authorization: Bearer <bearer-token>
247
- ```
248
-
249
- ### Properties
250
-
251
- - apikey: (required) the IAM apikey to be used to obtain the initial IAM access token.
252
-
253
- - iamProfileCrn: (optional) the Cloud Resource Name (CRN) associated with the trusted profile
254
- for which an access token should be fetched.
255
- Exactly one of iamProfileCrn, iamProfileId or iamProfileName must be specified.
256
-
257
- - iamProfileId: (optional) the ID associated with the trusted profile
258
- for which an access token should be fetched.
259
- Exactly one of iamProfileCrn, iamProfileId or iamProfileName must be specified.
260
-
261
- - iamProfileName: (optional) the name associated with the trusted profile
262
- for which an access token should be fetched. When specifying this property, you must also
263
- specify the iamAccountId property as well.
264
- Exactly one of iamProfileCrn, iamProfileId or iamProfileName must be specified.
265
-
266
- - iamAccountId: (optional) the ID associated with the IAM account that contains the trusted profile
267
- referenced by the iamProfileName property. The imaAccountId property must be specified if and only if
268
- the iamProfileName property is specified.
269
-
270
- - url: (optional) The base endpoint URL of the IAM token service.
271
- The default value of this property is the "prod" IAM token service endpoint
272
- (`https://iam.cloud.ibm.com`).
273
- Make sure that you use an IAM token service endpoint that is appropriate for the
274
- location of the service being used by your application.
275
- For example, if you are using an instance of a service in the "production" environment
276
- (e.g. `https://resource-controller.cloud.ibm.com`),
277
- then the default "prod" IAM token service endpoint should suffice.
278
- However, if your application is using an instance of a service in the "staging" environment
279
- (e.g. `https://resource-controller.test.cloud.ibm.com`),
280
- then you would also need to configure the authenticator to use the IAM token service "staging"
281
- endpoint as well (`https://iam.test.cloud.ibm.com`).
282
-
283
- - clientId/clientSecret: (optional) The `clientId` and `clientSecret` fields are used to form a
284
- "basic auth" Authorization header for interactions with the IAM token server when fetching the
285
- initial IAM access token. These fields are optional, but must be specified together.
286
-
287
- - scope: (optional) the scope to be used when obtaining the initial IAM access token.
288
- If not specified, then no scope will be associated with the access token.
289
-
290
- - disableSslVerification: (optional) A flag that indicates whether verification of the server's SSL
291
- certificate should be disabled or not. The default value is `false`.
292
-
293
- - headers: (optional) A set of key/value pairs that will be sent as HTTP headers in requests
294
- made to the IAM token service.
295
-
296
- ### Usage Notes
297
- - The IamAssumeAuthenticator is used to obtain an access token (a bearer token) from the IAM token service
298
- that allows an application to "assume" the identity of a trusted profile.
299
-
300
- - The authenticator first uses the apikey, url, clientId/clientSecret, scope, disableSslVerification, and headers
301
- properties to obtain an initial access token by invoking the IAM `getToken`
302
- (grant_type=`urn:ibm:params:oauth:grant-type:apikey`) operation.
303
-
304
- - The authenticator then uses the initial access token along with the url, iamProfileCrn, iamProfileId,
305
- iamProfileName, iamAccountId, disableSSLVerification, and headers properties to obtain an access token by invoking
306
- the IAM `getToken` (grant_type=`urn:ibm:params:oauth:grant-type:assume`) operation.
307
- The access token resulting from this second step will reflect the identity of the specified trusted profile.
308
-
309
- - When providing the trusted profile information, you must specify exactly one of: iamProfileCrn, iamProfileId
310
- or iamProfileName. If you specify iamProfileCrn or iamProfileId, then the trusted profile must exist in the same account that is
311
- associated with the input apikey. If you specify iamProfileName, then you must also specify the iamAccountId property
312
- to indicate the IAM account in which the named trusted profile can be found.
313
-
314
- ### Programming example
315
- ```js
316
- const { IamAssumeAuthenticator } = require('ibm-cloud-sdk-core');
317
- const ExampleServiceV1 = require('<sdk-package-name>/example-service/v1');
318
-
319
- // Create the authenticator.
320
- const authenticator = new IamAssumeAuthenticator({
321
- apikey: 'myapikey',
322
- iamProfileId: 'myprofile-1',
323
- });
324
-
325
- const options = {
326
- authenticator,
327
- };
328
-
329
- // Create the service instance.
330
- const service = new ExampleServiceV1(options);
331
-
332
- // 'service' can now be used to invoke operations.
333
- ```
334
-
335
- ### Configuration example
336
- External configuration:
337
- ```
338
- export EXAMPLE_SERVICE_AUTH_TYPE=iamAssume
339
- export EXAMPLE_SERVICE_APIKEY=myapikey
340
- export EXAMPLE_SERVICE_IAM_PROFILE_ID=myprofile-1
341
- ```
342
- Application code:
343
- ```js
344
- const ExampleServiceV1 = require('<sdk-package-name>/example-service/v1');
345
-
346
- const options = {
347
- serviceName: 'example_service',
348
- };
349
-
350
- const service = ExampleServiceV1.newInstance(options);
351
-
352
- // 'service' can now be used to invoke operations.
353
- ```
354
-
355
-
356
- ## Container Authentication
357
- The `ContainerAuthenticator` is intended to be used by application code
358
- running inside a compute resource managed by the IBM Kubernetes Service (IKS)
359
- in which a secure compute resource token (CR token) has been stored in a file
360
- within the compute resource's local file system.
361
- The CR token is similar to an IAM apikey except that it is managed automatically by
362
- the compute resource provider (IKS).
363
- This allows the application developer to:
364
- - avoid storing credentials in application code, configuration files or a password vault
365
- - avoid managing or rotating credentials
366
-
367
- The `ContainerAuthenticator` will retrieve the CR token from
368
- the compute resource in which the application is running, and will then perform
369
- the necessary interactions with the IAM token service to obtain an IAM access token
370
- using the IAM "get token" operation with grant-type `cr-token`.
371
- The authenticator will repeat these steps to obtain a new IAM access token when the
372
- current access token expires.
373
- The IAM access token is added to each outbound request in the `Authorization` header in the form:
374
- ```
375
- Authorization: Bearer <IAM-access-token>
376
- ```
377
-
378
- ### Properties
379
-
380
- - crTokenFilename: (optional) the name of the file containing the injected CR token value.
381
- If not specified, then the authenticator will first try `/var/run/secrets/tokens/vault-token`
382
- and then `/var/run/secrets/tokens/sa-token` as the default value (first file found is used).
383
- The application must have `read` permissions on the file containing the CR token value.
384
-
385
- - iamProfileName: (optional) the name of the linked trusted IAM profile to be used when obtaining the
386
- IAM access token (a CR token might map to multiple IAM profiles).
387
- One of `iamProfileName` or `iamProfileId` must be specified.
388
-
389
- - iamProfileId: (optional) the id of the linked trusted IAM profile to be used when obtaining the
390
- IAM access token (a CR token might map to multiple IAM profiles).
391
- One of `iamProfileName` or `iamProfileId` must be specified.
392
-
393
- - url: (optional) The base endpoint URL of the IAM token service.
394
- The default value of this property is the "prod" IAM token service endpoint
395
- (`https://iam.cloud.ibm.com`).
396
- Make sure that you use an IAM token service endpoint that is appropriate for the
397
- location of the service being used by your application.
398
- For example, if you are using an instance of a service in the "production" environment
399
- (e.g. `https://resource-controller.cloud.ibm.com`),
400
- then the default "prod" IAM token service endpoint should suffice.
401
- However, if your application is using an instance of a service in the "staging" environment
402
- (e.g. `https://resource-controller.test.cloud.ibm.com`),
403
- then you would also need to configure the authenticator to use the IAM token service "staging"
404
- endpoint as well (`https://iam.test.cloud.ibm.com`).
405
-
406
- - clientId/clientSecret: (optional) The `clientId` and `clientSecret` fields are used to form a
407
- "basic auth" Authorization header for interactions with the IAM token service. If neither field
408
- is specified, then no Authorization header will be sent with token server requests. These fields
409
- are optional, but must be specified together.
410
-
411
- - scope: (optional) the scope to be associated with the IAM access token.
412
- If not specified, then no scope will be associated with the access token.
413
-
414
- - disableSslVerification: (optional) A flag that indicates whether verification of the server's SSL
415
- certificate should be disabled or not. The default value is `false`.
416
-
417
- - headers: (optional) A set of key/value pairs that will be sent as HTTP headers in requests
418
- made to the IAM token service.
419
-
420
- - crTokenFilename: (optional) The name of the file containing the injected CR token value.
421
- If not specified, then `/var/run/secrets/tokens/vault-token` is used as the default value.
422
- The application must have `read` permissions on the file containing the CR token value.
423
-
424
- ### Programming example
425
- ```js
426
- const { ContainerAuthenticator } = require('ibm-cloud-sdk-core');
427
- const ExampleServiceV1 = require('<sdk-package-name>/example-service/v1');
428
-
429
- const authenticator = new ContainerAuthenticator({
430
- iamProfileName: 'iam-user123',
431
- });
432
-
433
- const options = {
434
- authenticator,
435
- };
436
-
437
- const service = new ExampleServiceV1(options);
438
-
439
- // 'service' can now be used to invoke operations.
440
- ```
441
-
442
- ### Configuration example
443
- External configuration:
444
- ```
445
- export EXAMPLE_SERVICE_AUTH_TYPE=container
446
- export EXAMPLE_SERVICE_IAM_PROFILE_NAME=iam-user123
447
- ```
448
- Application code:
449
- ```js
450
- const ExampleServiceV1 = require('<sdk-package-name>/example-service/v1');
451
-
452
- const options = {
453
- serviceName: 'example_service',
454
- };
455
-
456
- const service = ExampleServiceV1.newInstance(options);
457
-
458
- // 'service' can now be used to invoke operations.
459
- ```
460
-
461
-
462
- ## VPC Instance Authentication
463
- The `VpcInstanceAuthenticator` is intended to be used by application code
464
- running inside a VPC-managed compute resource (virtual server instance) that has been configured
465
- to use the "compute resource identity" feature.
466
- The compute resource identity feature allows you to assign a trusted IAM profile to the compute resource as its "identity".
467
- This, in turn, allows applications running within the compute resource to take on this identity when interacting with
468
- IAM-secured IBM Cloud services.
469
- This results in a simplified security model that allows the application developer to:
470
- - avoid storing credentials in application code, configuration files or a password vault
471
- - avoid managing or rotating credentials
472
-
473
- The `VpcInstanceAuthenticator` will invoke the appropriate operations on the compute resource's locally-available
474
- VPC Instance Metadata Service to (1) retrieve an instance identity token
475
- and then (2) exchange that instance identity token for an IAM access token.
476
- The authenticator will repeat these steps to obtain a new IAM access token whenever the current access token expires.
477
- The IAM access token is added to each outbound request in the `Authorization` header in the form:
478
- ```
479
- Authorization: Bearer <IAM-access-token>
480
- ```
481
-
482
- ### Properties
483
-
484
- - iamProfileCrn: (optional) the crn of the linked trusted IAM profile to be used when obtaining the IAM access token.
485
-
486
- - iamProfileId: (optional) the id of the linked trusted IAM profile to be used when obtaining the IAM access token.
487
-
488
- - url: (optional) The VPC Instance Metadata Service's base URL.
489
- The default value of this property is `http://169.254.169.254`. However, if the VPC Instance Metadata Service is configured
490
- with the HTTP Secure Protocol setting (`https`), then you should configure this property to be `https://api.metadata.cloud.ibm.com`.
491
-
492
- Usage Notes:
493
- 1. At most one of `iamProfileCrn` or `iamProfileId` may be specified. The specified value must map
494
- to a trusted IAM profile that has been linked to the compute resource (virtual server instance).
495
-
496
- 2. If both `iamProfileCrn` and `iamProfileId` are specified, then an error occurs.
497
-
498
- 3. If neither `iamProfileCrn` nor `iamProfileId` are specified, then the default trusted profile linked to the
499
- compute resource will be used to perform the IAM token exchange.
500
- If no default trusted profile is defined for the compute resource, then an error occurs.
501
-
502
-
503
- ### Programming example
504
- ```js
505
- const { VpcInstanceAuthenticator } = require('ibm-cloud-sdk-core');
506
- const ExampleServiceV1 = require('<sdk-package-name>/example-service/v1');
507
-
508
- const authenticator = new VpcInstanceAuthenticator({
509
- iamProfileCrn: 'crn:iam-profile-123',
510
- });
511
-
512
- const options = {
513
- authenticator,
514
- };
515
-
516
- const service = new ExampleServiceV1(options);
517
-
518
- // 'service' can now be used to invoke operations.
519
- ```
520
-
521
- ### Configuration example
522
- External configuration:
523
- ```
524
- export EXAMPLE_SERVICE_AUTH_TYPE=vpc
525
- export EXAMPLE_SERVICE_IAM_PROFILE_CRN=crn:iam-profile-123
526
- ```
527
- Application code:
528
- ```js
529
- const ExampleServiceV1 = require('<sdk-package-name>/example-service/v1');
530
-
531
- const options = {
532
- serviceName: 'example_service',
533
- };
534
-
535
- const service = ExampleServiceV1.newInstance(options);
536
-
537
- // 'service' can now be used to invoke operations.
538
- ```
539
-
540
-
541
- ## Cloud Pak for Data Authentication
542
- The `CloudPakForDataAuthenticator` will accept a user-supplied username value, along with either a
543
- password or apikey, and will
544
- perform the necessary interactions with the Cloud Pak for Data token service to obtain a suitable
545
- bearer token. The authenticator will also obtain a new bearer token when the current token expires.
546
- The bearer token is then added to each outbound request in the `Authorization` header in the
547
- form:
548
- ```
549
- Authorization: Bearer <bearer-token>
550
- ```
551
- ### Properties
552
-
553
- - username: (required) the username used to obtain a bearer token.
554
-
555
- - password: (required if apikey is not specified) the user's password used to obtain a bearer token.
556
- Exactly one of password or apikey should be specified.
557
-
558
- - apikey: (required if password is not specified) the user's apikey used to obtain a bearer token.
559
- Exactly one of password or apikey should be specified.
560
-
561
- - url: (required) The URL representing the Cloud Pak for Data token service endpoint's base URL string.
562
- This value should not include the `/v1/authorize` path portion.
563
-
564
- - disableSslVerification: (optional) A flag that indicates whether verification of the server's SSL
565
- certificate should be disabled or not. The default value is `false`.
566
-
567
- - headers: (optional) A set of key/value pairs that will be sent as HTTP headers in requests
568
- made to the Cloud Pak for Data token service.
569
-
570
- ### Programming examples
571
- ```js
572
- const { CloudPakForDataAuthenticator } = require('ibm-cloud-sdk-core');
573
- const ExampleServiceV1 = require('<sdk-package-name>/example-service/v1');
574
-
575
- const authenticator = new CloudPakForDataAuthenticator({
576
- username: 'myuser',
577
- apikey: 'myapikey',
578
- url: 'https://mycp4dhost.com',
579
- });
580
-
581
- const options = {
582
- authenticator,
583
- };
584
-
585
- const service = new ExampleServiceV1(options);
586
-
587
- // 'service' can now be used to invoke operations.
588
- ```
589
-
590
- ### Configuration example
591
- External configuration:
592
- ```
593
- # Configure "example_service" with username/apikey.
594
- export EXAMPLE_SERVICE_AUTH_TYPE=cp4d
595
- export EXAMPLE_SERVICE_USERNAME=myuser
596
- export EXAMPLE_SERVICE_APIKEY=myapikey
597
- export EXAMPLE_SERVICE_URL=https://mycp4dhost.com
598
- ```
599
- Application code:
600
- ```js
601
- const ExampleServiceV1 = require('<sdk-package-name>/example-service/v1');
602
-
603
- const options = {
604
- serviceName: 'example_service',
605
- };
606
-
607
- const service = ExampleServiceV1.newInstance(options);
608
-
609
- // 'service' can now be used to invoke operations.
610
- ```
611
-
612
-
613
- ## Multi-Cloud Saas Platform (MCSP) Authentication
614
- The `McspAuthenticator` can be used in scenarios where an application needs to
615
- interact with an IBM Cloud service that has been deployed to a non-IBM Cloud environment (e.g. AWS).
616
- It accepts a user-supplied apikey and performs the necessary interactions with the
617
- Multi-Cloud Saas Platform token service to obtain a suitable MCSP access token (a bearer token)
618
- for the specified apikey.
619
- The authenticator will also obtain a new bearer token when the current token expires.
620
- The bearer token is then added to each outbound request in the `Authorization` header in the
621
- form:
622
- ```
623
- Authorization: Bearer <bearer-token>
624
- ```
625
-
626
- ### Properties
627
-
628
- - apikey: (required) the apikey to be used to obtain an MCSP access token.
629
-
630
- - url: (required) The URL representing the MCSP token service endpoint's base URL string. Do not include the
631
- operation path (e.g. `/siusermgr/api/1.0/apikeys/token`) as part of this property's value.
632
-
633
- - disableSSLVerification: (optional) A flag that indicates whether verification of the server's SSL
634
- certificate should be disabled or not. The default value is `false`.
635
-
636
- - headers: (optional) A set of key/value pairs that will be sent as HTTP headers in requests
637
- made to the MCSP token service.
638
-
639
- ### Usage Notes
640
- - When constructing an McspAuthenticator instance, you must specify the apikey and url properties.
641
-
642
- - The authenticator will use the token server's `POST /siusermgr/api/1.0/apikeys/token` operation to
643
- exchange the user-supplied apikey for an MCSP access token (the bearer token).
644
-
645
- ### Programming example
646
- ```js
647
- const { McspAuthenticator } = require('ibm-cloud-sdk-core');
648
- const ExampleServiceV1 = require('<sdk-package-name>/example-service/v1');
649
-
650
- const authenticator = new McspAuthenticator({
651
- apikey: 'myapikey',
652
- url: 'https://example.mcsp.token-exchange.com',
653
- });
654
-
655
- const options = {
656
- authenticator,
657
- };
658
-
659
- const service = new ExampleServiceV1(options);
660
-
661
- // 'service' can now be used to invoke operations.
662
- ```
663
-
664
- ### Configuration example
665
- External configuration:
666
- ```
667
- export EXAMPLE_SERVICE_AUTH_TYPE=mcsp
668
- export EXAMPLE_SERVICE_APIKEY=myapikey
669
- export EXAMPLE_SERVICE_AUTH_URL=https://example.mcsp.token-exchange.com
670
- ```
671
- Application code:
672
- ```js
673
- const ExampleServiceV1 = require('<sdk-package-name>/example-service/v1');
674
-
675
- const options = {
676
- serviceName: 'example_service',
677
- };
678
-
679
- const service = ExampleServiceV1.newInstance(options);
680
-
681
- // 'service' can now be used to invoke operations.
682
- ```
683
-
684
-
685
- ## No Auth Authentication
686
- The `NoAuthAuthenticator` is a placeholder authenticator which performs no actual authentication function.
687
- It can be used in situations where authentication needs to be bypassed, perhaps while developing
688
- or debugging an application or service.
689
-
690
- ### Properties
691
- None
692
-
693
- ### Programming example
694
- ```js
695
- const { NoAuthAuthenticator } = require('ibm-cloud-sdk-core');
696
- const ExampleServiceV1 = require('<sdk-package-name>/example-service/v1');
697
-
698
- const authenticator = new NoAuthAuthenticator();
699
-
700
- const options = {
701
- authenticator,
702
- };
703
-
704
- const service = new ExampleServiceV1(options);
705
-
706
- // 'service' can now be used to invoke operations.
707
- ```
708
-
709
- ### Configuration example
710
- External configuration:
711
- ```
712
- export EXAMPLE_SERVICE_AUTH_TYPE=noauth
713
- ```
714
- Application code:
715
- ```js
716
- const ExampleServiceV1 = require('<sdk-package-name>/example-service/v1');
717
-
718
- const options = {
719
- serviceName: 'example_service',
720
- };
721
-
722
- const service = ExampleServiceV1.newInstance(options);
723
-
724
- // 'service' can now be used to invoke operations.
725
- ```