sumo-wrapper-python 1.0.17__tar.gz → 1.0.18__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.
Potentially problematic release.
This version of sumo-wrapper-python might be problematic. Click here for more details.
- {sumo_wrapper_python-1.0.17 → sumo_wrapper_python-1.0.18}/PKG-INFO +1 -1
- {sumo_wrapper_python-1.0.17 → sumo_wrapper_python-1.0.18}/src/sumo/wrapper/_auth_provider.py +20 -17
- {sumo_wrapper_python-1.0.17 → sumo_wrapper_python-1.0.18}/src/sumo/wrapper/_version.py +2 -2
- {sumo_wrapper_python-1.0.17 → sumo_wrapper_python-1.0.18}/src/sumo_wrapper_python.egg-info/PKG-INFO +1 -1
- {sumo_wrapper_python-1.0.17 → sumo_wrapper_python-1.0.18}/.github/workflows/build_docs.yaml +0 -0
- {sumo_wrapper_python-1.0.17 → sumo_wrapper_python-1.0.18}/.github/workflows/linting.yml +0 -0
- {sumo_wrapper_python-1.0.17 → sumo_wrapper_python-1.0.18}/.github/workflows/publish_release.yml +0 -0
- {sumo_wrapper_python-1.0.17 → sumo_wrapper_python-1.0.18}/.github/workflows/pytest.yml +0 -0
- {sumo_wrapper_python-1.0.17 → sumo_wrapper_python-1.0.18}/.gitignore +0 -0
- {sumo_wrapper_python-1.0.17 → sumo_wrapper_python-1.0.18}/.pre-commit-config.yaml +0 -0
- {sumo_wrapper_python-1.0.17 → sumo_wrapper_python-1.0.18}/.readthedocs.yaml +0 -0
- {sumo_wrapper_python-1.0.17 → sumo_wrapper_python-1.0.18}/CONTRIBUTING.md +0 -0
- {sumo_wrapper_python-1.0.17 → sumo_wrapper_python-1.0.18}/LICENSE +0 -0
- {sumo_wrapper_python-1.0.17 → sumo_wrapper_python-1.0.18}/README.md +0 -0
- {sumo_wrapper_python-1.0.17 → sumo_wrapper_python-1.0.18}/SECURITY.md +0 -0
- {sumo_wrapper_python-1.0.17 → sumo_wrapper_python-1.0.18}/docs/Makefile +0 -0
- {sumo_wrapper_python-1.0.17 → sumo_wrapper_python-1.0.18}/docs/_static/equinor-logo.png +0 -0
- {sumo_wrapper_python-1.0.17 → sumo_wrapper_python-1.0.18}/docs/_static/equinor-logo2.jpg +0 -0
- {sumo_wrapper_python-1.0.17 → sumo_wrapper_python-1.0.18}/docs/_static/equinor_logo.jpg +0 -0
- {sumo_wrapper_python-1.0.17 → sumo_wrapper_python-1.0.18}/docs/_static/equinor_logo_only.jpg +0 -0
- {sumo_wrapper_python-1.0.17 → sumo_wrapper_python-1.0.18}/docs/_templates/layout.html +0 -0
- {sumo_wrapper_python-1.0.17 → sumo_wrapper_python-1.0.18}/docs/api.rst +0 -0
- {sumo_wrapper_python-1.0.17 → sumo_wrapper_python-1.0.18}/docs/conf.py +0 -0
- {sumo_wrapper_python-1.0.17 → sumo_wrapper_python-1.0.18}/docs/index.rst +0 -0
- {sumo_wrapper_python-1.0.17 → sumo_wrapper_python-1.0.18}/docs/make.bat +0 -0
- {sumo_wrapper_python-1.0.17 → sumo_wrapper_python-1.0.18}/docs/sumo-wrapper-python.rst +0 -0
- {sumo_wrapper_python-1.0.17 → sumo_wrapper_python-1.0.18}/pyproject.toml +0 -0
- {sumo_wrapper_python-1.0.17 → sumo_wrapper_python-1.0.18}/setup.cfg +0 -0
- {sumo_wrapper_python-1.0.17 → sumo_wrapper_python-1.0.18}/src/sumo/__init__.py +0 -0
- {sumo_wrapper_python-1.0.17 → sumo_wrapper_python-1.0.18}/src/sumo/wrapper/__init__.py +0 -0
- {sumo_wrapper_python-1.0.17 → sumo_wrapper_python-1.0.18}/src/sumo/wrapper/_blob_client.py +0 -0
- {sumo_wrapper_python-1.0.17 → sumo_wrapper_python-1.0.18}/src/sumo/wrapper/_decorators.py +0 -0
- {sumo_wrapper_python-1.0.17 → sumo_wrapper_python-1.0.18}/src/sumo/wrapper/_logging.py +0 -0
- {sumo_wrapper_python-1.0.17 → sumo_wrapper_python-1.0.18}/src/sumo/wrapper/_retry_strategy.py +0 -0
- {sumo_wrapper_python-1.0.17 → sumo_wrapper_python-1.0.18}/src/sumo/wrapper/config.py +0 -0
- {sumo_wrapper_python-1.0.17 → sumo_wrapper_python-1.0.18}/src/sumo/wrapper/login.py +0 -0
- {sumo_wrapper_python-1.0.17 → sumo_wrapper_python-1.0.18}/src/sumo/wrapper/sumo_client.py +0 -0
- {sumo_wrapper_python-1.0.17 → sumo_wrapper_python-1.0.18}/src/sumo_wrapper_python.egg-info/SOURCES.txt +0 -0
- {sumo_wrapper_python-1.0.17 → sumo_wrapper_python-1.0.18}/src/sumo_wrapper_python.egg-info/dependency_links.txt +0 -0
- {sumo_wrapper_python-1.0.17 → sumo_wrapper_python-1.0.18}/src/sumo_wrapper_python.egg-info/entry_points.txt +0 -0
- {sumo_wrapper_python-1.0.17 → sumo_wrapper_python-1.0.18}/src/sumo_wrapper_python.egg-info/requires.txt +0 -0
- {sumo_wrapper_python-1.0.17 → sumo_wrapper_python-1.0.18}/src/sumo_wrapper_python.egg-info/top_level.txt +0 -0
- {sumo_wrapper_python-1.0.17 → sumo_wrapper_python-1.0.18}/tests/conftest.py +0 -0
- {sumo_wrapper_python-1.0.17 → sumo_wrapper_python-1.0.18}/tests/test_sumo_thin_client.py +0 -0
- {sumo_wrapper_python-1.0.17 → sumo_wrapper_python-1.0.18}/tests/testdata/case.yml +0 -0
- {sumo_wrapper_python-1.0.17 → sumo_wrapper_python-1.0.18}/tests/testdata/surface.yml +0 -0
{sumo_wrapper_python-1.0.17 → sumo_wrapper_python-1.0.18}/src/sumo/wrapper/_auth_provider.py
RENAMED
|
@@ -68,7 +68,7 @@ class AuthProvider:
|
|
|
68
68
|
|
|
69
69
|
def store_shared_access_key_for_case(self, case_uuid, token):
|
|
70
70
|
with open(
|
|
71
|
-
get_token_path(self._resource_id
|
|
71
|
+
get_token_path(self._resource_id, ".sharedkey", case_uuid),
|
|
72
72
|
"w",
|
|
73
73
|
) as f:
|
|
74
74
|
f.write(token)
|
|
@@ -93,6 +93,7 @@ class AuthProviderAccessToken(AuthProvider):
|
|
|
93
93
|
self._access_token = access_token
|
|
94
94
|
payload = jwt.decode(access_token, options={"verify_signature": False})
|
|
95
95
|
self._expires = payload["exp"]
|
|
96
|
+
self._resource_id = payload["aud"]
|
|
96
97
|
return
|
|
97
98
|
|
|
98
99
|
def get_token(self):
|
|
@@ -117,10 +118,17 @@ class AuthProviderRefreshToken(AuthProvider):
|
|
|
117
118
|
pass
|
|
118
119
|
|
|
119
120
|
|
|
120
|
-
def get_token_path(resource_id, suffix):
|
|
121
|
-
|
|
122
|
-
os.path.
|
|
123
|
-
|
|
121
|
+
def get_token_path(resource_id, suffix, case_uuid=None):
|
|
122
|
+
if case_uuid is not None:
|
|
123
|
+
return os.path.join(
|
|
124
|
+
os.path.expanduser("~"),
|
|
125
|
+
".sumo",
|
|
126
|
+
str(resource_id) + "+" + str(case_uuid) + suffix,
|
|
127
|
+
)
|
|
128
|
+
else:
|
|
129
|
+
return os.path.join(
|
|
130
|
+
os.path.expanduser("~"), ".sumo", str(resource_id) + suffix
|
|
131
|
+
)
|
|
124
132
|
|
|
125
133
|
|
|
126
134
|
@tn.retry(
|
|
@@ -176,8 +184,8 @@ def get_token_cache(resource_id, suffix):
|
|
|
176
184
|
retry_error_callback=_return_last_value,
|
|
177
185
|
before_sleep=_log_retry_info,
|
|
178
186
|
)
|
|
179
|
-
def protect_token_cache(resource_id, suffix):
|
|
180
|
-
token_path = get_token_path(resource_id, suffix)
|
|
187
|
+
def protect_token_cache(resource_id, suffix, case_uuid=None):
|
|
188
|
+
token_path = get_token_path(resource_id, suffix, case_uuid)
|
|
181
189
|
|
|
182
190
|
if sys.platform.startswith("linux") or sys.platform == "darwin":
|
|
183
191
|
filemode = stat.filemode(os.stat(token_path).st_mode)
|
|
@@ -369,9 +377,9 @@ class AuthProviderSumoToken(AuthProvider):
|
|
|
369
377
|
retry_error_callback=_return_last_value,
|
|
370
378
|
before_sleep=_log_retry_info,
|
|
371
379
|
)
|
|
372
|
-
def __init__(self, resource_id):
|
|
373
|
-
protect_token_cache(resource_id, ".sharedkey")
|
|
374
|
-
token_path = get_token_path(resource_id, ".sharedkey")
|
|
380
|
+
def __init__(self, resource_id, case_uuid=None):
|
|
381
|
+
protect_token_cache(resource_id, ".sharedkey", case_uuid)
|
|
382
|
+
token_path = get_token_path(resource_id, ".sharedkey", case_uuid)
|
|
375
383
|
with open(token_path, "r") as f:
|
|
376
384
|
self._token = f.readline().strip()
|
|
377
385
|
return
|
|
@@ -411,13 +419,8 @@ def get_auth_provider(
|
|
|
411
419
|
if access_token:
|
|
412
420
|
return AuthProviderAccessToken(access_token)
|
|
413
421
|
# ELSE
|
|
414
|
-
if
|
|
415
|
-
|
|
416
|
-
):
|
|
417
|
-
return AuthProviderSumoToken(resource_id + "+" + case_uuid)
|
|
418
|
-
# ELSE
|
|
419
|
-
if os.path.exists(get_token_path(resource_id, ".sharedkey")):
|
|
420
|
-
return AuthProviderSumoToken(resource_id)
|
|
422
|
+
if os.path.exists(get_token_path(resource_id, ".sharedkey", case_uuid)):
|
|
423
|
+
return AuthProviderSumoToken(resource_id, case_uuid)
|
|
421
424
|
# ELSE
|
|
422
425
|
if os.path.exists(get_token_path(resource_id, ".token")):
|
|
423
426
|
auth_silent = AuthProviderSilent(client_id, authority, resource_id)
|
|
File without changes
|
|
File without changes
|
{sumo_wrapper_python-1.0.17 → sumo_wrapper_python-1.0.18}/.github/workflows/publish_release.yml
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{sumo_wrapper_python-1.0.17 → sumo_wrapper_python-1.0.18}/docs/_static/equinor_logo_only.jpg
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{sumo_wrapper_python-1.0.17 → sumo_wrapper_python-1.0.18}/src/sumo/wrapper/_retry_strategy.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|