Encryptors 2.44__tar.gz → 2.46__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.
Files changed (88) hide show
  1. {encryptors-2.44 → encryptors-2.46}/PKG-INFO +1 -1
  2. {encryptors-2.44 → encryptors-2.46}/setup.py +1 -1
  3. {encryptors-2.44 → encryptors-2.46}/src/Encryptors.egg-info/PKG-INFO +1 -1
  4. {encryptors-2.44 → encryptors-2.46}/src/Osdental/Graphql/Extensions/AuditExtension.py +11 -4
  5. {encryptors-2.44 → encryptors-2.46}/src/Osdental/Graphql/_Helpers/_AuditHelper.py +4 -4
  6. {encryptors-2.44 → encryptors-2.46}/src/Osdental/Helpers/AuditDispatcher.py +3 -3
  7. {encryptors-2.44 → encryptors-2.46}/README.md +0 -0
  8. {encryptors-2.44 → encryptors-2.46}/setup.cfg +0 -0
  9. {encryptors-2.44 → encryptors-2.46}/src/Encryptors.egg-info/SOURCES.txt +0 -0
  10. {encryptors-2.44 → encryptors-2.46}/src/Encryptors.egg-info/dependency_links.txt +0 -0
  11. {encryptors-2.44 → encryptors-2.46}/src/Encryptors.egg-info/entry_points.txt +0 -0
  12. {encryptors-2.44 → encryptors-2.46}/src/Encryptors.egg-info/requires.txt +0 -0
  13. {encryptors-2.44 → encryptors-2.46}/src/Encryptors.egg-info/top_level.txt +0 -0
  14. {encryptors-2.44 → encryptors-2.46}/src/Osdental/Cli/__init__.py +0 -0
  15. {encryptors-2.44 → encryptors-2.46}/src/Osdental/Database/BaseRepository.py +0 -0
  16. {encryptors-2.44 → encryptors-2.46}/src/Osdental/Database/Connection.py +0 -0
  17. {encryptors-2.44 → encryptors-2.46}/src/Osdental/Database/__init__.py +0 -0
  18. {encryptors-2.44 → encryptors-2.46}/src/Osdental/Decorators/Grpc.py +0 -0
  19. {encryptors-2.44 → encryptors-2.46}/src/Osdental/Decorators/PublicResolver.py +0 -0
  20. {encryptors-2.44 → encryptors-2.46}/src/Osdental/Decorators/Retry.py +0 -0
  21. {encryptors-2.44 → encryptors-2.46}/src/Osdental/Decorators/SecureResolver.py +0 -0
  22. {encryptors-2.44 → encryptors-2.46}/src/Osdental/Decorators/SqlDataNormalizer.py +0 -0
  23. {encryptors-2.44 → encryptors-2.46}/src/Osdental/Decorators/__init__.py +0 -0
  24. {encryptors-2.44 → encryptors-2.46}/src/Osdental/Encryptor/Aes.py +0 -0
  25. {encryptors-2.44 → encryptors-2.46}/src/Osdental/Encryptor/Argon2.py +0 -0
  26. {encryptors-2.44 → encryptors-2.46}/src/Osdental/Encryptor/Bcrypt.py +0 -0
  27. {encryptors-2.44 → encryptors-2.46}/src/Osdental/Encryptor/Jwt.py +0 -0
  28. {encryptors-2.44 → encryptors-2.46}/src/Osdental/Encryptor/Rsa.py +0 -0
  29. {encryptors-2.44 → encryptors-2.46}/src/Osdental/Encryptor/Sha512.py +0 -0
  30. {encryptors-2.44 → encryptors-2.46}/src/Osdental/Encryptor/__init__.py +0 -0
  31. {encryptors-2.44 → encryptors-2.46}/src/Osdental/Exception/ControlledException.py +0 -0
  32. {encryptors-2.44 → encryptors-2.46}/src/Osdental/Exception/__init__.py +0 -0
  33. {encryptors-2.44 → encryptors-2.46}/src/Osdental/Graphql/Extensions/__init__.py +0 -0
  34. {encryptors-2.44 → encryptors-2.46}/src/Osdental/Graphql/Models/__init__.py +0 -0
  35. {encryptors-2.44 → encryptors-2.46}/src/Osdental/Graphql/_Exceptions/__init__.py +0 -0
  36. {encryptors-2.44 → encryptors-2.46}/src/Osdental/Graphql/_Helpers/_ExtractAuthToken.py +0 -0
  37. {encryptors-2.44 → encryptors-2.46}/src/Osdental/Graphql/_Helpers/_TenantPolicy.py +0 -0
  38. {encryptors-2.44 → encryptors-2.46}/src/Osdental/Graphql/_Helpers/_TokenService.py +0 -0
  39. {encryptors-2.44 → encryptors-2.46}/src/Osdental/Graphql/_Helpers/__init__.py +0 -0
  40. {encryptors-2.44 → encryptors-2.46}/src/Osdental/Graphql/__init__.py +0 -0
  41. {encryptors-2.44 → encryptors-2.46}/src/Osdental/Helpers/KeyVaultService.py +0 -0
  42. {encryptors-2.44 → encryptors-2.46}/src/Osdental/Helpers/ResponseDecryptor.py +0 -0
  43. {encryptors-2.44 → encryptors-2.46}/src/Osdental/Helpers/__init__.py +0 -0
  44. {encryptors-2.44 → encryptors-2.46}/src/Osdental/Http/APIClient.py +0 -0
  45. {encryptors-2.44 → encryptors-2.46}/src/Osdental/Http/_Exceptions.py +0 -0
  46. {encryptors-2.44 → encryptors-2.46}/src/Osdental/Http/__init__.py +0 -0
  47. {encryptors-2.44 → encryptors-2.46}/src/Osdental/Messaging/AzureServiceBus.py +0 -0
  48. {encryptors-2.44 → encryptors-2.46}/src/Osdental/Messaging/Kafka.py +0 -0
  49. {encryptors-2.44 → encryptors-2.46}/src/Osdental/Messaging/RabbitMQ.py +0 -0
  50. {encryptors-2.44 → encryptors-2.46}/src/Osdental/Messaging/__init__.py +0 -0
  51. {encryptors-2.44 → encryptors-2.46}/src/Osdental/Models/AuditConfig.py +0 -0
  52. {encryptors-2.44 → encryptors-2.46}/src/Osdental/Models/Response.py +0 -0
  53. {encryptors-2.44 → encryptors-2.46}/src/Osdental/Models/Token.py +0 -0
  54. {encryptors-2.44 → encryptors-2.46}/src/Osdental/Models/_Audit.py +0 -0
  55. {encryptors-2.44 → encryptors-2.46}/src/Osdental/Models/__init__.py +0 -0
  56. {encryptors-2.44 → encryptors-2.46}/src/Osdental/RedisCache/Redis.py +0 -0
  57. {encryptors-2.44 → encryptors-2.46}/src/Osdental/RedisCache/__init__.py +0 -0
  58. {encryptors-2.44 → encryptors-2.46}/src/Osdental/Rest/Context/RequestContext.py +0 -0
  59. {encryptors-2.44 → encryptors-2.46}/src/Osdental/Rest/Context/__init__.py +0 -0
  60. {encryptors-2.44 → encryptors-2.46}/src/Osdental/Rest/Middlewares/RequestContextMiddleware.py +0 -0
  61. {encryptors-2.44 → encryptors-2.46}/src/Osdental/Rest/Middlewares/__init__.py +0 -0
  62. {encryptors-2.44 → encryptors-2.46}/src/Osdental/Rest/__init__.py +0 -0
  63. {encryptors-2.44 → encryptors-2.46}/src/Osdental/Shared/Enums/Code.py +0 -0
  64. {encryptors-2.44 → encryptors-2.46}/src/Osdental/Shared/Enums/Constant.py +0 -0
  65. {encryptors-2.44 → encryptors-2.46}/src/Osdental/Shared/Enums/FileType.py +0 -0
  66. {encryptors-2.44 → encryptors-2.46}/src/Osdental/Shared/Enums/GrahpqlOperation.py +0 -0
  67. {encryptors-2.44 → encryptors-2.46}/src/Osdental/Shared/Enums/Message.py +0 -0
  68. {encryptors-2.44 → encryptors-2.46}/src/Osdental/Shared/Enums/Profile.py +0 -0
  69. {encryptors-2.44 → encryptors-2.46}/src/Osdental/Shared/Enums/__init__.py +0 -0
  70. {encryptors-2.44 → encryptors-2.46}/src/Osdental/Shared/Logger.py +0 -0
  71. {encryptors-2.44 → encryptors-2.46}/src/Osdental/Shared/Utils/CaseConverter.py +0 -0
  72. {encryptors-2.44 → encryptors-2.46}/src/Osdental/Shared/Utils/CodeGenerator.py +0 -0
  73. {encryptors-2.44 → encryptors-2.46}/src/Osdental/Shared/Utils/DataNormalizer.py +0 -0
  74. {encryptors-2.44 → encryptors-2.46}/src/Osdental/Shared/Utils/DataUtils.py +0 -0
  75. {encryptors-2.44 → encryptors-2.46}/src/Osdental/Shared/Utils/DateUtils.py +0 -0
  76. {encryptors-2.44 → encryptors-2.46}/src/Osdental/Shared/Utils/FileMetaData.py +0 -0
  77. {encryptors-2.44 → encryptors-2.46}/src/Osdental/Shared/Utils/HashValidator.py +0 -0
  78. {encryptors-2.44 → encryptors-2.46}/src/Osdental/Shared/Utils/Mapper.py +0 -0
  79. {encryptors-2.44 → encryptors-2.46}/src/Osdental/Shared/Utils/PasswordGenerator.py +0 -0
  80. {encryptors-2.44 → encryptors-2.46}/src/Osdental/Shared/Utils/QueryGenerator.py +0 -0
  81. {encryptors-2.44 → encryptors-2.46}/src/Osdental/Shared/Utils/RsaUtils.py +0 -0
  82. {encryptors-2.44 → encryptors-2.46}/src/Osdental/Shared/Utils/TextProcessor.py +0 -0
  83. {encryptors-2.44 → encryptors-2.46}/src/Osdental/Shared/Utils/__init__.py +0 -0
  84. {encryptors-2.44 → encryptors-2.46}/src/Osdental/Shared/__init__.py +0 -0
  85. {encryptors-2.44 → encryptors-2.46}/src/Osdental/Storage/AzureBlobStorage.py +0 -0
  86. {encryptors-2.44 → encryptors-2.46}/src/Osdental/Storage/S3Storage.py +0 -0
  87. {encryptors-2.44 → encryptors-2.46}/src/Osdental/Storage/__init__.py +0 -0
  88. {encryptors-2.44 → encryptors-2.46}/src/Osdental/__init__.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: Encryptors
3
- Version: 2.44
3
+ Version: 2.46
4
4
  Summary: End-to-end algorithm library
5
5
  Author: OSDental LLC
6
6
  Author-email: support@osdental.ai
@@ -2,7 +2,7 @@ from setuptools import setup, find_packages
2
2
  # ANDERSON ESTO YA SE SUBIO Y ESTA ESTABLE, AUN TE QUEDA PENDIENTE LA AUDITORIA CON RSA Y AES DE ACCESSTOKEN
3
3
  setup(
4
4
  name="Encryptors",
5
- version="2.44",
5
+ version="2.46",
6
6
  author="OSDental LLC",
7
7
  author_email="support@osdental.ai",
8
8
  description="End-to-end algorithm library",
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: Encryptors
3
- Version: 2.44
3
+ Version: 2.46
4
4
  Summary: End-to-end algorithm library
5
5
  Author: OSDental LLC
6
6
  Author-email: support@osdental.ai
@@ -106,10 +106,17 @@ class AuditExtension(Extension):
106
106
  except Exception:
107
107
  raise ValueError("Invalid encrypted payload")
108
108
 
109
- try:
110
- decrypted_payload = json.loads(decrypted)
111
- except Exception:
112
- raise ValueError("Decrypted payload is not valid JSON")
109
+ if isinstance(decrypted, dict):
110
+ decrypted_payload = decrypted
111
+
112
+ elif isinstance(decrypted, str):
113
+ try:
114
+ decrypted_payload = json.loads(decrypted)
115
+ except Exception:
116
+ raise ValueError("Decrypted payload is not valid JSON")
117
+
118
+ else:
119
+ raise ValueError("Unsupported decrypted payload type")
113
120
 
114
121
  if decrypted_payload is not None:
115
122
  kwargs["data"] = decrypted_payload
@@ -5,7 +5,7 @@ from Osdental.Models._Audit import Audit
5
5
  class AuditHelper:
6
6
 
7
7
  @staticmethod
8
- async def build_request_payload(audit: Audit) -> Dict:
8
+ async def build_request_payload(audit: Audit) -> Dict[str, Any]:
9
9
  request = audit.request
10
10
  audit_config = audit.audit_config
11
11
  payload = audit.payload
@@ -49,12 +49,12 @@ class AuditHelper:
49
49
  def build_final_payload(
50
50
  _type: Literal["RESPONSE", "ERROR"],
51
51
  status_code: Any,
52
- result: Optional[Any] = "*",
52
+ result: Optional[Any] = None,
53
53
  error: Optional[Any] = "*"
54
- ):
54
+ ) -> Dict[str, Any]:
55
55
  return {
56
56
  "type": _type,
57
57
  "httpResponseCode": status_code,
58
- "messageOut": json.dumps(result) if isinstance(result, dict) else result,
58
+ "messageOut": json.dumps(result) if isinstance(result, dict) else "*",
59
59
  "errorProducer": error
60
60
  }
@@ -74,7 +74,7 @@ class AuditDispatcher:
74
74
  self._queue.task_done()
75
75
 
76
76
  # Logica
77
- async def _process(self, payload: Dict[str, Any]):
77
+ async def _process(self, payload: Dict[str, Any]) -> None:
78
78
  request = payload["request"]
79
79
  request_payload = payload["request_payload"]
80
80
  result: Response = payload["result"]
@@ -128,7 +128,7 @@ class AuditDispatcher:
128
128
  audit_message = request_audit_payload | payload
129
129
 
130
130
  else:
131
- if encryption_type in VALID_TYPES and decrypted_key:
131
+ if encryption_type in VALID_TYPES and decrypted_key and data:
132
132
  data = decryptor_data(encryption_type, decrypted_key, data)
133
133
 
134
134
  payload = AuditHelper.build_final_payload(
@@ -139,4 +139,4 @@ class AuditDispatcher:
139
139
 
140
140
  audit_message = request_audit_payload | payload
141
141
 
142
- await self._messaging.send_message(audit_message)
142
+ await self._messaging.send_message(audit_message)
File without changes
File without changes