“Can you quickly send me the API key for the CRM integration?” Questions like this are common among developers. To help colleagues keep moving, API keys, tokens and other credentials are often passed on through channels such as chats. But once that happens, the secret leaves the intended control process and can become a major risk for Non-Human Identities (NHIs) – and ultimately for the entire organization.
A Top 10 No One Wants to Make
But let’s start at the beginning: applications, workloads, APIs, bots and other automated systems require their own Non-Human Identity to access protected resources. They prove their identity to applications and services using credentials such as API keys, tokens or private keys. Which data, applications or cloud resources they are subsequently allowed to access depends on the permissions associated with the respective identity.
If a credential falls into the wrong hands, it can make it considerably easier for attackers to gain access to protected systems. A compromised secret may allow an attacker to authenticate to a system as if they were a legitimate application.
The Open Worldwide Application Security Project (OWASP) therefore lists secret leakage as one of the key risks associated with Non-Human Identities. In 2025, it even ranked second. Secrets can leak in a number of ways, particularly through hard-coding in source code, storage in plaintext configuration files or sharing via public chat channels. Copies can then remain in chat histories, backups or other systems, where attackers may be able to discover and exploit them.
Does this sound like an important topic for your organization, but you would like to learn more about NHIs first? Then umbrella.associates’ blog post “Machine Identities: The New Challenge!” is a good place to start.
Inseparable: NHIs and Credentials
Simply blaming employees misses the point. The real challenge begins long before information is shared or a potential leak occurs. Organizations need to know which secrets exist, which NHI they belong to, which permissions are associated with them and how they are controlled throughout their entire lifecycle. Yet this visibility is often lacking.
The question of where an API key is stored should, of course, be easy to answer so that day-to-day operations do not grind to a halt. But it is even more important for those responsible to understand which identity can authenticate with that key and what actions that identity is subsequently allowed to perform.
The first rule for handling secrets is therefore simple: teams should never consider them in isolation. A secret must always be viewed in connection with the NHI behind it and the specific permissions assigned to that identity.
From Secrets Management to Secrets Governance
Organizations can improve the security of their Non-Human Identities by progressing through two stages. First, they need to protect the secrets themselves – and this also involves two key areas.
#1 Misuse and Exposure
Where can credentials unintentionally appear? Organizations that know where the weak points are can address them systematically. They should therefore check whether API keys, tokens or other secrets are, for example:
- embedded in source code or code repositories,
- stored in plaintext in configuration files or scripts,
- shared via chats, tickets or emails,
- exposed in logs or debug output,
- stored on developer endpoints, or
- placed in SaaS applications or cloud platforms without sufficient controls.
#2 Longevity
How long does a credential remain valid? This is a question that is often overlooked. As a result, credentials may remain valid for far longer than necessary. At the same time, the associated identity may retain excessive permissions for an extended period. OWASP specifically warns against overly long lifetimes for secrets, keys and tokens.
Once these aspects are firmly established as part of secrets management, teams can take the next step. The focus then shifts to the relationship between credentials and NHIs. The following checklist can help organizations move towards secrets governance:
- Inventory: We know which NHIs and credentials exist.
- Define ownership: It is clearly established who is responsible for specific NHIs and credentials.
- Secure provisioning: A secrets vault or secure secrets management system is used. Credentials are never distributed via chats, tickets, source code or unprotected configuration files.
- Least privilege: The identity behind the credential receives only the permissions it actually requires.
- Short-lived credentials: Wherever technically possible, temporary, dynamically generated credentials replace static, long-lived secrets.
- Automated rotation: Keys and tokens are renewed on a regular basis.
- Offboarding: A consistent process ensures that credentials and NHIs that are no longer required are deactivated.
- Secret scanning: Repositories and development processes are automatically scanned for accidentally exposed credentials.
Insecure or Secure – A Subtle but Crucial Difference
The benefits of moving beyond pure secrets management towards secrets governance become clear when looking at the lifecycle of an API key.
Without governance:
A developer typically creates an API key. When someone on the team needs it, the information is often shared via chat. Over time, several people use the key. Because there are no defined rules for ownership or validity, no one takes responsibility for rotating it. Even after the project ends, the API key remains active.
With secrets governance:
In this case, the team does important groundwork first. An application is assigned an NHI, and an owner is defined and documented. The credential is provisioned in a controlled manner, while the permissions assigned to the corresponding NHI are restricted to the specific use case. Usage can be continuously monitored, the credential is rotated automatically and, once the project ends, the identity is deactivated and its access rights are revoked.
Ultimately, It Comes Down to Identity Governance
Identity plus credential plus permissions plus usage context plus lifecycle: only by bringing all of these elements together can organizations improve the security of their NHIs. This also leads to a broader lesson for many teams. Protecting employee identities is important and necessary. But Non-Human Identities must never be overlooked. Identity and Access Management should therefore always take both human and non-human identities into account. In the ideal scenario, secrets governance ultimately becomes an integral part of identity governance.
