4 Min Read

Designing Multi‑tenant SaaS for Kenyan Banking Compliance

Designing Multi‑tenant SaaS for Kenyan Banking Compliance

Learn which multi‑tenant architecture fits Kenyan banking regulations, including data residency, KYC handling, and the trade‑offs of shared vs isolated

What you need to decide up front

You have three viable ways to isolate tenants in a banking SaaS platform:

  1. Separate instances, each bank gets its own full stack (database, container, VM).
  2. Separate schemas, a single database server hosts a distinct schema per bank.
  3. Shared schema with tenant_id, all banks share tables, and every row carries a tenant identifier.

Your choice drives cost, operational complexity, and how easily you can prove compliance with Kenya’s Data Protection Act 2019 and any KYC regulations that apply.

How the options line up against Kenyan banking constraints

OptionData residency proofKYC isolationOperational overheadTypical risk
Separate instancesEasy, each instance can be pinned to a Kenya data centerStrong, no cross‑tenant queriesHigh, provisioning, patching, backup per instanceLow
Separate schemasNeeds explicit audit to show schema‑level segregationGood, role‑based access can block cross‑schema readsMedium, one DB server, but many schemas to manageMedium
Shared schemaMust demonstrate row‑level security controls in audit logsAcceptable if row‑level policies are enforced and loggedLow, single DB, simple scalingHigher, mis‑config can expose data

If the bank’s regulator demands hard isolation for KYC records, separate instances are the safest bet. If the budget is tight and the regulator accepts technical controls (row‑level security, immutable audit logs), a shared schema can work.

Building the compliance foundation

1. Pin data to Kenya

Select a cloud provider that offers a Kenya region or a local colocation partner. In Pulumi, you would set the region explicitly:

import * as aws from "@pulumi/aws";

const db = new aws.rds.Instance("bank-db", {
    engine: "postgres",
    instanceClass: "db.t3.medium",
    allocatedStorage: 100,
    region: "af-south-1", // replace with Kenya region when available
    storageEncrypted: true,
});

The region field guarantees that the underlying storage lives in Kenya. Include this requirement in the procurement contract.

2. Encrypt KYC fields

All KYC attributes must be encrypted at rest. Use PostgreSQL’s pgcrypto extension for column‑level encryption:

CREATE EXTENSION IF NOT EXISTS pgcrypto;

ALTER TABLE customers
    ALTER COLUMN id_document TYPE bytea
    USING encrypt(id_document::bytea, gen_salt('bf'), 'bf');

Transport encryption is mandatory; enforce TLS 1.2+ on every API endpoint and database connection.

3. Identity and access management

Keycloak is the open‑source choice we use for multi‑tenant identity. For banking, configure realms per tenant when you need strong isolation, or client scopes with fine‑grained role mappings for shared‑schema setups. The guide we published on Keycloak tenancy walks through both patterns: Saa S Multi Tenant Approaches Using Keycloak

4. Auditing and monitoring

Regulators expect immutable logs of who accessed which KYC record and when. Deploy Grafana + Prometheus dashboards that capture:

  • Authentication events from Keycloak
  • Database query logs filtered by tenant_id
  • Alert rules for anomalous access patterns

Our system‑orchestration service sets up this stack and hands over a runbook: system orchestration

The delivery rhythm that keeps compliance on track

Afriq Silicon runs every project in two‑week sprints. The first sprint after kickoff is always a compliance sprint that produces:

  • Architecture diagram locked to Kenya region
  • Terraform/Pulumi code for encrypted storage
  • Keycloak realm or client‑scope configuration
  • A minimal audit‑log test suite

Subsequent sprints add business features while the compliance artefacts remain immutable. This approach matches the discovery‑proposal‑milestone flow described on our process page: how we work

When you need to switch tenancy models later

If you start with a shared schema and later need stronger isolation, plan a migration sprint:

  1. Export each tenant’s data to CSV (or Parquet) using COPY TO.
  2. Spin up a new instance or schema.
  3. Load data with COPY FROM.
  4. Update the API gateway to route the tenant to its new backend.

Because the migration is a bounded sprint, you can include it in the original proposal as an optional phase.

Checklist for the procurement team

  • Confirm that the cloud contract guarantees data residency in Kenya.
  • Require encryption of all KYC columns and TLS 1.2+ for APIs.
  • Ask the vendor to show Keycloak realm or client‑scope design.
  • Insist on immutable audit logs and a Grafana dashboard for regulator review.
  • Include a migration clause if you might change tenancy models later.

If you follow this checklist and align the architecture with the three isolation options, you’ll have a SaaS platform that meets Kenyan banking compliance without surprise later.

Ready to turn these notes into a production system? Talk to our team about it.

Photo by Christina Morillo on Pexels.


Frequently Asked Questions

Common questions on this topic, answered by the Afriq Silicon team.

What determines whether I should use separate databases or shared tables for each tenant?
The decision hinges on the bank’s risk appetite, the need for strict data isolation, and the expected scale; separate databases give strongest isolation but add operational overhead, while shared tables reduce cost but require rigorous row‑level security.
How can I keep customer data inside Kenya while using a cloud provider?
Choose a provider with a Kenya‑region or a local data center and configure your infrastructure as code to lock resources to that region; the contract must explicitly state data residency.
What KYC data must be encrypted at rest and in transit?
All personally identifiable information collected for KYC, identity documents, biometric hashes, and contact details, must be encrypted at rest and transmitted over TLS 1.2+; the encryption keys should be managed by a HSM or a cloud‑native key manager in Kenya.
Who is responsible for monitoring compliance after launch?
The bank retains ownership of policy and audit reporting, but the vendor should hand over a documented monitoring setup that includes audit logs, alerting, and a runbook for incident response.
Can I switch from a shared‑schema design to isolated databases later?
Migration is possible but requires data extraction, transformation, and loading to new instances; plan for it in the discovery phase and allocate budget for a migration sprint.

Related

Similar Articles

Stay Informed with Our Latest Articles: Explore the most recent insights, trends, and updates from our industry experts. Dive into a wealth of knowledge to keep you ahead in the ever-evolving tech landscape.

Scalable IT Infrastructure: What It Actually Takes

June 11th, 2026

trendse-commercedesignsaa-s

Scalable IT Infrastructure: What It Actually Takes

Scalability sounds simple until you need it. Then it becomes the most expensive problem you didn't plan for.

By Titus Mwangi 3 Min Read
How Fintech Automation Is Reshaping African Finance

October 15th, 2025

saa-s

How Fintech Automation Is Reshaping African Finance

From mobile money to CFO automation, fintech is quietly rewiring how African businesses handle money. Here is what is changing, why now, and where to start.

By Titus Mwangi 3 Min Read
SaaS Multi Tenant Approaches Using Keycloak

January 4th, 2024

saa-sdesign

SaaS Multi Tenant Approaches Using Keycloak

A practical guide to implementing multi-tenant SaaS identity management with Keycloak, covering realms, groups, and per-tenant isolation patterns.

By Harman Kibue, Titus Mwangi 3 Min Read
Building ML models without code: options for African enterprises

September 22nd, 2026

trends

Building ML models without code: options for African enterprises

Find out if you can train and deploy machine‑learning models without writing code, compare no‑code, low‑code and custom options, and see the steps to choose

By Titus Mwangi 4 Min Read
noise

Let’s Build Something
Amazing Together

Afriq Silicon

We will help you turn ideas into digital reality whatever industry you want to revolutionize

Solutions

Contact

© 2026 Afriq Silicon, Inc. All rights reserved