Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions backend/.env.example
Original file line number Diff line number Diff line change
Expand Up @@ -158,3 +158,19 @@ CLEARING_SOURCE_PROVIDER=mock
CLEARING_SOURCE_BASE_URL=http://localhost:8000
CLEARING_SOURCE_TIMEOUT_SECONDS=5
CLEARING_SOURCE_MAX_RETRIES=2

# Listas restrictivas para PLD/FT HU21 (E6-T07, `risk`): adaptador
# `SanctionsLists` (OFAC / World-Check / PEP simuladas) con matching difuso
# determinista (Jaro-Winkler en stdlib, tolerante al orden) y semillas JSON
# versionadas de nombres ficticios (sin PII real). `mock` determinista por
# defecto (sin red); `http` coteja contra `POST {base_url}/screen` y lista
# versiones con `GET {base_url}/lists` (timeout/reintentos/circuito). La API
# key es server-side (solo cabecera); jamas en el repo. Umbral
# `risk.screening_threshold` (default `0.85`; el limite cuenta como match).
SANCTIONS_PROVIDER=mock
SANCTIONS_MOCK_MODE=success
SANCTIONS_BASE_URL=http://localhost:8000
SANCTIONS_API_KEY=change-me
SANCTIONS_TIMEOUT_SECONDS=5
SANCTIONS_MAX_RETRIES=2
SANCTIONS_SCREENING_THRESHOLD=0.85
6 changes: 6 additions & 0 deletions backend/app/adapters/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,14 @@
"wallet_interop": "app.adapters.wallet_interop",
"service_provider": "app.adapters.service_provider",
"clearing_source": "app.adapters.clearing_source",
"sanctions_lists": "app.adapters.sanctions_lists",
}

__all__ = [
"create_clearing_source",
"create_credit_bureau_provider",
"create_holder_lookup_provider",
"create_sanctions_lists",
"create_service_provider",
"create_wallet_interop_provider",
]
Expand All @@ -44,5 +46,9 @@ def __getattr__(name: str):
if name == "create_clearing_source":
from app.adapters.clearing_source import create_clearing_source as factory

return factory
if name == "create_sanctions_lists":
from app.adapters.sanctions_lists import create_sanctions_lists as factory

return factory
raise AttributeError(f"modulo {__name__!r} sin atributo {name!r}")
1 change: 1 addition & 0 deletions backend/app/adapters/data/sanctions/ofac.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"effective_from":"2026-01-05","entries":[{"country":"PE","document_number":"FIC-OFAC-0001","name":"AURELIO MENDOZA QUISPE"},{"country":"PE","document_number":"FIC-OFAC-0002","name":"TALIA HUAMAN CONDORI"},{"country":"PE","document_number":"FIC-OFAC-9001","name":"CORPORACION ANDINA FICTICIA S.A.C."}],"list_code":"OFAC","note":"Semilla ficticia E6-T07: nombres inventados, sin PII real.","version":"2026.01"}
1 change: 1 addition & 0 deletions backend/app/adapters/data/sanctions/pep.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"effective_from":"2026-01-20","entries":[{"country":"PE","document_number":"FIC-PEP-0001","name":"ELIAS TICONA MAMANI"},{"country":"PE","document_number":"FIC-PEP-0002","name":"MIRTA SOTO VELARDE"}],"list_code":"PEP","note":"Semilla ficticia E6-T07: nombres inventados, sin PII real.","version":"2026.01"}
1 change: 1 addition & 0 deletions backend/app/adapters/data/sanctions/worldcheck.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"effective_from":"2026-02-10","entries":[{"country":"PE","document_number":"FIC-WC-0001","name":"BRUNO FALCONI RIVEROS"},{"country":"PE","document_number":"FIC-WC-0002","name":"NAYRA POMA SALAS"},{"country":"PE","document_number":"FIC-WC-9001","name":"CONSORCIO LITORAL FICTICIO S.A."}],"list_code":"WORLDCHECK","note":"Semilla ficticia E6-T07: nombres inventados, sin PII real.","version":"2026.02"}
Loading
Loading