NHIs (non-human identities) have become a top risk as enterprises adopt Cloud and SaaS, and breaches involving NHIs rise, driving this vulnerability to the top of CISO priority lists.
An NHI is a digital identity linked to an application or service, empowering it to execute actions on target systems or resources. Developers, systems, and applications rapidly generate NHIs to enable automated interactions during cloud adoption, software development, and integration of third-party services. These identities are pivotal in driving automation and facilitating seamless integration across cloud services, SaaS platforms, and on-premises applications.
With the rising prevalence of NHIs in modern ecosystems, implementing robust management and security is vital to protecting against unauthorized access and mitigating risks. The main challenges that have increased the need for greater security include:
In this blog post, we discuss three core elements that play a role in NHI security: entitlements, credentials, and client security. We outline how their use dictates your security plan, explain why entitlements are critical, and offer best practices for securing credentials and clients.
Note: the term ‘credential’ in this article refers to authentication secrets such as API keys, access keys, certificates, etc., and the term ‘provider’ refers to a public cloud or SaaS provider.
When an NHI is created, three elements must be managed and secured: its credentials, entitlements, and the client that uses it.
A client (an application or a workload) uses an NHI to perform actions on one or more resources using a set of entitlements (permissions). In this process, the client application authenticates using a credential to establish its identity.
The key takeaway is that entitlements control your attack surface. While securing all three elements is essential, if entitlements are rightsized to least privilege, even if a credential or client is compromised, the business impact is greatly reduced. The attacker is severely constrained.
An NHI can be used in four ways, depending on who is responsible for credential management, who is responsible for entitlement management, and where the client workload is located. Below, we discuss these use cases and their security implications.
In this case, the enterprise creates an NHI for a required cloud service, which the cloud provider completely manages.
The three aspects of NHI security discussed above apply in this case:
Example:
In AWS, the AWSServiceRoleForBackup is an example of Provider-Managed NHI. It helps backup resources in AWS and has entitlements to list/read resources and copy them to the S3 bucket/EBS volume for backup.
The Enterprise is only responsible for creating the NHI when they require the backup service. The AWS cloud provider is responsible for defining NHI and its short-lived credentials. AWS also defines the NHI’s entitlement and is accountable for the security of the workload (AWS Backup Service) where the NHI is used.
In shared ownership, the provider and the enterprise jointly manage the NHI:
Example:
In AWS, an EC2 instance with an instance profile or a Lambda service can be linked to an IAM Role with a list of permissions. An Azure-managed Identity with role assignment would also fall into this category. The application runs in the cloud provider's VM service, which manages the lifecycle and injection of temporary credentials. The enterprise is responsible for defining the permissions required for the application and the security of the client VM, and AWS is responsible for managing the short-lived credentials.
When the NHI is entirely managed by the enterprise, the security looks like:
Example:
An AWS IAM User with an Access Key and Role assignment or Entra/Azure Service Principal with Key and Role assignment falls into this category. The NHI can be used from anywhere: inside the enterprise network (case 1 below) or externally (case 2 below) to perform actions on the target system or resource.
Case 1:
Case 2:
In this case, a third party (external entity) creates and manages the NHI credentials. The enterprise trusts the NHI and manages the entitlements. The NHI is used by the third-party entity to perform actions in the enterprise’s cloud environment.
Example:
An example of an NHI in this category is a role-to-role trust established between a third-party entity’s AWS account and a role in the target enterprise’s AWS Account. In Azure, the Service Principal in the customer's Entra domain trusts a registered Application in a third-party Entra domain, and the Service Principal has assigned roles in the target enterprise’s Azure environment.
Credentials, entitlements, and clients/workloads must all be managed to secure your NHIs. Credential and client compromises will happen; in many cases, they are outside the enterprise's control. To maximize security, the two best practices an enterprise can follow are
Andromeda Security discovers all NHI credentials, entitlements, and workloads and helps customers manage and secure them through:
NHIs (non-human identities) have become a top risk as enterprises adopt Cloud and SaaS, and breaches involving NHIs rise, driving this vulnerability to the top of CISO priority lists.
An NHI is a digital identity linked to an application or service, empowering it to execute actions on target systems or resources. Developers, systems, and applications rapidly generate NHIs to enable automated interactions during cloud adoption, software development, and integration of third-party services. These identities are pivotal in driving automation and facilitating seamless integration across cloud services, SaaS platforms, and on-premises applications.
With the rising prevalence of NHIs in modern ecosystems, implementing robust management and security is vital to protecting against unauthorized access and mitigating risks. The main challenges that have increased the need for greater security include:
In this blog post, we discuss three core elements that play a role in NHI security: entitlements, credentials, and client security. We outline how their use dictates your security plan, explain why entitlements are critical, and offer best practices for securing credentials and clients.
Note: the term ‘credential’ in this article refers to authentication secrets such as API keys, access keys, certificates, etc., and the term ‘provider’ refers to a public cloud or SaaS provider.
When an NHI is created, three elements must be managed and secured: its credentials, entitlements, and the client that uses it.
A client (an application or a workload) uses an NHI to perform actions on one or more resources using a set of entitlements (permissions). In this process, the client application authenticates using a credential to establish its identity.
The key takeaway is that entitlements control your attack surface. While securing all three elements is essential, if entitlements are rightsized to least privilege, even if a credential or client is compromised, the business impact is greatly reduced. The attacker is severely constrained.
An NHI can be used in four ways, depending on who is responsible for credential management, who is responsible for entitlement management, and where the client workload is located. Below, we discuss these use cases and their security implications.
In this case, the enterprise creates an NHI for a required cloud service, which the cloud provider completely manages.
The three aspects of NHI security discussed above apply in this case:
Example:
In AWS, the AWSServiceRoleForBackup is an example of Provider-Managed NHI. It helps backup resources in AWS and has entitlements to list/read resources and copy them to the S3 bucket/EBS volume for backup.
The Enterprise is only responsible for creating the NHI when they require the backup service. The AWS cloud provider is responsible for defining NHI and its short-lived credentials. AWS also defines the NHI’s entitlement and is accountable for the security of the workload (AWS Backup Service) where the NHI is used.
In shared ownership, the provider and the enterprise jointly manage the NHI:
Example:
In AWS, an EC2 instance with an instance profile or a Lambda service can be linked to an IAM Role with a list of permissions. An Azure-managed Identity with role assignment would also fall into this category. The application runs in the cloud provider's VM service, which manages the lifecycle and injection of temporary credentials. The enterprise is responsible for defining the permissions required for the application and the security of the client VM, and AWS is responsible for managing the short-lived credentials.
When the NHI is entirely managed by the enterprise, the security looks like:
Example:
An AWS IAM User with an Access Key and Role assignment or Entra/Azure Service Principal with Key and Role assignment falls into this category. The NHI can be used from anywhere: inside the enterprise network (case 1 below) or externally (case 2 below) to perform actions on the target system or resource.
Case 1:
Case 2:
In this case, a third party (external entity) creates and manages the NHI credentials. The enterprise trusts the NHI and manages the entitlements. The NHI is used by the third-party entity to perform actions in the enterprise’s cloud environment.
Example:
An example of an NHI in this category is a role-to-role trust established between a third-party entity’s AWS account and a role in the target enterprise’s AWS Account. In Azure, the Service Principal in the customer's Entra domain trusts a registered Application in a third-party Entra domain, and the Service Principal has assigned roles in the target enterprise’s Azure environment.
Credentials, entitlements, and clients/workloads must all be managed to secure your NHIs. Credential and client compromises will happen; in many cases, they are outside the enterprise's control. To maximize security, the two best practices an enterprise can follow are
Andromeda Security discovers all NHI credentials, entitlements, and workloads and helps customers manage and secure them through: