Join our Newsletter — 33% off our NHI Course
Authentication, Authorisation & Trust

Condition Key

← Back to Glossary
By NHI Mgmt Group Updated October 7, 2026 Domain: Authentication, Authorisation & Trust

A condition key is a request attribute used in IAM policy logic to narrow when an allow or deny statement applies. Examples include source IP, principal tags, and time values. If the wrong context is supplied, a simulation can produce results that do not match real authorisation behaviour.

What Condition Keys Do in IAM Policy Evaluation

Condition keys are the request-context signals that let an IAM policy apply only when specific attributes are present. They refine authorization by checking details such as source IP, tags, region, or time before an allow or deny statement takes effect.

That makes them a precision tool, not a standalone access control. A condition key changes policy behavior only when the evaluator receives the right context, and a missing or mismatched value can change the effective result of the policy.

How Condition Keys Shape Allow and Deny Logic

Condition keys work inside policy statements, usually as part of a conditional expression that must evaluate true for the statement to match. They can be used to narrow broad permissions, enforce contextual restrictions, or add an extra layer of protection around sensitive actions.

Because they operate inside decision logic, the same statement can behave very differently across requests. A policy that looks permissive on paper may still be tightly constrained in practice if its condition keys are specific and correctly populated.

Condition keys also expose a common source of confusion in policy testing. Simulation tools or ad hoc reviews can produce misleading results if they do not mirror the real request context, especially when attributes come from identity tags, network context, or session data.

Common Examples and Where They Matter

Frequently used examples include source IP, requested time, resource or principal tags, MFA-related context, and environment-specific attributes. Each of these lets policy authors express rules that are closer to business intent than a static allow list alone.

For example, a policy may allow an action only from a trusted network range, or only when a principal carries a specific tag. Those conditions are often used to reduce blast radius, separate production from non-production access, or enforce context-aware guardrails for sensitive operations.

Condition keys are especially useful when access should depend on something other than the identity alone. They help policies account for where a request came from, what it is trying to reach, and whether the surrounding context is acceptable.

Policy Design and Simulation Implications

Condition keys make IAM policy design more expressive, but they also increase the need for careful testing. The policy author must know which request attributes are guaranteed to exist, which are optional, and which can be influenced by the caller or the surrounding environment.

When simulation omits a required attribute, the result may not reflect production authorization behavior. That is why condition-key logic should be validated against realistic request contexts, not only against the simplest test case.

Good use of condition keys usually means being explicit about the context you depend on and keeping the policy readable enough to audit. Overly complex conditions can be harder to reason about, harder to troubleshoot, and easier to misapply during change reviews.

Risk and Threat Considerations

Condition keys create security risk when teams assume a policy is active without verifying the real request context. If the wrong attributes are supplied, omitted, or simulated inaccurately, an access decision can appear safer than it is, or fail open in ways that are hard to notice.

Failure mechanism: The policy evaluator matches on request attributes that differ between testing and production, or on values that are missing, stale, spoofed, or not enforced consistently across request paths.

Impact: An attacker or misconfigured workload may gain access outside the intended time, network, or trust boundary, while defenders believe the policy is protecting the action.

Standards & Framework Alignment

This section maps relevant standards and security frameworks to the operational risks and controls described in this guidance.

NIST SP 800-53 Rev 5, NIST CSF 2.0, CIS Controls v8 and OWASP ASVS set the technical controls, while ISO/IEC 27001:2022 defines the regulatory obligations.

FrameworkControl / ReferenceRelevance
NIST SP 800-53 Rev 5AC-3 — Access EnforcementCondition keys narrow when policy statements enforce access decisions.
AC-6 — Least PrivilegeCondition keys commonly reduce access to the minimum context needed.
IA-5 — Authenticator ManagementCondition keys often depend on trusted session and authentication context.
Recommendation — Use AC-3 to enforce contextual access rules in policy evaluation. Apply AC-6 to constrain permissions with contextual conditions. Use IA-5 to manage the credentials and context that condition checks rely on.
NIST CSF 2.0PR.AA-01 — Identities and credentials are issued, managed, verified, revoked, and auditedCondition-key policies depend on managed identity context and enforcement data.
PR.AA-05 — Access permissions and authorizations are managed, incorporating the principles of least privilege and separation of dutiesCondition keys are a mechanism for narrowing authorizations with least-privilege context.
Recommendation — Align identity and credential governance with the context used in policy conditions. Use PR.AA-05 to keep policy conditions aligned to least-privilege access.
CIS Controls v8CIS-6 — Access Control ManagementCondition keys are part of access-control logic and its review.
Recommendation — Use CIS-6 to review conditional access rules for correctness and scope.
OWASP ASVSV8 — AuthorizationCondition keys refine authorization decisions based on request context.
Recommendation — Validate authorization logic that depends on contextual conditions.
ISO/IEC 27001:2022A.5.15 — Access controlCondition keys support access-control decisions that depend on contextual policy rules.
Recommendation — Apply access-control rules consistently to the contextual conditions used in IAM policy.

Practitioner Guidance

What to watch for: Treat every condition key as a dependency on request integrity and context quality. If a policy depends on tags, source network, or session attributes, make sure the source of those values is understood and that testing uses the same context model the service will see in production.

Practitioner takeaway: Condition keys are strongest when they are specific, testable, and tied to context you can actually trust.

Free weekly newsletter

Subscribe to the NHI & AI Identity Journal

The latest on NHI and Agentic AI security – articles, research, breaches, news and events every week.

Bonus 33% off our NHI Course when you subscribe.

NHIMG Editorial Note
Reviewed and updated by the NHIMG editorial team on October 7, 2026.
NHI Mgmt Group — the #1 independent authority on Non-Human Identity, IAM, and Agentic AI security. nhimg.org