ibm-cloud-sdk-core 4.2.5 → 4.3.1
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.
- package/.secrets.baseline +17 -17
- package/CHANGELOG.md +14 -0
- package/auth/token-managers/container-token-manager.d.ts +1 -1
- package/auth/token-managers/container-token-manager.js +3 -1
- package/auth/token-managers/cp4d-token-manager.d.ts +1 -1
- package/auth/token-managers/cp4d-token-manager.js +4 -1
- package/auth/token-managers/iam-request-based-token-manager.js +2 -1
- package/auth/token-managers/iam-token-manager.d.ts +1 -1
- package/auth/token-managers/iam-token-manager.js +3 -1
- package/auth/token-managers/mcsp-token-manager.d.ts +1 -1
- package/auth/token-managers/mcsp-token-manager.js +4 -1
- package/auth/token-managers/token-manager.d.ts +1 -0
- package/auth/token-managers/vpc-instance-token-manager.js +4 -0
- package/auth/utils/file-reading-helpers.d.ts +1 -1
- package/auth/utils/file-reading-helpers.js +1 -1
- package/auth/utils/read-external-sources.js +4 -4
- package/build/docs/ibm-cloud-sdk-core.atleastone.md +48 -4
- package/build/docs/ibm-cloud-sdk-core.atmostone.md +48 -4
- package/build/docs/ibm-cloud-sdk-core.authenticator.authenticate.md +32 -3
- package/build/docs/ibm-cloud-sdk-core.authenticator.md +270 -18
- package/build/docs/ibm-cloud-sdk-core.authenticatorinterface.authenticate.md +32 -3
- package/build/docs/ibm-cloud-sdk-core.authenticatorinterface.md +33 -4
- package/build/docs/ibm-cloud-sdk-core.baseservice._constructor_.md +32 -3
- package/build/docs/ibm-cloud-sdk-core.baseservice.configureservice.md +32 -3
- package/build/docs/ibm-cloud-sdk-core.baseservice.convertmodel.md +64 -5
- package/build/docs/ibm-cloud-sdk-core.baseservice.createrequest.md +32 -3
- package/build/docs/ibm-cloud-sdk-core.baseservice.createrequestanddeserializeresponse.md +64 -5
- package/build/docs/ibm-cloud-sdk-core.baseservice.enableretries.md +32 -3
- package/build/docs/ibm-cloud-sdk-core.baseservice.md +288 -21
- package/build/docs/ibm-cloud-sdk-core.baseservice.setdefaultheaders.md +32 -3
- package/build/docs/ibm-cloud-sdk-core.baseservice.setenablegzipcompression.md +32 -3
- package/build/docs/ibm-cloud-sdk-core.baseservice.setserviceurl.md +32 -3
- package/build/docs/ibm-cloud-sdk-core.basicauthenticator._constructor_.md +33 -3
- package/build/docs/ibm-cloud-sdk-core.basicauthenticator.authenticate.md +32 -3
- package/build/docs/ibm-cloud-sdk-core.basicauthenticator.md +137 -11
- package/build/docs/ibm-cloud-sdk-core.bearertokenauthenticator._constructor_.md +33 -3
- package/build/docs/ibm-cloud-sdk-core.bearertokenauthenticator.authenticate.md +32 -3
- package/build/docs/ibm-cloud-sdk-core.bearertokenauthenticator.md +132 -11
- package/build/docs/ibm-cloud-sdk-core.bearertokenauthenticator.setbearertoken.md +32 -3
- package/build/docs/ibm-cloud-sdk-core.buildrequestfileobject.md +32 -3
- package/build/docs/ibm-cloud-sdk-core.checkcredentials.md +48 -4
- package/build/docs/ibm-cloud-sdk-core.cloudpakfordataauthenticator._constructor_.md +33 -3
- package/build/docs/ibm-cloud-sdk-core.cloudpakfordataauthenticator.md +121 -10
- package/build/docs/ibm-cloud-sdk-core.computebasicauthheader.md +48 -4
- package/build/docs/ibm-cloud-sdk-core.constructfilepath.md +30 -3
- package/build/docs/ibm-cloud-sdk-core.constructserviceurl.md +64 -5
- package/build/docs/ibm-cloud-sdk-core.containerauthenticator._constructor_.md +33 -3
- package/build/docs/ibm-cloud-sdk-core.containerauthenticator.md +144 -12
- package/build/docs/ibm-cloud-sdk-core.containerauthenticator.setcrtokenfilename.md +32 -3
- package/build/docs/ibm-cloud-sdk-core.containerauthenticator.setiamprofileid.md +32 -3
- package/build/docs/ibm-cloud-sdk-core.containerauthenticator.setiamprofilename.md +32 -3
- package/build/docs/ibm-cloud-sdk-core.containertokenmanager._constructor_.md +33 -3
- package/build/docs/ibm-cloud-sdk-core.containertokenmanager.md +121 -10
- package/build/docs/ibm-cloud-sdk-core.containertokenmanager.setcrtokenfilename.md +32 -3
- package/build/docs/ibm-cloud-sdk-core.containertokenmanager.setiamprofileid.md +32 -3
- package/build/docs/ibm-cloud-sdk-core.containertokenmanager.setiamprofilename.md +32 -3
- package/build/docs/ibm-cloud-sdk-core.cp4dtokenmanager._constructor_.md +33 -3
- package/build/docs/ibm-cloud-sdk-core.cp4dtokenmanager.md +102 -9
- package/build/docs/ibm-cloud-sdk-core.fileexistsatpath.md +30 -3
- package/build/docs/ibm-cloud-sdk-core.fileobject.md +57 -4
- package/build/docs/ibm-cloud-sdk-core.fileoptions.md +59 -4
- package/build/docs/ibm-cloud-sdk-core.filestream.md +38 -3
- package/build/docs/ibm-cloud-sdk-core.filewithmetadata.md +72 -5
- package/build/docs/ibm-cloud-sdk-core.getauthenticatorfromenvironment.md +32 -3
- package/build/docs/ibm-cloud-sdk-core.getcontenttype.md +32 -3
- package/build/docs/ibm-cloud-sdk-core.getformat.md +46 -4
- package/build/docs/ibm-cloud-sdk-core.getmissingparams.md +48 -4
- package/build/docs/ibm-cloud-sdk-core.getnewlogger.md +32 -3
- package/build/docs/ibm-cloud-sdk-core.getqueryparam.md +48 -4
- package/build/docs/ibm-cloud-sdk-core.iamauthenticator._constructor_.md +33 -3
- package/build/docs/ibm-cloud-sdk-core.iamauthenticator.md +121 -10
- package/build/docs/ibm-cloud-sdk-core.iamrequestbasedauthenticator._constructor_.md +33 -3
- package/build/docs/ibm-cloud-sdk-core.iamrequestbasedauthenticator.md +187 -14
- package/build/docs/ibm-cloud-sdk-core.iamrequestbasedauthenticator.setclientidandsecret.md +48 -4
- package/build/docs/ibm-cloud-sdk-core.iamrequestbasedauthenticator.setscope.md +32 -3
- package/build/docs/ibm-cloud-sdk-core.iamrequestbasedtokenmanager._constructor_.md +33 -3
- package/build/docs/ibm-cloud-sdk-core.iamrequestbasedtokenmanager.md +197 -15
- package/build/docs/ibm-cloud-sdk-core.iamrequestbasedtokenmanager.savetokeninfo.md +32 -3
- package/build/docs/ibm-cloud-sdk-core.iamrequestbasedtokenmanager.setclientidandsecret.md +48 -4
- package/build/docs/ibm-cloud-sdk-core.iamrequestbasedtokenmanager.setscope.md +32 -3
- package/build/docs/ibm-cloud-sdk-core.iamrequestoptions.md +78 -5
- package/build/docs/ibm-cloud-sdk-core.iamtokenmanager._constructor_.md +33 -3
- package/build/docs/ibm-cloud-sdk-core.iamtokenmanager.md +71 -6
- package/build/docs/ibm-cloud-sdk-core.isemptyobject.md +30 -3
- package/build/docs/ibm-cloud-sdk-core.isfiledata.md +30 -3
- package/build/docs/ibm-cloud-sdk-core.isfilewithmetadata.md +30 -3
- package/build/docs/ibm-cloud-sdk-core.ishtml.md +32 -3
- package/build/docs/ibm-cloud-sdk-core.isjsonmimetype.md +32 -3
- package/build/docs/ibm-cloud-sdk-core.jwttokenmanager._constructor_.md +32 -3
- package/build/docs/ibm-cloud-sdk-core.jwttokenmanager.md +139 -11
- package/build/docs/ibm-cloud-sdk-core.jwttokenmanager.savetokeninfo.md +32 -3
- package/build/docs/ibm-cloud-sdk-core.mcspauthenticator._constructor_.md +33 -3
- package/build/docs/ibm-cloud-sdk-core.mcspauthenticator.md +121 -10
- package/build/docs/ibm-cloud-sdk-core.mcsptokenmanager._constructor_.md +33 -3
- package/build/docs/ibm-cloud-sdk-core.mcsptokenmanager.md +102 -9
- package/build/docs/ibm-cloud-sdk-core.md +794 -75
- package/build/docs/ibm-cloud-sdk-core.noauthauthenticator.authenticate.md +30 -3
- package/build/docs/ibm-cloud-sdk-core.noauthauthenticator.md +42 -4
- package/build/docs/ibm-cloud-sdk-core.onlyone.md +48 -4
- package/build/docs/ibm-cloud-sdk-core.readcrtokenfile.md +30 -3
- package/build/docs/ibm-cloud-sdk-core.readexternalsources.md +32 -3
- package/build/docs/ibm-cloud-sdk-core.removesuffix.md +48 -4
- package/build/docs/ibm-cloud-sdk-core.sdklogger.md +106 -7
- package/build/docs/ibm-cloud-sdk-core.streamtopromise.md +32 -3
- package/build/docs/ibm-cloud-sdk-core.striptrailingslash.md +32 -3
- package/build/docs/ibm-cloud-sdk-core.tokenmanager._constructor_.md +32 -3
- package/build/docs/ibm-cloud-sdk-core.tokenmanager.md +329 -21
- package/build/docs/ibm-cloud-sdk-core.tokenmanager.savetokeninfo.md +32 -3
- package/build/docs/ibm-cloud-sdk-core.tokenmanager.setdisablesslverification.md +32 -3
- package/build/docs/ibm-cloud-sdk-core.tokenmanager.setheaders.md +32 -3
- package/build/docs/ibm-cloud-sdk-core.tokenmanager.useragent.md +11 -0
- package/build/docs/ibm-cloud-sdk-core.tokenrequestbasedauthenticator._constructor_.md +32 -3
- package/build/docs/ibm-cloud-sdk-core.tokenrequestbasedauthenticator.authenticate.md +32 -3
- package/build/docs/ibm-cloud-sdk-core.tokenrequestbasedauthenticator.md +189 -14
- package/build/docs/ibm-cloud-sdk-core.tokenrequestbasedauthenticator.setdisablesslverification.md +32 -3
- package/build/docs/ibm-cloud-sdk-core.tokenrequestbasedauthenticator.setheaders.md +32 -3
- package/build/docs/ibm-cloud-sdk-core.tolowerkeys.md +32 -3
- package/build/docs/ibm-cloud-sdk-core.unittestutils.checkforsuccessfulexecution.md +32 -3
- package/build/docs/ibm-cloud-sdk-core.unittestutils.checkmediaheaders.md +64 -5
- package/build/docs/ibm-cloud-sdk-core.unittestutils.checkurlandmethod.md +64 -5
- package/build/docs/ibm-cloud-sdk-core.unittestutils.checkuserheader.md +64 -5
- package/build/docs/ibm-cloud-sdk-core.unittestutils.expecttobepromise.md +32 -3
- package/build/docs/ibm-cloud-sdk-core.unittestutils.getoptions.md +32 -3
- package/build/docs/ibm-cloud-sdk-core.unittestutils.md +77 -8
- package/build/docs/ibm-cloud-sdk-core.useroptions.md +154 -9
- package/build/docs/ibm-cloud-sdk-core.validateinput.md +48 -4
- package/build/docs/ibm-cloud-sdk-core.validateparams.md +64 -5
- package/build/docs/ibm-cloud-sdk-core.vpcinstanceauthenticator._constructor_.md +33 -3
- package/build/docs/ibm-cloud-sdk-core.vpcinstanceauthenticator.md +130 -11
- package/build/docs/ibm-cloud-sdk-core.vpcinstanceauthenticator.setiamprofilecrn.md +32 -3
- package/build/docs/ibm-cloud-sdk-core.vpcinstanceauthenticator.setiamprofileid.md +32 -3
- package/build/docs/ibm-cloud-sdk-core.vpcinstancetokenmanager._constructor_.md +33 -3
- package/build/docs/ibm-cloud-sdk-core.vpcinstancetokenmanager.md +105 -9
- package/build/docs/ibm-cloud-sdk-core.vpcinstancetokenmanager.setiamprofilecrn.md +32 -3
- package/build/docs/ibm-cloud-sdk-core.vpcinstancetokenmanager.setiamprofileid.md +32 -3
- package/build/docs/index.md +20 -3
- package/docs/ibm-cloud-sdk-core.api.json +31 -1
- package/es/auth/token-managers/container-token-manager.d.ts +1 -1
- package/es/auth/token-managers/container-token-manager.js +3 -1
- package/es/auth/token-managers/cp4d-token-manager.d.ts +1 -1
- package/es/auth/token-managers/cp4d-token-manager.js +4 -1
- package/es/auth/token-managers/iam-request-based-token-manager.js +2 -1
- package/es/auth/token-managers/iam-token-manager.d.ts +1 -1
- package/es/auth/token-managers/iam-token-manager.js +3 -1
- package/es/auth/token-managers/mcsp-token-manager.d.ts +1 -1
- package/es/auth/token-managers/mcsp-token-manager.js +4 -1
- package/es/auth/token-managers/token-manager.d.ts +1 -0
- package/es/auth/token-managers/vpc-instance-token-manager.js +4 -0
- package/es/auth/utils/file-reading-helpers.d.ts +1 -1
- package/es/auth/utils/file-reading-helpers.js +1 -1
- package/es/auth/utils/read-external-sources.js +4 -4
- package/es/lib/base-service.d.ts +2 -1
- package/es/lib/base-service.js +9 -1
- package/es/lib/build-user-agent.d.ts +21 -0
- package/es/lib/build-user-agent.js +27 -0
- package/es/tsdoc-metadata.json +1 -1
- package/etc/ibm-cloud-sdk-core.api.md +2 -0
- package/ibm-cloud-sdk-core.d.ts +3 -1
- package/lib/base-service.d.ts +2 -1
- package/lib/base-service.js +9 -1
- package/lib/build-user-agent.d.ts +21 -0
- package/lib/build-user-agent.js +32 -0
- package/package.json +9 -10
- package/temp/ibm-cloud-sdk-core.api.json +31 -1
- package/temp/ibm-cloud-sdk-core.api.md +2 -0
- package/.nvmrc +0 -1
package/.secrets.baseline
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"files": "package-lock.json|^.secrets.baseline$",
|
|
4
4
|
"lines": null
|
|
5
5
|
},
|
|
6
|
-
"generated_at": "2024-
|
|
6
|
+
"generated_at": "2024-04-16T16:00:48Z",
|
|
7
7
|
"plugins_used": [
|
|
8
8
|
{
|
|
9
9
|
"name": "AWSKeyDetector"
|
|
@@ -96,7 +96,7 @@
|
|
|
96
96
|
"hashed_secret": "bc2f74c22f98f7b6ffbc2f67453dbfa99bce9a32",
|
|
97
97
|
"is_secret": false,
|
|
98
98
|
"is_verified": false,
|
|
99
|
-
"line_number":
|
|
99
|
+
"line_number": 146,
|
|
100
100
|
"type": "Secret Keyword",
|
|
101
101
|
"verified_result": null
|
|
102
102
|
}
|
|
@@ -200,7 +200,7 @@
|
|
|
200
200
|
"hashed_secret": "184ee1f04a018aa3b897e085516a9b657fea0f6b",
|
|
201
201
|
"is_secret": false,
|
|
202
202
|
"is_verified": false,
|
|
203
|
-
"line_number":
|
|
203
|
+
"line_number": 86,
|
|
204
204
|
"type": "Secret Keyword",
|
|
205
205
|
"verified_result": null
|
|
206
206
|
}
|
|
@@ -210,7 +210,7 @@
|
|
|
210
210
|
"hashed_secret": "d5ff02fa48e492fac0a245ad63d1ae608e705c05",
|
|
211
211
|
"is_secret": false,
|
|
212
212
|
"is_verified": false,
|
|
213
|
-
"line_number":
|
|
213
|
+
"line_number": 98,
|
|
214
214
|
"type": "Secret Keyword",
|
|
215
215
|
"verified_result": null
|
|
216
216
|
},
|
|
@@ -218,7 +218,7 @@
|
|
|
218
218
|
"hashed_secret": "8f4bfc22c4fd7cb884f94ec175ff4a3284a174a1",
|
|
219
219
|
"is_secret": false,
|
|
220
220
|
"is_verified": false,
|
|
221
|
-
"line_number":
|
|
221
|
+
"line_number": 99,
|
|
222
222
|
"type": "Secret Keyword",
|
|
223
223
|
"verified_result": null
|
|
224
224
|
},
|
|
@@ -226,7 +226,7 @@
|
|
|
226
226
|
"hashed_secret": "45a15668db917c293f16e8add0f5d801889e5923",
|
|
227
227
|
"is_secret": false,
|
|
228
228
|
"is_verified": false,
|
|
229
|
-
"line_number":
|
|
229
|
+
"line_number": 116,
|
|
230
230
|
"type": "Secret Keyword",
|
|
231
231
|
"verified_result": null
|
|
232
232
|
},
|
|
@@ -234,7 +234,7 @@
|
|
|
234
234
|
"hashed_secret": "65e622227634e8876cfa733000233fb80c6f0473",
|
|
235
235
|
"is_secret": false,
|
|
236
236
|
"is_verified": false,
|
|
237
|
-
"line_number":
|
|
237
|
+
"line_number": 117,
|
|
238
238
|
"type": "Secret Keyword",
|
|
239
239
|
"verified_result": null
|
|
240
240
|
}
|
|
@@ -270,7 +270,7 @@
|
|
|
270
270
|
"hashed_secret": "8f4bfc22c4fd7cb884f94ec175ff4a3284a174a1",
|
|
271
271
|
"is_secret": false,
|
|
272
272
|
"is_verified": false,
|
|
273
|
-
"line_number":
|
|
273
|
+
"line_number": 60,
|
|
274
274
|
"type": "Secret Keyword",
|
|
275
275
|
"verified_result": null
|
|
276
276
|
},
|
|
@@ -278,7 +278,7 @@
|
|
|
278
278
|
"hashed_secret": "0358c67856fb6a21c4767daf02fcb8fe4dc0a318",
|
|
279
279
|
"is_secret": false,
|
|
280
280
|
"is_verified": false,
|
|
281
|
-
"line_number":
|
|
281
|
+
"line_number": 63,
|
|
282
282
|
"type": "Secret Keyword",
|
|
283
283
|
"verified_result": null
|
|
284
284
|
},
|
|
@@ -286,7 +286,7 @@
|
|
|
286
286
|
"hashed_secret": "dbb19b8ae3b78f908e1467721fe4c9f0b0529d9b",
|
|
287
287
|
"is_secret": false,
|
|
288
288
|
"is_verified": false,
|
|
289
|
-
"line_number":
|
|
289
|
+
"line_number": 64,
|
|
290
290
|
"type": "Secret Keyword",
|
|
291
291
|
"verified_result": null
|
|
292
292
|
}
|
|
@@ -296,7 +296,7 @@
|
|
|
296
296
|
"hashed_secret": "8f4bfc22c4fd7cb884f94ec175ff4a3284a174a1",
|
|
297
297
|
"is_secret": false,
|
|
298
298
|
"is_verified": false,
|
|
299
|
-
"line_number":
|
|
299
|
+
"line_number": 79,
|
|
300
300
|
"type": "Secret Keyword",
|
|
301
301
|
"verified_result": null
|
|
302
302
|
},
|
|
@@ -304,7 +304,7 @@
|
|
|
304
304
|
"hashed_secret": "65e622227634e8876cfa733000233fb80c6f0473",
|
|
305
305
|
"is_secret": false,
|
|
306
306
|
"is_verified": false,
|
|
307
|
-
"line_number":
|
|
307
|
+
"line_number": 95,
|
|
308
308
|
"type": "Secret Keyword",
|
|
309
309
|
"verified_result": null
|
|
310
310
|
}
|
|
@@ -442,7 +442,7 @@
|
|
|
442
442
|
"hashed_secret": "1572bd30ac06678a82df42b5913e5e52e27f9a12",
|
|
443
443
|
"is_secret": false,
|
|
444
444
|
"is_verified": false,
|
|
445
|
-
"line_number":
|
|
445
|
+
"line_number": 27,
|
|
446
446
|
"type": "Secret Keyword",
|
|
447
447
|
"verified_result": null
|
|
448
448
|
},
|
|
@@ -450,7 +450,7 @@
|
|
|
450
450
|
"hashed_secret": "16856d955c788df03735a24feb2e3ffefd91f3dc",
|
|
451
451
|
"is_secret": false,
|
|
452
452
|
"is_verified": false,
|
|
453
|
-
"line_number":
|
|
453
|
+
"line_number": 28,
|
|
454
454
|
"type": "Secret Keyword",
|
|
455
455
|
"verified_result": null
|
|
456
456
|
}
|
|
@@ -512,7 +512,7 @@
|
|
|
512
512
|
"hashed_secret": "43ed4c2d8375dfc89e3dc8c917f404b9481d355b",
|
|
513
513
|
"is_secret": false,
|
|
514
514
|
"is_verified": false,
|
|
515
|
-
"line_number":
|
|
515
|
+
"line_number": 30,
|
|
516
516
|
"type": "Secret Keyword",
|
|
517
517
|
"verified_result": null
|
|
518
518
|
}
|
|
@@ -522,7 +522,7 @@
|
|
|
522
522
|
"hashed_secret": "a7ef1be18bb8d37af79f3d87761a203378bf26a2",
|
|
523
523
|
"is_secret": false,
|
|
524
524
|
"is_verified": false,
|
|
525
|
-
"line_number":
|
|
525
|
+
"line_number": 169,
|
|
526
526
|
"type": "Secret Keyword",
|
|
527
527
|
"verified_result": null
|
|
528
528
|
}
|
|
@@ -542,7 +542,7 @@
|
|
|
542
542
|
"hashed_secret": "f2e7745f43b0ef0e2c2faf61d6c6a28be2965750",
|
|
543
543
|
"is_secret": false,
|
|
544
544
|
"is_verified": false,
|
|
545
|
-
"line_number":
|
|
545
|
+
"line_number": 26,
|
|
546
546
|
"type": "Secret Keyword",
|
|
547
547
|
"verified_result": null
|
|
548
548
|
}
|
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
## [4.3.1](https://github.com/IBM/node-sdk-core/compare/v4.3.0...v4.3.1) (2024-05-21)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* **deps:** bump `braces` and `micromatch` to avoid vulnerabilities ([#274](https://github.com/IBM/node-sdk-core/issues/274)) ([1ecac01](https://github.com/IBM/node-sdk-core/commit/1ecac01847dbcef18747c0400e5e36f9a981b936))
|
|
7
|
+
|
|
8
|
+
# [4.3.0](https://github.com/IBM/node-sdk-core/compare/v4.2.5...v4.3.0) (2024-04-17)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Features
|
|
12
|
+
|
|
13
|
+
* send user-agent header with auth token requests ([#272](https://github.com/IBM/node-sdk-core/issues/272)) ([a558274](https://github.com/IBM/node-sdk-core/commit/a558274d3c19a2d0d453b8e9f5bc233f201ebb85))
|
|
14
|
+
|
|
1
15
|
## [4.2.5](https://github.com/IBM/node-sdk-core/compare/v4.2.4...v4.2.5) (2024-03-29)
|
|
2
16
|
|
|
3
17
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
/**
|
|
3
|
-
* Copyright
|
|
3
|
+
* (C) Copyright IBM Corp. 2021, 2024.
|
|
4
4
|
*
|
|
5
5
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
6
|
* you may not use this file except in compliance with the License.
|
|
@@ -69,6 +69,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
69
69
|
exports.ContainerTokenManager = void 0;
|
|
70
70
|
var helpers_1 = require("../utils/helpers");
|
|
71
71
|
var file_reading_helpers_1 = require("../utils/file-reading-helpers");
|
|
72
|
+
var build_user_agent_1 = require("../../lib/build-user-agent");
|
|
72
73
|
var iam_request_based_token_manager_1 = require("./iam-request-based-token-manager");
|
|
73
74
|
var DEFAULT_CR_TOKEN_FILEPATH1 = '/var/run/secrets/tokens/vault-token';
|
|
74
75
|
var DEFAULT_CR_TOKEN_FILEPATH2 = '/var/run/secrets/tokens/sa-token';
|
|
@@ -118,6 +119,7 @@ var ContainerTokenManager = /** @class */ (function (_super) {
|
|
|
118
119
|
}
|
|
119
120
|
// construct form data for the cr token use case of iam token management
|
|
120
121
|
_this.formData.grant_type = 'urn:ibm:params:oauth:grant-type:cr-token';
|
|
122
|
+
_this.userAgent = (0, build_user_agent_1.buildUserAgent)('container-authenticator');
|
|
121
123
|
return _this;
|
|
122
124
|
}
|
|
123
125
|
/**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
/**
|
|
3
|
-
* (C) Copyright IBM Corp. 2019,
|
|
3
|
+
* (C) Copyright IBM Corp. 2019, 2024.
|
|
4
4
|
*
|
|
5
5
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
6
|
* you may not use this file except in compliance with the License.
|
|
@@ -36,6 +36,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
36
36
|
exports.Cp4dTokenManager = void 0;
|
|
37
37
|
var extend_1 = __importDefault(require("extend"));
|
|
38
38
|
var helpers_1 = require("../utils/helpers");
|
|
39
|
+
var build_user_agent_1 = require("../../lib/build-user-agent");
|
|
39
40
|
var jwt_token_manager_1 = require("./jwt-token-manager");
|
|
40
41
|
/**
|
|
41
42
|
* Token Manager of CloudPak for data.
|
|
@@ -76,12 +77,14 @@ var Cp4dTokenManager = /** @class */ (function (_super) {
|
|
|
76
77
|
_this.username = options.username;
|
|
77
78
|
_this.password = options.password;
|
|
78
79
|
_this.apikey = options.apikey;
|
|
80
|
+
_this.userAgent = (0, build_user_agent_1.buildUserAgent)('cp4d-authenticator');
|
|
79
81
|
return _this;
|
|
80
82
|
}
|
|
81
83
|
Cp4dTokenManager.prototype.requestToken = function () {
|
|
82
84
|
// these cannot be overwritten
|
|
83
85
|
var requiredHeaders = {
|
|
84
86
|
'Content-Type': 'application/json',
|
|
87
|
+
'User-Agent': this.userAgent,
|
|
85
88
|
};
|
|
86
89
|
var parameters = {
|
|
87
90
|
options: {
|
|
@@ -149,7 +149,8 @@ var IamRequestBasedTokenManager = /** @class */ (function (_super) {
|
|
|
149
149
|
IamRequestBasedTokenManager.prototype.requestToken = function () {
|
|
150
150
|
// these cannot be overwritten
|
|
151
151
|
var requiredHeaders = {
|
|
152
|
-
'Content-
|
|
152
|
+
'Content-Type': 'application/x-www-form-urlencoded',
|
|
153
|
+
'User-Agent': this.userAgent,
|
|
153
154
|
};
|
|
154
155
|
// If both the clientId and secret were specified by the user, then use them.
|
|
155
156
|
if (this.clientId && this.clientSecret) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
/**
|
|
3
|
-
* (C) Copyright IBM Corp. 2019,
|
|
3
|
+
* (C) Copyright IBM Corp. 2019, 2024.
|
|
4
4
|
*
|
|
5
5
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
6
|
* you may not use this file except in compliance with the License.
|
|
@@ -32,6 +32,7 @@ var __extends = (this && this.__extends) || (function () {
|
|
|
32
32
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
33
33
|
exports.IamTokenManager = void 0;
|
|
34
34
|
var helpers_1 = require("../utils/helpers");
|
|
35
|
+
var build_user_agent_1 = require("../../lib/build-user-agent");
|
|
35
36
|
var iam_request_based_token_manager_1 = require("./iam-request-based-token-manager");
|
|
36
37
|
/**
|
|
37
38
|
* The IAMTokenManager takes an api key and performs the necessary interactions with
|
|
@@ -68,6 +69,7 @@ var IamTokenManager = /** @class */ (function (_super) {
|
|
|
68
69
|
_this.formData.apikey = _this.apikey;
|
|
69
70
|
_this.formData.grant_type = 'urn:ibm:params:oauth:grant-type:apikey';
|
|
70
71
|
_this.formData.response_type = 'cloud_iam';
|
|
72
|
+
_this.userAgent = (0, build_user_agent_1.buildUserAgent)('iam-authenticator');
|
|
71
73
|
return _this;
|
|
72
74
|
}
|
|
73
75
|
return IamTokenManager;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
/**
|
|
3
|
-
* (C) Copyright IBM Corp. 2023.
|
|
3
|
+
* (C) Copyright IBM Corp. 2023, 2024.
|
|
4
4
|
*
|
|
5
5
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
6
|
* you may not use this file except in compliance with the License.
|
|
@@ -36,6 +36,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
36
36
|
exports.McspTokenManager = void 0;
|
|
37
37
|
var extend_1 = __importDefault(require("extend"));
|
|
38
38
|
var helpers_1 = require("../utils/helpers");
|
|
39
|
+
var build_user_agent_1 = require("../../lib/build-user-agent");
|
|
39
40
|
var jwt_token_manager_1 = require("./jwt-token-manager");
|
|
40
41
|
/**
|
|
41
42
|
* This is the path associated with the operation used to obtain
|
|
@@ -69,12 +70,14 @@ var McspTokenManager = /** @class */ (function (_super) {
|
|
|
69
70
|
_this.tokenName = 'token';
|
|
70
71
|
(0, helpers_1.validateInput)(options, _this.requiredOptions);
|
|
71
72
|
_this.apikey = options.apikey;
|
|
73
|
+
_this.userAgent = (0, build_user_agent_1.buildUserAgent)('mcsp-authenticator');
|
|
72
74
|
return _this;
|
|
73
75
|
}
|
|
74
76
|
McspTokenManager.prototype.requestToken = function () {
|
|
75
77
|
var requiredHeaders = {
|
|
76
78
|
Accept: 'application/json',
|
|
77
79
|
'Content-Type': 'application/json',
|
|
80
|
+
'User-Agent': this.userAgent,
|
|
78
81
|
};
|
|
79
82
|
var parameters = {
|
|
80
83
|
options: {
|
|
@@ -39,6 +39,7 @@ export type TokenManagerOptions = {
|
|
|
39
39
|
*/
|
|
40
40
|
export declare class TokenManager {
|
|
41
41
|
protected url: string;
|
|
42
|
+
protected userAgent: string;
|
|
42
43
|
protected disableSslVerification: boolean;
|
|
43
44
|
protected headers: OutgoingHttpHeaders;
|
|
44
45
|
protected requestWrapperInstance: RequestWrapper;
|
|
@@ -72,6 +72,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
72
72
|
exports.VpcInstanceTokenManager = void 0;
|
|
73
73
|
var logger_1 = __importDefault(require("../../lib/logger"));
|
|
74
74
|
var helpers_1 = require("../utils/helpers");
|
|
75
|
+
var build_user_agent_1 = require("../../lib/build-user-agent");
|
|
75
76
|
var jwt_token_manager_1 = require("./jwt-token-manager");
|
|
76
77
|
var DEFAULT_IMS_ENDPOINT = 'http://169.254.169.254';
|
|
77
78
|
var METADATA_SERVICE_VERSION = '2022-03-01';
|
|
@@ -109,6 +110,7 @@ var VpcInstanceTokenManager = /** @class */ (function (_super) {
|
|
|
109
110
|
if (options.iamProfileId) {
|
|
110
111
|
_this.iamProfileId = options.iamProfileId;
|
|
111
112
|
}
|
|
113
|
+
_this.userAgent = (0, build_user_agent_1.buildUserAgent)('vpc-instance-authenticator');
|
|
112
114
|
return _this;
|
|
113
115
|
}
|
|
114
116
|
/**
|
|
@@ -153,6 +155,7 @@ var VpcInstanceTokenManager = /** @class */ (function (_super) {
|
|
|
153
155
|
method: 'POST',
|
|
154
156
|
headers: {
|
|
155
157
|
'Content-Type': 'application/json',
|
|
158
|
+
'User-Agent': this.userAgent,
|
|
156
159
|
Accept: 'application/json',
|
|
157
160
|
Authorization: "Bearer ".concat(instanceIdentityToken),
|
|
158
161
|
},
|
|
@@ -182,6 +185,7 @@ var VpcInstanceTokenManager = /** @class */ (function (_super) {
|
|
|
182
185
|
method: 'PUT',
|
|
183
186
|
headers: {
|
|
184
187
|
'Content-Type': 'application/json',
|
|
188
|
+
'User-Agent': this.userAgent,
|
|
185
189
|
Accept: 'application/json',
|
|
186
190
|
'Metadata-Flavor': 'ibm',
|
|
187
191
|
},
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
/**
|
|
3
|
-
* Copyright 2021,
|
|
3
|
+
* Copyright 2021, 2024 IBM Corp. All Rights Reserved.
|
|
4
4
|
*
|
|
5
5
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
6
|
* you may not use this file except in compliance with the License.
|
|
@@ -6,7 +6,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
6
6
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
7
|
exports.readExternalSources = void 0;
|
|
8
8
|
/**
|
|
9
|
-
* (C) Copyright IBM Corp. 2019,
|
|
9
|
+
* (C) Copyright IBM Corp. 2019, 2024.
|
|
10
10
|
*
|
|
11
11
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
12
12
|
* you may not use this file except in compliance with the License.
|
|
@@ -21,8 +21,8 @@ exports.readExternalSources = void 0;
|
|
|
21
21
|
* limitations under the License.
|
|
22
22
|
*/
|
|
23
23
|
var camelcase_1 = __importDefault(require("camelcase"));
|
|
24
|
-
var lodash_isempty_1 = __importDefault(require("lodash.isempty"));
|
|
25
24
|
var logger_1 = __importDefault(require("../../lib/logger"));
|
|
25
|
+
var helper_1 = require("../../lib/helper");
|
|
26
26
|
var file_reading_helpers_1 = require("./file-reading-helpers");
|
|
27
27
|
/**
|
|
28
28
|
* Read properties stored in external sources like Environment Variables,
|
|
@@ -49,10 +49,10 @@ function getProperties(serviceName) {
|
|
|
49
49
|
// only get properties from one source, return null if none found
|
|
50
50
|
var properties = null;
|
|
51
51
|
properties = filterPropertiesByServiceName((0, file_reading_helpers_1.readCredentialsFile)(), serviceName);
|
|
52
|
-
if ((0,
|
|
52
|
+
if ((0, helper_1.isEmptyObject)(properties)) {
|
|
53
53
|
properties = filterPropertiesByServiceName(process.env, serviceName);
|
|
54
54
|
}
|
|
55
|
-
if ((0,
|
|
55
|
+
if ((0, helper_1.isEmptyObject)(properties)) {
|
|
56
56
|
properties = getPropertiesFromVCAP(serviceName);
|
|
57
57
|
}
|
|
58
58
|
return properties;
|
|
@@ -14,11 +14,55 @@ export declare function atLeastOne(a: any, b: any): boolean;
|
|
|
14
14
|
|
|
15
15
|
## Parameters
|
|
16
16
|
|
|
17
|
-
|
|
18
|
-
| --- | --- | --- |
|
|
19
|
-
| a | any | the first object |
|
|
20
|
-
| b | any | the second object |
|
|
17
|
+
<table><thead><tr><th>
|
|
21
18
|
|
|
19
|
+
Parameter
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
</th><th>
|
|
23
|
+
|
|
24
|
+
Type
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
</th><th>
|
|
28
|
+
|
|
29
|
+
Description
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
</th></tr></thead>
|
|
33
|
+
<tbody><tr><td>
|
|
34
|
+
|
|
35
|
+
a
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
</td><td>
|
|
39
|
+
|
|
40
|
+
any
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
</td><td>
|
|
44
|
+
|
|
45
|
+
the first object
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
</td></tr>
|
|
49
|
+
<tr><td>
|
|
50
|
+
|
|
51
|
+
b
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
</td><td>
|
|
55
|
+
|
|
56
|
+
any
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
</td><td>
|
|
60
|
+
|
|
61
|
+
the second object
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
</td></tr>
|
|
65
|
+
</tbody></table>
|
|
22
66
|
**Returns:**
|
|
23
67
|
|
|
24
68
|
boolean
|
|
@@ -14,11 +14,55 @@ export declare function atMostOne(a: any, b: any): boolean;
|
|
|
14
14
|
|
|
15
15
|
## Parameters
|
|
16
16
|
|
|
17
|
-
|
|
18
|
-
| --- | --- | --- |
|
|
19
|
-
| a | any | The first object |
|
|
20
|
-
| b | any | The second object |
|
|
17
|
+
<table><thead><tr><th>
|
|
21
18
|
|
|
19
|
+
Parameter
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
</th><th>
|
|
23
|
+
|
|
24
|
+
Type
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
</th><th>
|
|
28
|
+
|
|
29
|
+
Description
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
</th></tr></thead>
|
|
33
|
+
<tbody><tr><td>
|
|
34
|
+
|
|
35
|
+
a
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
</td><td>
|
|
39
|
+
|
|
40
|
+
any
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
</td><td>
|
|
44
|
+
|
|
45
|
+
The first object
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
</td></tr>
|
|
49
|
+
<tr><td>
|
|
50
|
+
|
|
51
|
+
b
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
</td><td>
|
|
55
|
+
|
|
56
|
+
any
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
</td><td>
|
|
60
|
+
|
|
61
|
+
The second object
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
</td></tr>
|
|
65
|
+
</tbody></table>
|
|
22
66
|
**Returns:**
|
|
23
67
|
|
|
24
68
|
boolean
|
|
@@ -14,10 +14,39 @@ authenticate(requestOptions: AuthenticateOptions): Promise<void>;
|
|
|
14
14
|
|
|
15
15
|
## Parameters
|
|
16
16
|
|
|
17
|
-
|
|
18
|
-
| --- | --- | --- |
|
|
19
|
-
| requestOptions | AuthenticateOptions | The request to augment with authentication information. |
|
|
17
|
+
<table><thead><tr><th>
|
|
20
18
|
|
|
19
|
+
Parameter
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
</th><th>
|
|
23
|
+
|
|
24
|
+
Type
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
</th><th>
|
|
28
|
+
|
|
29
|
+
Description
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
</th></tr></thead>
|
|
33
|
+
<tbody><tr><td>
|
|
34
|
+
|
|
35
|
+
requestOptions
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
</td><td>
|
|
39
|
+
|
|
40
|
+
AuthenticateOptions
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
</td><td>
|
|
44
|
+
|
|
45
|
+
The request to augment with authentication information.
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
</td></tr>
|
|
49
|
+
</tbody></table>
|
|
21
50
|
**Returns:**
|
|
22
51
|
|
|
23
52
|
Promise<void>
|