Skip to content

Commit

Permalink
docs: update readme and secrets baseline
Browse files Browse the repository at this point in the history
  • Loading branch information
apaparazzi0329 committed Feb 26, 2024
1 parent f9cd926 commit 6d7fb8f
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 15 deletions.
36 changes: 23 additions & 13 deletions .secrets.baseline
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"files": "package-lock.json|^.secrets.baseline$",
"lines": null
},
"generated_at": "2023-03-17T19:47:10Z",
"generated_at": "2024-02-26T19:01:03Z",
"plugins_used": [
{
"name": "AWSKeyDetector"
Expand Down Expand Up @@ -70,15 +70,15 @@
"hashed_secret": "d9e9019d9eb455a3d72a3bc252c26927bb148a10",
"is_secret": false,
"is_verified": false,
"line_number": 119,
"line_number": 118,
"type": "Secret Keyword",
"verified_result": null
},
{
"hashed_secret": "32e8612d8ca77c7ea8374aa7918db8e5df9252ed",
"is_secret": false,
"is_verified": false,
"line_number": 163,
"line_number": 162,
"type": "Secret Keyword",
"verified_result": null
}
Expand All @@ -98,15 +98,15 @@
"hashed_secret": "e8fc807ce6fbcda13f91c5b64850173873de0cdc",
"is_secret": false,
"is_verified": false,
"line_number": 5220,
"line_number": 5683,
"type": "Secret Keyword",
"verified_result": null
},
{
"hashed_secret": "fdee05598fdd57ff8e9ae29e92c25a04f2c52fa6",
"is_secret": false,
"is_verified": false,
"line_number": 5221,
"line_number": 5684,
"type": "Secret Keyword",
"verified_result": null
}
Expand Down Expand Up @@ -136,15 +136,15 @@
"hashed_secret": "d506bd5213c46bd49e16c634754ad70113408252",
"is_secret": false,
"is_verified": false,
"line_number": 7661,
"line_number": 7986,
"type": "Secret Keyword",
"verified_result": null
},
{
"hashed_secret": "b8473b86d4c2072ca9b08bd28e373e8253e865c4",
"is_secret": false,
"is_verified": false,
"line_number": 11192,
"line_number": 11590,
"type": "Secret Keyword",
"verified_result": null
}
Expand All @@ -154,15 +154,15 @@
"hashed_secret": "d506bd5213c46bd49e16c634754ad70113408252",
"is_secret": false,
"is_verified": false,
"line_number": 1333,
"line_number": 1393,
"type": "Secret Keyword",
"verified_result": null
},
{
"hashed_secret": "b8473b86d4c2072ca9b08bd28e373e8253e865c4",
"is_secret": false,
"is_verified": false,
"line_number": 6510,
"line_number": 8441,
"type": "Secret Keyword",
"verified_result": null
}
Expand All @@ -172,33 +172,43 @@
"hashed_secret": "8318df9ecda039deac9868adf1944a29a95c7114",
"is_secret": false,
"is_verified": false,
"line_number": 6733,
"line_number": 7053,
"type": "Secret Keyword",
"verified_result": null
},
{
"hashed_secret": "b8473b86d4c2072ca9b08bd28e373e8253e865c4",
"is_secret": false,
"is_verified": false,
"line_number": 7882,
"line_number": 8245,
"type": "Secret Keyword",
"verified_result": null
},
{
"hashed_secret": "b8e758b5ad59a72f146fcf065239d5c7b695a39a",
"is_secret": false,
"is_verified": false,
"line_number": 10064,
"line_number": 10479,
"type": "Hex High Entropy String",
"verified_result": null
}
],
"test/unit/test_discovery_v2.py": [
{
"hashed_secret": "b8473b86d4c2072ca9b08bd28e373e8253e865c4",
"is_secret": false,
"is_verified": false,
"line_number": 6882,
"type": "Secret Keyword",
"verified_result": null
}
],
"test/unit/test_speech_to_text_v1.py": [
{
"hashed_secret": "b8473b86d4c2072ca9b08bd28e373e8253e865c4",
"is_secret": false,
"is_verified": false,
"line_number": 411,
"line_number": 432,
"type": "Secret Keyword",
"verified_result": null
}
Expand Down
19 changes: 17 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ discovery = DiscoveryV1(version='2019-04-30',
discovery.set_service_url('<url_as_per_region>')
```

### Username and password
#### Username and password

```python
from ibm_watson import DiscoveryV1
Expand All @@ -187,7 +187,7 @@ discovery = DiscoveryV1(version='2019-04-30', authenticator=authenticator)
discovery.set_service_url('<url_as_per_region>')
```

### No Authentication
#### No Authentication

```python
from ibm_watson import DiscoveryV1
Expand All @@ -198,6 +198,21 @@ discovery = DiscoveryV1(version='2019-04-30', authenticator=authenticator)
discovery.set_service_url('<url_as_per_region>')
```

### 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.

```python
from ibm_watson import AssistantV2
from ibm_cloud_sdk_core.authenticators import MCSPAuthenticator

# In the constructor, letting the SDK manage the token
authenticator = MCSPAuthenticator('apikey', 'token_service_endpoint')
assistant = AssistantV2(version='2023-06-15',
authenticator=authenticator)
assistant.set_service_url('<url_as_per_region>')
```

## Python version

Tested on Python 3.9, 3.10, and 3.11.
Expand Down

0 comments on commit 6d7fb8f

Please sign in to comment.