From 6d34fda75bac140c14c6861dfe138857847915cd Mon Sep 17 00:00:00 2001 From: Angelo Paparazzi Date: Mon, 26 Feb 2024 13:04:55 -0600 Subject: [PATCH] docs: update readme and secrets baseline --- .secrets.baseline | 62 +++++++++++++++++++++++++++++++++++++++++------ README.md | 18 ++++++++++++++ 2 files changed, 72 insertions(+), 8 deletions(-) diff --git a/.secrets.baseline b/.secrets.baseline index e31fc20dec..0f5c7c7d60 100644 --- a/.secrets.baseline +++ b/.secrets.baseline @@ -3,7 +3,7 @@ "files": "package-lock.json|^.secrets.baseline$", "lines": null }, - "generated_at": "2022-08-16T19:52:06Z", + "generated_at": "2024-02-26T18:58:05Z", "plugins_used": [ { "name": "AWSKeyDetector" @@ -78,11 +78,47 @@ ], "results": { "README.md": [ + { + "hashed_secret": "d4c3d66fd0c38547a3c7a4c6bdc29c36911bc030", + "is_secret": false, + "is_verified": false, + "line_number": 155, + "type": "Secret Keyword", + "verified_result": null + }, { "hashed_secret": "32e8612d8ca77c7ea8374aa7918db8e5df9252ed", "is_secret": false, "is_verified": false, - "line_number": 651, + "line_number": 650, + "type": "Secret Keyword", + "verified_result": null + } + ], + "assistant/v2.ts": [ + { + "hashed_secret": "4b28f8a2cf2d8920de88932ead405e6bddb15da2", + "is_secret": false, + "is_verified": false, + "line_number": 3637, + "type": "Secret Keyword", + "verified_result": null + } + ], + "discovery/v1.ts": [ + { + "hashed_secret": "e8fc807ce6fbcda13f91c5b64850173873de0cdc", + "is_secret": false, + "is_verified": false, + "line_number": 5550, + "type": "Secret Keyword", + "verified_result": null + }, + { + "hashed_secret": "fdee05598fdd57ff8e9ae29e92c25a04f2c52fa6", + "is_secret": false, + "is_verified": false, + "line_number": 5551, "type": "Secret Keyword", "verified_result": null } @@ -138,7 +174,7 @@ "hashed_secret": "1b214d8483f6b115656b6910c696e13e8881b66c", "is_secret": false, "is_verified": false, - "line_number": 674, + "line_number": 661, "type": "Secret Keyword", "verified_result": null } @@ -148,7 +184,7 @@ "hashed_secret": "789b49606c321c8cf228d17942608eff0ccc4171", "is_secret": false, "is_verified": false, - "line_number": 224, + "line_number": 221, "type": "Secret Keyword", "verified_result": null }, @@ -156,7 +192,7 @@ "hashed_secret": "6c475a361bc57d2e4e2f82a93d79efd8abc1c58b", "is_secret": false, "is_verified": false, - "line_number": 257, + "line_number": 254, "type": "Secret Keyword", "verified_result": null } @@ -234,7 +270,17 @@ "hashed_secret": "b8473b86d4c2072ca9b08bd28e373e8253e865c4", "is_secret": false, "is_verified": false, - "line_number": 5973, + "line_number": 5971, + "type": "Secret Keyword", + "verified_result": null + } + ], + "test/unit/discovery.v2.test.js": [ + { + "hashed_secret": "b8473b86d4c2072ca9b08bd28e373e8253e865c4", + "is_secret": false, + "is_verified": false, + "line_number": 3471, "type": "Secret Keyword", "verified_result": null } @@ -264,13 +310,13 @@ "hashed_secret": "b8473b86d4c2072ca9b08bd28e373e8253e865c4", "is_secret": false, "is_verified": false, - "line_number": 435, + "line_number": 436, "type": "Secret Keyword", "verified_result": null } ] }, - "version": "0.13.1+ibm.50.dss", + "version": "0.13.1+ibm.56.dss", "word_list": { "file": null, "hash": null diff --git a/README.md b/README.md index 8ff40e91a5..b2213baed1 100755 --- a/README.md +++ b/README.md @@ -141,6 +141,24 @@ To use IAM authentication, you must use an `IamAuthenticator` or a `BearerTokenA To use the SDK in a Cloud Pak, use the `CloudPakForDataAuthenticator`. This will require a username, password, and URL. +##### MCSP + +To use the SDK through a third party cloud provider (such as AWS), use the `MCSPAuthenticator`. This will require the base endpoint URL for the MCSP token service (e.g. https://iam.platform.saas.ibm.com) and an apikey. + +```js +import AssistantV2 from 'ibm-watson/assistant/v2' +import { McspAuthenticator } from 'ibm-watson/auth'; + +# In the constructor, letting the SDK manage the token +const authenticator = new McspAuthenticator({ + url: 'token_service_endpoint', + apikey: 'apikey', +}) +const assistant = AssistantV2(version='2023-06-15', + authenticator=authenticator) +assistant.setServiceUrl('') +``` + ### Cloud Authentication Prioritization When uploading your application to IBM Cloud there is a certain priority Watson services will use when looking for proper credentials. The order is as follows: