Non-Human Identity Lifecycle Management Guide
By the Netallion AI Assurance Team
Every enterprise runs on non-human identities. Service accounts process batch jobs. API keys connect microservices. OAuth tokens authorize third-party integrations. Managed identities authenticate cloud resources. These credentials are the connective tissue of modern infrastructure, and they outnumber human users by orders of magnitude. Yet most organizations have no inventory of them, no ownership assignments, and no rotation policies. This guide provides a practical framework for building an NHI lifecycle management program from scratch.
1. What Are Non-Human Identities?
A non-human identity (NHI) is any credential, token, or account that authenticates a machine, service, or automated process rather than a human user. NHIs are created by developers, DevOps teams, and automated pipelines. They are embedded in applications, stored in configuration files, and passed through environment variables.
Common types of non-human identities:
- Service accounts — Dedicated accounts for applications and services in Active Directory, Entra ID, GCP IAM, or AWS IAM
- API keys — Static tokens for authenticating to REST APIs, SaaS platforms, and third-party services
- OAuth client credentials — Client ID and secret pairs for machine-to-machine OAuth2 flows
- Managed identities — Cloud-provider-managed credentials (Azure Managed Identity, AWS IAM Roles, GCP Service Accounts)
- SSH keys — Key pairs for server access, Git operations, and automated deployments
- Database credentials — Connection strings and login credentials for database access
- Certificates — TLS/SSL certificates, code signing certificates, and client authentication certificates
- Webhook secrets — Shared secrets for validating webhook payloads between services
2. The 100:1 Ratio Problem
Industry research consistently shows that non-human identities outnumber human identities by a ratio of at least 100:1 in the average enterprise. A company with 500 developers may have 50,000 or more NHIs in active use. This ratio is growing as organizations adopt microservices architectures, cloud-native infrastructure, and AI-powered automation.
The security implications are severe. Most NHIs are created with excessive permissions because developers default to broad access during development and never narrow it down. Most NHIs have no expiration date because setting rotation policies adds friction to the development process. Most NHIs have no assigned owner because the developer who created them may have changed teams or left the organization years ago.
When an NHI is compromised, the blast radius can be enormous. A single exposed service account with broad Azure AD permissions can grant an attacker access to every resource in a subscription. An API key with admin-level access to a SaaS platform can be used to exfiltrate customer data. The 2024 Microsoft Midnight Blizzard attack began with a compromised OAuth application in a legacy test tenant, demonstrating how orphaned NHIs become attack vectors.
3. NHI Lifecycle Stages
Discovery
The first stage is finding every NHI in your environment. This requires scanning multiple sources: identity providers (Entra ID, Okta, AWS IAM), secrets managers (Azure Key Vault, HashiCorp Vault, AWS Secrets Manager), code repositories (GitHub, GitLab), CI/CD pipelines (Azure DevOps, GitHub Actions), cloud resource configurations, and application logs. Manual inventory is not feasible at scale. Automated discovery tools are essential.
Classification and Ownership
Every discovered NHI needs to be classified by type, sensitivity, and scope of access. More importantly, every NHI needs an assigned human owner who is accountable for its security posture. Without ownership, NHIs become orphaned when teams reorganize. Ownership should be tracked in a centralized inventory with automated reminders for quarterly ownership confirmation.
Rotation
Credential rotation limits the window of exposure if an NHI is compromised. Best practices vary by credential type: API keys should be rotated every 90 days, OAuth client secrets every 180 days, and certificates before expiration. Managed identities handle rotation automatically and should be preferred over static credentials whenever the platform supports them.
# Example: Recommended rotation schedules
API keys: 90 days
OAuth client secrets: 180 days
SSH keys: 365 days
Database passwords: 90 days
Certificates: 30 days before expiry
Webhook secrets: 180 days
Decommission
When a service is retired, its NHIs must be decommissioned. This means revoking credentials, removing service accounts, and verifying that no other service depends on the decommissioned identity. Decommission is the most frequently skipped lifecycle stage, which is why orphaned NHIs accumulate over time. Automated dependency mapping helps identify which services depend on a given NHI before it is removed.
4. Building an NHI Program
A successful NHI program requires organizational buy-in, tooling, and process. Here is a phased approach:
- Phase 1 (Weeks 1-4): Discovery — Deploy automated NHI discovery across your identity providers, cloud environments, and code repositories. Establish your baseline inventory count.
- Phase 2 (Weeks 5-8): Ownership — Assign owners to all discovered NHIs. Classify by sensitivity (Critical, High, Medium, Low). Flag orphaned NHIs for immediate review.
- Phase 3 (Weeks 9-12): Policy — Define rotation schedules by credential type. Set minimum permission requirements. Establish decommission procedures. Publish the NHI security policy.
- Phase 4 (Ongoing): Enforcement — Automate rotation reminders and enforcement. Monitor for policy violations. Report NHI security posture metrics to leadership quarterly.
5. Common Mistakes
- Treating NHIs like human identities — NHIs cannot respond to MFA prompts, password reset emails, or training reminders. Security controls designed for humans do not transfer to machines. NHIs need their own governance framework.
- Relying on spreadsheets for inventory — Manual tracking fails at scale. By the time you finish your spreadsheet, new NHIs have been created that are not on it. Automated, continuous discovery is required.
- Ignoring least privilege — Developers create NHIs with broad permissions for convenience. Over time, those broad permissions become the default. Enforce least privilege at creation time, not retroactively.
- Skipping decommission — Every service retirement should include an NHI decommission checklist. Integrate NHI cleanup into your change management process.
6. How Netallion AI Assurance Automates NHI Management
Netallion AI Assurance provides end-to-end NHI lifecycle management as a core platform capability:
- Proactive enumeration — Automatically discovers NHIs across Entra ID, AWS IAM, GitHub, GitLab, and cloud resource configurations. Continuous scanning ensures new NHIs are inventoried within hours of creation.
- Ownership tracking — Assigns and tracks ownership for every NHI with automated quarterly ownership confirmation reminders. Flags orphaned NHIs when owners leave the organization.
- Exposure detection — 497 detection patterns scan Azure Monitor logs, code repositories, collaboration tools, and AI prompts for exposed NHI credentials. Live verifiers confirm whether exposed credentials are still active.
- One-click remediation — Rotate exposed credentials directly into Azure Key Vault, revoke GitHub tokens, deactivate AWS keys, and issue new credentials with a single click from the findings dashboard.
- Compliance reporting — Generate NHI inventory reports, rotation compliance reports, and exposure trend reports for SOC 2, HIPAA, PCI-DSS, and ISO 27001 auditors.
7. Getting Started
The most important step is the first one: discover what you have. Most organizations are surprised by the number of NHIs in their environment when they run their first automated scan. Start with your primary identity provider and your largest cloud environment. Build the inventory, assign owners, and then layer on rotation policies and automated enforcement. The goal is not to achieve perfection on day one. The goal is to establish visibility and continuous improvement.
Related Guides
Get visibility into your non-human identities
Start a 14-day Business trial of Netallion AI Assurance. Discover your NHI inventory in under 15 minutes.
Start Free Trial