Encryptors 2.63__tar.gz → 2.65__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.63 → encryptors-2.65}/PKG-INFO +1 -1
- {encryptors-2.63 → encryptors-2.65}/setup.py +1 -1
- {encryptors-2.63 → encryptors-2.65}/src/Encryptors.egg-info/PKG-INFO +1 -1
- {encryptors-2.63 → encryptors-2.65}/src/Osdental/Helpers/JwtTokenHelper.py +5 -5
- {encryptors-2.63 → encryptors-2.65}/src/Osdental/Models/TokenClaims.py +1 -0
- {encryptors-2.63 → encryptors-2.65}/src/Osdental/Services/JwtAuthTokenService.py +2 -0
- {encryptors-2.63 → encryptors-2.65}/src/Osdental/Services/__init__.py +7 -0
- {encryptors-2.63 → encryptors-2.65}/README.md +0 -0
- {encryptors-2.63 → encryptors-2.65}/setup.cfg +0 -0
- {encryptors-2.63 → encryptors-2.65}/src/Encryptors.egg-info/SOURCES.txt +0 -0
- {encryptors-2.63 → encryptors-2.65}/src/Encryptors.egg-info/dependency_links.txt +0 -0
- {encryptors-2.63 → encryptors-2.65}/src/Encryptors.egg-info/entry_points.txt +0 -0
- {encryptors-2.63 → encryptors-2.65}/src/Encryptors.egg-info/requires.txt +0 -0
- {encryptors-2.63 → encryptors-2.65}/src/Encryptors.egg-info/top_level.txt +0 -0
- {encryptors-2.63 → encryptors-2.65}/src/Osdental/Cache/Redis.py +0 -0
- {encryptors-2.63 → encryptors-2.65}/src/Osdental/Cache/__init__.py +0 -0
- {encryptors-2.63 → encryptors-2.65}/src/Osdental/Cli/__init__.py +0 -0
- {encryptors-2.63 → encryptors-2.65}/src/Osdental/Constants/Constant.py +0 -0
- {encryptors-2.63 → encryptors-2.65}/src/Osdental/Constants/Message.py +0 -0
- {encryptors-2.63 → encryptors-2.65}/src/Osdental/Constants/__init__.py +0 -0
- {encryptors-2.63 → encryptors-2.65}/src/Osdental/Context/__init__.py +0 -0
- {encryptors-2.63 → encryptors-2.65}/src/Osdental/Database/BaseRepository.py +0 -0
- {encryptors-2.63 → encryptors-2.65}/src/Osdental/Database/Connection.py +0 -0
- {encryptors-2.63 → encryptors-2.65}/src/Osdental/Database/__init__.py +0 -0
- {encryptors-2.63 → encryptors-2.65}/src/Osdental/Decorators/Grpc.py +0 -0
- {encryptors-2.63 → encryptors-2.65}/src/Osdental/Decorators/Retry.py +0 -0
- {encryptors-2.63 → encryptors-2.65}/src/Osdental/Decorators/SecureResolver.py +0 -0
- {encryptors-2.63 → encryptors-2.65}/src/Osdental/Decorators/__init__.py +0 -0
- {encryptors-2.63 → encryptors-2.65}/src/Osdental/Encryptor/Aes.py +0 -0
- {encryptors-2.63 → encryptors-2.65}/src/Osdental/Encryptor/Argon2.py +0 -0
- {encryptors-2.63 → encryptors-2.65}/src/Osdental/Encryptor/Bcrypt.py +0 -0
- {encryptors-2.63 → encryptors-2.65}/src/Osdental/Encryptor/Jwt.py +0 -0
- {encryptors-2.63 → encryptors-2.65}/src/Osdental/Encryptor/Rsa.py +0 -0
- {encryptors-2.63 → encryptors-2.65}/src/Osdental/Encryptor/Sha512.py +0 -0
- {encryptors-2.63 → encryptors-2.65}/src/Osdental/Encryptor/__init__.py +0 -0
- {encryptors-2.63 → encryptors-2.65}/src/Osdental/Enums/AuditType.py +0 -0
- {encryptors-2.63 → encryptors-2.65}/src/Osdental/Enums/ErrorSource.py +0 -0
- {encryptors-2.63 → encryptors-2.65}/src/Osdental/Enums/FileType.py +0 -0
- {encryptors-2.63 → encryptors-2.65}/src/Osdental/Enums/GrahpqlOperation.py +0 -0
- {encryptors-2.63 → encryptors-2.65}/src/Osdental/Enums/Profile.py +0 -0
- {encryptors-2.63 → encryptors-2.65}/src/Osdental/Enums/ResultType.py +0 -0
- {encryptors-2.63 → encryptors-2.65}/src/Osdental/Enums/StatusCode.py +0 -0
- {encryptors-2.63 → encryptors-2.65}/src/Osdental/Enums/__init__.py +0 -0
- {encryptors-2.63 → encryptors-2.65}/src/Osdental/Exception/ControlledException.py +0 -0
- {encryptors-2.63 → encryptors-2.65}/src/Osdental/Exception/__init__.py +0 -0
- {encryptors-2.63 → encryptors-2.65}/src/Osdental/Helpers/AuditHelper.py +0 -0
- {encryptors-2.63 → encryptors-2.65}/src/Osdental/Helpers/AuditQueue.py +0 -0
- {encryptors-2.63 → encryptors-2.65}/src/Osdental/Helpers/AuthTokenProcessor.py +0 -0
- {encryptors-2.63 → encryptors-2.65}/src/Osdental/Helpers/AzureClassifier.py +0 -0
- {encryptors-2.63 → encryptors-2.65}/src/Osdental/Helpers/GrpcConnection.py +0 -0
- {encryptors-2.63 → encryptors-2.65}/src/Osdental/Helpers/Resilience.py +0 -0
- {encryptors-2.63 → encryptors-2.65}/src/Osdental/Helpers/ResponseDecryptor.py +0 -0
- {encryptors-2.63 → encryptors-2.65}/src/Osdental/Helpers/__init__.py +0 -0
- {encryptors-2.63 → encryptors-2.65}/src/Osdental/Http/APIClient.py +0 -0
- {encryptors-2.63 → encryptors-2.65}/src/Osdental/Http/__init__.py +0 -0
- {encryptors-2.63 → encryptors-2.65}/src/Osdental/Messaging/AzureServiceBus.py +0 -0
- {encryptors-2.63 → encryptors-2.65}/src/Osdental/Messaging/Kafka.py +0 -0
- {encryptors-2.63 → encryptors-2.65}/src/Osdental/Messaging/RabbitMQ.py +0 -0
- {encryptors-2.63 → encryptors-2.65}/src/Osdental/Messaging/__init__.py +0 -0
- {encryptors-2.63 → encryptors-2.65}/src/Osdental/Models/ApiResponse.py +0 -0
- {encryptors-2.63 → encryptors-2.65}/src/Osdental/Models/AuditContext.py +0 -0
- {encryptors-2.63 → encryptors-2.65}/src/Osdental/Models/Graphql.py +0 -0
- {encryptors-2.63 → encryptors-2.65}/src/Osdental/Models/Notification.py +0 -0
- {encryptors-2.63 → encryptors-2.65}/src/Osdental/Models/Response.py +0 -0
- {encryptors-2.63 → encryptors-2.65}/src/Osdental/Models/Token.py +0 -0
- {encryptors-2.63 → encryptors-2.65}/src/Osdental/Models/__init__.py +0 -0
- {encryptors-2.63 → encryptors-2.65}/src/Osdental/Secrets/AzureKeyVaultProvider.py +0 -0
- {encryptors-2.63 → encryptors-2.65}/src/Osdental/Secrets/__init__.py +0 -0
- {encryptors-2.63 → encryptors-2.65}/src/Osdental/Services/ServiceBusAuditEmitter.py +0 -0
- {encryptors-2.63 → encryptors-2.65}/src/Osdental/Services/WebsocketClient.py +0 -0
- {encryptors-2.63 → encryptors-2.65}/src/Osdental/Storage/AzureBlobStorage.py +0 -0
- {encryptors-2.63 → encryptors-2.65}/src/Osdental/Storage/S3Storage.py +0 -0
- {encryptors-2.63 → encryptors-2.65}/src/Osdental/Storage/__init__.py +0 -0
- {encryptors-2.63 → encryptors-2.65}/src/Osdental/Utils/CaseConverter.py +0 -0
- {encryptors-2.63 → encryptors-2.65}/src/Osdental/Utils/CodeGenerator.py +0 -0
- {encryptors-2.63 → encryptors-2.65}/src/Osdental/Utils/DataNormalizer.py +0 -0
- {encryptors-2.63 → encryptors-2.65}/src/Osdental/Utils/DataUtils.py +0 -0
- {encryptors-2.63 → encryptors-2.65}/src/Osdental/Utils/DateUtils.py +0 -0
- {encryptors-2.63 → encryptors-2.65}/src/Osdental/Utils/FileMetaData.py +0 -0
- {encryptors-2.63 → encryptors-2.65}/src/Osdental/Utils/HashValidator.py +0 -0
- {encryptors-2.63 → encryptors-2.65}/src/Osdental/Utils/Mapper.py +0 -0
- {encryptors-2.63 → encryptors-2.65}/src/Osdental/Utils/PasswordGenerator.py +0 -0
- {encryptors-2.63 → encryptors-2.65}/src/Osdental/Utils/QueryGenerator.py +0 -0
- {encryptors-2.63 → encryptors-2.65}/src/Osdental/Utils/RsaUtils.py +0 -0
- {encryptors-2.63 → encryptors-2.65}/src/Osdental/Utils/TextProcessor.py +0 -0
- {encryptors-2.63 → encryptors-2.65}/src/Osdental/Utils/__init__.py +0 -0
- {encryptors-2.63 → encryptors-2.65}/src/Osdental/__init__.py +0 -0
|
@@ -2,7 +2,7 @@ from setuptools import setup, find_packages
|
|
|
2
2
|
# ANDERSON REVISAR EL CACHE LOCAL DEL KEYVAULT PARA VALIDAR SI FUNCIONA
|
|
3
3
|
setup(
|
|
4
4
|
name="Encryptors",
|
|
5
|
-
version="2.
|
|
5
|
+
version="2.65",
|
|
6
6
|
author="OSDental LLC",
|
|
7
7
|
author_email="support@osdental.ai",
|
|
8
8
|
description="End-to-end algorithm library",
|
|
@@ -45,20 +45,20 @@ class JwtTokenHelper:
|
|
|
45
45
|
}
|
|
46
46
|
|
|
47
47
|
# 1. Firmar → JWS (inner JWT)
|
|
48
|
-
signed:
|
|
48
|
+
signed: str = jwt.encode(
|
|
49
49
|
header={"alg": "RS256", "typ": "JWT"},
|
|
50
50
|
claims=payload,
|
|
51
51
|
key=self._private_key,
|
|
52
52
|
)
|
|
53
53
|
|
|
54
54
|
# 2. Encriptar → JWE (outer token)
|
|
55
|
-
encrypted:
|
|
55
|
+
encrypted: str = jwe.encrypt_compact(
|
|
56
56
|
protected={"alg": "RSA-OAEP", "enc": "A256CBC-HS512", "cty": "JWT"},
|
|
57
|
-
plaintext=signed, # el JWT firmado es el payload del JWE
|
|
57
|
+
plaintext=signed.encode(), # el JWT firmado es el payload del JWE
|
|
58
58
|
public_key=self._public_key,
|
|
59
59
|
)
|
|
60
60
|
|
|
61
|
-
return encrypted
|
|
61
|
+
return encrypted
|
|
62
62
|
|
|
63
63
|
def get_claims_ignore_expiration(
|
|
64
64
|
self,
|
|
@@ -107,7 +107,7 @@ class JwtTokenHelper:
|
|
|
107
107
|
try:
|
|
108
108
|
# --- Paso 1: desencriptar JWE ---
|
|
109
109
|
decrypted = jwe.decrypt_compact(
|
|
110
|
-
|
|
110
|
+
value=token.encode(),
|
|
111
111
|
private_key=self._private_key,
|
|
112
112
|
algorithms=self._jwe_algorithms,
|
|
113
113
|
)
|
|
@@ -140,6 +140,7 @@ class JwtAuthTokenService(IAuthTokenService):
|
|
|
140
140
|
user_full_name=claims["user_full_name"],
|
|
141
141
|
abbreviation=claims["abbreviation"],
|
|
142
142
|
aes_key_auth=claims["aes_key_auth"],
|
|
143
|
+
exp=claims["exp"],
|
|
143
144
|
)
|
|
144
145
|
|
|
145
146
|
|
|
@@ -165,4 +166,5 @@ class JwtAuthTokenService(IAuthTokenService):
|
|
|
165
166
|
user_full_name=claims["user_full_name"],
|
|
166
167
|
abbreviation=claims["abbreviation"],
|
|
167
168
|
aes_key_auth=claims["aes_key_auth"],
|
|
169
|
+
exp=claims["exp"],
|
|
168
170
|
)
|
|
@@ -47,6 +47,13 @@ class IAuthTokenService(ABC):
|
|
|
47
47
|
) -> ActionTokenClaims:
|
|
48
48
|
pass
|
|
49
49
|
|
|
50
|
+
@abstractmethod
|
|
51
|
+
async def validate_token_for_refresh(
|
|
52
|
+
self,
|
|
53
|
+
token: str,
|
|
54
|
+
) -> UserTokenClaims:
|
|
55
|
+
pass
|
|
56
|
+
|
|
50
57
|
|
|
51
58
|
class IAuditEmitter(Protocol):
|
|
52
59
|
async def process(self, payload: Dict[str, Any]) -> None:
|
|
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
|