Skip to content
Portal

Architecture

UBO is built around one gateway (deployed as several identical instances) carrying all the business domains, one PostgreSQL database as the source of truth, and specialised infrastructure services: identity, event queue, cache, vault, file server, monitoring. Two views complement each other:

  • the components: who calls whom, over which protocol;
  • the functions: how information flows between the business functions, and by which medium (in-memory call, SQL transaction, file, event journal, network).
simulated in developmentMONITORINGUBO gateways × 2Rust · AxumREST API · webhooksnetwork stations (lease)authorization pathrules · decisionsclearing · disputesaccounting · filesmanufacturing · transfersevents (outbox)scheduler (lease)HSM · vault · quotasUsersbrowserBank systemscore banking, appsCard networksVisaNet · BanknetPartnerspersonalisers, providersExternal servicesKYC, scoring, reference dataKeycloakidentityTraefikportal · API · docsSFTPGoSFTP serverPostgreSQLprimaryReplicaread onlyRedisquotas, cacheKafkatopics ubo.*Consumersbank systemsOpenBaosecrets vaultJaegertracesPrometheusmetricsLokilogsGrafanadashboards1HTTPS2OIDC3HTTPS REST4HTTP5JWKS6webhooks HTTPS7ISO 8583 / TCP8SFTP9SFTP10hook HTTP11API admin12SFTP · HTTPS (push)13HTTPS (rules)14SQL15SQL (read)16replication17RESP18produce19consume20HTTP API21OTLP22scrape /metrics23logs24PromQL25LogQL26traces
Each arrow goes from the caller to the one called; a double arrow is a two-way session. The numbers refer to the matrix below.
No. Caller → called Medium Mode What for Security
1 Users → Traefik HTTPS synchronous The portal (React app) and its API calls TLS, session token
2 Users → Keycloak OpenID Connect (authorization code) synchronous Single sign-on to the portal Password, Keycloak policy
3 Bank systems → Traefik HTTPS, JSON REST API synchronous Issuing, authorizations, disputes, files… OAuth 2.0 token (JWT) carrying the bank
4 Traefik → gateways HTTP synchronous Round-robin; a gateway no longer answering /health is taken out Internal network
5 Gateway → Keycloak HTTPS periodic (10 min) Public keys (JWKS) to verify the tokens —
6 Gateway → bank systems HTTPS (webhooks) asynchronous Each business event, a few seconds later HMAC-SHA256 signature, 6 attempts
7 Gateway ↔ networks ISO 8583 over TCP real time Authorizations (0100/0110), reversals (0400), advices, session management (0800); UBO’s station opens the session Zone keys, encrypted PIN, cryptograms
8 Networks → SFTPGo SFTP per file Daily clearing files SSH key, PGP-encrypted file
9 Partners → SFTPGo SFTP per file Dropping and collecting files (hosted exchange points) SSH key, isolated space, PGP
10 SFTPGo → gateway HTTP (hook) on each drop Reports each upload, rename, download Hook token
11 Gateway → SFTPGo HTTP (admin API) on demand Partners’ accounts, keys, quotas Admin account, vault
12 Gateway → partners SFTP or HTTPS per batch Push to a remote partner (manufacturing, files) SSH key or token, PGP
13 Gateway → external services HTTPS synchronous, bounded The rules’ calls (KYC, fraud score, reference data) API keys from the vault; never the card number
14 Gateway → PostgreSQL SQL (+ LISTEN/NOTIFY) synchronous All writes and up-to-date reads; change signals Role subject to bank isolation
15 Gateway → replica SQL synchronous Consultation, reporting, audit, while less than 5 s behind Same role, same isolation
16 PostgreSQL → replica Streaming replication (WAL) continuous Keep the replica up to date Dedicated replication role
17 Gateway → Redis RESP synchronous, bounded (100 ms) Shared quotas, cards’ recent activity Internal network
18 Gateway → Kafka Produce asynchronous Event publication (one topic per object) Internal network
19 Consumers → Kafka Consume asynchronous The bank’s systems read the event stream ACLs per bank (production)
20 Gateway → OpenBao HTTP (KV v2) on demand, 30 s cache Secrets: API keys, passwords, PGP keys Limited-rights token, unsealed by the HSM
21 Gateway → Jaeger OTLP asynchronous Traces of each operation Internal network
22 Prometheus → gateways HTTP (/metrics) every 5 s Metrics, each gateway found by its name Internal network
23 Containers → Loki Logs (Promtail) continuous Logs of all the containers Internal network
24-26 Grafana → Prometheus, Loki, Jaeger PromQL, LogQL, API on demand Dashboards, linked logs and traces Grafana account
REAL TIME — DURING THE PAYMENTDEFERRED — AFTER THE PAYMENTBUSINESS AND FAN-OUTNetworksauthorization requestsNetwork stationsdialect decodingAuthorization path6 steps, ~60 msRule engineconditions, nodesExternal servicesKYC, scoringLimits and balancesreservationDecisionrecorded, explainedHSMPIN, CVV, ARQCNetworks · bankfilesTransfersSFTP, PGP, acksFilesformat, checksClearingmatchingOperation lifecycleissuer state machineAccountingentries, reportSchedulerjobs under leaseDisputescases, decisionsManufacturingorders, batchesEvent journaloutboxWebhooks · Kafkato the bankPersonalisersmanufacturingF1ISO 8583 / TCPF2in-processF3in-processF4HTTPSF5SQL transactionF6same transactionF7HSM operationsF8SFTP + PGPF9stored fileF10linesF11network messageF12same transactionF13report, journal → bankF14authorizationF15dispute messagesF16batch (format)F17SFTP · HTTPSF18same transactionF19HTTPS · KafkaF20triggerssynchronous call, in memorysame SQL transactionasynchronous: file, journal, jobexternal exchange (protocol)outside UBO
During the payment everything is synchronous and in memory; afterwards the functions chain through files, the journal and jobs. The numbers refer to the matrix below.
No. From → to Medium What travels
F1 Networks → stations ISO 8583 / TCP The authorization request, in the network’s dialect
F2 Stations → authorization path In-memory call The request translated into the platform’s neutral model (the same as for the API)
F3 Path → rule engine In-memory call The operation’s context (request, card, cardholder, history); 800 ms budget
F4 Rules → external services HTTPS The useful data (never the card number); answer, timeout or error
F5 Path → limits and balances SQL transaction Reserving the amount on the balance and all the limits concerned, in one call
F6 Path → decision Same transaction The operation, its explained decision, its fingerprint and its first event, recorded together
F7 Path → HSM In-memory call PIN, CVV and chip cryptogram verification; response computation
F8 Networks, bank → transfers SFTP + PGP Incoming files (clearing, blocks…)
F9 Transfers → files Stored, encrypted file The received file, checked against its format and totals
F10 Files → clearing Lines integrated by a job (5 s) Each cleared transaction, matched with its authorization
F11 Clearing → operation lifecycle Network message, in memory Presentment, credit, withdrawal, reversal: the same processing as through the API
F12 Lifecycle → accounting Same transaction The financial event of the account movement
F13 Accounting, files → bank Produced, signed file, through transfers The day’s accounting report, the authorization journal
F14 Decision → operation lifecycle Same transaction The authorization opens its lifecycle: hold, deadline, follow-ups
F15 Disputes → operation lifecycle Network message, in memory The case’s actions (chargeback, pre-arbitration…) and financial decisions
F16 Manufacturing → files File in the personaliser’s format The batch of cards to make, signed and encrypted
F17 Transfers → personalisers SFTP or HTTPS The batch, then acknowledgements and tracking
F18 Lifecycle → event journal Same transaction (outbox) Each change of an operation, card, file, dispute
F19 Journal → webhooks, Kafka Relays every second The events, signed for the webhooks, per object on Kafka
F20 Scheduler → functions Jobs under lease File integration, expiries, dispute deadlines, accounting close, publication, partitions
Component Role Technology
Gateway (×2) The API, the network stations, the scheduler, all the business domains Rust, Axum, SQLx
Traefik Balances the API between the gateways, serves the portal and the documentation Traefik 3
PostgreSQL Source of truth: all the data, isolated per bank PostgreSQL 17
Read replica Consultation, reporting, audit PostgreSQL 17, streaming replication
Redis Quotas shared between gateways, cards’ recent activity Redis 7
Kafka Publication of the business events Kafka (KRaft)
OpenBao Secrets vault OpenBao
Keycloak Identity: users’ sign-in, API tokens Keycloak
SFTPGo Partners’ SFTP server SFTPGo
Portal The banks’ interface React, TypeScript, Tailwind
Simulator Networks, merchants, personalisers, external services Rust
Monitoring Metrics, dashboards, traces, logs Prometheus, Grafana, Jaeger, Loki

The gateway is a set of Rust modules in a hexagonal architecture: the domain (model and rules) depends on no technology; the adapters (database, Kafka, network, files) and the API plug into it. Each module is described in the business components.

Module Domain
ubo-common Core: configuration, errors, isolation, HSM, vault, quotas, cache, replica, events
ubo-entity, ubo-user Organisations; users and roles
ubo-card Cardholders, accounts, cards and their lifecycle, products, designs, limits, PIN
ubo-auth-engine Authorization path, decisions, 3-D Secure, network stations, reporting
ubo-rule-engine Rule engine and external calls
ubo-network, ubo-visa ISO 8583 codec and networks’ dialects; issuer state machine
ubo-disputes Dispute cases
ubo-files, ubo-transfers Format engine and file lifecycle; SFTP transfers
ubo-accounting Financial events, entries, days, accounting report
ubo-personalization Card manufacturing
ubo-gateway Assembly: API, authentication, scheduler, security, monitoring
ubo-simulator Simulator

The screen Exploitation → Architecture shows the same platform in six views (business, functional, software, system, data, integration), with each component’s real state.

Architecture vision in the portal