Every automated process in your environment signs in as something: a service account that runs a scheduled task, an app registration behind an integration, an API key in a deployment pipeline, a cloud role assumed by a function. These non-human identities (NHIs) are created quickly, by many teams, for good reasons, and then forgotten.
They matter for a simple reason: attackers like them. A service account rarely has MFA, often has broad access, and frequently has a password that has not changed in years. Nobody notices when it is used from somewhere unusual because nobody is watching it.
What counts as a non-human identity
| Type | Where it lives | Typical risk |
|---|---|---|
| Service accounts | Active Directory, databases, applications | Static passwords, broad rights, interactive logon allowed, no owner |
| App registrations and service principals | Microsoft Entra ID | Client secrets that expire unnoticed or never rotate; tenant-wide API permissions |
| Managed and workload identities | Cloud platforms and Kubernetes | Over-broad role assignments; often ungoverned because “there is no password” |
| API keys and access keys | SaaS and cloud IAM users | Long-lived, copied into scripts and repositories, rarely inventoried |
| Certificates and tokens | Services, pipelines, devices | Expired or unmanaged, tied to departed engineers |
| Pipeline and automation credentials | CI/CD, orchestration, RPA bots | Highly privileged, shared across projects, stored in many places |
| AI agents | Cloud AI platforms, copilots, custom code | Act with delegated or own permissions; ownership and scope unclear |
Why they are harder to govern than people
People have an HR record, a manager, a start date, and a visible departure. Non-human identities have none of that by default.
People
- Created from an HR event with a known start date
- A manager is accountable
- MFA and conditional access apply
- Departure is visible and triggers removal
- Reviewers recognize names in an access review
Non-human identities
- Created ad hoc by whoever needs one
- Owner is the creator, who may have left or moved
- Often cannot use MFA, so the credential is the whole defense
- Nothing signals that the workload was retired
- Reviewers see cryptic names and cannot judge need
Step 1: Build the inventory
Discover non-human identities from every place they are created, and record the same minimum fields for each:
- Owner (a named person and a backup team) and business purpose
- System and environment it serves, and who consumes it
- Authentication method and where the credential is stored
- Permissions and the sensitivity of what they reach
- Created date, last used date, and credential expiry
Useful discovery sources include directory queries for accounts without a normal person attached, Entra app registrations and service principals, cloud IAM users and roles, secret-vault contents, and CI/CD configuration. Expect the first pass to be messy; the goal is a starting list that improves every cycle.
Step 2: Assign ownership that survives people changing jobs
An owner who has left is worse than no owner because it creates false confidence. Build in resilience:
- Require two contacts: an accountable individual and a team mailbox or group.
- Trigger a reassignment task when an owner leaves or changes teams. This belongs in your leaver process.
- Flag identities whose owner is disabled, and set a policy for how long they may keep running before suspension.
- Make owners confirm periodically that the identity is still needed. A short yes/no with a due date is enough.
Step 3: Choose the strongest credential you can
Not every workload supports the best option, but the direction is clear: remove the secret where you can, and shorten its life where you cannot.
Prefer the top
Platform-managed identity
Managed identities and cloud roles. No secret exists for anyone to steal
Federation to short-lived tokens
Pipelines and workloads exchange a trusted token for a temporary credential
Certificates with automated renewal
Strong, rotatable, and revocable when lifecycle tooling handles expiry
Vaulted secrets with rotation
Stored in a vault, retrieved at run time, rotated on a schedule
Static secrets in config, scripts, or chat
Long-lived, copied, and invisible to inventory
Avoid the bottom
A few concrete rules help:
- No shared accounts across applications. One identity per workload makes scoping and revocation possible.
- No interactive logon for service accounts, and no membership in broadly privileged groups.
- Expiry on everything. A secret with no end date will be found in production in five years.
- Never place secrets in tickets, chat, or documentation. Provide a vault reference instead.
Step 4: Scope permissions to the function
Define the actions and resources the workload needs, then grant exactly that. For each non-human identity ask:
- Does it need write access, or only read?
- Does it need access to every resource of this type, or specific ones?
- Does it need to exist in every environment, or only production?
- Can the permission be time-limited or conditional?
Review the answers on a schedule. Permissions granted during a rushed launch are usually still there years later.
Step 5: Manage the whole lifecycle
- Step 1
Request
Owner, purpose, and scope are approved before creation
- Step 2
Create
Built from a template with least privilege and a credential policy
- Step 3
Operate
Credentials rotate and use is logged against a baseline
- Step 4
Review
Owner re-confirms need; unused access is trimmed
- Step 5
Retire
Identity and credentials removed with the workload
Make retirement automatic wherever possible. Tie the identity to the deployment definition so that deleting the workload removes the identity. Where that is not possible, use inactivity detection: an account that has not authenticated for a defined period becomes a candidate for disablement, then deletion.
Warning signs to monitor
- Credentials with no expiry or an expiry far in the future
- Identities with no owner, or an owner who is disabled
- Unused for an extended period, yet still holding permissions
- Service accounts with interactive logon, delegation rights, or privileged group membership
- Sign-ins from new locations or hosts that do not match the workload's known behavior
- Secrets present in code repositories, build logs, or configuration files
Common objections
“Rotating this password will break something.” That is precisely the signal that nobody understands its dependencies. Map the dependencies, then rotate in a controlled window; do not let fear justify permanence.
“It is only used internally.” Internal credentials are the ones attackers use after the first foothold. Lateral movement relies on exactly this kind of account.
“We will clean it up after the migration.” Create the owner and expiry now. Temporary exceptions without end dates become permanent.
Further reading
- Microsoft Learn: Group managed service accounts overview
- Microsoft Learn: Managed identities for Azure resources
- OWASP Non-Human Identities Top 10
- MITRE ATT&CK: Kerberoasting (T1558.003)
- On this site: the non-human identity glossary entry, Identity Is the New Perimeter, and Who owns your AI agents?
About Rivitan
Rivitan treats non-human identities as first-class citizens of identity governance. Service Accounts & Secret Vaulting creates AD service accounts through a controlled workflow and vaults credentials in Delinea Secret Server; App Registration Lifecycle captures owners and monitors secret expiry in Entra ID; AWS IAM Governance finds stale keys and unused roles; and AI Agent Governance brings agents into the same ownership and review model. To discuss your inventory, book a conversation.