Security · Reliability

Hardening the core investment platform

Years of steady work on the Grails system at the heart of the business: upgrading it, securing it, and fixing the failure modes that only show up in production.

Client
XENO Investment
Role
Long-term maintainer and contributor across two major framework versions
Period
2022 — 2026
Status
In production
  • Groovy
  • Grails 4 → 6
  • MySQL 8
  • Kafka
  • RabbitMQ
  • Keycloak
  • Kubernetes
  • Helm

01 Problem

The core platform holds client accounts, goals, deposits and withdrawals. It predates most of the surrounding services and has to keep running while everything around it changes — new identity provider, new event streams, new channels.

02 Constraints

  • Zero tolerance for errors in withdrawal and account-ownership logic.
  • Changes must coexist with newer services consuming and producing the same events.

03 Architecture

Where the work landed
  1. 01
    WithdrawalsVerification codes bound to the account owner; bounded code generation.
  2. 02
    IdentityExisting staff linked to Keycloak identities.
  3. 03
    EventsConsumer groups and partition rebalancing fixed; no self-consumption.
  4. 04
    DatabaseTargeted indexes for queries that timed out in production.
  5. 05
    ChannelsUSSD APIs, PIN reset, referrals and the new provider contract.

04 Decisions

Bind verification to the owner

Chose
Withdrawal codes are validated against the account owner who requested them.
Instead of
Validate the code alone.
Why
Closed a path where a valid code belonging to someone else could confirm a withdrawal.

Bounded code generation

Chose
Draw verification codes from a bounded pool with an explicit exhaustion path.
Instead of
Random generation until an unused code appears.
Why
Unbounded generation loops forever once the code space is exhausted.

Ignore your own events

Chose
Consumers skip messages the platform itself published.
Instead of
Process every message on the topic.
Why
Prevents feedback loops once the monolith both produces and consumes shared topics.

05 Implementation

  • Worked across both the Grails 4 and Grails 6 generations of the platform, including Kubernetes deployment and service-discovery configuration.
  • Added indexes through versioned migrations for lookups that were timing out.
  • Built Kafka consumers that provision client, staff and partner users from the authentication service.

06 Outcomes

  • Two withdrawal-verification flaws closed: code ownership and code-space exhaustion.
  • Production query timeouts resolved with targeted indexes.
  • Kafka rebalancing and self-consumption issues fixed as the platform moved to event-driven integration.

Outcomes are limited to what I can verify and share. Internal names, partners, infrastructure details and production data are deliberately omitted.