- Lower Kabete Rd, Nairobi 00100, Kenya
- Mon-Fri, 08:00am - 06:00pm
- +254 (798) 586113
- info@afriqsilicon.com
4 Min Read
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
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:
- Separate instances, each bank gets its own full stack (database, container, VM).
- Separate schemas, a single database server hosts a distinct schema per bank.
- 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
| Option | Data residency proof | KYC isolation | Operational overhead | Typical risk |
|---|---|---|---|---|
| Separate instances | Easy, each instance can be pinned to a Kenya data center | Strong, no cross‑tenant queries | High, provisioning, patching, backup per instance | Low |
| Separate schemas | Needs explicit audit to show schema‑level segregation | Good, role‑based access can block cross‑schema reads | Medium, one DB server, but many schemas to manage | Medium |
| Shared schema | Must demonstrate row‑level security controls in audit logs | Acceptable if row‑level policies are enforced and logged | Low, single DB, simple scaling | Higher, 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:
- Export each tenant’s data to CSV (or Parquet) using
COPY TO. - Spin up a new instance or schema.
- Load data with
COPY FROM. - 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?
How can I keep customer data inside Kenya while using a cloud provider?
What KYC data must be encrypted at rest and in transit?
Who is responsible for monitoring compliance after launch?
Can I switch from a shared‑schema design to isolated databases later?
Related Services
Working through this problem? These are the services we offer that connect to it.
Multi-Tenant Platform Development
Platforms that scale from first deployment to millions of users.
Multi-tenant platform development from Afriq Silicon. We build platforms with tenant isolation, subscription billing, enterprise SSO, and resilient infrastructure.
Explore serviceSystem Orchestration
Make your infrastructure invisible, reliably fast, quietly resilient.
IT system orchestration and infrastructure from Afriq Silicon. We design scalable, secure, integrated IT environments for growing organizations.
Explore serviceStrategic Consultancy
Align your technology decisions with your business reality.
Technology strategy consultancy from Afriq Silicon. We help with build-vs-buy decisions, technology selection, vendor evaluation, and digital transformation planning.
Explore serviceRelated
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.
June 11th, 2026
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.
October 15th, 2025
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.
January 4th, 2024
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.
September 22nd, 2026
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
Pages
- - Work
- - Services
- - Our Process
- - Contact Us
Solutions
- - Acts ML
- - Kilelehub
- - Other Projects
Legal
Contact
- - Lower Kabete Rd, Nairobi 00100, Kenya
- - Mon-Fri, 08:00am - 06:00pm
- - +254 (798) 586113
- - info@afriqsilicon.com