devsecops-engine-tools 1.116.1__py3-none-any.whl → 1.116.3__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 devsecops-engine-tools might be problematic. Click here for more details.

@@ -41,33 +41,29 @@ class GenericOauth(AuthenticationGateway):
41
41
 
42
42
  def get_access_token_client_credentials(self):
43
43
  """Obtain access token using client credentials flow."""
44
- try:
45
- required_keys = ["client_id", "client_secret"]
46
- if not all(key in self.config for key in required_keys):
47
- raise ValueError("One or more keys is missing in OAuth config")
44
+ required_keys = ["client_id", "client_secret"]
45
+ if not all(key in self.config for key in required_keys):
46
+ raise ValueError("One or more keys is missing in OAuth config")
48
47
 
49
- data = {
50
- "client_id": self.config["client_id"],
51
- "client_secret": self.config["client_secret"],
52
- "grant_type": "client_credentials",
53
- "scope": self.config["scope"]
54
- }
48
+ data = {
49
+ "client_id": self.config["client_id"],
50
+ "client_secret": self.config["client_secret"],
51
+ "grant_type": "client_credentials",
52
+ "scope": self.config["scope"]
53
+ }
55
54
 
56
- if self.config["path"].startswith("http"): url = self.config["path"]
57
- else: url = self.endpoint + self.config["path"]
58
-
59
- headers = self.config["headers"]
60
- response = requests.request(
61
- self.config["method"], url, headers=headers, data=data, timeout=5
55
+ if self.config["path"].startswith("http"): url = self.config["path"]
56
+ else: url = self.endpoint + self.config["path"]
57
+
58
+ headers = self.config["headers"]
59
+ response = requests.request(
60
+ self.config["method"], url, headers=headers, data=data, timeout=5
61
+ )
62
+ if 200 <= response.status_code < 300:
63
+ result = response.json()["access_token"]
64
+ return ("Authorization",f"Bearer {result}")
65
+ else:
66
+ raise ValueError(
67
+ "OAuth: Can't obtain access token code {0}: -> {1}".format(response.status_code, response.text)
62
68
  )
63
- if 200 <= response.status_code < 300:
64
- result = response.json()["access_token"]
65
- return ("Authorization",f"Bearer {result}")
66
- else:
67
- logger.warning(
68
- "OAuth: Can't obtain access token"
69
- "token Unknown status "
70
- "code {0}: -> {1}".format(response.status_code, response.text)
71
- )
72
- except (ConnectionError, ValueError, KeyError) as e:
73
- logger.warning("OAuth: Can't obtain access token: {0}".format(e))
69
+
@@ -1 +1 @@
1
- version = '1.116.1'
1
+ version = '1.116.3'
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: devsecops-engine-tools
3
- Version: 1.116.1
3
+ Version: 1.116.3
4
4
  Summary: Tool for DevSecOps strategy
5
5
  Home-page: https://github.com/bancolombia/devsecops-engine-tools
6
6
  Author: Bancolombia DevSecOps Team
@@ -1,5 +1,5 @@
1
1
  devsecops_engine_tools/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
- devsecops_engine_tools/version.py,sha256=7JkAWunAxlTrOsrHQoxSGbRen6fwMohUIdsQ-egEUik,20
2
+ devsecops_engine_tools/version.py,sha256=Yww6P45Gz722EaxkeQ_JtcESFG35P_V7NxHcOEuobKE,20
3
3
  devsecops_engine_tools/engine_core/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
4
4
  devsecops_engine_tools/engine_core/src/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
5
5
  devsecops_engine_tools/engine_core/src/applications/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -85,7 +85,7 @@ devsecops_engine_tools/engine_dast/src/infrastructure/driven_adapters/nuclei/nuc
85
85
  devsecops_engine_tools/engine_dast/src/infrastructure/driven_adapters/nuclei/nuclei_deserealizer.py,sha256=qqoBMXr350ItzabSU6a_fD2-9kB6pAmtWioFP5AvCIE,1346
86
86
  devsecops_engine_tools/engine_dast/src/infrastructure/driven_adapters/nuclei/nuclei_tool.py,sha256=KQKEq06izKut2VMhD9nfc-CFPdvT8wOcar3COB7x6ZA,6843
87
87
  devsecops_engine_tools/engine_dast/src/infrastructure/driven_adapters/oauth/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
88
- devsecops_engine_tools/engine_dast/src/infrastructure/driven_adapters/oauth/generic_oauth.py,sha256=5OvS-XKrSuqHnG64GFd4XqzEGPjwAhn3xfcGgL1ATW4,2965
88
+ devsecops_engine_tools/engine_dast/src/infrastructure/driven_adapters/oauth/generic_oauth.py,sha256=UHd77u_vcA6tQKQezdsnfZLx7vvNyZ5zFyDBhEakdsM,2666
89
89
  devsecops_engine_tools/engine_dast/src/infrastructure/entry_points/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
90
90
  devsecops_engine_tools/engine_dast/src/infrastructure/entry_points/entry_point_dast.py,sha256=rm0Ao-nFrIvzbrfUBrPUEyJJV_eVaEdzYDnnwumOAsw,484
91
91
  devsecops_engine_tools/engine_dast/src/infrastructure/helpers/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -408,8 +408,8 @@ devsecops_engine_tools/engine_utilities/utils/name_conversion.py,sha256=ADJrRGax
408
408
  devsecops_engine_tools/engine_utilities/utils/printers.py,sha256=amYAr9YQfYgR6jK9a2l26z3oovFPQ3FAKmhq6BKhEBA,623
409
409
  devsecops_engine_tools/engine_utilities/utils/session_manager.py,sha256=Z0fdhB3r-dxU0nGSD9zW_B4r2Qol1rUnUCkhFR0U-HQ,487
410
410
  devsecops_engine_tools/engine_utilities/utils/utils.py,sha256=HCjS900TBoNcHrC4LaiP-Kf9frVdtagF130qOUgnO2M,6757
411
- devsecops_engine_tools-1.116.1.dist-info/METADATA,sha256=82r4HO801zvv99mFWa_nYtQ4DvVe3vnh3cvPc0Nhh6A,3429
412
- devsecops_engine_tools-1.116.1.dist-info/WHEEL,sha256=lTU6B6eIfYoiQJTZNc-fyaR6BpL6ehTzU3xGYxn2n8k,91
413
- devsecops_engine_tools-1.116.1.dist-info/entry_points.txt,sha256=OWAww5aBsGeMv0kWhSgVNB0ySKKpYuJd4dly0ikFPkc,283
414
- devsecops_engine_tools-1.116.1.dist-info/top_level.txt,sha256=ge6y0X_xBAU1aG3EMWFtl9djbVyg5BxuSp2r2Lg6EQU,23
415
- devsecops_engine_tools-1.116.1.dist-info/RECORD,,
411
+ devsecops_engine_tools-1.116.3.dist-info/METADATA,sha256=wqeZx_MTVe8cCOj7AE6kbqzLXv-CW_Gw3XQZivnSG0w,3429
412
+ devsecops_engine_tools-1.116.3.dist-info/WHEEL,sha256=lTU6B6eIfYoiQJTZNc-fyaR6BpL6ehTzU3xGYxn2n8k,91
413
+ devsecops_engine_tools-1.116.3.dist-info/entry_points.txt,sha256=OWAww5aBsGeMv0kWhSgVNB0ySKKpYuJd4dly0ikFPkc,283
414
+ devsecops_engine_tools-1.116.3.dist-info/top_level.txt,sha256=ge6y0X_xBAU1aG3EMWFtl9djbVyg5BxuSp2r2Lg6EQU,23
415
+ devsecops_engine_tools-1.116.3.dist-info/RECORD,,