sumo-wrapper-python 1.9.0__tar.gz → 1.10.0__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.
- {sumo_wrapper_python-1.9.0 → sumo_wrapper_python-1.10.0}/PKG-INFO +1 -1
- {sumo_wrapper_python-1.9.0 → sumo_wrapper_python-1.10.0}/src/sumo/wrapper/_auth_provider.py +26 -5
- {sumo_wrapper_python-1.9.0 → sumo_wrapper_python-1.10.0}/src/sumo/wrapper/_version.py +3 -3
- {sumo_wrapper_python-1.9.0 → sumo_wrapper_python-1.10.0}/src/sumo/wrapper/sumo_client.py +4 -0
- {sumo_wrapper_python-1.9.0 → sumo_wrapper_python-1.10.0}/src/sumo_wrapper_python.egg-info/PKG-INFO +1 -1
- sumo_wrapper_python-1.10.0/src/sumo_wrapper_python.egg-info/scm_version.json +8 -0
- sumo_wrapper_python-1.9.0/src/sumo_wrapper_python.egg-info/scm_version.json +0 -8
- {sumo_wrapper_python-1.9.0 → sumo_wrapper_python-1.10.0}/.github/pull_request_template.md +0 -0
- {sumo_wrapper_python-1.9.0 → sumo_wrapper_python-1.10.0}/.github/workflows/build_docs.yaml +0 -0
- {sumo_wrapper_python-1.9.0 → sumo_wrapper_python-1.10.0}/.github/workflows/linting.yml +0 -0
- {sumo_wrapper_python-1.9.0 → sumo_wrapper_python-1.10.0}/.github/workflows/publish_release.yml +0 -0
- {sumo_wrapper_python-1.9.0 → sumo_wrapper_python-1.10.0}/.github/workflows/pytest.yml +0 -0
- {sumo_wrapper_python-1.9.0 → sumo_wrapper_python-1.10.0}/.gitignore +0 -0
- {sumo_wrapper_python-1.9.0 → sumo_wrapper_python-1.10.0}/.pre-commit-config.yaml +0 -0
- {sumo_wrapper_python-1.9.0 → sumo_wrapper_python-1.10.0}/.readthedocs.yaml +0 -0
- {sumo_wrapper_python-1.9.0 → sumo_wrapper_python-1.10.0}/CONTRIBUTING.md +0 -0
- {sumo_wrapper_python-1.9.0 → sumo_wrapper_python-1.10.0}/LICENSE +0 -0
- {sumo_wrapper_python-1.9.0 → sumo_wrapper_python-1.10.0}/README.md +0 -0
- {sumo_wrapper_python-1.9.0 → sumo_wrapper_python-1.10.0}/SECURITY.md +0 -0
- {sumo_wrapper_python-1.9.0 → sumo_wrapper_python-1.10.0}/docs/Makefile +0 -0
- {sumo_wrapper_python-1.9.0 → sumo_wrapper_python-1.10.0}/docs/_static/equinor-logo.png +0 -0
- {sumo_wrapper_python-1.9.0 → sumo_wrapper_python-1.10.0}/docs/_static/equinor-logo2.jpg +0 -0
- {sumo_wrapper_python-1.9.0 → sumo_wrapper_python-1.10.0}/docs/_static/equinor_logo.jpg +0 -0
- {sumo_wrapper_python-1.9.0 → sumo_wrapper_python-1.10.0}/docs/_static/equinor_logo_only.jpg +0 -0
- {sumo_wrapper_python-1.9.0 → sumo_wrapper_python-1.10.0}/docs/_templates/layout.html +0 -0
- {sumo_wrapper_python-1.9.0 → sumo_wrapper_python-1.10.0}/docs/api.rst +0 -0
- {sumo_wrapper_python-1.9.0 → sumo_wrapper_python-1.10.0}/docs/conf.py +0 -0
- {sumo_wrapper_python-1.9.0 → sumo_wrapper_python-1.10.0}/docs/index.rst +0 -0
- {sumo_wrapper_python-1.9.0 → sumo_wrapper_python-1.10.0}/docs/make.bat +0 -0
- {sumo_wrapper_python-1.9.0 → sumo_wrapper_python-1.10.0}/docs/sumo-wrapper-python.rst +0 -0
- {sumo_wrapper_python-1.9.0 → sumo_wrapper_python-1.10.0}/pyproject.toml +0 -0
- {sumo_wrapper_python-1.9.0 → sumo_wrapper_python-1.10.0}/setup.cfg +0 -0
- {sumo_wrapper_python-1.9.0 → sumo_wrapper_python-1.10.0}/src/sumo/__init__.py +0 -0
- {sumo_wrapper_python-1.9.0 → sumo_wrapper_python-1.10.0}/src/sumo/wrapper/__init__.py +0 -0
- {sumo_wrapper_python-1.9.0 → sumo_wrapper_python-1.10.0}/src/sumo/wrapper/_blob_client.py +0 -0
- {sumo_wrapper_python-1.9.0 → sumo_wrapper_python-1.10.0}/src/sumo/wrapper/_decorators.py +0 -0
- {sumo_wrapper_python-1.9.0 → sumo_wrapper_python-1.10.0}/src/sumo/wrapper/_logging.py +0 -0
- {sumo_wrapper_python-1.9.0 → sumo_wrapper_python-1.10.0}/src/sumo/wrapper/_retry_strategy.py +0 -0
- {sumo_wrapper_python-1.9.0 → sumo_wrapper_python-1.10.0}/src/sumo/wrapper/login.py +0 -0
- {sumo_wrapper_python-1.9.0 → sumo_wrapper_python-1.10.0}/src/sumo_wrapper_python.egg-info/SOURCES.txt +0 -0
- {sumo_wrapper_python-1.9.0 → sumo_wrapper_python-1.10.0}/src/sumo_wrapper_python.egg-info/dependency_links.txt +0 -0
- {sumo_wrapper_python-1.9.0 → sumo_wrapper_python-1.10.0}/src/sumo_wrapper_python.egg-info/entry_points.txt +0 -0
- {sumo_wrapper_python-1.9.0 → sumo_wrapper_python-1.10.0}/src/sumo_wrapper_python.egg-info/requires.txt +0 -0
- {sumo_wrapper_python-1.9.0 → sumo_wrapper_python-1.10.0}/src/sumo_wrapper_python.egg-info/scm_file_list.json +0 -0
- {sumo_wrapper_python-1.9.0 → sumo_wrapper_python-1.10.0}/src/sumo_wrapper_python.egg-info/top_level.txt +0 -0
- {sumo_wrapper_python-1.9.0 → sumo_wrapper_python-1.10.0}/tests/conftest.py +0 -0
- {sumo_wrapper_python-1.9.0 → sumo_wrapper_python-1.10.0}/tests/test_sumo_thin_client.py +0 -0
- {sumo_wrapper_python-1.9.0 → sumo_wrapper_python-1.10.0}/tests/testdata/case.yml +0 -0
- {sumo_wrapper_python-1.9.0 → sumo_wrapper_python-1.10.0}/tests/testdata/surface.yml +0 -0
|
@@ -9,6 +9,7 @@ from datetime import UTC, datetime, timedelta
|
|
|
9
9
|
from pathlib import Path
|
|
10
10
|
from urllib.parse import parse_qs
|
|
11
11
|
|
|
12
|
+
import httpx
|
|
12
13
|
import jwt
|
|
13
14
|
import msal
|
|
14
15
|
import tenacity as tn
|
|
@@ -90,6 +91,17 @@ class AuthProvider:
|
|
|
90
91
|
f.write(token)
|
|
91
92
|
protect_token_cache(self._resource_id, ".sharedkey", case_uuid)
|
|
92
93
|
|
|
94
|
+
def _store_fallback_auth(self, sumo_client):
|
|
95
|
+
sync_client = sumo_client._client
|
|
96
|
+
if sync_client is None:
|
|
97
|
+
sumo_client._client = httpx.Client()
|
|
98
|
+
token = sumo_client.get("/createfallbackauth").text
|
|
99
|
+
self.store_shared_access_key_for_case("fallback", token)
|
|
100
|
+
sumo_client._client = sync_client
|
|
101
|
+
|
|
102
|
+
def store_fallback_auth(self, sumo_client):
|
|
103
|
+
return
|
|
104
|
+
|
|
93
105
|
def has_case_token(self, case_uuid):
|
|
94
106
|
return os.path.exists(
|
|
95
107
|
get_token_path(self._resource_id, ".sharedkey", case_uuid)
|
|
@@ -115,6 +127,9 @@ class AuthProviderSilent(AuthProvider):
|
|
|
115
127
|
|
|
116
128
|
self._scope = scope_for_resource(resource_id)
|
|
117
129
|
|
|
130
|
+
def store_fallback_auth(self, sumo_client):
|
|
131
|
+
self._store_fallback_auth(sumo_client)
|
|
132
|
+
|
|
118
133
|
|
|
119
134
|
class AuthProviderAccessToken(AuthProvider):
|
|
120
135
|
def __init__(self, access_token):
|
|
@@ -268,6 +283,9 @@ class AuthProviderInteractive(AuthProvider):
|
|
|
268
283
|
)
|
|
269
284
|
return
|
|
270
285
|
|
|
286
|
+
def store_fallback_auth(self, sumo_client):
|
|
287
|
+
self._store_fallback_auth(sumo_client)
|
|
288
|
+
|
|
271
289
|
|
|
272
290
|
class AuthProviderDeviceCode(AuthProvider):
|
|
273
291
|
def __init__(self, client_id, authority, resource_id):
|
|
@@ -451,12 +469,15 @@ def get_auth_provider(
|
|
|
451
469
|
)
|
|
452
470
|
os.environ["BROWSER"] = "firefox"
|
|
453
471
|
|
|
454
|
-
|
|
472
|
+
auth_interactive = AuthProviderInteractive(
|
|
473
|
+
client_id, authority, resource_id
|
|
474
|
+
)
|
|
475
|
+
token = auth_interactive.get_token()
|
|
476
|
+
if token is not None:
|
|
477
|
+
return auth_interactive
|
|
455
478
|
# ELSE
|
|
456
|
-
if
|
|
457
|
-
|
|
458
|
-
# under Equinor compliant device policy
|
|
459
|
-
return AuthProviderDeviceCode(client_id, authority, resource_id)
|
|
479
|
+
if os.path.exists(get_token_path(resource_id, ".sharedkey", "fallback")):
|
|
480
|
+
return AuthProviderSumoToken(resource_id, "fallback")
|
|
460
481
|
# ELSE
|
|
461
482
|
return AuthProviderNone(resource_id)
|
|
462
483
|
|
|
@@ -18,7 +18,7 @@ version_tuple: tuple[int | str, ...]
|
|
|
18
18
|
commit_id: str | None
|
|
19
19
|
__commit_id__: str | None
|
|
20
20
|
|
|
21
|
-
__version__ = version = '1.
|
|
22
|
-
__version_tuple__ = version_tuple = (1,
|
|
21
|
+
__version__ = version = '1.10.0'
|
|
22
|
+
__version_tuple__ = version_tuple = (1, 10, 0)
|
|
23
23
|
|
|
24
|
-
__commit_id__ = commit_id = '
|
|
24
|
+
__commit_id__ = commit_id = 'g35b2b9609'
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{sumo_wrapper_python-1.9.0 → sumo_wrapper_python-1.10.0}/.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
|
|
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.9.0 → sumo_wrapper_python-1.10.0}/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
|