dnastack-client-library 3.1.145__py3-none-any.whl → 3.1.159__py3-none-any.whl
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.
- dnastack/cli/commands/auth/commands.py +1 -1
- dnastack/client/workbench/samples/models.py +0 -1
- dnastack/common/auth_manager.py +8 -1
- dnastack/constants.py +1 -1
- dnastack/context/manager.py +1 -1
- dnastack/http/authenticators/oauth2_adapter/token_exchange.py +1 -1
- {dnastack_client_library-3.1.145.dist-info → dnastack_client_library-3.1.159.dist-info}/METADATA +10 -1
- {dnastack_client_library-3.1.145.dist-info → dnastack_client_library-3.1.159.dist-info}/RECORD +12 -12
- {dnastack_client_library-3.1.145.dist-info → dnastack_client_library-3.1.159.dist-info}/WHEEL +0 -0
- {dnastack_client_library-3.1.145.dist-info → dnastack_client_library-3.1.159.dist-info}/entry_points.txt +0 -0
- {dnastack_client_library-3.1.145.dist-info → dnastack_client_library-3.1.159.dist-info}/licenses/LICENSE +0 -0
- {dnastack_client_library-3.1.145.dist-info → dnastack_client_library-3.1.159.dist-info}/top_level.txt +0 -0
|
@@ -158,5 +158,5 @@ class AuthCommandHandler:
|
|
|
158
158
|
auth_manager.events.on('no-refresh-token', handle_no_refresh_token)
|
|
159
159
|
auth_manager.events.on('refresh-skipped', handle_refresh_skipped)
|
|
160
160
|
|
|
161
|
-
auth_manager.initiate_authentications(endpoint_ids, force_refresh, revoke_existing)
|
|
161
|
+
auth_manager.initiate_authentications(endpoint_ids, force_refresh, revoke_existing, allow_token_exchange=False)
|
|
162
162
|
|
dnastack/common/auth_manager.py
CHANGED
|
@@ -10,6 +10,7 @@ from dnastack.common.tracing import Span
|
|
|
10
10
|
from dnastack.context.models import Context
|
|
11
11
|
from dnastack.http.authenticators.abstract import Authenticator, AuthStateStatus, AuthState
|
|
12
12
|
from dnastack.http.authenticators.factory import HttpAuthenticatorFactory
|
|
13
|
+
from dnastack.http.authenticators.oauth2_adapter.models import GRANT_TYPE_TOKEN_EXCHANGE
|
|
13
14
|
|
|
14
15
|
|
|
15
16
|
class ExtendedAuthState(AuthState):
|
|
@@ -127,7 +128,8 @@ class AuthManager:
|
|
|
127
128
|
def initiate_authentications(self,
|
|
128
129
|
endpoint_ids: List[str] = None,
|
|
129
130
|
force_refresh: bool = False,
|
|
130
|
-
revoke_existing: bool = False
|
|
131
|
+
revoke_existing: bool = False,
|
|
132
|
+
allow_token_exchange: bool = False):
|
|
131
133
|
trace = Span(origin=self)
|
|
132
134
|
|
|
133
135
|
authenticators = self.get_authenticators(endpoint_ids)
|
|
@@ -137,6 +139,11 @@ class AuthManager:
|
|
|
137
139
|
|
|
138
140
|
for authenticator in authenticators:
|
|
139
141
|
state = authenticator.get_state()
|
|
142
|
+
if not allow_token_exchange and state.auth_info.get('grant_type') == GRANT_TYPE_TOKEN_EXCHANGE:
|
|
143
|
+
self._logger.debug(f'Skipping token exchange authenticator {authenticator.session_id} (allow_token_exchange=False)')
|
|
144
|
+
index += 1
|
|
145
|
+
continue
|
|
146
|
+
|
|
140
147
|
basic_event_info = dict(session_id=authenticator.session_id,
|
|
141
148
|
state=state,
|
|
142
149
|
index=index,
|
dnastack/constants.py
CHANGED
dnastack/context/manager.py
CHANGED
|
@@ -336,7 +336,7 @@ class BaseContextManager:
|
|
|
336
336
|
for event_type in self.__propagated_auth_event_types:
|
|
337
337
|
self.events.relay_from(auth_manager.events, event_type)
|
|
338
338
|
|
|
339
|
-
auth_manager.initiate_authentications()
|
|
339
|
+
auth_manager.initiate_authentications(allow_token_exchange=platform_credentials)
|
|
340
340
|
del auth_manager
|
|
341
341
|
|
|
342
342
|
# Then, return the repository.
|
|
@@ -47,7 +47,7 @@ class TokenExchangeAdapter(OAuth2Adapter):
|
|
|
47
47
|
if context_subject_token:
|
|
48
48
|
return context_subject_token
|
|
49
49
|
|
|
50
|
-
audience = self._auth_info.audience or self._auth_info.resource_url
|
|
50
|
+
audience = self._auth_info.audience or self._auth_info.client_id or self._auth_info.resource_url
|
|
51
51
|
token = self._fetch_cloud_identity_token(audience, trace_context)
|
|
52
52
|
if token:
|
|
53
53
|
return token
|
{dnastack_client_library-3.1.145.dist-info → dnastack_client_library-3.1.159.dist-info}/METADATA
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: dnastack-client-library
|
|
3
|
-
Version: 3.1.
|
|
3
|
+
Version: 3.1.159
|
|
4
4
|
Summary: DNAstack's GA4GH library and CLI
|
|
5
5
|
Author-email: DNAstack <devs@dnastack.com>
|
|
6
6
|
License: Apache License, Version 2.0
|
|
@@ -27,6 +27,15 @@ Requires-Dist: kotoba
|
|
|
27
27
|
Requires-Dist: imagination>=3.3.1
|
|
28
28
|
Requires-Dist: requests-toolbelt<1,>=0.9.1
|
|
29
29
|
Requires-Dist: httpie>=3.2.1
|
|
30
|
+
Requires-Dist: beautifulsoup4>=4.10.0
|
|
31
|
+
Requires-Dist: flask~=2.1
|
|
32
|
+
Requires-Dist: google-cloud-secret-manager
|
|
33
|
+
Requires-Dist: google-crc32c
|
|
34
|
+
Requires-Dist: pandas
|
|
35
|
+
Requires-Dist: python-dotenv
|
|
36
|
+
Requires-Dist: pip>=21.3.1
|
|
37
|
+
Requires-Dist: packaging>=21.3
|
|
38
|
+
Requires-Dist: selenium>=4.1.0
|
|
30
39
|
Provides-Extra: test
|
|
31
40
|
Requires-Dist: selenium>=3.141.0; extra == "test"
|
|
32
41
|
Requires-Dist: pyjwt>=2.1.0; extra == "test"
|
{dnastack_client_library-3.1.145.dist-info → dnastack_client_library-3.1.159.dist-info}/RECORD
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
dnastack/__init__.py,sha256=mslf7se8vBSK_HkqWTGPdibeVhT4xyKXgzQBV7dEK1M,333
|
|
2
2
|
dnastack/__main__.py,sha256=EKmtIs4TBseQJi-OT_U6LqRyKLiyrGTBuTQg9zE-G2I,4376
|
|
3
|
-
dnastack/constants.py,sha256=
|
|
3
|
+
dnastack/constants.py,sha256=Lgz298BXYq_2gOGdhlAdlDkzJjgpA-c6hddW5d5bRuQ,114
|
|
4
4
|
dnastack/feature_flags.py,sha256=RK_V_Ovncoe6NeTheAA_frP-kYkZC1fDlTbbup2KYG4,1419
|
|
5
5
|
dnastack/json_path.py,sha256=TyghhDf7nGQmnsUWBhenU_fKsE_Ez-HLVER6HgH5-hU,2700
|
|
6
6
|
dnastack/omics_cli.py,sha256=ZppKZTHv_XjUUZyRIzSkx0Ug5ODAYrCOTsU0ezCOVrA,3694
|
|
@@ -31,7 +31,7 @@ dnastack/cli/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
|
31
31
|
dnastack/cli/commands/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
32
32
|
dnastack/cli/commands/utils.py,sha256=ZwKTyyvqBTrt27cF9wF6SglE01t7NkHWLMjXegi_6iA,574
|
|
33
33
|
dnastack/cli/commands/auth/__init__.py,sha256=SGnt7w8ccS1ED6EQzBq4PaH3kqoLuXC4wrFMa7P_Vg4,313
|
|
34
|
-
dnastack/cli/commands/auth/commands.py,sha256=
|
|
34
|
+
dnastack/cli/commands/auth/commands.py,sha256=FIQLegV5h6T2IP-fh4xcp7aItC4OkKSOHIlFCBQK1bw,6498
|
|
35
35
|
dnastack/cli/commands/auth/event_handlers.py,sha256=g6FPChlBZZr7M6hejGWT6Z3THNZr7AtbV0S5PJEtU_o,3627
|
|
36
36
|
dnastack/cli/commands/collections/__init__.py,sha256=hrsjIkOvqOnYUN4xwoSB3iTCLrbX6qG-XeafVzoGleI,535
|
|
37
37
|
dnastack/cli/commands/collections/commands.py,sha256=yawGsTZfgkTYvyCIyRaup9mEQOrr_nfE7Cj6lPcEaIk,8978
|
|
@@ -141,7 +141,7 @@ dnastack/client/workbench/ewes/client.py,sha256=yIqjwyyY9q0NrxpTX6LrnlnjavHoa6Fo
|
|
|
141
141
|
dnastack/client/workbench/ewes/models.py,sha256=wnzthvBjzG_Zq1lyVJBTN5gWgT9gO1sZ0-Q91isy7FA,8214
|
|
142
142
|
dnastack/client/workbench/samples/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
143
143
|
dnastack/client/workbench/samples/client.py,sha256=2X34SYTjV6n4yZz0q7Kaa4NPWDHRi2ut0uJWL3zXZWA,5901
|
|
144
|
-
dnastack/client/workbench/samples/models.py,sha256=
|
|
144
|
+
dnastack/client/workbench/samples/models.py,sha256=g_04aDltLVRVCstOGkINqJNo1XSKB2aXWwnMfDEhC0Y,1466
|
|
145
145
|
dnastack/client/workbench/storage/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
146
146
|
dnastack/client/workbench/storage/client.py,sha256=uMr0mtwMj07TKhS2_IHIKoF-JkrEUiFdGpijVHP-vb4,4080
|
|
147
147
|
dnastack/client/workbench/storage/models.py,sha256=S5P1m-blJH5x4glmIcu1KTDoJEjt8Qfp-lEeBW9I7PI,2219
|
|
@@ -153,7 +153,7 @@ dnastack/client/workbench/workflow/client.py,sha256=ZbQAzJ1DPoPcMGkJEKSyV37pEpSk
|
|
|
153
153
|
dnastack/client/workbench/workflow/models.py,sha256=xokiS_Kyet3zbyB8i5Z3Uq3wmvcgPMkTQ2WGWhFrexw,4481
|
|
154
154
|
dnastack/client/workbench/workflow/utils.py,sha256=Yw9X-Gtu5lYPDCZjimFJMhrib9ELl07YyD4A-L8Y7pE,4661
|
|
155
155
|
dnastack/common/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
156
|
-
dnastack/common/auth_manager.py,sha256=
|
|
156
|
+
dnastack/common/auth_manager.py,sha256=AFMDIR01AQ2EPNyUZ7RMS8A8FvdRUMEhLtFjTd5Mdqw,9051
|
|
157
157
|
dnastack/common/class_decorator.py,sha256=vu-TytoFW06IZwuTl54oR-YKqftAPeyIGJeqSG3WvO4,2470
|
|
158
158
|
dnastack/common/console.py,sha256=edvhWiXtPPXg508RCcfuWKElpLdRu2A9p1kLhdsTtSw,602
|
|
159
159
|
dnastack/common/environments.py,sha256=VDSSxvtxd60IxAyjgwx9YJuAwWkorhnAMN-XaV087gw,2529
|
|
@@ -175,7 +175,7 @@ dnastack/configuration/wrapper.py,sha256=qLmI8bgwTTflym_e0HC85IwdoCuLfazJt_O8mJJ
|
|
|
175
175
|
dnastack/context/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
176
176
|
dnastack/context/context_wraper.py,sha256=G88LciVBW5HJkvhi3oYS6RlrH_-l0H2CSYSU8nS33_0,315
|
|
177
177
|
dnastack/context/helper.py,sha256=GOlmi2ddkstSRBo3sG6yB8_2oMFqN1o6yI8Ny-gpkbQ,1475
|
|
178
|
-
dnastack/context/manager.py,sha256=
|
|
178
|
+
dnastack/context/manager.py,sha256=4Z_KhDhIClkUOiT605yi9SwehdqiJwYth4T3G3Lb4rM,17395
|
|
179
179
|
dnastack/context/models.py,sha256=BXSJZSwiopNZ_l2nY8uzofoYebLYwu0BLbirSBIY110,671
|
|
180
180
|
dnastack/http/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
181
181
|
dnastack/http/client_factory.py,sha256=HdRZpTEnFQcHEdVbdYl7AbCcRUv3K3kVyznIxEWIqvA,650
|
|
@@ -193,10 +193,10 @@ dnastack/http/authenticators/oauth2_adapter/cloud_providers.py,sha256=UHQ-YHHr5i
|
|
|
193
193
|
dnastack/http/authenticators/oauth2_adapter/device_code_flow.py,sha256=dXI5CyUcsqYg6gf5vDC_3eY6Cc-H1C8W7FeD_24j92A,6750
|
|
194
194
|
dnastack/http/authenticators/oauth2_adapter/factory.py,sha256=ZtNXOklWEim-26ooNoPp3ji_hRg1vf4fHHnY94F0wLI,1087
|
|
195
195
|
dnastack/http/authenticators/oauth2_adapter/models.py,sha256=iY7asrSElyjubInrGV5rJKKZAxJWeq7csnaj-EqMq00,943
|
|
196
|
-
dnastack/http/authenticators/oauth2_adapter/token_exchange.py,sha256=
|
|
197
|
-
dnastack_client_library-3.1.
|
|
198
|
-
dnastack_client_library-3.1.
|
|
199
|
-
dnastack_client_library-3.1.
|
|
200
|
-
dnastack_client_library-3.1.
|
|
201
|
-
dnastack_client_library-3.1.
|
|
202
|
-
dnastack_client_library-3.1.
|
|
196
|
+
dnastack/http/authenticators/oauth2_adapter/token_exchange.py,sha256=nSuAsSKWa_UNqHSbPMOEk4komaFITYAnE04Sk5WOrLc,6332
|
|
197
|
+
dnastack_client_library-3.1.159.dist-info/licenses/LICENSE,sha256=uwybO-wUbQhxkosgjhJlxmYATMy-AzoULFO9FUedE34,11580
|
|
198
|
+
dnastack_client_library-3.1.159.dist-info/METADATA,sha256=8WpjZzXD8-Zq7hzlzrm953TLgASaQrScgbOPFqKldYg,1766
|
|
199
|
+
dnastack_client_library-3.1.159.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
200
|
+
dnastack_client_library-3.1.159.dist-info/entry_points.txt,sha256=Y6OeicsiyGn3-8D-SiV4NiKlJgXfkSqK88kFBR6R1rY,89
|
|
201
|
+
dnastack_client_library-3.1.159.dist-info/top_level.txt,sha256=P2RgRyqJ7hfNy1wLVRoVLJYEppUVkCX3syGK9zBqkt8,9
|
|
202
|
+
dnastack_client_library-3.1.159.dist-info/RECORD,,
|
{dnastack_client_library-3.1.145.dist-info → dnastack_client_library-3.1.159.dist-info}/WHEEL
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|