PlaybookLast checked 16 October 2026 with AI-assisted research. Editor: Akshay Dubey.Corrections logEditorial policy
On this page
  1. Why NHIs need their own monitoring
  2. Six signals and what each one catches
  3. The fields that name the caller and the source
  4. Signal to log source map
  5. Built-in detections and their limits
  6. Check log coverage before writing rules
  7. How this maps to the OWASP NHI Top 10
  8. Acceptance criteria for the Monitor stage
  9. FAQ
  10. Sources

Monitoring non-human identities means watching a short list of signals of misuse or decay: unused identities and credentials, credentials used from an unexpected network or outside their workload, new permissions, new credentials and leaked secrets. Each signal appears in a specific log: AWS CloudTrail, Azure and Microsoft Entra logs, Google Cloud Audit Logs and Kubernetes audit logs.

This page covers what to watch and where each signal is recorded. It is the Monitor stage of the NHI Governance lifecycle model v2 (an analytical model, not a standard). How to write detections, triage alerts and contain an incident is covered in NHI in security operations. Platform log fields and built-in detections below are taken from each provider's documentation as read on 10 October 2026; the signal list, baselines and acceptance criteria are our interpretation.

Why non-human identities need their own monitoring

Three properties change what works:

  • Behaviour is narrow. A service account or cloud role usually calls the same APIs from the same workload. Deviation is easier to see than for a person, but only if you have recorded what normal looks like.
  • There is no sign-in prompt. Workloads present keys, tokens or certificates directly. A stolen credential used from an attacker's server produces an ordinary API call, not a failed login.
  • The logs are not always on. Kubernetes writes no audit events unless the API server is given an audit policy file. Google Cloud Data Access audit logs are disabled by default except for BigQuery. AWS CloudTrail event history keeps 90 days of management events per Region, and the Azure Activity Log keeps 90 days. Check coverage before writing any rule.

Monitoring also assumes an inventory. A signal on an identity with no recorded owner, workload or expected network has nothing to be compared against and nobody to confirm it. Build those records first; see the discovery methodology and assigning an owner to every identity.

Six signals and what each one catches

The six signals below cover most of the OWASP Non-Human Identities Top 10 (2025) risks that can be seen in logs at all. Each needs a baseline from the inventory; without one, the signal produces noise.

SignalWhat it can indicateBaseline neededOWASP NHI risk (our mapping)
1. Identity or credential not used for a set period (this site uses 90 days)Orphaned identity, retired workload, forgotten keyLast authentication per identity and per credentialNHI1 Improper Offboarding
2. Credential used from an unexpected source address or networkStolen credential, or a person using a machine credential from a laptopExpected IP ranges, NAT gateways or cluster egress for each identityNHI2 Secret Leakage, NHI10 Human Use of NHI, NHI3 Vulnerable Third-Party NHI
3. New permission grant or trust changePrivilege escalation or persistence, or unreviewed changeChange process: who may grant, through which pipelineNHI5 Overprivileged NHI, NHI6 Insecure Cloud Deployment Configurations
4. New credential created for an existing identityPersistence (attacker adds own key), or a team bypassing federationWhich identities are expected to hold no stored credentialNHI7 Long-Lived Secrets
5. Token used outside its expected workload or environmentCredential copied off its host, or non-production identity reaching productionWorkload, node or environment each identity belongs toNHI2, NHI8 Environment Isolation, NHI9 NHI Reuse
6. Secret exposure alertCredential published in code, a package or a public repositoryMapping from credential to identity and ownerNHI2 Secret Leakage

Source networks are recorded as IP addresses. Matching an address to an autonomous system number (ASN) or hosting provider needs an external IP-to-ASN data set; none of the four platforms below records the ASN in the event itself, as far as their field references show. In our view an ASN change (for example from your cloud provider's range to a residential or unrelated hosting network) is a stronger signal than an individual IP change, because workload addresses change often within one provider.

The fields that name the caller and the source

Every signal starts from two questions: which identity made the call, and from where. The fields differ by platform.

Platform and logWhich identityFrom whereNotes
AWS CloudTrailuserIdentity: type (for example IAMUser, AssumedRole, WebIdentityUser), arn, accessKeyId, and sessionContext.sessionIssuer for the role behind temporary credentialssourceIPAddress; for actions by AWS services this shows a service name or AWS InternalAssumeRoleWithWebIdentity events record subjectFromWebIdentityToken, which ties a federated session to the external workload
Microsoft Entra sign-in logsService principal sign-ins (apps and service principals presenting a certificate or client secret) and a separate managed identity sign-in logIP address is one of the fields service principal sign-ins are grouped byManaged identity sign-ins are only in the managed identity log, not the service principal log
Azure Activity Log"Event initiated by" identity for each control plane operationCaller details per eventControl plane only; data plane operations are in resource logs
Google Cloud Audit LogsAuthenticationInfo (principal email); serviceAccountKeyName when a user-managed key was used; serviceAccountDelegationInfo when a service account was impersonatedRequestMetadata.callerIpSome services, including App Engine and Compute Engine, do not log serviceAccountKeyName
Kubernetes audit loguser; service accounts appear as system:serviceaccount:NAMESPACE:NAME; impersonatedUser if impersonation was usedsourceIPs, ordered by X-Forwarded-For, X-Real-Ip, then the connection's remote addressuserAgent is supplied by the client and should not be trusted

Signal to log source map

The table names the event or feature to watch for each signal. Event names are those used in each provider's documentation. It is a starting point; your estate may log more or less depending on configuration.

SignalAWSAzure and Microsoft EntraGoogle CloudKubernetes
1. Unused identity or credentialIAM last accessed and last used information (role last used, access key last used); IAM Access Analyzer unused access findings for unused roles, access keys and permissions (a charged feature)Absence of entries in service principal and managed identity sign-in logs over the period (our method)Service account insights: service accounts that have not authenticated in the past 90 days (Pre-GA at the time of writing)For legacy Secret-based tokens, the kubernetes.io/legacy-token-last-used label; for others, absence from audit logs (our method)
2. Unexpected sourcesourceIPAddress per accessKeyId or role sessionService principal sign-ins by IP addresscallerIp per principalsourceIPs per service account
3. New permission or trustIAM API calls in CloudTrail (CloudTrail captures all IAM and AWS STS API calls), such as policy attachment and trust policy updatesActivity Log Microsoft.Authorization/roleAssignments/write; Entra audit log activities "Add app role assignment to service principal", "Add delegated permission grant", "Consent to application"Admin Activity log entries for SetIamPolicy (Admin Activity logs are always written)Create or update of RoleBindings and ClusterRoleBindings, if the audit policy logs them
4. New credentialCreateAccessKey in CloudTrailEntra audit log "Add service principal credentials" and "Update application - Certificates and secrets management"google.iam.admin.v1.CreateServiceAccountKey (Admin Activity)Creation of Secrets of type kubernetes.io/service-account-token; requests to the serviceaccounts/token subresource
5. Use outside the workloadGuardDuty findings UnauthorizedAccess:IAMUser/InstanceCredentialExfiltration.OutsideAWS and .InsideAWS for EC2 instance credentials used elsewhereEntra ID Protection workload identity detection "Suspicious Sign-ins" (sign-in properties unusual for that service principal)callerIp outside the expected range for the service account (our method)Service account token used from a sourceIPs value outside the pod and node ranges (our method)
6. Secret exposureAWS applies the managed policy AWSCompromisedKeyQuarantineV3 when an IAM user's credentials are compromised or exposed publiclyEntra ID Protection detection "Leaked Credentials"Exposed service account keys are disabled automatically by default since 16 June 2024, controlled by constraints/iam.serviceAccountKeyExposureResponse; project owners and security contacts are notifiedNo built-in detector documented (our reading); rely on repository and registry secret scanning

Repository-side detection matters for signal 6 because most leaks start in code. GitHub secret scanning runs on public repositories free of charge, scans full Git history, and notifies partner service providers when it finds their credential types so they can revoke them. For private organisation repositories it requires GitHub Secret Protection. OWASP NHI2 recommends integrating secret scanning into CI/CD pipelines.

Built-in detections and their limits

Each cloud provider offers detections for workload identities. They help, but none is complete, and each has scope limits worth recording in your monitoring design:

  • Amazon GuardDuty raises anomaly findings such as Discovery:IAMUser/AnomalousBehavior, which it describes as produced by an anomaly detection machine learning model, and findings for API calls from Tor exit nodes or known malicious IP addresses. The credential exfiltration findings apply to credentials created for an EC2 instance through its launch role.
  • Microsoft Entra ID Protection detects risk on single-tenant, non-Microsoft SaaS and multitenant apps. Managed identities are not currently in scope. Full risk details and risk-based Conditional Access need Workload Identities Premium; without it you still receive the detections with limited reporting detail.
  • Google Cloud notifies on and, by default, disables exposed service account keys. Organisations that chose WAIT_FOR_ABUSE still receive the notification but the key stays active.
  • Kubernetes documentation, as we read it, describes no built-in anomaly detection. What you get is the audit log, at the level your policy sets: Metadata records the requesting user, timestamp, resource and verb without request bodies.

Check log coverage before writing rules

A rule that queries a log nobody collects will never fire. The checks below are our suggestion; each has an acceptance criterion you can test.

CheckAcceptance criterion
CloudTrail trail or event data store covers every account and Region in the organisationEvents from each account and Region arrive in the central store; event history alone (90 days, management events, one Region per search) is not relied on
STS logging location understoodSearches include US East (N. Virginia) for requests to the AWS STS global endpoint, which are logged there; regional endpoint calls are logged in their own Region
Azure Activity Log exportedA diagnostic setting sends the Activity Log to a workspace or storage with retention beyond the default 90 days
Entra service principal and managed identity sign-in logs exportedBoth log types reach the SIEM, not only interactive user sign-ins
Google Cloud Data Access logs enabled where workload data access mattersAn explicit decision, recorded per service, because they are off by default except for BigQuery
Kubernetes audit policy set on every clusterThe API server runs with --audit-policy-file and a log or webhook backend; on managed clusters, the provider's control plane audit logging is switched on
Inventory joined to logsEach event can be joined to an inventory record giving owner, workload and expected network

How this maps to the OWASP NHI Top 10

The mapping is ours, not OWASP's. Where an OWASP entry itself mentions monitoring or auditing, the table says so.

OWASP riskSignalsWhat OWASP's entry says about detection
NHI1 Improper Offboarding1Regularly audit active NHIs to monitor ongoing usage, and recertify that they are still needed and owned
NHI2 Secret Leakage2, 5, 6Integrate secret scanning into CI/CD pipelines
NHI3 Vulnerable Third-Party NHI2, 3Continuously monitor third-party activity using logs, API call tracking and behaviour analytics
NHI4 Insecure Authentication4 (partly)Periodically review authentication methods; this is mainly a configuration review, not a log signal
NHI5 Overprivileged NHI3Continuously assess granted permissions
NHI6 Insecure Cloud Deployment Configurations3Validate tokens strictly and restrict trust relationships; watch trust policy changes
NHI7 Long-Lived Secrets1, 4Prefer short-lived credentials and automated rotation; watch for new long-lived credentials
NHI8 Environment Isolation5Unique identities per environment; a non-production identity seen in production is a finding
NHI9 NHI Reuse5Audit identities with their assigned components; one identity seen from several workloads suggests reuse
NHI10 Human Use of NHI2Use tools that audit and track NHI usage so human use is detectable

Acceptance criteria for the Monitor stage

These are our suggested tests that the Monitor stage is operating, not requirements from any standard. They are written so that an internal auditor can check each one from records.

  1. Every identity in the inventory has a last-authentication date that is no more than one collection cycle old.
  2. Identities and credentials with no authentication in 90 days appear on a report sent to their named owner, and each has a recorded decision (keep with reason, disable, or retire).
  3. New credential creation for identities marked "no stored credential" raises an alert within one working day.
  4. Permission and trust changes to non-human identities outside the approved pipeline raise an alert.
  5. Each provider-side detection that applies (GuardDuty, Entra ID Protection, Google key exposure response, repository secret scanning) is switched on, or its absence is a recorded decision.
  6. Each alert record names both the identity and the credential involved, and the owner who confirmed or dismissed it.
  7. The coverage checks above are re-run at least quarterly and the result is kept as evidence.

For metrics to report upward, see NHI metrics and board reporting. For how to turn these signals into tested detections and a response, see NHI in security operations. Access reviews, which use the same last-used data, are covered in running an NHI access review.

Frequently asked questions

What should you monitor for non-human identities?

Six signals cover most cases: identities or credentials unused for a set period, credentials used from an unexpected network, new permission grants or trust changes, new credentials on existing identities, tokens used outside their expected workload or environment, and secret exposure alerts. Each needs a baseline from your inventory: owner, workload and expected network.

Which logs show service account and workload identity activity?

AWS CloudTrail (userIdentity and sourceIPAddress), the Azure Activity Log plus Microsoft Entra service principal and managed identity sign-in logs and audit logs, Google Cloud Audit Logs (AuthenticationInfo and callerIp), and Kubernetes audit logs, where service accounts appear as system:serviceaccount:NAMESPACE:NAME with sourceIPs.

Are Kubernetes audit logs on by default?

Not on a self-managed API server. Kubernetes documentation states that the audit policy is passed with the --audit-policy-file flag and that if the flag is omitted, no events are logged. On managed services, check the provider setting for control plane audit logs.

How do you find unused non-human identities?

Use last-used data: AWS IAM last accessed information or IAM Access Analyzer unused access findings, Google Cloud service account insights (accounts that have not authenticated in 90 days), and the absence of sign-in log entries for Entra service principals and managed identities. Send the list to each named owner for a recorded decision.

Is monitoring NHIs required by law?

No law we know of names NHI monitoring as such. Frameworks such as the OWASP NHI Top 10 (guidance) recommend auditing NHI usage. Whether a specific regulation applies to your logging depends on your sector and jurisdiction; treat the criteria on this page as our suggestion, not a legal requirement.

Sources

From the publisher

HumanAudit, which publishes this site, is preparing the NHI Governance pack: an NHI policy, ownership register, lifecycle procedures and one control set mapped, as our interpretation, to PCI DSS v4.0.1, ISO/IEC 27001:2022, NIS2 and DORA. Planned for March 2027; not yet on sale, and no price has been published.

Monthly change log

Know when the NHI landscape changes.

One email a month from this reference: new deals, standards status changes and corrections. No sponsored content. Unsubscribe from any email.

We first email you a link to confirm. Privacy policy.