Encryptors 2.74__tar.gz → 2.75__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.
- {encryptors-2.74 → encryptors-2.75}/PKG-INFO +1 -1
- {encryptors-2.74 → encryptors-2.75}/setup.py +1 -1
- {encryptors-2.74 → encryptors-2.75}/src/Encryptors.egg-info/PKG-INFO +1 -1
- {encryptors-2.74 → encryptors-2.75}/src/Osdental/Decorators/SecureResolver.py +6 -3
- encryptors-2.75/src/Osdental/Services/ServiceBusAuditEmitter.py +33 -0
- encryptors-2.74/src/Osdental/Services/ServiceBusAuditEmitter.py +0 -22
- {encryptors-2.74 → encryptors-2.75}/README.md +0 -0
- {encryptors-2.74 → encryptors-2.75}/setup.cfg +0 -0
- {encryptors-2.74 → encryptors-2.75}/src/Encryptors.egg-info/SOURCES.txt +0 -0
- {encryptors-2.74 → encryptors-2.75}/src/Encryptors.egg-info/dependency_links.txt +0 -0
- {encryptors-2.74 → encryptors-2.75}/src/Encryptors.egg-info/entry_points.txt +0 -0
- {encryptors-2.74 → encryptors-2.75}/src/Encryptors.egg-info/requires.txt +0 -0
- {encryptors-2.74 → encryptors-2.75}/src/Encryptors.egg-info/top_level.txt +0 -0
- {encryptors-2.74 → encryptors-2.75}/src/Osdental/Cache/Redis.py +0 -0
- {encryptors-2.74 → encryptors-2.75}/src/Osdental/Cache/__init__.py +0 -0
- {encryptors-2.74 → encryptors-2.75}/src/Osdental/Cli/__init__.py +0 -0
- {encryptors-2.74 → encryptors-2.75}/src/Osdental/Constants/Constant.py +0 -0
- {encryptors-2.74 → encryptors-2.75}/src/Osdental/Constants/Message.py +0 -0
- {encryptors-2.74 → encryptors-2.75}/src/Osdental/Constants/__init__.py +0 -0
- {encryptors-2.74 → encryptors-2.75}/src/Osdental/Context/__init__.py +0 -0
- {encryptors-2.74 → encryptors-2.75}/src/Osdental/Database/BaseRepository.py +0 -0
- {encryptors-2.74 → encryptors-2.75}/src/Osdental/Database/Connection.py +0 -0
- {encryptors-2.74 → encryptors-2.75}/src/Osdental/Database/__init__.py +0 -0
- {encryptors-2.74 → encryptors-2.75}/src/Osdental/Decorators/Grpc.py +0 -0
- {encryptors-2.74 → encryptors-2.75}/src/Osdental/Decorators/Retry.py +0 -0
- {encryptors-2.74 → encryptors-2.75}/src/Osdental/Decorators/__init__.py +0 -0
- {encryptors-2.74 → encryptors-2.75}/src/Osdental/Encryptor/Aes.py +0 -0
- {encryptors-2.74 → encryptors-2.75}/src/Osdental/Encryptor/Argon2.py +0 -0
- {encryptors-2.74 → encryptors-2.75}/src/Osdental/Encryptor/Bcrypt.py +0 -0
- {encryptors-2.74 → encryptors-2.75}/src/Osdental/Encryptor/Jwt.py +0 -0
- {encryptors-2.74 → encryptors-2.75}/src/Osdental/Encryptor/Rsa.py +0 -0
- {encryptors-2.74 → encryptors-2.75}/src/Osdental/Encryptor/Sha512.py +0 -0
- {encryptors-2.74 → encryptors-2.75}/src/Osdental/Encryptor/__init__.py +0 -0
- {encryptors-2.74 → encryptors-2.75}/src/Osdental/Enums/AuditType.py +0 -0
- {encryptors-2.74 → encryptors-2.75}/src/Osdental/Enums/CipherType.py +0 -0
- {encryptors-2.74 → encryptors-2.75}/src/Osdental/Enums/FileType.py +0 -0
- {encryptors-2.74 → encryptors-2.75}/src/Osdental/Enums/GrahpqlOperation.py +0 -0
- {encryptors-2.74 → encryptors-2.75}/src/Osdental/Enums/GrpcStatusCode.py +0 -0
- {encryptors-2.74 → encryptors-2.75}/src/Osdental/Enums/Profile.py +0 -0
- {encryptors-2.74 → encryptors-2.75}/src/Osdental/Enums/ResultType.py +0 -0
- {encryptors-2.74 → encryptors-2.75}/src/Osdental/Enums/Secret.py +0 -0
- {encryptors-2.74 → encryptors-2.75}/src/Osdental/Enums/StatusCode.py +0 -0
- {encryptors-2.74 → encryptors-2.75}/src/Osdental/Enums/__init__.py +0 -0
- {encryptors-2.74 → encryptors-2.75}/src/Osdental/Exception/ControlledException.py +0 -0
- {encryptors-2.74 → encryptors-2.75}/src/Osdental/Exception/__init__.py +0 -0
- {encryptors-2.74 → encryptors-2.75}/src/Osdental/Helpers/AuditHelper.py +0 -0
- {encryptors-2.74 → encryptors-2.75}/src/Osdental/Helpers/AuditQueue.py +0 -0
- {encryptors-2.74 → encryptors-2.75}/src/Osdental/Helpers/AuthTokenProcessor.py +0 -0
- {encryptors-2.74 → encryptors-2.75}/src/Osdental/Helpers/AzureClassifier.py +0 -0
- {encryptors-2.74 → encryptors-2.75}/src/Osdental/Helpers/CipherHelper.py +0 -0
- {encryptors-2.74 → encryptors-2.75}/src/Osdental/Helpers/JwtTokenHelper.py +0 -0
- {encryptors-2.74 → encryptors-2.75}/src/Osdental/Helpers/Resilience.py +0 -0
- {encryptors-2.74 → encryptors-2.75}/src/Osdental/Helpers/__init__.py +0 -0
- {encryptors-2.74 → encryptors-2.75}/src/Osdental/Http/APIClient.py +0 -0
- {encryptors-2.74 → encryptors-2.75}/src/Osdental/Http/__init__.py +0 -0
- {encryptors-2.74 → encryptors-2.75}/src/Osdental/Messaging/AzureServiceBus.py +0 -0
- {encryptors-2.74 → encryptors-2.75}/src/Osdental/Messaging/Kafka.py +0 -0
- {encryptors-2.74 → encryptors-2.75}/src/Osdental/Messaging/RabbitMQ.py +0 -0
- {encryptors-2.74 → encryptors-2.75}/src/Osdental/Messaging/__init__.py +0 -0
- {encryptors-2.74 → encryptors-2.75}/src/Osdental/Models/ApiResponse.py +0 -0
- {encryptors-2.74 → encryptors-2.75}/src/Osdental/Models/AuditContext.py +0 -0
- {encryptors-2.74 → encryptors-2.75}/src/Osdental/Models/Graphql.py +0 -0
- {encryptors-2.74 → encryptors-2.75}/src/Osdental/Models/Notification.py +0 -0
- {encryptors-2.74 → encryptors-2.75}/src/Osdental/Models/Response.py +0 -0
- {encryptors-2.74 → encryptors-2.75}/src/Osdental/Models/Token.py +0 -0
- {encryptors-2.74 → encryptors-2.75}/src/Osdental/Models/TokenClaims.py +0 -0
- {encryptors-2.74 → encryptors-2.75}/src/Osdental/Models/__init__.py +0 -0
- {encryptors-2.74 → encryptors-2.75}/src/Osdental/Secrets/AzureKeyVaultProvider.py +0 -0
- {encryptors-2.74 → encryptors-2.75}/src/Osdental/Secrets/__init__.py +0 -0
- {encryptors-2.74 → encryptors-2.75}/src/Osdental/Services/GrpcConnection.py +0 -0
- {encryptors-2.74 → encryptors-2.75}/src/Osdental/Services/JwtAuthTokenService.py +0 -0
- {encryptors-2.74 → encryptors-2.75}/src/Osdental/Services/WebsocketClient.py +0 -0
- {encryptors-2.74 → encryptors-2.75}/src/Osdental/Services/__init__.py +0 -0
- {encryptors-2.74 → encryptors-2.75}/src/Osdental/Storage/AzureBlobStorage.py +0 -0
- {encryptors-2.74 → encryptors-2.75}/src/Osdental/Storage/S3Storage.py +0 -0
- {encryptors-2.74 → encryptors-2.75}/src/Osdental/Storage/__init__.py +0 -0
- {encryptors-2.74 → encryptors-2.75}/src/Osdental/Utils/CaseConverter.py +0 -0
- {encryptors-2.74 → encryptors-2.75}/src/Osdental/Utils/CodeGenerator.py +0 -0
- {encryptors-2.74 → encryptors-2.75}/src/Osdental/Utils/DataNormalizer.py +0 -0
- {encryptors-2.74 → encryptors-2.75}/src/Osdental/Utils/DataUtils.py +0 -0
- {encryptors-2.74 → encryptors-2.75}/src/Osdental/Utils/DateUtils.py +0 -0
- {encryptors-2.74 → encryptors-2.75}/src/Osdental/Utils/FileMetaData.py +0 -0
- {encryptors-2.74 → encryptors-2.75}/src/Osdental/Utils/HashValidator.py +0 -0
- {encryptors-2.74 → encryptors-2.75}/src/Osdental/Utils/Mapper.py +0 -0
- {encryptors-2.74 → encryptors-2.75}/src/Osdental/Utils/PasswordGenerator.py +0 -0
- {encryptors-2.74 → encryptors-2.75}/src/Osdental/Utils/QueryGenerator.py +0 -0
- {encryptors-2.74 → encryptors-2.75}/src/Osdental/Utils/RsaUtils.py +0 -0
- {encryptors-2.74 → encryptors-2.75}/src/Osdental/Utils/TextProcessor.py +0 -0
- {encryptors-2.74 → encryptors-2.75}/src/Osdental/Utils/__init__.py +0 -0
- {encryptors-2.74 → encryptors-2.75}/src/Osdental/__init__.py +0 -0
|
@@ -127,7 +127,8 @@ def resolver(public: bool = False, action=None):
|
|
|
127
127
|
# ── 7. AUDITAR ÉXITO ──────────────────────
|
|
128
128
|
_ = asyncio.create_task(
|
|
129
129
|
container.audit_emitter.emit(
|
|
130
|
-
_build_success_payload(audit_ctx, result)
|
|
130
|
+
_build_success_payload(audit_ctx, result),
|
|
131
|
+
settings.is_auditable,
|
|
131
132
|
)
|
|
132
133
|
)
|
|
133
134
|
|
|
@@ -138,7 +139,8 @@ def resolver(public: bool = False, action=None):
|
|
|
138
139
|
if audit_ctx:
|
|
139
140
|
_ = asyncio.create_task(
|
|
140
141
|
container.audit_emitter.emit(
|
|
141
|
-
_build_error_payload(audit_ctx, e)
|
|
142
|
+
_build_error_payload(audit_ctx, e),
|
|
143
|
+
settings.is_auditable,
|
|
142
144
|
)
|
|
143
145
|
)
|
|
144
146
|
return Response(
|
|
@@ -151,7 +153,8 @@ def resolver(public: bool = False, action=None):
|
|
|
151
153
|
if audit_ctx:
|
|
152
154
|
_ = asyncio.create_task(
|
|
153
155
|
container.audit_emitter.emit(
|
|
154
|
-
_build_unexpected_payload(audit_ctx, e)
|
|
156
|
+
_build_unexpected_payload(audit_ctx, e),
|
|
157
|
+
settings.is_auditable,
|
|
155
158
|
)
|
|
156
159
|
)
|
|
157
160
|
return Response(
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import logging
|
|
2
|
+
import json
|
|
3
|
+
from typing import Dict, Any
|
|
4
|
+
from Osdental.Messaging import IMessageQueue
|
|
5
|
+
from Osdental.Storage import IStorageService
|
|
6
|
+
|
|
7
|
+
logger = logging.getLogger(__name__)
|
|
8
|
+
|
|
9
|
+
class ServiceBusAuditEmitter:
|
|
10
|
+
|
|
11
|
+
def __init__(self, messaging: IMessageQueue, storage: IStorageService):
|
|
12
|
+
self._messaging = messaging
|
|
13
|
+
self._storage = storage
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
async def process(self, payload: Dict[str, Any], is_auditable: bool = False) -> None:
|
|
17
|
+
if not is_auditable:
|
|
18
|
+
logger.info("Skipping audit: no data in GraphQL response")
|
|
19
|
+
return
|
|
20
|
+
|
|
21
|
+
message_log_id = payload.get("idMessageLog")
|
|
22
|
+
data = json.dumps(payload)
|
|
23
|
+
blob_name = f"audits/{message_log_id}.text"
|
|
24
|
+
if not message_log_id:
|
|
25
|
+
logger.info("No Idmessagelog header found. Skipping audit storage.")
|
|
26
|
+
return
|
|
27
|
+
|
|
28
|
+
url = await self._storage.upload(blob_name, data)
|
|
29
|
+
if not url:
|
|
30
|
+
logger.warning("Skipping audit: The audit file could not be stored in blob storage.")
|
|
31
|
+
return
|
|
32
|
+
|
|
33
|
+
await self._messaging.send_message(blob_name)
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import json
|
|
2
|
-
from typing import Dict, Any
|
|
3
|
-
from Osdental.Messaging import IMessageQueue
|
|
4
|
-
from Osdental.Storage import IStorageService
|
|
5
|
-
|
|
6
|
-
class ServiceBusAuditEmitter:
|
|
7
|
-
|
|
8
|
-
def __init__(self, messaging: IMessageQueue, storage: IStorageService):
|
|
9
|
-
self._messaging = messaging
|
|
10
|
-
self._storage = storage
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
async def process(self, payload: Dict[str, Any]) -> None:
|
|
14
|
-
message_log_id = payload.get("idMessageLog")
|
|
15
|
-
data = json.dumps(payload)
|
|
16
|
-
blob_name = f"audits/{message_log_id}.text"
|
|
17
|
-
print(data)
|
|
18
|
-
# url = await self._storage.upload(blob_name, data)
|
|
19
|
-
# if not url:
|
|
20
|
-
# return
|
|
21
|
-
|
|
22
|
-
# await self._messaging.send_message(blob_name)
|
|
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
|
|
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
|
|
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|