Identity

When something happens in your cloud environment (a resource is created, a policy is changed, a login occurs), Guardrails maps that event back to a specific actor. This mapping is what Guardrails calls identity resolution, and it's fundamental to accountability and audit.

Core Concepts

Identity

An Identity is the Guardrails entity responsible for an action. It can be:

Persona

A Persona is a physical representation of an identity in a specific scope. A single identity (one person) may have multiple personas across different cloud providers. For example, John might have an AWS IAM User, an Azure AD user, and a GCP user, three personas, one identity.

Alternate Persona

When the security principal in an event can't be found in the Guardrails CMDB, the Alternate Persona provides a string representation of the actor in the native format from the event source. This ensures some identifying information is always available, even when full identity resolution fails.

[!IMPORTANT] Events are mapped at the time they're received. If Guardrails can't resolve the identity at that moment (because the user hasn't been mapped yet, or the resource hasn't been discovered), the event remains unidentified. Events are never retroactively updated with actor information. However, the alternate persona always contains identifying information from the original event.

AWS Identity Resolution

For AWS, identity information comes from CloudTrail's userIdentity element. Guardrails resolves six AWS identity types:

Root

Events from the AWS account's root credentials. The identity maps to the AWS Account resource itself. If the account has an alias, it appears as the userName.

IAM User

Events from an IAM user's credentials. Guardrails performs a reverse lookup of the userName against the AWS > IAM > Login User Names policy to find the matching Guardrails Profile. The persona is the AWS IAM User resource.

Assumed Role

Events from temporary credentials obtained via STS AssumeRole. Guardrails handles these differently depending on who assumed the role:

Federated User

Events from temporary credentials obtained via STS GetFederationToken. The identity is resolved through a reverse lookup of the session issuer's userName.

AWS Account

Events from cross-account role assumption, where another AWS account switches into a role. The identity maps to the originating AWS Account resource.

AWS Service

Events from AWS service accounts assuming roles (e.g., CloudFormation, Lambda). The identity is the invoking service. Since these are automated, the identity typically maps to the service name string.

Identity Mapping Summary

AWS TypeIdentityPersonaAlt Persona
RootAWS Account resourceN/AARN
IAM UserGuardrails Profile (via login name lookup)AWS IAM User resourceuserName
Assumed RoleGuardrails Profile (via token or login name)Resource matching ARNRole session info
Federated UserGuardrails Profile (via session issuer lookup)Resource matching ARNSession issuer userName
AWS AccountAWS Account resourceResource matching role ARNRecipient account ID
AWS ServiceN/AN/AInvoking service

Login Name Policies

The identity resolution process depends on Login Name policies that map Guardrails profiles to their cloud provider identities. Each provider has its own policy:

These policies use calculated policies with GraphQL input queries and Nunjucks templates to dynamically map profile emails to cloud-specific identifiers. For example, mapping a Google profile email [email protected] to an Azure UPN [email protected].

[!NOTE] The cloud provider audit trail should always be considered the authoritative data of record. Guardrails identity mapping is a best-effort correlation that depends on correct Login Name policy configuration and timely event processing.

Common Use Cases

Next Steps