Case study · Identity and cyber resilience

Every key has an owner: machine and AI agent identity for a South African fintech

A South African investment and payments platform had tightened staff logins years ago. The credentials its software used were another matter: cloud keys in CI, database passwords in configuration, partner API keys shared between services, and now AI agents with their own tool access. After an attack elsewhere showed how quickly automated attackers turn one foothold into every reachable token, the company set out to know, own, shorten and be able to revoke every machine credential it had.

Case studyFinancial services · South AfricaSumanta Mukhopadhyay9 min read
#security#governance#ai
CASE STUDY · CASE STUDY · IDENTITY AND CYBER RESILIENCE8 Nov 2026 · 15:50 GST
At a glance
SectorFinancial services · South Africa
My roleFractional CTO and security architect
EngagementAssessment, architecture and delivery leadership
ScopeMachine credential inventory, workload identity, short-lived credentials, AI agent identities and delegation, revocation, detection, regulatory evidence
What changed
  • A single inventory of machine and agent credentials, each with an owner and an expiry
  • Long-lived cloud keys removed from CI in favour of short-lived federated credentials
  • AI agents given their own identities with narrow, short-lived permissions
  • Revoking all machine credentials became a rehearsed action rather than an improvised one
  • Evidence for identity and access controls ready for the regulator and auditors
Machine credential inventoryOIDC federation for CI pipelinesCloud workload identitySecrets manager with dynamic credentialsToken broker for AI agentsKubernetes service account tokensIdentity-aware logging and alertsRevoke-all runbook

Anonymised composite. Client names, identifying details and confidential figures are withheld; public facts are cited in the references.

The situation

A South African platform offered investment accounts and payments to retail customers and small businesses. Staff identity was in good shape: single sign-on, multi-factor authentication and quarterly access reviews. Software identity was not. Pipelines deployed with long-lived cloud access keys. Services read database passwords from configuration files. Partner API keys were shared between several services, and nobody was sure which. Over the past year, teams had added AI agents: a support assistant that looked up account status, and internal agents that triaged alerts and drafted reconciliation reports, each with its own set of keys.

As a financial institution in scope of Joint Standard 2 of 2024, issued by the FSCA and the Prudential Authority and effective from 1 June 2025, the company had to maintain cybersecurity and cyber resilience controls, including identity and access management34. A security compromise involving personal information would also trigger notification duties under POPIA. The company's access controls were written around people; its regulator would not see the distinction as an excuse.

Why now. In late October, Chainalysis disclosed an intrusion by an actor using "offensive agentic techniques"2. On 6 November it said the attack had exposed password hashes and live tokens for all users, and it took key products offline1. The lesson for the board was simple: automated attackers find and use every credential they can reach, quickly. Industry research suggested the company was not unusual: a 2026 identity survey reported that only a small minority of organisations automate the lifecycle of machine identities5.

What had to be true

  • Known: every machine and agent credential in one inventory.
  • Owned: each with a named team and a purpose.
  • Short-lived: static keys replaced by credentials that expire in minutes or hours wherever possible.
  • Narrow: each identity allowed only what its job needs.
  • Revocable: all machine credentials can be rotated or revoked quickly, in a tested way.
  • Visible: every action attributable to a specific identity, and unusual use detected.

Architecture

Callers
Pipelinesbuild and deployServicesAPIs and jobsAI agentssupport and operations
Identity
Workload identitywho is this software?Agent identitiesone per agentDelegationacting for which user?
Issuing
OIDC federationCI to cloudSecrets managerdynamic database credentialsToken brokerscoped, short-lived agent tokens
Targets
Cloud accountsDatabasesPartner APIsInternal tools
Evidence
Inventoryowner, scope, expiryIdentity-aware logswho did whatAlertsunusual machine behaviour
Software proves who it is, then receives a short-lived credential for one job. Nothing holds a key it does not need right now.

Pipelines stopped storing cloud keys and instead exchanged a signed identity token from the CI system for short-lived cloud credentials. Services on Kubernetes used their service account identities to obtain credentials from the cloud and the secrets manager, which issued database users that expired after a few hours. Kubernetes itself follows the same principle for image pulls, where credential provider plugins fetch registry credentials on demand instead of storing them6. Partner API keys that could not be made short-lived were split so each service had its own, stored only in the secrets manager and rotated on a schedule.

Diagram of the kubelet calling a credential provider plugin with a CredentialProviderRequest for an image, the plugin authenticating to the registry and returning a CredentialProviderResponse with credentials
Fetch credentials when needed instead of storing them: Kubernetes applies the pattern to image pulls, and the same idea drove the platform's design. Source: Kubernetes blog, Andrew Sy Kim and Dixita Narang · CC BY 4.0

The data flow, end to end

  1. ProveA pipeline, service or agent presents its workload or agent identity
  2. CheckThe issuer checks policy: which identity, which target, which action
  3. IssueA credential scoped to the job is issued with a short expiry
  4. ActThe caller uses it; agents acting for a customer carry that delegation
  5. RecordEvery action is logged against the identity, and the user where delegated
  6. ExpireThe credential lapses; nothing long-lived is left behind to steal
The question changes from "where is this key stored?" to "who was allowed to get one, and when?".

The hard part: agents, delegation and revoking without an outage

Agents acting for customers. The support assistant needed to look up a specific customer's account, but must never be able to look up any account. The token broker issued it a token only after the customer had authenticated in the conversation, scoped to that customer, read-only and expiring with the session. Internal agents had their own identities and could only call tools on an approved list. Every action was logged against both the agent and, where relevant, the person it acted for. See agentic infrastructure.

Revoking everything, safely. The scenario the board cared about was "assume every machine credential is compromised". The first tabletop exercise showed that revoking everything at once would take the platform down, because some services could not obtain new credentials without a restart and a few partner keys had no rotation process at all. Fixing that became its own workstream: services that refresh credentials automatically, a documented rotation for each partner key, and a staged revoke-all runbook rehearsed in a test environment.

If you cannot revoke a credential without breaking production, you do not control it. Make rotation routine before you need it in an emergency.

How it ran

Security
  1. Inventory and owners
  2. Policy and token broker
  3. Alerts and drills
Platform
  1. CI federation
  2. Workload identity
  3. Dynamic credentials
Product and AI teams
  1. Agent tool lists
  2. Delegation flows
  3. Credential refresh in services
Risk and compliance
  1. Map to Joint Standard
  2. Breach playbooks
  3. Evidence for the regulator
Security set the rules, platform made them easy, product teams adopted them, and compliance turned them into evidence.
Phase 1Find
  • Scan code and config
  • List cloud and API keys
  • Assign owners
Phase 2Shorten
  • CI federation
  • Dynamic database users
  • Split shared keys
Phase 3Agents
  • Agent identities
  • Token broker
  • Delegation and logging
Phase 4Rehearse
  • Rotation drills
  • Revoke-all runbook
  • Detection tuning
Find first, shorten the riskiest next, then bring agents and drills into the same model.

Key decisions and trade-offs

DecisionAlternativeWhy
Inventory before toolingBuy a non-human identity product firstA tool cannot assign owners or decide scopes
Federated, short-lived CI credentialsRotate static keys more oftenRemoves the key rather than shrinking its life
One identity per agentAgents share a service accountActions attributable and revocable per agent
Customer-scoped tokens for the support agentBroad read access with prompt rulesLimits enforced in code, not in instructions
Staged revoke-all runbookRevoke everything at onceContains an incident without causing an outage
Partner keys split per serviceOne shared key per partnerA leak exposes one service, not all

What I'd do again, and differently

Again: start with the inventory and owners. It found credentials nobody remembered creating, and it made every later decision concrete. Differently: run the revoke-all tabletop in the first month; it exposed the services that could not refresh credentials, which shaped the whole plan. Related: LLMjacking and stolen AI keys, securing MCP servers, the 8 November tech news and where I work.

If your services and AI agents hold credentials you cannot list, own or revoke, see my fractional CTO work, or analyse your challenge and bring the result to a call.

References
  1. 1
  2. 2
  3. 3
  4. 4
  5. 5
  6. 6
FAQ

Common questions

What is a machine or non-human identity?

Any identity used by software rather than a person: cloud access keys, service accounts, API keys, database credentials, CI tokens and, increasingly, AI agents. They often outnumber human users and are harder to track.

Why do short-lived credentials matter after an agentic attack?

Automated attackers move quickly from first access to every credential they can reach. Credentials that expire in minutes or hours limit what a stolen token can do and how long it stays useful.

How should AI agents be given access to systems?

Give each agent its own identity, issue short-lived tokens scoped to the task through a broker, act on a user's behalf only with explicit delegation, and log every action against both the agent and the user.

Keep reading

Related

Open to advisory, fractional CTO & select builds

Let's talk about what you're building.

The fastest route is a free 30-minute call. Prefer to write? Send a message and I'll reply personally within two business days.

Start a conversation

How would you like to reach me?

Book a 30-min callFastest. Pick any open slot on my calendar.→ Write in GmailOpens a pre-filled draft in your browser.→ Use my email appOutlook, Apple Mail or your default client.→

I reply personally within two business days. Time zones from the Americas and Europe to the Middle East and Asia-Pacific.