Steve Miller's Blog

Non-Human Identity Security: Inventory Service Accounts, API Keys, and Bot Tokens

Three technology professionals discuss service account ownership at a meeting table beside server cabinets.

Non-human identity security starts with an awkward question: who owns the credentials that keep working after their creator leaves? Service accounts, deployment keys, and bot tokens do not appear on the employee offboarding checklist unless somebody puts them there. I would rather have an inventory that answers that question than a frightening industry ratio and a spreadsheet nobody trusts.

A Big Ratio Is Not Your Cloud Census

Entro Labs, the research team inside security vendor Entro Security, reported 144 non-human identities for every human identity in its H1 2025 report. This was vendor-sponsored research using telemetry from Entro’s enterprise customer base, not a representative survey of every cloud estate. Its methodology covers more than 27 million non-human identities across global customers, collected between January 1 and June 30, 2025, spanning cloud providers and SaaS platforms.

The report does not disclose the number of customer organizations or a detailed counting rule for that ratio. It does not establish that non-human identities outnumber employees in most cloud estates. Human identities are not necessarily employee headcount, either. Treat the finding as a reason to inspect your environment, not a multiplier for estimating its size. More credentials do not automatically mean more risk; their permissions, exposure, and lifecycle matter.

Make Non-Human Identity Security an Ownership Problem

Keep the principal separate from its credentials. A service account is an identity; a key or token is a way of authenticating or exercising access. Rotating a credential need not retire the principal, and counting every replacement token as another permanent identity can make your dashboard nonsense.

AWS’s IAM best practices call for reviewing and removing unused users, roles, permissions, policies, and credentials, applying least privilege, and using temporary credentials with workload roles. Those are AWS-specific controls, not a promise that every SaaS integration supports the same model. My practical inventory would connect these records:

Reconcile cloud identity records with deployment configuration, secret-management metadata, and SaaS application registrations. An export from the cloud console is a starting point, not evidence that you found a bot token installed in a separate collaboration service.

For AWS workloads, prefer IAM roles with temporary credentials where supported. Scope permissions to the required actions and resources, and constrain the trust relationship as carefully as the permissions policy. A narrowly scoped role still needs an appropriately restricted caller. Temporary credentials reduce the lifetime of a stolen credential; they do not make excessive permissions harmless.

Cloudflare’s Missed Credentials Were Not Harmless

There is a documented consequence to confusing apparently unused credentials with revoked access. In its disclosure of the November 2023 intrusion, Cloudflare said it had failed to rotate one service token and three service account credentials stolen during the earlier Okta compromise. They were mistakenly believed to be unused. The resulting intrusion reached its Atlassian environment.

Cloudflare said no customer data or systems were impacted, and described access controls that limited movement. This was not proof that every bot token compromises an entire company. It was evidence that a credential left valid can remain useful to an attacker even after its owner thinks it has no job. An inventory needs an operational revocation state, not just a status someone typed.

Rotate Without Turning Expiry Into an Outage

Provider guidance is not interchangeable. Google Cloud’s service account key guidance recommends avoiding user-managed keys where possible, using usage metrics to identify unused keys, and routinely rotating the user-managed keys that remain. It also warns against simply setting key expiry on production workloads because expiry can cause outages; its recommendation there is lifecycle management through rotation. It makes exceptions for some hardware-protected keys.

AWS’s guidance above takes a different formulation for necessary long-term access keys: update them when needed, using last-used information to make changes safely. Neither page supplies a universal rotation interval for all credentials. Choose a supported authentication mechanism and a lifecycle policy for that mechanism, rather than copying a calendar rule across unrelated services.

For a planned replacement, my runbook would identify every consumer, deploy the replacement through the approved delivery path, verify successful authentication, and then invalidate the old credential. Where overlapping credentials are supported, keep that overlap controlled and brief. A suspected compromise needs incident handling and prompt containment, not an ordinary change-window delay. Confirm revocation using the issuer’s documented behavior; do not assume replacing a stored key instantly terminates every existing session.

Test the Inventory Against a Real Dependency

Imagine a hypothetical deployment bot whose maintainer has left. Ask the owning team to trace its credential reference to the issuer, explain its production permissions, and demonstrate replacement in a safe test environment. Verify the old credential is rejected and the intended job still runs. If ownership or dependencies cannot be established, that is remediation work, not permission to delete blindly.

I would prioritize unknown owners and broad production access before chasing the smallest possible identity count. Track whether important identities have accountable owners, constrained access, usable logs, and tested revocation. A bigger inventory with those answers can be healthier than a smaller one full of mysteries. The target is controlled access, not winning a ratio contest.

Exit mobile version