ibm-cloud-sdk-core 3.21.0__tar.gz → 3.22.1__tar.gz

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 (68) hide show
  1. {ibm_cloud_sdk_core-3.21.0/ibm_cloud_sdk_core.egg-info → ibm_cloud_sdk_core-3.22.1}/PKG-INFO +10 -9
  2. {ibm_cloud_sdk_core-3.21.0 → ibm_cloud_sdk_core-3.22.1}/README.md +6 -5
  3. {ibm_cloud_sdk_core-3.21.0 → ibm_cloud_sdk_core-3.22.1}/ibm_cloud_sdk_core/__init__.py +2 -0
  4. {ibm_cloud_sdk_core-3.21.0 → ibm_cloud_sdk_core-3.22.1}/ibm_cloud_sdk_core/authenticators/__init__.py +1 -0
  5. {ibm_cloud_sdk_core-3.21.0 → ibm_cloud_sdk_core-3.22.1}/ibm_cloud_sdk_core/authenticators/authenticator.py +1 -0
  6. {ibm_cloud_sdk_core-3.21.0 → ibm_cloud_sdk_core-3.22.1}/ibm_cloud_sdk_core/authenticators/container_authenticator.py +1 -0
  7. ibm_cloud_sdk_core-3.22.1/ibm_cloud_sdk_core/authenticators/iam_assume_authenticator.py +146 -0
  8. {ibm_cloud_sdk_core-3.21.0 → ibm_cloud_sdk_core-3.22.1}/ibm_cloud_sdk_core/base_service.py +1 -1
  9. {ibm_cloud_sdk_core-3.21.0 → ibm_cloud_sdk_core-3.22.1}/ibm_cloud_sdk_core/get_authenticator.py +15 -0
  10. {ibm_cloud_sdk_core-3.21.0 → ibm_cloud_sdk_core-3.22.1}/ibm_cloud_sdk_core/token_managers/container_token_manager.py +1 -0
  11. ibm_cloud_sdk_core-3.22.1/ibm_cloud_sdk_core/token_managers/iam_assume_token_manager.py +150 -0
  12. {ibm_cloud_sdk_core-3.21.0 → ibm_cloud_sdk_core-3.22.1}/ibm_cloud_sdk_core/token_managers/iam_request_based_token_manager.py +1 -0
  13. ibm_cloud_sdk_core-3.22.1/ibm_cloud_sdk_core/version.py +1 -0
  14. {ibm_cloud_sdk_core-3.21.0 → ibm_cloud_sdk_core-3.22.1/ibm_cloud_sdk_core.egg-info}/PKG-INFO +10 -9
  15. {ibm_cloud_sdk_core-3.21.0 → ibm_cloud_sdk_core-3.22.1}/ibm_cloud_sdk_core.egg-info/SOURCES.txt +4 -0
  16. {ibm_cloud_sdk_core-3.21.0 → ibm_cloud_sdk_core-3.22.1}/pyproject.toml +3 -3
  17. {ibm_cloud_sdk_core-3.21.0 → ibm_cloud_sdk_core-3.22.1}/test/test_authenticator.py +2 -0
  18. {ibm_cloud_sdk_core-3.21.0 → ibm_cloud_sdk_core-3.22.1}/test/test_container_authenticator.py +1 -1
  19. {ibm_cloud_sdk_core-3.21.0 → ibm_cloud_sdk_core-3.22.1}/test/test_container_token_manager.py +26 -0
  20. ibm_cloud_sdk_core-3.22.1/test/test_iam_assume_authenticator.py +190 -0
  21. ibm_cloud_sdk_core-3.22.1/test/test_iam_assume_token_manager.py +241 -0
  22. {ibm_cloud_sdk_core-3.21.0 → ibm_cloud_sdk_core-3.22.1}/test/test_utils.py +32 -1
  23. ibm_cloud_sdk_core-3.21.0/ibm_cloud_sdk_core/version.py +0 -1
  24. {ibm_cloud_sdk_core-3.21.0 → ibm_cloud_sdk_core-3.22.1}/LICENSE +0 -0
  25. {ibm_cloud_sdk_core-3.21.0 → ibm_cloud_sdk_core-3.22.1}/MANIFEST.in +0 -0
  26. {ibm_cloud_sdk_core-3.21.0 → ibm_cloud_sdk_core-3.22.1}/ibm_cloud_sdk_core/api_exception.py +0 -0
  27. {ibm_cloud_sdk_core-3.21.0 → ibm_cloud_sdk_core-3.22.1}/ibm_cloud_sdk_core/authenticators/basic_authenticator.py +0 -0
  28. {ibm_cloud_sdk_core-3.21.0 → ibm_cloud_sdk_core-3.22.1}/ibm_cloud_sdk_core/authenticators/bearer_token_authenticator.py +0 -0
  29. {ibm_cloud_sdk_core-3.21.0 → ibm_cloud_sdk_core-3.22.1}/ibm_cloud_sdk_core/authenticators/cp4d_authenticator.py +0 -0
  30. {ibm_cloud_sdk_core-3.21.0 → ibm_cloud_sdk_core-3.22.1}/ibm_cloud_sdk_core/authenticators/iam_authenticator.py +0 -0
  31. {ibm_cloud_sdk_core-3.21.0 → ibm_cloud_sdk_core-3.22.1}/ibm_cloud_sdk_core/authenticators/iam_request_based_authenticator.py +0 -0
  32. {ibm_cloud_sdk_core-3.21.0 → ibm_cloud_sdk_core-3.22.1}/ibm_cloud_sdk_core/authenticators/mcsp_authenticator.py +0 -0
  33. {ibm_cloud_sdk_core-3.21.0 → ibm_cloud_sdk_core-3.22.1}/ibm_cloud_sdk_core/authenticators/no_auth_authenticator.py +0 -0
  34. {ibm_cloud_sdk_core-3.21.0 → ibm_cloud_sdk_core-3.22.1}/ibm_cloud_sdk_core/authenticators/vpc_instance_authenticator.py +0 -0
  35. {ibm_cloud_sdk_core-3.21.0 → ibm_cloud_sdk_core-3.22.1}/ibm_cloud_sdk_core/detailed_response.py +0 -0
  36. {ibm_cloud_sdk_core-3.21.0 → ibm_cloud_sdk_core-3.22.1}/ibm_cloud_sdk_core/http_adapter.py +0 -0
  37. {ibm_cloud_sdk_core-3.21.0 → ibm_cloud_sdk_core-3.22.1}/ibm_cloud_sdk_core/logger.py +0 -0
  38. {ibm_cloud_sdk_core-3.21.0 → ibm_cloud_sdk_core-3.22.1}/ibm_cloud_sdk_core/private_helpers.py +0 -0
  39. {ibm_cloud_sdk_core-3.21.0 → ibm_cloud_sdk_core-3.22.1}/ibm_cloud_sdk_core/token_managers/__init__.py +0 -0
  40. {ibm_cloud_sdk_core-3.21.0 → ibm_cloud_sdk_core-3.22.1}/ibm_cloud_sdk_core/token_managers/cp4d_token_manager.py +0 -0
  41. {ibm_cloud_sdk_core-3.21.0 → ibm_cloud_sdk_core-3.22.1}/ibm_cloud_sdk_core/token_managers/iam_token_manager.py +0 -0
  42. {ibm_cloud_sdk_core-3.21.0 → ibm_cloud_sdk_core-3.22.1}/ibm_cloud_sdk_core/token_managers/jwt_token_manager.py +0 -0
  43. {ibm_cloud_sdk_core-3.21.0 → ibm_cloud_sdk_core-3.22.1}/ibm_cloud_sdk_core/token_managers/mcsp_token_manager.py +0 -0
  44. {ibm_cloud_sdk_core-3.21.0 → ibm_cloud_sdk_core-3.22.1}/ibm_cloud_sdk_core/token_managers/token_manager.py +0 -0
  45. {ibm_cloud_sdk_core-3.21.0 → ibm_cloud_sdk_core-3.22.1}/ibm_cloud_sdk_core/token_managers/vpc_instance_token_manager.py +0 -0
  46. {ibm_cloud_sdk_core-3.21.0 → ibm_cloud_sdk_core-3.22.1}/ibm_cloud_sdk_core/utils.py +0 -0
  47. {ibm_cloud_sdk_core-3.21.0 → ibm_cloud_sdk_core-3.22.1}/ibm_cloud_sdk_core.egg-info/dependency_links.txt +0 -0
  48. {ibm_cloud_sdk_core-3.21.0 → ibm_cloud_sdk_core-3.22.1}/ibm_cloud_sdk_core.egg-info/requires.txt +0 -0
  49. {ibm_cloud_sdk_core-3.21.0 → ibm_cloud_sdk_core-3.22.1}/ibm_cloud_sdk_core.egg-info/top_level.txt +0 -0
  50. {ibm_cloud_sdk_core-3.21.0 → ibm_cloud_sdk_core-3.22.1}/setup.cfg +0 -0
  51. {ibm_cloud_sdk_core-3.21.0 → ibm_cloud_sdk_core-3.22.1}/test/test_api_exception.py +0 -0
  52. {ibm_cloud_sdk_core-3.21.0 → ibm_cloud_sdk_core-3.22.1}/test/test_base_service.py +0 -0
  53. {ibm_cloud_sdk_core-3.21.0 → ibm_cloud_sdk_core-3.22.1}/test/test_basic_authenticator.py +0 -0
  54. {ibm_cloud_sdk_core-3.21.0 → ibm_cloud_sdk_core-3.22.1}/test/test_bearer_authenticator.py +0 -0
  55. {ibm_cloud_sdk_core-3.21.0 → ibm_cloud_sdk_core-3.22.1}/test/test_cp4d_authenticator.py +0 -0
  56. {ibm_cloud_sdk_core-3.21.0 → ibm_cloud_sdk_core-3.22.1}/test/test_cp4d_token_manager.py +0 -0
  57. {ibm_cloud_sdk_core-3.21.0 → ibm_cloud_sdk_core-3.22.1}/test/test_detailed_response.py +0 -0
  58. {ibm_cloud_sdk_core-3.21.0 → ibm_cloud_sdk_core-3.22.1}/test/test_http_adapter.py +0 -0
  59. {ibm_cloud_sdk_core-3.21.0 → ibm_cloud_sdk_core-3.22.1}/test/test_iam_authenticator.py +0 -0
  60. {ibm_cloud_sdk_core-3.21.0 → ibm_cloud_sdk_core-3.22.1}/test/test_iam_token_manager.py +0 -0
  61. {ibm_cloud_sdk_core-3.21.0 → ibm_cloud_sdk_core-3.22.1}/test/test_jwt_token_manager.py +0 -0
  62. {ibm_cloud_sdk_core-3.21.0 → ibm_cloud_sdk_core-3.22.1}/test/test_logger.py +0 -0
  63. {ibm_cloud_sdk_core-3.21.0 → ibm_cloud_sdk_core-3.22.1}/test/test_mcsp_authenticator.py +0 -0
  64. {ibm_cloud_sdk_core-3.21.0 → ibm_cloud_sdk_core-3.22.1}/test/test_mcsp_token_manager.py +0 -0
  65. {ibm_cloud_sdk_core-3.21.0 → ibm_cloud_sdk_core-3.22.1}/test/test_no_auth_authenticator.py +0 -0
  66. {ibm_cloud_sdk_core-3.21.0 → ibm_cloud_sdk_core-3.22.1}/test/test_token_manager.py +0 -0
  67. {ibm_cloud_sdk_core-3.21.0 → ibm_cloud_sdk_core-3.22.1}/test/test_vpc_instance_authenticator.py +0 -0
  68. {ibm_cloud_sdk_core-3.21.0 → ibm_cloud_sdk_core-3.22.1}/test/test_vpc_instance_token_manager.py +0 -0
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.2
2
2
  Name: ibm-cloud-sdk-core
3
- Version: 3.21.0
3
+ Version: 3.22.1
4
4
  Summary: Core library used by SDKs for IBM Cloud Services
5
5
  Author-email: IBM <devxsdk@us.ibm.com>
6
6
  Project-URL: Repository, https://github.com/IBM/python-sdk-core
@@ -12,11 +12,11 @@ Project-URL: License, https://github.com/IBM/python-sdk-core/blob/main/LICENSE
12
12
  Keywords: ibm,cloud,ibm cloud services
13
13
  Classifier: Programming Language :: Python
14
14
  Classifier: Programming Language :: Python :: 3
15
- Classifier: Programming Language :: Python :: 3.8
16
15
  Classifier: Programming Language :: Python :: 3.9
17
16
  Classifier: Programming Language :: Python :: 3.10
18
17
  Classifier: Programming Language :: Python :: 3.11
19
18
  Classifier: Programming Language :: Python :: 3.12
19
+ Classifier: Programming Language :: Python :: 3.13
20
20
  Classifier: Development Status :: 5 - Production/Stable
21
21
  Classifier: Environment :: Console
22
22
  Classifier: Intended Audience :: Developers
@@ -25,7 +25,7 @@ Classifier: Operating System :: OS Independent
25
25
  Classifier: Topic :: Software Development :: Libraries
26
26
  Classifier: Topic :: Software Development :: Libraries :: Python Modules
27
27
  Classifier: Topic :: Software Development :: Libraries :: Application Frameworks
28
- Requires-Python: >=3.8
28
+ Requires-Python: >=3.9
29
29
  Description-Content-Type: text/markdown
30
30
  License-File: LICENSE
31
31
  Requires-Dist: requests<3.0.0,>=2.31.0
@@ -49,12 +49,12 @@ Requires-Dist: twine; extra == "publish"
49
49
  [![CLA assistant](https://cla-assistant.io/readme/badge/ibm/python-sdk-core)](https://cla-assistant.io/ibm/python-sdk-core)
50
50
  [![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg)](https://github.com/semantic-release/semantic-release)
51
51
 
52
- # IBM Python SDK Core Version 3.21.0
52
+ # IBM Python SDK Core Version 3.22.1
53
53
  This project contains core functionality required by Python code generated by the IBM Cloud OpenAPI SDK Generator
54
54
  (openapi-sdkgen).
55
55
 
56
56
  # Python Version
57
- The current minimum Python version supported is 3.8.
57
+ The current minimum Python version supported is 3.9.
58
58
 
59
59
  ## Installation
60
60
 
@@ -68,7 +68,8 @@ python -m pip install --upgrade ibm-cloud-sdk-core
68
68
  The python-sdk-core project supports the following types of authentication:
69
69
  - Basic Authentication
70
70
  - Bearer Token Authentication
71
- - Identity and Access Management (IAM) Authentication
71
+ - Identity and Access Management (IAM) Authentication (grant type: apikey)
72
+ - Identity and Access Management (IAM) Authentication (grant type: assume)
72
73
  - Container Authentication
73
74
  - VPC Instance Authentication
74
75
  - Cloud Pak for Data Authentication
@@ -114,12 +115,12 @@ When running your application, you should see output like this if debug logging
114
115
  ```
115
116
  2024-09-16 15:44:45,174 [ibm-cloud-sdk-core:DEBUG] Get authenticator from environment, key=global_search
116
117
  2024-09-16 15:44:45,175 [ibm-cloud-sdk-core:DEBUG] Set service URL: https://api.global-search-tagging.cloud.ibm.com
117
- 2024-09-16 15:44:45,175 [ibm-cloud-sdk-core:DEBUG] Set User-Agent: ibm-python-sdk-core-3.21.0 os.name=Linux os.version=6.10.9-100.fc39.x86_64 python.version=3.12.5
118
+ 2024-09-16 15:44:45,175 [ibm-cloud-sdk-core:DEBUG] Set User-Agent: ibm-python-sdk-core-3.22.1 os.name=Linux os.version=6.10.9-100.fc39.x86_64 python.version=3.12.5
118
119
  2024-09-16 15:44:45,181 [ibm-cloud-sdk-core:DEBUG] Configuring BaseService instance with service name: global_search
119
120
  2024-09-16 15:44:45,181 [ibm-cloud-sdk-core:DEBUG] Performing synchronous token fetch
120
121
  2024-09-16 15:44:45,182 [ibm-cloud-sdk-core:DEBUG] Invoking IAM get_token operation: https://iam.cloud.ibm.com/identity/token
121
122
  2024-09-16 15:44:45,182 [urllib3.connectionpool:DEBUG] Starting new HTTPS connection (1): iam.cloud.ibm.com:443
122
- send: b'POST /identity/token HTTP/1.1\r\nHost: iam.cloud.ibm.com\r\nUser-Agent: ibm-python-sdk-core/iam-authenticator-3.21.0 os.name=Linux os.version=6.10.9-100.fc39.x86_64 python.version=3.12.5\r\nAccept-Encoding: gzip, deflate\r\nAccept: application/json\r\nConnection: keep-alive\r\nContent-Type: application/x-www-form-urlencoded\r\nContent-Length: 135\r\n\r\n'
123
+ send: b'POST /identity/token HTTP/1.1\r\nHost: iam.cloud.ibm.com\r\nUser-Agent: ibm-python-sdk-core/iam-authenticator-3.22.1 os.name=Linux os.version=6.10.9-100.fc39.x86_64 python.version=3.12.5\r\nAccept-Encoding: gzip, deflate\r\nAccept: application/json\r\nConnection: keep-alive\r\nContent-Type: application/x-www-form-urlencoded\r\nContent-Length: 135\r\n\r\n'
123
124
  send: b'grant_type=urn%3Aibm%3Aparams%3Aoauth%3Agrant-type%3Aapikey&apikey=[redacted]&response_type=cloud_iam'
124
125
  reply: 'HTTP/1.1 200 OK\r\n'
125
126
  header: Content-Type: application/json
@@ -4,12 +4,12 @@
4
4
  [![CLA assistant](https://cla-assistant.io/readme/badge/ibm/python-sdk-core)](https://cla-assistant.io/ibm/python-sdk-core)
5
5
  [![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg)](https://github.com/semantic-release/semantic-release)
6
6
 
7
- # IBM Python SDK Core Version 3.21.0
7
+ # IBM Python SDK Core Version 3.22.1
8
8
  This project contains core functionality required by Python code generated by the IBM Cloud OpenAPI SDK Generator
9
9
  (openapi-sdkgen).
10
10
 
11
11
  # Python Version
12
- The current minimum Python version supported is 3.8.
12
+ The current minimum Python version supported is 3.9.
13
13
 
14
14
  ## Installation
15
15
 
@@ -23,7 +23,8 @@ python -m pip install --upgrade ibm-cloud-sdk-core
23
23
  The python-sdk-core project supports the following types of authentication:
24
24
  - Basic Authentication
25
25
  - Bearer Token Authentication
26
- - Identity and Access Management (IAM) Authentication
26
+ - Identity and Access Management (IAM) Authentication (grant type: apikey)
27
+ - Identity and Access Management (IAM) Authentication (grant type: assume)
27
28
  - Container Authentication
28
29
  - VPC Instance Authentication
29
30
  - Cloud Pak for Data Authentication
@@ -69,12 +70,12 @@ When running your application, you should see output like this if debug logging
69
70
  ```
70
71
  2024-09-16 15:44:45,174 [ibm-cloud-sdk-core:DEBUG] Get authenticator from environment, key=global_search
71
72
  2024-09-16 15:44:45,175 [ibm-cloud-sdk-core:DEBUG] Set service URL: https://api.global-search-tagging.cloud.ibm.com
72
- 2024-09-16 15:44:45,175 [ibm-cloud-sdk-core:DEBUG] Set User-Agent: ibm-python-sdk-core-3.21.0 os.name=Linux os.version=6.10.9-100.fc39.x86_64 python.version=3.12.5
73
+ 2024-09-16 15:44:45,175 [ibm-cloud-sdk-core:DEBUG] Set User-Agent: ibm-python-sdk-core-3.22.1 os.name=Linux os.version=6.10.9-100.fc39.x86_64 python.version=3.12.5
73
74
  2024-09-16 15:44:45,181 [ibm-cloud-sdk-core:DEBUG] Configuring BaseService instance with service name: global_search
74
75
  2024-09-16 15:44:45,181 [ibm-cloud-sdk-core:DEBUG] Performing synchronous token fetch
75
76
  2024-09-16 15:44:45,182 [ibm-cloud-sdk-core:DEBUG] Invoking IAM get_token operation: https://iam.cloud.ibm.com/identity/token
76
77
  2024-09-16 15:44:45,182 [urllib3.connectionpool:DEBUG] Starting new HTTPS connection (1): iam.cloud.ibm.com:443
77
- send: b'POST /identity/token HTTP/1.1\r\nHost: iam.cloud.ibm.com\r\nUser-Agent: ibm-python-sdk-core/iam-authenticator-3.21.0 os.name=Linux os.version=6.10.9-100.fc39.x86_64 python.version=3.12.5\r\nAccept-Encoding: gzip, deflate\r\nAccept: application/json\r\nConnection: keep-alive\r\nContent-Type: application/x-www-form-urlencoded\r\nContent-Length: 135\r\n\r\n'
78
+ send: b'POST /identity/token HTTP/1.1\r\nHost: iam.cloud.ibm.com\r\nUser-Agent: ibm-python-sdk-core/iam-authenticator-3.22.1 os.name=Linux os.version=6.10.9-100.fc39.x86_64 python.version=3.12.5\r\nAccept-Encoding: gzip, deflate\r\nAccept: application/json\r\nConnection: keep-alive\r\nContent-Type: application/x-www-form-urlencoded\r\nContent-Length: 135\r\n\r\n'
78
79
  send: b'grant_type=urn%3Aibm%3Aparams%3Aoauth%3Agrant-type%3Aapikey&apikey=[redacted]&response_type=cloud_iam'
79
80
  reply: 'HTTP/1.1 200 OK\r\n'
80
81
  header: Content-Type: application/json
@@ -18,6 +18,7 @@ classes:
18
18
  BaseService: Abstract class for common functionality between each service.
19
19
  DetailedResponse: The object returned from successful service operations.
20
20
  IAMTokenManager: Requests and refreshes IAM tokens using an apikey, and optionally a client_id and client_secret.
21
+ IAMAssumeTokenManager: Requests and refreshes IAM tokens using an apikey and a trusted profile.
21
22
  JWTTokenManager: Abstract class for common functionality between each JWT token manager.
22
23
  CP4DTokenManager: Requests and refreshes CP4D tokens given a username and password.
23
24
  ApiException: Custom exception class for errors returned from service operations.
@@ -39,6 +40,7 @@ functions:
39
40
  from .base_service import BaseService
40
41
  from .detailed_response import DetailedResponse
41
42
  from .token_managers.iam_token_manager import IAMTokenManager
43
+ from .token_managers.iam_assume_token_manager import IAMAssumeTokenManager
42
44
  from .token_managers.jwt_token_manager import JWTTokenManager
43
45
  from .token_managers.cp4d_token_manager import CP4DTokenManager
44
46
  from .token_managers.container_token_manager import ContainerTokenManager
@@ -39,6 +39,7 @@ from .bearer_token_authenticator import BearerTokenAuthenticator
39
39
  from .container_authenticator import ContainerAuthenticator
40
40
  from .cp4d_authenticator import CloudPakForDataAuthenticator
41
41
  from .iam_authenticator import IAMAuthenticator
42
+ from .iam_assume_authenticator import IAMAssumeAuthenticator
42
43
  from .vpc_instance_authenticator import VPCInstanceAuthenticator
43
44
  from .no_auth_authenticator import NoAuthAuthenticator
44
45
  from .mcsp_authenticator import MCSPAuthenticator
@@ -24,6 +24,7 @@ class Authenticator(ABC):
24
24
  AUTHTYPE_BASIC = 'basic'
25
25
  AUTHTYPE_BEARERTOKEN = 'bearerToken'
26
26
  AUTHTYPE_IAM = 'iam'
27
+ AUTHTYPE_IAM_ASSUME = 'iamAssume'
27
28
  AUTHTYPE_CONTAINER = 'container'
28
29
  AUTHTYPE_CP4D = 'cp4d'
29
30
  AUTHTYPE_VPC = 'vpc'
@@ -66,6 +66,7 @@ class ContainerAuthenticator(IAMRequestBasedAuthenticator):
66
66
 
67
67
  def __init__(
68
68
  self,
69
+ *,
69
70
  cr_token_filename: Optional[str] = None,
70
71
  iam_profile_name: Optional[str] = None,
71
72
  iam_profile_id: Optional[str] = None,
@@ -0,0 +1,146 @@
1
+ # coding: utf-8
2
+
3
+ # Copyright 2024 IBM All Rights Reserved.
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # http://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+
17
+ from typing import Any, Dict, Optional
18
+
19
+ from ibm_cloud_sdk_core.authenticators.iam_authenticator import IAMAuthenticator
20
+ from ibm_cloud_sdk_core.token_managers.iam_assume_token_manager import IAMAssumeTokenManager
21
+
22
+ from .authenticator import Authenticator
23
+ from .iam_request_based_authenticator import IAMRequestBasedAuthenticator
24
+
25
+
26
+ class IAMAssumeAuthenticator(IAMRequestBasedAuthenticator):
27
+ """IAMAssumeAuthenticator obtains an IAM access token using the IAM "get-token" operation's
28
+ "assume" grant type. The authenticator obtains an initial IAM access token from a
29
+ user-supplied apikey, then exchanges this initial IAM access token for another IAM access token
30
+ that has "assumed the identity" of the specified trusted profile.
31
+
32
+ The bearer token will be sent as an Authorization header in the form:
33
+
34
+ Authorization: Bearer <bearer-token>
35
+
36
+ Args:
37
+ apikey: The IAM api key.
38
+
39
+ Keyword Args:
40
+ iam_profile_id: the ID of the trusted profile
41
+ iam_profile_crn: the CRN of the trusted profile
42
+ iam_profile_name: the name of the trusted profile (must be used together with `iam_account_id`)
43
+ iam_account_id: the ID of the trusted profile (must be used together with `iam_profile_name`)
44
+ url: The URL representing the IAM token service endpoint. If not specified, a suitable default value is used.
45
+ client_id: The client_id and client_secret fields are used to form
46
+ a "basic" authorization header for IAM token requests. Defaults to None.
47
+ client_secret: The client_id and client_secret fields are used to form
48
+ a "basic" authorization header for IAM token requests. Defaults to None.
49
+ disable_ssl_verification: A flag that indicates whether verification of
50
+ the server's SSL certificate should be disabled or not. Defaults to False.
51
+ headers: Default headers to be sent with every IAM token request. Defaults to None.
52
+ proxies: Dictionary for mapping request protocol to proxy URL. Defaults to None.
53
+ proxies.http (optional): The proxy endpoint to use for HTTP requests.
54
+ proxies.https (optional): The proxy endpoint to use for HTTPS requests.
55
+ scope: The "scope" to use when fetching the bearer token from the IAM token server.
56
+ This can be used to obtain an access token with a specific scope.
57
+
58
+ Attributes:
59
+ token_manager (IAMTokenManager): Retrieves and manages IAM tokens from the endpoint specified by the url.
60
+
61
+ Raises:
62
+ TypeError: The `disable_ssl_verification` is not a bool.
63
+ ValueError: The `apikey`, `client_id`, and/or `client_secret` are not valid for IAM token requests or the
64
+ following keyword arguments are incorrectly specified:
65
+ `iam_profile_id`, `iam_profile_crn`, `iam_profile_name`, `iam_account_id`.
66
+ """
67
+
68
+ def __init__(
69
+ self,
70
+ apikey: str,
71
+ *,
72
+ iam_profile_id: Optional[str] = None,
73
+ iam_profile_crn: Optional[str] = None,
74
+ iam_profile_name: Optional[str] = None,
75
+ iam_account_id: Optional[str] = None,
76
+ url: Optional[str] = None,
77
+ client_id: Optional[str] = None,
78
+ client_secret: Optional[str] = None,
79
+ disable_ssl_verification: bool = False,
80
+ headers: Optional[Dict[str, str]] = None,
81
+ proxies: Optional[Dict[str, str]] = None,
82
+ scope: Optional[str] = None,
83
+ ) -> None:
84
+ # Check the type of `disable_ssl_verification`. Must be a bool.
85
+ if not isinstance(disable_ssl_verification, bool):
86
+ raise TypeError('disable_ssl_verification must be a bool')
87
+
88
+ self.token_manager = IAMAssumeTokenManager(
89
+ apikey,
90
+ iam_profile_id=iam_profile_id,
91
+ iam_profile_crn=iam_profile_crn,
92
+ iam_profile_name=iam_profile_name,
93
+ iam_account_id=iam_account_id,
94
+ url=url,
95
+ client_id=client_id,
96
+ client_secret=client_secret,
97
+ disable_ssl_verification=disable_ssl_verification,
98
+ headers=headers,
99
+ proxies=proxies,
100
+ scope=scope,
101
+ )
102
+
103
+ self.validate()
104
+
105
+ # Disable all setter methods, inherited from the parent class.
106
+ def __getattribute__(self, name: str) -> Any:
107
+ if name.startswith("set_"):
108
+ raise AttributeError(f"'{self.__class__.__name__}' has no attribute '{name}'")
109
+
110
+ return super().__getattribute__(name)
111
+
112
+ def authentication_type(self) -> str:
113
+ """Returns this authenticator's type ('iamAssume')."""
114
+ return Authenticator.AUTHTYPE_IAM_ASSUME
115
+
116
+ def validate(self) -> None:
117
+ """Validates the provided IAM related arguments.
118
+
119
+ Ensure the following:
120
+ - `apikey` of the IAMTokenManager is not `None`, and has no bad characters
121
+ - both `client_id` and `client_secret` are set if either of them are defined
122
+ - the correct number and type of IAM profile and IAM account options are specified
123
+
124
+ Raises:
125
+ ValueError: The apikey, client_id, and/or client_secret are not valid for IAM token requests.
126
+ """
127
+ # Create a temporary IAM authenticator that we can use to validate our delegate.
128
+ tmp_authenticator = IAMAuthenticator("")
129
+ tmp_authenticator.token_manager = self.token_manager.iam_delegate
130
+ tmp_authenticator.validate()
131
+ del tmp_authenticator
132
+
133
+ # Only one of the following arguments must be specified.
134
+ mutually_exclusive_attributes = [
135
+ self.token_manager.iam_profile_id,
136
+ self.token_manager.iam_profile_crn,
137
+ self.token_manager.iam_profile_name,
138
+ ]
139
+ if list(map(bool, mutually_exclusive_attributes)).count(True) != 1:
140
+ raise ValueError(
141
+ 'Exactly one of `iam_profile_id`, `iam_profile_crn`, or `iam_profile_name` must be specified.'
142
+ )
143
+
144
+ # `iam_account_id` must be specified iff `iam_profile_name` is used.
145
+ if self.token_manager.iam_profile_name and not self.token_manager.iam_account_id:
146
+ raise ValueError('`iam_profile_name` and `iam_account_id` must be provided together, or not at all.')
@@ -508,4 +508,4 @@ class BaseService:
508
508
 
509
509
  @staticmethod
510
510
  def _encode_path_vars(*args) -> None:
511
- return (requests.utils.quote(x, safe='') for x in args)
511
+ return BaseService.encode_path_vars(*args)
@@ -21,6 +21,7 @@ from .authenticators import (
21
21
  ContainerAuthenticator,
22
22
  CloudPakForDataAuthenticator,
23
23
  IAMAuthenticator,
24
+ IAMAssumeAuthenticator,
24
25
  NoAuthAuthenticator,
25
26
  VPCInstanceAuthenticator,
26
27
  MCSPAuthenticator,
@@ -55,6 +56,7 @@ def get_authenticator_from_environment(service_name: str) -> Authenticator:
55
56
  return authenticator
56
57
 
57
58
 
59
+ # pylint: disable=too-many-branches
58
60
  def __construct_authenticator(config: dict) -> Authenticator:
59
61
  # Determine the authentication type if not specified explicitly.
60
62
  if config.get('AUTH_TYPE'):
@@ -104,6 +106,19 @@ def __construct_authenticator(config: dict) -> Authenticator:
104
106
  disable_ssl_verification=config.get('AUTH_DISABLE_SSL', 'false').lower() == 'true',
105
107
  scope=config.get('SCOPE'),
106
108
  )
109
+ elif auth_type == Authenticator.AUTHTYPE_IAM_ASSUME.lower():
110
+ authenticator = IAMAssumeAuthenticator(
111
+ apikey=config.get('APIKEY'),
112
+ iam_profile_id=config.get('IAM_PROFILE_ID'),
113
+ iam_profile_crn=config.get('IAM_PROFILE_CRN'),
114
+ iam_profile_name=config.get('IAM_PROFILE_NAME'),
115
+ iam_account_id=config.get('IAM_ACCOUNT_ID'),
116
+ url=config.get('AUTH_URL'),
117
+ client_id=config.get('CLIENT_ID'),
118
+ client_secret=config.get('CLIENT_SECRET'),
119
+ disable_ssl_verification=config.get('AUTH_DISABLE_SSL', 'false').lower() == 'true',
120
+ scope=config.get('SCOPE'),
121
+ )
107
122
  elif auth_type == Authenticator.AUTHTYPE_VPC.lower():
108
123
  authenticator = VPCInstanceAuthenticator(
109
124
  iam_profile_crn=config.get('IAM_PROFILE_CRN'),
@@ -85,6 +85,7 @@ class ContainerTokenManager(IAMRequestBasedTokenManager):
85
85
 
86
86
  def __init__(
87
87
  self,
88
+ *,
88
89
  cr_token_filename: Optional[str] = None,
89
90
  iam_profile_name: Optional[str] = None,
90
91
  iam_profile_id: Optional[str] = None,
@@ -0,0 +1,150 @@
1
+ # coding: utf-8
2
+
3
+ # Copyright 2024 IBM All Rights Reserved.
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # http://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+
17
+ from typing import Any, Dict, Optional
18
+
19
+ from ibm_cloud_sdk_core.token_managers.iam_token_manager import IAMTokenManager
20
+
21
+ from .iam_request_based_token_manager import IAMRequestBasedTokenManager
22
+ from ..private_helpers import _build_user_agent
23
+
24
+
25
+ # pylint: disable=too-many-instance-attributes
26
+ class IAMAssumeTokenManager(IAMRequestBasedTokenManager):
27
+ """The IAMAssumeTokenManager takes an api key and information about a trusted profile then performs the necessary
28
+ interactions with the IAM token service to obtain and store a suitable bearer token. This token "assumes" the
29
+ identity of the provided trusted profile.
30
+
31
+ Attributes:
32
+ iam_profile_id (str): the ID of the trusted profile
33
+ iam_profile_crn (str): the CRN of the trusted profile
34
+ iam_profile_name (str): the name of the trusted profile (must be used together with `iam_account_id`)
35
+ iam_account_id (str): the ID of the trusted profile (must be used together with `iam_profile_name`)
36
+ iam_delegate (IAMTokenManager): an IAMTokenManager instance used to obtain the user's IAM access token
37
+ from the `apikey`.
38
+ url (str): The IAM endpoint to token requests.
39
+ headers (dict): Default headers to be sent with every IAM token request.
40
+ proxies (dict): Proxies to use for communicating with IAM.
41
+ proxies.http (str): The proxy endpoint to use for HTTP requests.
42
+ proxies.https (str): The proxy endpoint to use for HTTPS requests.
43
+ http_config (dict): A dictionary containing values that control the timeout, proxies, and etc of HTTP requests.
44
+
45
+ Args:
46
+ apikey: A generated APIKey from IBM Cloud.
47
+
48
+ Keyword Args:
49
+ iam_profile_id: the ID of the trusted profile
50
+ iam_profile_crn: the CRN of the trusted profile
51
+ iam_profile_name: the name of the trusted profile (must be used together with `iam_account_id`)
52
+ iam_account_id: the ID of the trusted profile (must be used together with `iam_profile_name`)
53
+ url: The IAM endpoint to token requests. Defaults to None.
54
+ client_id: The client_id and client_secret fields are used to form
55
+ a "basic auth" Authorization header for interactions with the IAM token server.
56
+ Defaults to None.
57
+ client_secret: The client_id and client_secret fields are used to form
58
+ a "basic auth" Authorization header for interactions with the IAM token server.
59
+ Defaults to None.
60
+ disable_ssl_verification: A flag that indicates whether verification of
61
+ the server's SSL certificate should be disabled or not. Defaults to False.
62
+ headers: Default headers to be sent with every IAM token request. Defaults to None.
63
+ proxies: Proxies to use for communicating with IAM. Defaults to None.
64
+ proxies.http: The proxy endpoint to use for HTTP requests.
65
+ proxies.https: The proxy endpoint to use for HTTPS requests.
66
+ scope: The "scope" to use when fetching the bearer token from the IAM token server.
67
+ This can be used to obtain an access token with a specific scope.
68
+ """
69
+
70
+ def __init__(
71
+ self,
72
+ apikey: str,
73
+ *,
74
+ iam_profile_id: Optional[str] = None,
75
+ iam_profile_crn: Optional[str] = None,
76
+ iam_profile_name: Optional[str] = None,
77
+ iam_account_id: Optional[str] = None,
78
+ url: Optional[str] = None,
79
+ client_id: Optional[str] = None,
80
+ client_secret: Optional[str] = None,
81
+ disable_ssl_verification: bool = False,
82
+ headers: Optional[Dict[str, str]] = None,
83
+ proxies: Optional[Dict[str, str]] = None,
84
+ scope: Optional[str] = None,
85
+ ) -> None:
86
+ super().__init__(
87
+ url=url,
88
+ disable_ssl_verification=disable_ssl_verification,
89
+ headers=headers,
90
+ proxies=proxies,
91
+ )
92
+
93
+ self.iam_profile_id = iam_profile_id
94
+ self.iam_profile_crn = iam_profile_crn
95
+ self.iam_profile_name = iam_profile_name
96
+ self.iam_account_id = iam_account_id
97
+
98
+ # Create an IAMTokenManager instance that will be used to obtain an IAM access token
99
+ # for the IAM "assume" token exchange. We use the same configuration that's provided
100
+ # for this class, as they have a lot in common.
101
+ self.iam_delegate = IAMTokenManager(
102
+ apikey=apikey,
103
+ url=url,
104
+ client_id=client_id,
105
+ client_secret=client_secret,
106
+ disable_ssl_verification=disable_ssl_verification,
107
+ headers=headers,
108
+ proxies=proxies,
109
+ scope=scope,
110
+ )
111
+
112
+ self.request_payload['grant_type'] = 'urn:ibm:params:oauth:grant-type:assume'
113
+ self._set_user_agent(_build_user_agent('iam-assume-authenticator'))
114
+
115
+ # Disable all setter methods, inherited from the parent class.
116
+ def __getattribute__(self, name: str) -> Any:
117
+ if name.startswith("set_"):
118
+ raise AttributeError(f"'{self.__class__.__name__}' has no attribute '{name}'")
119
+
120
+ return super().__getattribute__(name)
121
+
122
+ def request_token(self) -> Dict:
123
+ """Retrieves a standard IAM access token by using the IAM token manager
124
+ then obtains another access token for the assumed identity.
125
+
126
+ Returns:
127
+ A dictionary that contains the access token of the assumed IAM identity.
128
+ """
129
+ # Fetch the user's original IAM access token before trying to assume.
130
+ self.request_payload['access_token'] = self.iam_delegate.get_token()
131
+
132
+ if self.iam_profile_crn:
133
+ self.request_payload['profile_crn'] = self.iam_profile_crn
134
+ if self.iam_profile_id:
135
+ self.request_payload['profile_id'] = self.iam_profile_id
136
+ else:
137
+ self.request_payload['profile_name'] = self.iam_profile_name
138
+ self.request_payload['account'] = self.iam_account_id
139
+
140
+ # Make sure that the unsupported attributes will never be included in the requests.
141
+ self.client_id = None
142
+ self.client_secret = None
143
+ self.scope = None
144
+
145
+ return super().request_token()
146
+
147
+ def _save_token_info(self, token_response: Dict) -> None:
148
+ super()._save_token_info(token_response)
149
+ # Set refresh token to None unconditionally.
150
+ self.refresh_token = None
@@ -70,6 +70,7 @@ class IAMRequestBasedTokenManager(JWTTokenManager):
70
70
 
71
71
  def __init__(
72
72
  self,
73
+ *,
73
74
  url: Optional[str] = None,
74
75
  client_id: Optional[str] = None,
75
76
  client_secret: Optional[str] = None,
@@ -0,0 +1 @@
1
+ __version__ = '3.22.1'
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.2
2
2
  Name: ibm-cloud-sdk-core
3
- Version: 3.21.0
3
+ Version: 3.22.1
4
4
  Summary: Core library used by SDKs for IBM Cloud Services
5
5
  Author-email: IBM <devxsdk@us.ibm.com>
6
6
  Project-URL: Repository, https://github.com/IBM/python-sdk-core
@@ -12,11 +12,11 @@ Project-URL: License, https://github.com/IBM/python-sdk-core/blob/main/LICENSE
12
12
  Keywords: ibm,cloud,ibm cloud services
13
13
  Classifier: Programming Language :: Python
14
14
  Classifier: Programming Language :: Python :: 3
15
- Classifier: Programming Language :: Python :: 3.8
16
15
  Classifier: Programming Language :: Python :: 3.9
17
16
  Classifier: Programming Language :: Python :: 3.10
18
17
  Classifier: Programming Language :: Python :: 3.11
19
18
  Classifier: Programming Language :: Python :: 3.12
19
+ Classifier: Programming Language :: Python :: 3.13
20
20
  Classifier: Development Status :: 5 - Production/Stable
21
21
  Classifier: Environment :: Console
22
22
  Classifier: Intended Audience :: Developers
@@ -25,7 +25,7 @@ Classifier: Operating System :: OS Independent
25
25
  Classifier: Topic :: Software Development :: Libraries
26
26
  Classifier: Topic :: Software Development :: Libraries :: Python Modules
27
27
  Classifier: Topic :: Software Development :: Libraries :: Application Frameworks
28
- Requires-Python: >=3.8
28
+ Requires-Python: >=3.9
29
29
  Description-Content-Type: text/markdown
30
30
  License-File: LICENSE
31
31
  Requires-Dist: requests<3.0.0,>=2.31.0
@@ -49,12 +49,12 @@ Requires-Dist: twine; extra == "publish"
49
49
  [![CLA assistant](https://cla-assistant.io/readme/badge/ibm/python-sdk-core)](https://cla-assistant.io/ibm/python-sdk-core)
50
50
  [![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg)](https://github.com/semantic-release/semantic-release)
51
51
 
52
- # IBM Python SDK Core Version 3.21.0
52
+ # IBM Python SDK Core Version 3.22.1
53
53
  This project contains core functionality required by Python code generated by the IBM Cloud OpenAPI SDK Generator
54
54
  (openapi-sdkgen).
55
55
 
56
56
  # Python Version
57
- The current minimum Python version supported is 3.8.
57
+ The current minimum Python version supported is 3.9.
58
58
 
59
59
  ## Installation
60
60
 
@@ -68,7 +68,8 @@ python -m pip install --upgrade ibm-cloud-sdk-core
68
68
  The python-sdk-core project supports the following types of authentication:
69
69
  - Basic Authentication
70
70
  - Bearer Token Authentication
71
- - Identity and Access Management (IAM) Authentication
71
+ - Identity and Access Management (IAM) Authentication (grant type: apikey)
72
+ - Identity and Access Management (IAM) Authentication (grant type: assume)
72
73
  - Container Authentication
73
74
  - VPC Instance Authentication
74
75
  - Cloud Pak for Data Authentication
@@ -114,12 +115,12 @@ When running your application, you should see output like this if debug logging
114
115
  ```
115
116
  2024-09-16 15:44:45,174 [ibm-cloud-sdk-core:DEBUG] Get authenticator from environment, key=global_search
116
117
  2024-09-16 15:44:45,175 [ibm-cloud-sdk-core:DEBUG] Set service URL: https://api.global-search-tagging.cloud.ibm.com
117
- 2024-09-16 15:44:45,175 [ibm-cloud-sdk-core:DEBUG] Set User-Agent: ibm-python-sdk-core-3.21.0 os.name=Linux os.version=6.10.9-100.fc39.x86_64 python.version=3.12.5
118
+ 2024-09-16 15:44:45,175 [ibm-cloud-sdk-core:DEBUG] Set User-Agent: ibm-python-sdk-core-3.22.1 os.name=Linux os.version=6.10.9-100.fc39.x86_64 python.version=3.12.5
118
119
  2024-09-16 15:44:45,181 [ibm-cloud-sdk-core:DEBUG] Configuring BaseService instance with service name: global_search
119
120
  2024-09-16 15:44:45,181 [ibm-cloud-sdk-core:DEBUG] Performing synchronous token fetch
120
121
  2024-09-16 15:44:45,182 [ibm-cloud-sdk-core:DEBUG] Invoking IAM get_token operation: https://iam.cloud.ibm.com/identity/token
121
122
  2024-09-16 15:44:45,182 [urllib3.connectionpool:DEBUG] Starting new HTTPS connection (1): iam.cloud.ibm.com:443
122
- send: b'POST /identity/token HTTP/1.1\r\nHost: iam.cloud.ibm.com\r\nUser-Agent: ibm-python-sdk-core/iam-authenticator-3.21.0 os.name=Linux os.version=6.10.9-100.fc39.x86_64 python.version=3.12.5\r\nAccept-Encoding: gzip, deflate\r\nAccept: application/json\r\nConnection: keep-alive\r\nContent-Type: application/x-www-form-urlencoded\r\nContent-Length: 135\r\n\r\n'
123
+ send: b'POST /identity/token HTTP/1.1\r\nHost: iam.cloud.ibm.com\r\nUser-Agent: ibm-python-sdk-core/iam-authenticator-3.22.1 os.name=Linux os.version=6.10.9-100.fc39.x86_64 python.version=3.12.5\r\nAccept-Encoding: gzip, deflate\r\nAccept: application/json\r\nConnection: keep-alive\r\nContent-Type: application/x-www-form-urlencoded\r\nContent-Length: 135\r\n\r\n'
123
124
  send: b'grant_type=urn%3Aibm%3Aparams%3Aoauth%3Agrant-type%3Aapikey&apikey=[redacted]&response_type=cloud_iam'
124
125
  reply: 'HTTP/1.1 200 OK\r\n'
125
126
  header: Content-Type: application/json
@@ -23,6 +23,7 @@ ibm_cloud_sdk_core/authenticators/basic_authenticator.py
23
23
  ibm_cloud_sdk_core/authenticators/bearer_token_authenticator.py
24
24
  ibm_cloud_sdk_core/authenticators/container_authenticator.py
25
25
  ibm_cloud_sdk_core/authenticators/cp4d_authenticator.py
26
+ ibm_cloud_sdk_core/authenticators/iam_assume_authenticator.py
26
27
  ibm_cloud_sdk_core/authenticators/iam_authenticator.py
27
28
  ibm_cloud_sdk_core/authenticators/iam_request_based_authenticator.py
28
29
  ibm_cloud_sdk_core/authenticators/mcsp_authenticator.py
@@ -31,6 +32,7 @@ ibm_cloud_sdk_core/authenticators/vpc_instance_authenticator.py
31
32
  ibm_cloud_sdk_core/token_managers/__init__.py
32
33
  ibm_cloud_sdk_core/token_managers/container_token_manager.py
33
34
  ibm_cloud_sdk_core/token_managers/cp4d_token_manager.py
35
+ ibm_cloud_sdk_core/token_managers/iam_assume_token_manager.py
34
36
  ibm_cloud_sdk_core/token_managers/iam_request_based_token_manager.py
35
37
  ibm_cloud_sdk_core/token_managers/iam_token_manager.py
36
38
  ibm_cloud_sdk_core/token_managers/jwt_token_manager.py
@@ -48,6 +50,8 @@ test/test_cp4d_authenticator.py
48
50
  test/test_cp4d_token_manager.py
49
51
  test/test_detailed_response.py
50
52
  test/test_http_adapter.py
53
+ test/test_iam_assume_authenticator.py
54
+ test/test_iam_assume_token_manager.py
51
55
  test/test_iam_authenticator.py
52
56
  test/test_iam_token_manager.py
53
57
  test/test_jwt_token_manager.py
@@ -1,20 +1,20 @@
1
1
  [project]
2
2
  name = "ibm-cloud-sdk-core"
3
- version = "3.21.0"
3
+ version = "3.22.1"
4
4
  authors = [
5
5
  { name="IBM", email="devxsdk@us.ibm.com" }
6
6
  ]
7
7
  description = "Core library used by SDKs for IBM Cloud Services"
8
8
  readme = "README.md"
9
- requires-python = ">=3.8"
9
+ requires-python = ">=3.9"
10
10
  classifiers = [
11
11
  "Programming Language :: Python",
12
12
  "Programming Language :: Python :: 3",
13
- "Programming Language :: Python :: 3.8",
14
13
  "Programming Language :: Python :: 3.9",
15
14
  "Programming Language :: Python :: 3.10",
16
15
  "Programming Language :: Python :: 3.11",
17
16
  "Programming Language :: Python :: 3.12",
17
+ "Programming Language :: Python :: 3.13",
18
18
  "Development Status :: 5 - Production/Stable",
19
19
  "Environment :: Console",
20
20
  "Intended Audience :: Developers",
@@ -19,3 +19,5 @@ def test_authenticator():
19
19
  authenticator = TestAuthenticator()
20
20
  assert authenticator is not None
21
21
  assert authenticator.authentication_type() == Authenticator.AUTHTYPE_UNKNOWN
22
+ assert authenticator.validate() is None
23
+ assert authenticator.authenticate(None) is None