Inferensys

Prompt

Access Control Change Approval Routing Prompt

A production-ready prompt playbook for identity and access management teams automating permission change approvals. Determines the approval path based on resource sensitivity, role criticality, and separation-of-duty constraints, then produces the required approver list with conflict-of-interest checks.
Wide-angle shot of a modern WeWork open floor plan with creative walls covered in AI system architecture diagrams, product team collaborating in standing desk area with industrial lighting.
PROMPT PLAYBOOK

When to Use This Prompt

Understand the job-to-be-done, the ideal user, required context, and the critical boundaries for the Access Control Change Approval Routing Prompt.

This prompt is designed for IAM and security engineering teams that need to encode organizational approval policy into an AI workflow without hardcoding every resource-to-approver mapping. The core job-to-be-done is translating a structured permission change request into a sequenced, conflict-checked list of required approvers. The ideal user is a platform engineer or IAM architect building an internal tool where approval rules are too complex for static routing tables—rules that depend on resource sensitivity tiers, role criticality scores, and separation-of-duty (SoD) matrices that change independently of the application code.

To use this prompt effectively, you must provide a rich, structured context. This includes a machine-readable policy document defining risk tiers, an SoD matrix that maps conflicting role pairs, and a directory of roles with their assigned criticality. The input should be a well-formed permission change request specifying the target resource, the requested entitlements, and the requesting user's current roles. The model reasons over this context at runtime, which means the quality of the output is directly dependent on the completeness and structure of the policy data you supply. A vague policy document will produce vague, and potentially dangerous, routing decisions.

Do not use this prompt for real-time access enforcement, authentication decisions, or any workflow where the model directly grants or revokes permissions without human review. This prompt produces a routing decision—a list of people who must approve a change—not an execution command. It is a planning and orchestration step in a larger human-in-the-loop system. The output must be consumed by a downstream workflow engine that sequences the approvals and collects human attestations. Never connect this prompt's output directly to an IAM provisioning API. The critical safety boundary is that a human must always be the one to click 'approve' based on the route this prompt provides.

PRACTICAL GUARDRAILS

Use Case Fit

Where the Access Control Change Approval Routing Prompt works, where it fails, and what you must provide before using it in production.

01

Good Fit: Structured IAM Workflows

Use when: permission changes follow a defined process with known resource tiers, role criticality levels, and separation-of-duty rules. The prompt excels at encoding organizational policy into consistent routing decisions. Guardrail: validate that your resource classification and role taxonomy are complete before relying on the prompt for production routing.

02

Bad Fit: Ad-Hoc or Undocumented Policies

Avoid when: approval rules exist only in people's heads or vary case-by-case without written criteria. The prompt will hallucinate plausible-sounding but incorrect routing when policy is underspecified. Guardrail: if you cannot write down the approval rules in a policy document, do not expect the prompt to infer them reliably from examples alone.

03

Required Input: Resource Sensitivity Map

What to watch: the prompt needs a clear mapping of resources to sensitivity tiers, role criticality classifications, and separation-of-duty conflict pairs. Without these, routing decisions become guesswork. Guardrail: maintain a machine-readable policy artifact that the prompt references, and version it alongside the prompt template.

04

Required Input: Organizational Role Directory

What to watch: the prompt must know which roles exist, who holds them, and what approval authority each carries. Stale or incomplete directories produce routing to nonexistent approvers. Guardrail: integrate with your identity provider or HR system to keep role assignments current, and add a validation step that rejects unknown role references before routing executes.

05

Operational Risk: Privilege Escalation via Routing Gaps

Risk: an attacker or misconfigured automation could craft a permission change that falls between defined routing rules, landing in a default approval path with insufficient scrutiny. Guardrail: implement a deny-by-default posture where any request not matching a known routing rule escalates to a security review queue rather than receiving automatic approval.

06

Operational Risk: Separation-of-Duty Violations

Risk: the prompt may fail to detect that a single approver appears in multiple stages of a chain, breaking SoD controls. This is especially dangerous when approver pools are small. Guardrail: add a post-processing conflict-of-interest check that scans the generated approver list for duplicate individuals across stages and escalates conflicts for manual resolution.

PROMPT PLAYBOOK

Copy-Ready Prompt Template

A copy-ready system prompt for evaluating an access control change request and producing a conflict-checked, policy-compliant approval routing list.

This template encodes your organization's access control policy directly into the model's instructions. It is designed to be pasted into your system prompt or a high-guidance user message. The prompt forces the model to reason about resource sensitivity, role criticality, and separation-of-duty (SoD) constraints before outputting a structured approval list. Do not use this prompt for general-purpose access questions; it is strictly for routing a single, well-formed permission change request through a defined approval workflow.

text
You are an Access Control Approval Router for [ORGANIZATION_NAME]. Your task is to evaluate a permission change request and determine the exact approval path required before the change can be executed. You must apply the organization's access control policy, resource classification tiers, and separation-of-duty rules without exception.

## POLICY CONTEXT
- Resource Classification Tiers: [RESOURCE_TIERS_AND_DEFINITIONS]
- Role Criticality Levels: [ROLE_CRITICALITY_LEVELS]
- Separation-of-Duty (SoD) Conflict Rules: [SOD_RULES]
- Default Approval Policy: [DEFAULT_APPROVAL_POLICY]

## REQUEST DATA
- Request ID: [REQUEST_ID]
- Requester Identity: [REQUESTER_IDENTITY]
- Target User/Principal: [TARGET_PRINCIPAL]
- Requested Permission Set: [PERMISSION_SET]
- Target Resource(s): [TARGET_RESOURCES]
- Business Justification: [BUSINESS_JUSTIFICATION]
- Request Timestamp: [TIMESTAMP]

## OUTPUT SCHEMA
You must respond with a single valid JSON object conforming to this schema:
{
  "request_id": "string",
  "approval_required": boolean,
  "routing_decision": {
    "approval_type": "auto_approve | single_approver | multi_stakeholder | executive_signoff | denied",
    "approval_sequence": [
      {
        "step": number,
        "approver_role": "string",
        "approver_identity": "string | null",
        "condition": "string",
        "is_blocking": boolean
      }
    ],
    "veto_authorities": ["string"],
    "quorum_required": number | null
  },
  "risk_assessment": {
    "risk_level": "low | medium | high | critical",
    "risk_factors": ["string"],
    "sod_violations_detected": [
      {
        "violation": "string",
        "conflicting_permission": "string",
        "severity": "warning | blocking"
      }
    ]
  },
  "justification": "string",
  "policy_references": ["string"]
}

## CONSTRAINTS
1. If the requester is also a required approver for this change, flag a conflict of interest and escalate to their manager or [CONFLICT_ESCALATION_ROLE].
2. If any SoD violation is detected with "blocking" severity, the approval_type must be "denied" and the justification must cite the specific policy clause.
3. If the target resource is classified as [HIGHEST_TIER_LABEL], executive_signoff is mandatory regardless of other conditions.
4. For multi_stakeholder approvals, the sequence must respect the order defined in [APPROVAL_ORDER_POLICY].
5. If the business justification is empty or insufficient, do not proceed. Set approval_required to true and approval_type to "single_approver" for the requester's manager to validate the justification first.
6. Never output an empty approval_sequence when approval_required is true.

## EXAMPLES
[FEW_SHOT_EXAMPLES]

## INSTRUCTIONS
Analyze the request against the policy context. Reason step-by-step internally, then output only the JSON object.

To adapt this template, replace every square-bracket placeholder with your organization's specific data. The [RESOURCE_TIERS_AND_DEFINITIONS] should be a structured list of your resource classification levels (e.g., 'Tier 0: Public-facing documentation', 'Tier 3: Production customer PII'). The [SOD_RULES] placeholder must contain explicit, machine-interpretable rules like 'A user with the deployer role cannot also hold the approver role for the same production environment.' For [FEW_SHOT_EXAMPLES], provide at least two worked examples: one standard multi-step approval and one that triggers a SoD denial. This prompt is designed for models with strong instruction-following and JSON mode capabilities (e.g., GPT-4o, Claude 3.5 Sonnet).

Before deploying this prompt into any production approval pipeline, you must pair it with a post-generation validation step. The JSON output must be validated against the schema, and any sod_violations_detected with blocking severity must be programmatically verified to ensure the output's approval_type is denied. For high-risk environments, route every output where risk_level is high or critical to a human review queue before the approval sequence is executed. Never allow this prompt's output to directly trigger an automated permission change without a confirmed human approval record.

IMPLEMENTATION TABLE

Prompt Variables

Each placeholder required by the Access Control Change Approval Routing Prompt. Use these to populate the prompt template, validate inputs before execution, and log the resolved values for audit trails.

PlaceholderPurposeExampleValidation Notes

[PERMISSION_CHANGE_REQUEST]

The full text or structured object describing the requested access change, including target user, resource, and requested permissions.

User: alice@corp.com Action: GRANT Resource: prod-db-readonly Permissions: SELECT

Must not be null. Validate that required fields (user, action, resource) are present. Reject if action is not in [GRANT, REVOKE, MODIFY].

[RESOURCE_CLASSIFICATION]

The sensitivity tier of the resource being accessed, used to determine approval rigor.

TIER_1_REGULATED

Must match a defined enum: [TIER_0_PUBLIC, TIER_1_REGULATED, TIER_2_CONFIDENTIAL, TIER_3_RESTRICTED]. Reject if value is null or unrecognized.

[REQUESTER_ROLE]

The organizational role of the user requesting the change, used for separation-of-duty checks.

data_analyst

Must be a non-empty string matching a role in the identity provider directory. Validate against the [ROLE_DIRECTORY] schema before routing.

[CURRENT_APPROVERS]

A list of users who have already approved this request in a prior stage, used to detect circular approvals.

Array of strings. May be empty for initial routing. Each entry must be a valid user principal. Reject if the requester appears in this list.

[SOD_POLICY]

The separation-of-duty ruleset defining which role combinations are prohibited from approving the same request.

{"conflicts": [{"roles": ["requestor", "approver"], "scope": "same_request"}]}

Must be a valid JSON object conforming to the SoD policy schema. If null, skip SoD checks but log a warning. Validate that no conflicting roles are assigned to the same approver.

[ESCALATION_TIMEOUT_HOURS]

The maximum time in hours an approver has to act before the request is automatically escalated.

24

Must be a positive integer. If null, default to the system-wide setting. Reject values less than 1 or greater than 720.

[OUTPUT_SCHEMA]

The strict JSON schema the final output must conform to, defining the approval path and conflict checks.

{"type": "object", "properties": {"approval_path": {"type": "array"}}}

Must be a valid JSON Schema object. Validate the final model output against this schema. If output fails validation, trigger the output repair retry loop.

PROMPT PLAYBOOK

Implementation Harness Notes

How to wire the Access Control Change Approval Routing Prompt into an application with validation, retries, logging, and human-in-the-loop safeguards.

This prompt is designed to sit behind an API endpoint that receives permission change requests and returns an approval routing decision. The application layer must treat the model's output as a routing recommendation, not an executable command. The model determines who should approve and in what sequence; the application enforces this by creating approval tasks in your Identity Governance and Administration (IGA) or ticketing system. Never use the model's output to directly modify access controls, group memberships, or role assignments. The separation between the routing decision and the enforcement action is the primary safety boundary in this workflow.

Implement a strict output contract validation before any approval tasks are created. The expected output is a JSON object containing an approval_chain array of objects, each with role, approver_identifier, sequence_order, and justification fields. After receiving the model response, validate that: (1) the JSON parses without error, (2) the approval_chain is a non-empty array, (3) each entry has all required fields with correct types, (4) sequence_order values are unique and sequential starting from 1, and (5) no approver appears more than once in the chain unless explicitly allowed by policy. If validation fails, retry the prompt invocation with exponential backoff (e.g., 1s, 2s, 4s delays). After two failed retries, escalate to a human operator with the original request payload and all failed outputs for manual routing. Log every prompt invocation—including the full request, raw response, validation result, and any retry attempts—to an append-only audit store. These logs are essential for compliance review and debugging routing errors.

For high-risk environments, insert a human-in-the-loop review gate after successful validation but before approval tasks are created. Present the validated routing decision alongside the original permission change request to a designated security administrator or IAM team lead. Only after explicit human confirmation should the application enqueue the approval tasks. This gate catches subtle routing errors that pass schema validation but violate organizational policy, such as routing a sensitive role change to an approver with a known conflict of interest that the model failed to detect. The confirmation step should be time-bounded: if no human response is received within a configurable window (e.g., 30 minutes for standard changes, 15 minutes for urgent ones), escalate to a broader on-call group rather than auto-approving. Model choice matters here—use a model with strong instruction-following and structured output capabilities, and consider pinning a specific model version to avoid behavioral drift in production routing decisions.

IMPLEMENTATION TABLE

Expected Output Contract

The exact JSON structure the model must return for an access control change approval routing decision. Validate every field before processing the approval path.

Field or ElementType or FormatRequiredValidation Rule

approval_decision

string (enum)

Must be one of: 'auto_approved', 'routing_required', 'blocked'. No other values allowed.

approval_path

array of objects

Must be present when decision is 'routing_required'. Each element must conform to the approver_step schema. Array must be ordered by sequence.

approval_path[].step

integer

Sequential step number starting at 1. Must be unique within the array and strictly increasing.

approval_path[].role

string

Must match a role defined in the [ROLE_DIRECTORY] input. No fabricated roles allowed.

approval_path[].approver_count

integer

Must be >= 1. For quorum-based steps, must match the quorum rule from [APPROVAL_POLICY].

blocking_reason

string or null

Required when decision is 'blocked'. Must cite a specific policy clause from [APPROVAL_POLICY] or a separation-of-duty violation from [SOD_RULES].

conflict_of_interest_flags

array of strings

Each entry must reference a specific role from [ROLE_DIRECTORY] and the conflicting permission from [REQUESTED_CHANGE]. Empty array if no conflicts detected.

risk_assessment

object

Must contain 'level' (string enum: 'low', 'medium', 'high', 'critical') and 'factors' (array of strings describing risk drivers). Level must align with [RESOURCE_SENSITIVITY] and [ROLE_CRITICALITY] inputs.

PRACTICAL GUARDRAILS

Common Failure Modes

What breaks first when routing access control changes for approval, and how to prevent it.

01

Privilege Escalation via Role Confusion

What to watch: The model misclassifies a low-sensitivity permission change as routine, routing it to a single junior approver instead of the required multi-stakeholder security review. This often happens when the prompt relies on ambiguous role titles rather than explicit permission scope. Guardrail: Include a pre-routing classification step that maps the requested permission to a sensitivity tier (e.g., 'read-only', 'write', 'admin', 'cross-account') before determining the approval path. Test with 'add admin' and 'add read-only' variants.

02

Separation-of-Duty (SoD) Violation

What to watch: The model proposes an approver who is also the requestor or who owns a conflicting role, breaking SoD constraints. This occurs when the prompt does not explicitly check for conflicts between the requestor and the generated approver list. Guardrail: Add a hard post-processing rule or a dedicated validation step in the prompt that requires the model to cross-reference the requestor's identity against every proposed approver and flag any matches as invalid, requiring escalation.

03

Incomplete Approval Chain for Compound Changes

What to watch: A single request contains multiple permission changes (e.g., add to 'db-admin' and 'billing-read'). The model routes based on the first or most obvious change, missing the stricter approval requirements of the second. Guardrail: Instruct the model to decompose the request into all individual permission changes, evaluate the required approval path for each independently, and then merge them into a single, strictest-path sequence. Test with compound requests that mix high and low sensitivity.

04

Bypassing Emergency Access Protocols

What to watch: The model treats a standard request and an emergency access request identically, failing to trigger the separate, time-bounded, and audited emergency approval workflow. Guardrail: Add an explicit 'Emergency Access' classification trigger in the prompt that looks for keywords or a specific flag. When triggered, the prompt must output a different approval schema that includes a mandatory post-hoc review and a short time-to-live (TTL) for the access.

05

Approver Unavailability Deadlock

What to watch: The prompt generates a strict, ordered list of specific named approvers but provides no logic for delegation or timeout if an approver is unavailable, causing the workflow to stall indefinitely. Guardrail: The prompt must generate a primary and a secondary (delegated) approver for each required role, based on a provided delegation policy or an 'on-call' schedule. Include a timeout rule that auto-escalates to the secondary approver after a defined period.

06

Policy Drift in Prompt Instructions

What to watch: The organizational approval policy changes (e.g., a new VP must approve all 'admin' access), but the prompt's hardcoded rules are not updated, causing non-compliant routing. Guardrail: Design the prompt to reference an external, versioned policy document or a structured data object (like an approval matrix) rather than embedding the rules directly in the system prompt. This makes the policy auditable and updatable without changing the core prompt logic.

IMPLEMENTATION TABLE

Evaluation Rubric

How to test output quality before shipping. Run these checks against a golden dataset of 50+ permission change requests with known correct approval paths.

CriterionPass StandardFailure SignalTest Method

Approver List Completeness

All required approvers from golden dataset are present in output

Missing a required approver that golden data includes

Exact match comparison against golden [APPROVER_LIST] for each test case

Separation-of-Duty Violation Detection

All SoD conflicts in golden dataset are flagged with [CONFLICT_TYPE] and [CONFLICTING_ROLES]

SoD conflict present in golden data but output shows no conflict or wrong conflict type

Assert [CONFLICT_DETECTED] equals true for golden cases with known SoD violations

Privilege Escalation Blocking

Requests that would grant access above requester's current level are routed to [ESCALATION_APPROVER] not standard path

Privilege escalation request routed through standard approval without escalation flag

Check [ESCALATION_REQUIRED] field is true and [APPROVAL_PATH] includes escalation role for golden escalation cases

Resource Sensitivity Classification

[SENSITIVITY_TIER] matches golden label for each resource type

High-sensitivity resource classified as low or standard tier

Compare [SENSITIVITY_TIER] output to golden label; require exact match on HIGH and CRITICAL tiers

Role Criticality Weighting

Changes to roles marked CRITICAL in golden data include [EXECUTIVE_APPROVER] in path

Critical role change routed without executive signoff requirement

Assert [APPROVAL_PATH] contains at least one role from [EXECUTIVE_ROLES] list when [ROLE_CRITICALITY] is CRITICAL

Approval Sequence Order

[APPROVAL_SEQUENCE] matches golden ordering where sequence matters

Approvers listed in wrong order when policy requires sequential approval

Ordered list comparison against golden [SEQUENCE]; allow equivalent parallel groups but not reordered sequential steps

Conflict-of-Interest Flagging

Approver with [CONFLICTING_RELATIONSHIP] to requester is flagged and alternate approver suggested

Conflict relationship exists in golden data but output assigns that person as sole approver

Check [COI_FLAGGED] is true and [ALTERNATE_APPROVER] is populated for golden COI cases

Conditional Routing Accuracy

[ROUTING_CONDITIONS] in output match the triggering conditions from golden data

Wrong condition cited as reason for routing decision

Compare [ROUTING_CONDITIONS] field to golden [EXPECTED_CONDITIONS]; require exact match on condition type and threshold values

ADAPTATION OPTIONS

Adapt This Prompt

How to adapt

Start with the base prompt and a static role directory. Replace the dynamic directory lookup with a hardcoded list of 5-10 roles for initial testing. Use a simple JSON schema for the output: { "approvers": [{"role": string, "reason": string}], "conflicts": [] }. Skip the SoD matrix validation in the prompt and run it in post-processing instead.

Prompt snippet

code
You are an access control approval router. Given a permission change request and a static role directory, determine which roles must approve.

Role Directory:
[ROLE_DIRECTORY_JSON]

Permission Change Request:
[REQUEST_JSON]

Output a JSON object with an "approvers" array. Each approver must have "role" and "reason" fields.

Watch for

  • Overly broad approval lists when the model doesn't understand role scope
  • Missing conflict-of-interest detection without the SoD matrix
  • Hallucinated role names not present in the directory
Prasad Kumkar

About the author

Prasad Kumkar

CEO & MD, Inference Systems

Prasad Kumkar is the CEO & MD of Inference Systems and writes about AI systems architecture, LLM infrastructure, model serving, evaluation, and production deployment. Over 5+ years, he has worked across computer vision models, L5 autonomous vehicle systems, and LLM research, with a focus on taking complex AI ideas into real-world engineering systems.

His work and writing cover AI systems, large language models, AI agents, multimodal systems, autonomous systems, inference optimization, RAG, evaluation, and production AI engineering.