port-ocean 0.14.4__py3-none-any.whl → 0.14.6__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.
Potentially problematic release.
This version of port-ocean might be problematic. Click here for more details.
- integrations/_infra/Makefile +0 -2
- port_ocean/clients/port/authentication.py +11 -1
- port_ocean/tests/log/test_handlers.py +1 -1
- {port_ocean-0.14.4.dist-info → port_ocean-0.14.6.dist-info}/METADATA +1 -1
- {port_ocean-0.14.4.dist-info → port_ocean-0.14.6.dist-info}/RECORD +8 -8
- {port_ocean-0.14.4.dist-info → port_ocean-0.14.6.dist-info}/LICENSE.md +0 -0
- {port_ocean-0.14.4.dist-info → port_ocean-0.14.6.dist-info}/WHEEL +0 -0
- {port_ocean-0.14.4.dist-info → port_ocean-0.14.6.dist-info}/entry_points.txt +0 -0
integrations/_infra/Makefile
CHANGED
|
@@ -11,8 +11,6 @@ define run_checks
|
|
|
11
11
|
ruff check . || exit_code=$$?; \
|
|
12
12
|
echo "Running black"; \
|
|
13
13
|
black --check . || exit_code=$$?; \
|
|
14
|
-
echo "Running yamllint"; \
|
|
15
|
-
yamllint . || exit_code=$$?; \
|
|
16
14
|
if [ $$exit_code -eq 1 ]; then \
|
|
17
15
|
echo "\033[0;31mOne or more checks failed with exit code $$exit_code\033[0m"; \
|
|
18
16
|
else \
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import re
|
|
1
2
|
from typing import Any
|
|
2
3
|
|
|
3
4
|
import httpx
|
|
@@ -46,7 +47,11 @@ class PortAuthentication:
|
|
|
46
47
|
|
|
47
48
|
async def _get_token(self, client_id: str, client_secret: str) -> TokenResponse:
|
|
48
49
|
logger.info(f"Fetching access token for clientId: {client_id}")
|
|
49
|
-
|
|
50
|
+
if self._is_personal_token(client_id):
|
|
51
|
+
logger.warning(
|
|
52
|
+
"Integration is using personal credentials, make sure to use machine credentials. "
|
|
53
|
+
"Usage of personal credentials might impose unexpected integration behavior."
|
|
54
|
+
)
|
|
50
55
|
credentials = {"clientId": client_id, "clientSecret": client_secret}
|
|
51
56
|
response = await self.client.post(
|
|
52
57
|
f"{self.api_url}/auth/access_token",
|
|
@@ -82,3 +87,8 @@ class PortAuthentication:
|
|
|
82
87
|
self.client_id, self.client_secret
|
|
83
88
|
)
|
|
84
89
|
return self.last_token_object.full_token
|
|
90
|
+
|
|
91
|
+
@staticmethod
|
|
92
|
+
def _is_personal_token(client_id: str) -> bool:
|
|
93
|
+
email_regex = r"^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$"
|
|
94
|
+
return re.match(email_regex, client_id) is not None
|
|
@@ -3,7 +3,7 @@ integrations/_infra/Dockerfile.alpine,sha256=iauglyEzz5uEPBxsN-9SLFr6qca3Tf4b0DP
|
|
|
3
3
|
integrations/_infra/Dockerfile.base.builder,sha256=LwKLfJvQfKksMqacAT_aDQxFMC2Ty5fFKIa0Eu4QcCc,619
|
|
4
4
|
integrations/_infra/Dockerfile.base.runner,sha256=dsjTWgLQFm4x5gcm-IPhwkDv-M6VRKwdf-qct457h2c,357
|
|
5
5
|
integrations/_infra/Dockerfile.dockerignore,sha256=CM1Fxt3I2AvSvObuUZRmy5BNLSGC7ylnbpWzFgD4cso,1163
|
|
6
|
-
integrations/_infra/Makefile,sha256=
|
|
6
|
+
integrations/_infra/Makefile,sha256=zSZJ5ubxR84NCSs74rFFkjaZupo1FUZ90QnRPBKgsUM,2126
|
|
7
7
|
integrations/_infra/grpcio.sh,sha256=m924poYznoRZ6Tt7Ct8Cs5AV_cmmOx598yIZ3z4DvZE,616
|
|
8
8
|
integrations/_infra/init.sh,sha256=nN8lTrOhB286UfFvD6sJ9YJ-9asT9zVSddQB-RAb7Z4,99
|
|
9
9
|
port_ocean/__init__.py,sha256=J3Mqp7d-CkEe9eMigGG8gSEiVKICY2bf7csNEwVOXk0,294
|
|
@@ -45,7 +45,7 @@ port_ocean/cli/cookiecutter/{{cookiecutter.integration_slug}}/tests/test_sample.
|
|
|
45
45
|
port_ocean/cli/utils.py,sha256=IUK2UbWqjci-lrcDdynZXqVP5B5TcjF0w5CpEVUks-k,54
|
|
46
46
|
port_ocean/clients/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
47
47
|
port_ocean/clients/port/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
48
|
-
port_ocean/clients/port/authentication.py,sha256=
|
|
48
|
+
port_ocean/clients/port/authentication.py,sha256=BEcSosMi8B2pD70yFaunQvxYWRJZ030PFbHEs_MAGw0,3446
|
|
49
49
|
port_ocean/clients/port/client.py,sha256=Xd8Jk25Uh4WXY_WW-z1Qbv6F3ZTBFPoOolsxHMfozKw,3366
|
|
50
50
|
port_ocean/clients/port/mixins/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
51
51
|
port_ocean/clients/port/mixins/blueprints.py,sha256=POBl4uDocrgJBw4rvCAzwRcD4jk-uBL6pDAuKMTajdg,4633
|
|
@@ -136,7 +136,7 @@ port_ocean/tests/helpers/integration.py,sha256=_RxS-RHpu11lrbhUXYPZp862HLWx8AoD7
|
|
|
136
136
|
port_ocean/tests/helpers/ocean_app.py,sha256=8BysIhNqtTwhjnya5rr0AtrjulfJnJJMFz5cPUxIpLk,2167
|
|
137
137
|
port_ocean/tests/helpers/port_client.py,sha256=5d6GNr8vNNSOkrz1AdOhxBUKuusr_-UPDP7AVpHasQw,599
|
|
138
138
|
port_ocean/tests/helpers/smoke_test.py,sha256=_9aJJFRfuGJEg2D2YQJVJRmpreS6gEPHHQq8Q01x4aQ,2697
|
|
139
|
-
port_ocean/tests/log/test_handlers.py,sha256=
|
|
139
|
+
port_ocean/tests/log/test_handlers.py,sha256=uxgYCEQLP9U5qf-zUN9SgWFogMbYdnBeOVzXZ7E_yFw,2119
|
|
140
140
|
port_ocean/tests/test_smoke.py,sha256=uix2uIg_yOm8BHDgHw2hTFPy1fiIyxBGW3ENU_KoFlo,2557
|
|
141
141
|
port_ocean/tests/utils/test_async_iterators.py,sha256=3PLk1emEXekb8LcC5GgVh3OicaX15i5WyaJT_eFnu_4,1336
|
|
142
142
|
port_ocean/tests/utils/test_cache.py,sha256=GzoS8xGCBDbBcPwSDbdimsMMkRvJATrBC7UmFhdW3fw,4906
|
|
@@ -150,8 +150,8 @@ port_ocean/utils/repeat.py,sha256=0EFWM9d8lLXAhZmAyczY20LAnijw6UbIECf5lpGbOas,32
|
|
|
150
150
|
port_ocean/utils/signal.py,sha256=K-6kKFQTltcmKDhtyZAcn0IMa3sUpOHGOAUdWKgx0_E,1369
|
|
151
151
|
port_ocean/utils/time.py,sha256=pufAOH5ZQI7gXvOvJoQXZXZJV-Dqktoj9Qp9eiRwmJ4,1939
|
|
152
152
|
port_ocean/version.py,sha256=UsuJdvdQlazzKGD3Hd5-U7N69STh8Dq9ggJzQFnu9fU,177
|
|
153
|
-
port_ocean-0.14.
|
|
154
|
-
port_ocean-0.14.
|
|
155
|
-
port_ocean-0.14.
|
|
156
|
-
port_ocean-0.14.
|
|
157
|
-
port_ocean-0.14.
|
|
153
|
+
port_ocean-0.14.6.dist-info/LICENSE.md,sha256=WNHhf_5RCaeuKWyq_K39vmp9F28LxKsB4SpomwSZ2L0,11357
|
|
154
|
+
port_ocean-0.14.6.dist-info/METADATA,sha256=KTjM9cT2YRaEy1XsgkKN8uAlzVfCE9pxm4KGMTVvzN0,6673
|
|
155
|
+
port_ocean-0.14.6.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
|
|
156
|
+
port_ocean-0.14.6.dist-info/entry_points.txt,sha256=F_DNUmGZU2Kme-8NsWM5LLE8piGMafYZygRYhOVtcjA,54
|
|
157
|
+
port_ocean-0.14.6.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|