What Is an IAM Role?

Illustration of an IAM role: cloud and user icons connected by arrows to a key and lock, showing temporary credentials and assigned permissions enabling secure access to resources.

What Is an IAM Role?

What Is an IAM Role?

In today's cloud-driven world, security and access management have become paramount concerns for organizations of all sizes. The ability to control who can access what resources, when they can access them, and under what conditions has transformed from a nice-to-have feature into an absolute necessity. Every day, countless security breaches occur because of improperly configured access controls, leaked credentials, or overly permissive policies that grant users more power than they actually need.

IAM roles represent a fundamental shift in how we think about identity and access management in cloud environments. Rather than tying permissions directly to individual users or embedding credentials into applications, roles provide a dynamic, temporary, and more secure way to grant access to resources. They act as intermediaries that define what actions can be performed without permanently assigning those permissions to specific entities.

Throughout this comprehensive exploration, you'll gain a deep understanding of IAM roles from multiple angles—technical architecture, practical implementation, security implications, and real-world use cases. Whether you're a cloud architect designing secure systems, a developer building applications, or a security professional auditing access controls, this guide will equip you with the knowledge to leverage IAM roles effectively and securely.

Understanding the Fundamental Concept

An IAM role is essentially a set of permissions that define what actions can be performed on which resources within a cloud environment. Unlike traditional user accounts that have permanent credentials, roles are designed to be assumed temporarily by trusted entities. Think of it as a security badge that grants specific access rights for a limited time, rather than a permanent key that opens all doors indefinitely.

The beauty of IAM roles lies in their flexibility and security model. When an entity assumes a role, it receives temporary security credentials that automatically expire after a defined period. This time-bound nature significantly reduces the risk associated with credential compromise. If credentials are somehow exposed, they become useless once they expire, limiting the window of opportunity for malicious actors.

"The principle of least privilege isn't just about limiting what users can do—it's about ensuring they only have those permissions for exactly as long as they need them."

Roles operate on a trust relationship model. This means that before any entity can assume a role, there must be an explicit trust policy that defines who or what is allowed to assume that role. This creates a clear separation between identity (who you are) and authorization (what you're allowed to do). The trust policy acts as the first gate, determining whether an entity can even attempt to assume the role, while the permissions policy defines what that entity can do once the role is assumed.

Core Components of IAM Roles

Every IAM role consists of several essential components that work together to create a comprehensive access control mechanism:

  • Trust Policy: Defines which entities are permitted to assume the role, establishing the foundation of the trust relationship
  • Permissions Policy: Specifies the exact actions that can be performed and on which resources once the role is assumed
  • Role ARN: A unique identifier that allows other services and entities to reference and assume the role
  • Session Duration: The maximum length of time that temporary credentials remain valid after the role is assumed
  • Tags: Metadata that helps organize, track, and manage roles across complex environments

The trust policy deserves special attention because it's often misunderstood. Written in JSON format, it explicitly states which principals (users, services, or accounts) are allowed to perform the "sts:AssumeRole" action. This policy can be as broad or as restrictive as needed, supporting scenarios from simple same-account access to complex cross-account and cross-service integrations.

Component Purpose Configuration Level Security Impact
Trust Policy Controls who can assume the role Mandatory High - First line of defense
Permissions Policy Defines allowed actions and resources Mandatory High - Determines actual capabilities
Session Duration Limits credential validity period Optional (has defaults) Medium - Reduces exposure window
Permissions Boundary Sets maximum possible permissions Optional High - Prevents privilege escalation
Tags Organizational metadata Optional Low - Supports governance

Different Types and Their Practical Applications

IAM roles aren't one-size-fits-all solutions. They come in different flavors, each designed to address specific use cases and architectural patterns. Understanding these distinctions helps you choose the right type of role for your particular situation.

Service Roles

Service roles are designed specifically for cloud services to access other resources on your behalf. When you launch an EC2 instance, create a Lambda function, or deploy a container, these compute resources often need to interact with other services like databases, storage buckets, or messaging queues. Rather than embedding access keys directly into your application code—a practice that's both insecure and difficult to manage—you attach a service role that grants the necessary permissions.

The advantage here is profound. Your application code remains credential-free, making it safer to share, version control, and deploy across different environments. The underlying service automatically handles the credential rotation and management, requesting fresh temporary credentials as needed. This approach aligns perfectly with modern DevOps practices where code should be environment-agnostic and secrets should be managed separately from application logic.

Cross-Account Roles

Organizations often operate multiple cloud accounts for different purposes—development, testing, production, or separate business units. Cross-account roles enable secure access between these accounts without requiring separate credentials for each account. A user in Account A can assume a role in Account B, temporarily gaining the permissions defined in that role.

"Cross-account access through roles eliminates the need to duplicate user identities across multiple accounts, reducing both administrative overhead and security risks."

This pattern is particularly valuable for centralized security teams that need to audit or manage resources across an entire organization, or for shared services that multiple accounts need to access. The trust policy in the target account explicitly allows the source account to assume the role, creating a controlled bridge between otherwise isolated environments.

Federated Roles

Federation brings external identity providers into the cloud access equation. Instead of creating and managing separate cloud identities for every user, federated roles allow users to authenticate through existing corporate identity systems—Active Directory, Okta, Azure AD, or any SAML 2.0 compatible identity provider. After successful authentication, users receive temporary credentials to assume a role that grants appropriate cloud permissions.

This approach provides several compelling benefits. Users maintain a single set of credentials across all systems, reducing password fatigue and the security risks associated with password reuse. IT departments gain centralized control over user lifecycle management—when someone leaves the organization, disabling their corporate account automatically revokes their cloud access. The cloud environment never stores long-term credentials for these users, significantly reducing the attack surface.

Service-Linked Roles

Some cloud services require very specific permissions to function correctly, and these requirements might change as the service evolves. Service-linked roles are predefined by the service provider and automatically include all the permissions that service needs. You can't modify the permissions in these roles—they're managed entirely by the service itself.

While this might seem restrictive, it actually simplifies management and ensures that services always have the exact permissions they need, nothing more and nothing less. When you enable certain features or services, the platform automatically creates the necessary service-linked role. When you stop using that feature, you can delete the role, and all associated permissions disappear.

Security Architecture and Best Practices

Implementing IAM roles correctly requires more than just understanding their mechanics—it demands a security-first mindset and adherence to proven principles. The flexibility that makes roles powerful also creates opportunities for misconfiguration if not approached thoughtfully.

🔒 Principle of Least Privilege

This foundational security principle states that every entity should have only the minimum permissions necessary to perform its intended function. When creating roles, resist the temptation to grant broad permissions "just in case" or to avoid troubleshooting access issues later. Start with minimal permissions and expand only when there's a documented need.

Implementing least privilege with roles means being specific about actions and resources. Instead of granting "s3:*" on all buckets, specify exactly which actions are needed (like "s3:GetObject" and "s3:PutObject") and limit them to specific bucket ARNs. Use conditions in your policies to add additional constraints based on factors like IP address, time of day, or the presence of specific tags.

"Every permission you grant is a potential attack vector. The question isn't whether you can grant a permission, but whether you absolutely must."

🛡️ Trust Policy Restrictions

The trust policy determines who can assume a role, making it one of the most critical security controls. Be extremely careful about using wildcard principals or allowing entire accounts to assume sensitive roles. Each trust relationship should be explicitly justified and documented.

For cross-account scenarios, consider adding external ID conditions to prevent the "confused deputy" problem, where a malicious actor tricks a trusted service into performing actions on their behalf. For service roles, ensure the trust policy specifies exactly which service can assume the role, not just any service from the provider.

⏱️ Session Duration Management

Temporary credentials are only temporary if they actually expire in a reasonable timeframe. The default session duration for many roles is quite long—up to 12 hours in some cases. For sensitive operations or privileged access, consider reducing this to the minimum time necessary to complete the required tasks.

Shorter session durations mean more frequent credential rotation, which reduces the window of opportunity if credentials are compromised. However, they also require more frequent re-authentication, which can impact user experience. Balance security requirements against operational practicality, and use different session durations for different roles based on their sensitivity level.

📊 Monitoring and Auditing

Roles are only as secure as your ability to detect misuse. Implement comprehensive logging of role assumption events, tracking who assumed which role, when, and from where. Monitor for unusual patterns like roles being assumed from unexpected IP addresses, at unusual times, or with unexpected frequency.

Regular access reviews are essential. Periodically examine which roles exist, who can assume them, and what permissions they grant. Look for roles that haven't been used recently—they might be candidates for deletion. Review roles that are used frequently to ensure their permissions haven't become overly broad over time through incremental additions.

🔐 Permissions Boundaries

Permissions boundaries provide an additional layer of control by setting the maximum permissions that a role can have, regardless of what its permissions policy states. This is particularly valuable in scenarios where you need to delegate role creation to other teams while ensuring they can't create roles with more permissions than they should have.

Think of permissions boundaries as a safety net. Even if someone mistakenly (or maliciously) attaches an overly permissive policy to a role, the permissions boundary ensures that the effective permissions never exceed the defined maximum. This creates a defense-in-depth approach where multiple controls must fail before a security breach occurs.

Security Practice Implementation Method Difficulty Level Impact on Security Posture
Least Privilege Granular permission policies with specific actions and resources Medium Very High
Trust Policy Restrictions Explicit principal definitions with conditions Low High
Short Session Durations Configure maximum session duration settings Low Medium
Permissions Boundaries Attach boundary policies to roles Medium High
Continuous Monitoring Enable detailed logging and set up alerts High Very High
Regular Access Reviews Scheduled audits of role usage and permissions Medium High

Common Implementation Patterns and Scenarios

Understanding roles conceptually is one thing; knowing how to implement them effectively in real-world scenarios is another. Let's explore several common patterns that address typical organizational needs.

Application Access Pattern

Modern applications running in cloud environments need access to various resources—databases, storage, message queues, and external APIs. The application access pattern involves creating a role with precisely the permissions the application needs, then associating that role with the compute resource running the application.

For containerized applications, this might mean associating the role with the task definition or pod specification. For serverless functions, the role is attached to the function itself. For virtual machines, the role is associated with the instance profile. In all cases, the application code uses the cloud provider's SDK to automatically retrieve temporary credentials from the instance metadata service, requiring no credential management in the code itself.

This pattern becomes even more powerful when combined with environment-specific roles. Your development environment uses a role with permissions limited to development resources, while production uses a separate role with access to production resources. The application code remains identical across environments—only the associated role changes.

Human User Access Pattern

Human users accessing cloud resources often need different permission levels for different tasks. Rather than creating multiple user accounts with different permission sets, implement a pattern where users have a base identity with minimal permissions, then assume different roles based on what they need to do.

"Role assumption creates an audit trail that shows not just who did something, but what hat they were wearing when they did it."

A developer might assume a read-only role for investigating issues, a deployment role when releasing new versions, and an administrative role for infrastructure changes. Each role assumption is logged, creating clear accountability. The time-limited nature of assumed roles means users can't maintain elevated privileges indefinitely—they must consciously decide to assume a privileged role, perform the necessary tasks, and then return to their base permissions.

Break Glass Pattern

Even with careful planning, emergency situations arise where normal access controls become obstacles to resolving critical issues. The break glass pattern involves creating highly privileged emergency access roles with strict controls and comprehensive monitoring.

These roles should have very restrictive trust policies—perhaps requiring multi-factor authentication, limiting assumption to specific IP ranges, or requiring approval through a separate authorization system. Every assumption of a break glass role should trigger immediate alerts to security teams. After use, there should be a mandatory review process to understand what happened, why the emergency role was necessary, and how to prevent similar situations in the future.

Third-Party Access Pattern

Sometimes external vendors, partners, or contractors need temporary access to your cloud resources. Creating permanent user accounts for these entities creates ongoing security risks and administrative overhead. Instead, implement roles with external IDs that third parties can assume from their own accounts.

The external ID acts as a secret that prevents the confused deputy problem. Even if the third party's account ARN is known, they can't assume the role without also knowing the external ID. This ID should be generated randomly, shared securely, and rotated periodically. When the business relationship ends, simply delete the role—no need to track down and disable credentials.

🎯 Automated Remediation Pattern

Security automation increasingly relies on roles to perform remediation actions. When monitoring systems detect policy violations or security issues, they can assume roles that grant just enough permission to fix the specific problem. For example, a function that detects publicly accessible storage buckets might assume a role that allows it to modify bucket policies and make them private again.

This pattern requires careful design to prevent the automation itself from becoming a security risk. The role should have permissions limited to specific remediation actions, and the automation should have logic to prevent it from being tricked into performing unauthorized actions. Comprehensive logging ensures that every automated action can be reviewed and audited.

Advanced Concepts and Considerations

As organizations mature in their cloud journey, they encounter more complex scenarios that require deeper understanding of role mechanics and advanced features.

Role Chaining

Role chaining occurs when an entity assumes a role, then uses the temporary credentials from that role to assume another role. This can be useful for implementing multi-stage access controls or for accessing resources across multiple account boundaries. However, each role in the chain must explicitly allow the previous role to assume it, and there are limits to how many roles can be chained together.

Be cautious with role chaining as it can make access patterns difficult to understand and audit. Each additional link in the chain adds complexity and potential points of failure. Document any role chains clearly and ensure monitoring captures the complete chain of assumptions.

🔄 Session Tags and Transitive Permissions

When assuming a role, you can pass session tags that provide additional context about the session. These tags can then be used in permission policies to make fine-grained access control decisions. For example, you might tag a session with a project identifier, then use that tag in resource policies to ensure the assumed role can only access resources belonging to that specific project.

Some tags can be marked as transitive, meaning they persist through role chaining. This allows you to maintain context across multiple role assumptions, ensuring that access controls remain consistent even as credentials move through complex access patterns.

Policy Evaluation Logic

Understanding how permissions are evaluated is crucial for designing effective roles. When a request is made using assumed role credentials, the cloud provider evaluates multiple policies: identity-based policies attached to the role, resource-based policies on the target resource, permissions boundaries, service control policies, and session policies passed during role assumption.

"An explicit deny in any policy always wins. After that, there must be an explicit allow, or the request is denied by default."

This evaluation logic creates a powerful but complex permission system. A request might be allowed by the role's permissions policy but denied by a permissions boundary, or allowed by both but denied by a resource policy. Understanding this hierarchy helps you design roles that behave predictably and troubleshoot permission issues effectively.

🌐 Cross-Service Confused Deputy Prevention

The confused deputy problem occurs when a service with elevated permissions is tricked into performing actions on behalf of an attacker. While external IDs help prevent this in cross-account scenarios, there are additional measures for service-to-service interactions.

Use condition keys in your trust policies to verify that the service is acting on your behalf and not someone else's. For example, when allowing a service to assume a role, add conditions that check the source account or source ARN. This ensures the service can only assume the role when working with your specific resources, not when processing requests from other accounts.

Regional and Global Considerations

IAM roles are global resources, meaning they exist across all regions simultaneously. This has important implications for both functionality and security. On the positive side, you can create a role once and use it in any region. On the security side, if a role is compromised, it can potentially be used to access resources in any region where you operate.

Some organizations implement regional restrictions using condition keys in policies, limiting where roles can be used. This provides defense in depth—even if credentials are compromised, they can't be used to access resources outside approved regions. However, this requires careful planning to ensure legitimate use cases aren't blocked.

💡 Performance and Scaling Considerations

While roles are designed to scale, there are practical limits and performance considerations. Each role assumption requires an API call to the security token service, which takes time and counts against API rate limits. For high-throughput applications, this can become a bottleneck.

Credential caching helps mitigate this issue. Most SDKs automatically cache temporary credentials and only request new ones when the cached credentials are close to expiring. Ensure your application properly implements credential caching rather than assuming a new role for every single operation. For extremely high-throughput scenarios, consider using longer session durations to reduce the frequency of role assumptions, balanced against the security implications of longer-lived credentials.

Troubleshooting and Common Pitfalls

Even experienced cloud practitioners encounter issues with IAM roles. Understanding common problems and their solutions can save hours of frustration.

Permission Denied Errors

The most common issue is receiving permission denied errors when you believe the role should have the necessary permissions. Start by verifying that the entity trying to assume the role is actually listed in the trust policy. Then check that the permissions policy includes the specific action being attempted on the specific resource.

Remember that permissions can be denied at multiple levels. Check for explicit denies in any policy that applies to the request. Verify that permissions boundaries aren't limiting the effective permissions below what the role's policy grants. For cross-account scenarios, ensure both the role's permissions policy and the resource's policy (if applicable) allow the action.

Trust Relationship Issues

If you can't assume a role at all, the problem is likely in the trust policy. Verify that the trust policy syntax is correct—trust policies use a different structure than permissions policies. Ensure the principal trying to assume the role exactly matches what's specified in the trust policy, including account IDs and any conditions.

"The most secure system is one that nobody can use. The art is finding the balance between security and usability."

For federated access, verify that the SAML assertion or OIDC token contains the expected attributes and that the trust policy correctly references them. Federation issues often stem from mismatches between what the identity provider sends and what the trust policy expects.

Session Duration Problems

If temporary credentials expire faster than expected, check the maximum session duration configured for the role. This setting limits how long credentials can be valid, regardless of what duration is requested during role assumption. Some services have their own maximum session durations that might be shorter than the role's configured maximum.

For long-running processes, implement proper credential refresh logic rather than trying to extend session durations indefinitely. Most SDKs provide automatic credential refresh capabilities—ensure your application uses them correctly.

🔍 Policy Complexity and Conflicts

As roles accumulate multiple attached policies over time, understanding their effective permissions becomes challenging. Use policy simulation tools to test whether specific actions would be allowed or denied. These tools evaluate all applicable policies and show you exactly why a request would succeed or fail.

Avoid attaching too many policies to a single role. Instead of having ten different policies each granting a few permissions, consolidate related permissions into fewer, well-organized policies. This makes the role's capabilities easier to understand and audit.

Resource Policy Interactions

Some resources have their own policies that can grant or deny access independently of IAM roles. Storage buckets, encryption keys, and databases often have resource policies. For cross-account access, you typically need both the role's permissions policy to allow the action and the resource policy to allow access from that role.

When troubleshooting access issues, don't forget to check resource policies. An action might be allowed by the role but denied by the resource policy, or vice versa. The interaction between these different policy types is where many subtle permission issues hide.

IAM roles continue to evolve as cloud platforms mature and new security challenges emerge. Understanding where the technology is heading helps you make forward-looking architectural decisions.

Attribute-Based Access Control

Traditional role-based access control assigns permissions based on what role you assume. Attribute-based access control (ABAC) makes permission decisions based on attributes—tags on users, resources, and requests. This allows for more dynamic and scalable permission models.

With ABAC, instead of creating separate roles for each project or environment, you create a single role that uses attributes to determine what resources can be accessed. A user with a "project:alpha" tag can access resources tagged "project:alpha" but not resources tagged "project:beta". This dramatically reduces the number of roles needed in large, complex environments.

Zero Trust Architecture Integration

Zero trust security models assume that no entity should be trusted by default, regardless of whether it's inside or outside the network perimeter. IAM roles fit naturally into zero trust architectures, providing fine-grained, temporary access based on continuous verification.

Future developments will likely include more sophisticated context-aware access controls, where role assumption and permission grants depend on real-time risk assessment. Factors like device security posture, network location, time of day, and behavioral patterns might all influence whether a role can be assumed and what permissions it grants.

🚀 Automated Role Management

As environments grow more complex, manually managing roles becomes impractical. Machine learning systems are beginning to analyze actual usage patterns and recommend role optimizations—identifying overly permissive roles, unused permissions, and opportunities to consolidate similar roles.

These systems can also detect anomalous role usage that might indicate compromise or policy violations. By learning normal patterns of role assumption and usage, they can alert on deviations that human reviewers might miss in the volume of audit logs.

Standardization and Portability

Currently, each cloud provider implements roles somewhat differently, making multi-cloud architectures challenging. Industry efforts toward standardization aim to create more portable identity and access management models. While complete standardization is unlikely given the different architectural approaches of various platforms, common patterns and interoperability standards are emerging.

"The future of access management isn't about building higher walls—it's about building smarter gates that open for the right people at the right time for the right reasons."

This evolution will make it easier to implement consistent security policies across different cloud providers and to move workloads between platforms without completely redesigning access controls.

Organizational Impact and Change Management

Implementing IAM roles effectively isn't just a technical challenge—it requires organizational change and cultural adaptation. The shift from traditional credential-based access to role-based access affects workflows, responsibilities, and mindsets.

Team Structure and Responsibilities

Organizations need to clearly define who is responsible for creating, managing, and auditing roles. In some organizations, a central security team maintains tight control over all roles. In others, individual application teams manage their own roles within guardrails set by security policies. Both approaches can work, but the choice should be explicit and well-communicated.

Consider implementing a role request and approval process that balances agility with security. Teams should be able to get the roles they need without excessive bureaucracy, but there should be oversight to ensure roles follow organizational standards and security requirements. Automation can help here—policy-as-code tools can validate that proposed roles meet requirements before they're created.

Training and Education

Developers, operators, and security professionals all need to understand roles, but they need different depths of knowledge. Developers need to know how to use roles in their applications and how to request appropriate roles for their needs. Operators need to understand how to troubleshoot role-related issues and how to safely grant temporary elevated access when needed. Security professionals need deep knowledge of role mechanics, policy evaluation, and security implications.

Invest in role-specific training programs rather than generic cloud security training. Hands-on labs where people can experiment with creating roles, assuming them, and dealing with permission issues build practical skills that lectures alone cannot provide.

📋 Documentation and Knowledge Management

Maintain comprehensive documentation of your organization's roles, including what each role is for, who can assume it, what permissions it grants, and why those permissions are necessary. This documentation becomes invaluable during security audits, incident response, and onboarding new team members.

Use infrastructure-as-code to define roles programmatically rather than creating them manually through web consoles. This provides automatic documentation through code, enables version control to track changes over time, and makes it easier to replicate role structures across different environments or accounts.

Measuring Success

Define metrics to evaluate whether your role implementation is achieving its goals. Track the number of roles over time—rapid growth might indicate proliferation that needs consolidation. Monitor role usage to identify roles that are rarely or never used. Measure the time between role assumption and the actions performed—very short sessions might indicate that users are assuming roles unnecessarily frequently.

Security metrics are equally important. Track permission denied errors to identify where roles might be too restrictive or where users are attempting unauthorized actions. Monitor the time to resolve role-related issues as an indicator of how well your team understands the role architecture. Measure the percentage of roles that follow organizational standards and best practices.

What is the main difference between IAM users and IAM roles?

IAM users have permanent credentials and represent specific individuals or applications with a persistent identity. IAM roles, on the other hand, provide temporary credentials that are assumed by trusted entities. Users have long-term passwords or access keys, while roles issue short-lived security tokens. Roles are designed to be shared among multiple entities, whereas users represent specific identities. The temporary nature of role credentials makes them more secure, as compromised credentials automatically expire.

How long do temporary credentials from an assumed role last?

The duration of temporary credentials depends on the role's maximum session duration setting and the duration requested when assuming the role. By default, credentials can last from 15 minutes up to 12 hours for most roles. Service-linked roles and some service roles may have different limits. The actual session duration is the shorter of what's requested and what the role's maximum session duration allows. Organizations can configure shorter maximum durations for sensitive roles to reduce the window of opportunity if credentials are compromised.

Can a role be assumed by entities in different cloud accounts?

Yes, cross-account role assumption is a fundamental capability of IAM roles. The role's trust policy must explicitly allow the external account to assume it, typically by specifying the account ID as a trusted principal. The entity in the external account must also have permissions to assume roles. For added security, cross-account roles often include external ID requirements or other conditions to prevent unauthorized access. This pattern enables secure collaboration between organizations or between different parts of the same organization that operate separate accounts.

What happens if a role's permissions are changed while someone is using assumed credentials?

Changes to a role's permissions policy typically take effect immediately for new actions, even for credentials that were issued before the change. However, there can be a small delay due to caching—policies are cached for a short period to improve performance. If you need to immediately revoke permissions, you should revoke the active sessions rather than just modifying the policy. This ensures that existing credentials can no longer be used, regardless of caching. For this reason, regularly rotating role assumptions through shorter session durations provides better security than relying on policy changes to revoke access.

How many policies can be attached to a single IAM role?

Cloud providers typically limit the number of managed policies that can be attached to a role—often to 10 managed policies. Additionally, there are size limits on inline policies. However, these limits are usually sufficient for well-designed roles. If you find yourself needing more policies, it's often a sign that the role's responsibilities should be split into multiple roles, or that related permissions should be consolidated into fewer, more comprehensive policies. Keeping the number of attached policies low makes the role's effective permissions easier to understand and audit.

Can IAM roles be used for human users or only for services?

IAM roles can absolutely be used for human users, and this is actually a recommended pattern for providing elevated permissions. Rather than creating multiple user accounts with different permission levels, users can assume different roles based on what tasks they need to perform. This creates clear audit trails showing who assumed which role and when, and ensures that elevated permissions are only active when needed. Many organizations implement a pattern where human users have minimal direct permissions but can assume various roles to perform different job functions.