Skip to content
Knowledge base
Identity Security8 min readJuly 30, 2026

Non-Human Identity Governance: A Practical Guide to Service Accounts, Secrets, and Workload Credentials

Service accounts, app registrations, API keys, and workload identities now outnumber the people they serve, and most have no owner. A practical guide to inventory, ownership, credential strategy, and lifecycle for non-human identities.

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

TypeWhere it livesTypical risk
Service accountsActive Directory, databases, applicationsStatic passwords, broad rights, interactive logon allowed, no owner
App registrations and service principalsMicrosoft Entra IDClient secrets that expire unnoticed or never rotate; tenant-wide API permissions
Managed and workload identitiesCloud platforms and KubernetesOver-broad role assignments; often ungoverned because “there is no password”
API keys and access keysSaaS and cloud IAM usersLong-lived, copied into scripts and repositories, rarely inventoried
Certificates and tokensServices, pipelines, devicesExpired or unmanaged, tied to departed engineers
Pipeline and automation credentialsCI/CD, orchestration, RPA botsHighly privileged, shared across projects, stored in many places
AI agentsCloud AI platforms, copilots, custom codeAct 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.

Figure 1Human versus non-human identity governance

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
The governance model is the same: owner, purpose, least privilege, review, and retirement. The difference is that you must build the triggers yourself.

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.

Figure 2A credential ladder, strongest first

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

In Active Directory, group managed service accounts remove password handling for supported services. In the cloud, managed identities and workload identity federation remove stored secrets for supported scenarios.

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:

  1. Does it need write access, or only read?
  2. Does it need access to every resource of this type, or specific ones?
  3. Does it need to exist in every environment, or only production?
  4. 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

Figure 3A lifecycle for every non-human identity
  1. Step 1

    Request

    Owner, purpose, and scope are approved before creation

  2. Step 2

    Create

    Built from a template with least privilege and a credential policy

  3. Step 3

    Operate

    Credentials rotate and use is logged against a baseline

  4. Step 4

    Review

    Owner re-confirms need; unused access is trimmed

  5. Step 5

    Retire

    Identity and credentials removed with the workload

The lifecycle must be wired to events engineers already have: pull requests, deployments, decommission tickets, and owner changes.

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

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.

#Non-human identity#Service accounts#Secrets management#Workload identity#App registrations
M

Written by Mehdi Rezaei

Founder & Identity Architect — 14+ years securing Fortune 500 environments across Entra ID, Active Directory, governance, and automation. Written from real engagements, by hand.

Connect on LinkedIn

Ready to simplify enterprise IAM?

Book a free 30-minute discovery call. We'll talk through your identity estate and where the biggest wins are — platform, advisory, or both.

Book a Call