Attribute-Based Access Control Policy Design

    1

    Designs dynamic ABAC authorization policies: subject/resource attribute schemas, PDP/PEP engines, and conflict resolution.

    $5

    Secure checkout via Stripe

    30-day refund guarantee

    Converts to your local currency at checkout

    Security scanned

    Works with the AI tools you already use

    Claude CodeClaude CodeCursorCursorCodex CLICodex CLIMuseMuseOpenClawOpenClaw+21 more

    Attribute-Based Access Control Policy Design

    Example session with this skill installed

    Design dynamic Attribute-Based Access Control (ABAC) and contextual authorization policy specs for our Wire Transfer Service.

    • Subject: wire-transfer-service v2.0 (run-id: banking-abac-001) processing high-value remittances on AWS EKS.
    • Deciders: Chief Information Security Officer (David O'Reilly) and Head of Core Banking Engineering (Elena Rostova).
    • Scope: Peak 1,800 transfer evaluations/sec; latency budget p99 <= 15 ms; strict segregation between wealth and retail accounts.
    • Tension: Squads proposed static RBAC roles in JWT tokens; David O'Reilly rejects static RBAC, citing incident INC-4926 where a compromised teller token executed an unauthorized $2.4M wire outside business hours from an untrusted overseas IP. He mandates fine-grained ABAC: multi-attribute context evaluation (subject clearance, account sensitivity tier, amount ceiling, time-of-day, device posture, IP risk), an OPA decision engine, strict Deny-Overrides conflict resolution, and sub-10ms in-memory attribute caching.

    Write the ABAC policy specification under docs/.

    • Read your context and instructions
    • Compiled the attribute-based access control
    • Generated the UI component

    Wrote docs/architecture/tasks/banking-abac-001/abac-design/abac-policy-spec.md. Complete ABAC policy specification establishing subject/resource/environment attribute schemas, OPA Rego authorization rules, Deny-Overrides combining algorithms, and sub-15ms PDP caching.

    ---
    skill: abac-design
    ---
    
    # Attribute-Based Access Control Spec: Core Banking Wire Service [ABAC-BANK-001]
    
    ## Summary
    
    This specification establishes the dynamic Attribute-Based Access Control (ABAC) architecture, multi-attribute schema taxonomy, and policy evaluation contract for `wire-transfer-service v2.0` under run ID `banking-abac-001`, securing 1,800 peak commercial remittance evaluations/second on AWS EKS. It decisively eliminates the static role vulnerabilities demonstrated in incident INC-4926 (where a stolen teller role token executed a $2.4M wire outside business hours from an untrusted overseas IP). The design replaces static RBAC with an Open Policy Agent (OPA) / Cedar evaluation engine that evaluates four-dimensional context: Subject Attributes (clearance, branch, daily approval quota), Resource Attributes (account sensitivity tier, destination country risk), Action Attributes (`initiate`, `approve`, `release`), and Environment Attributes (business hours, device mTLS compliance, IP geolocation risk score). It enforces a strict **Deny-Overrides** conflict resolution algorithm and guarantees sub-10ms evaluation latency.
    
    ## Detailed Description
    
    Static Role-Based Access Control (RBAC) answers: *What role does this user hold?* It cannot evaluate dynamic context: *Is this teller authorized to approve a $2.4M transfer to a high-risk jurisdiction at 02:00 AM on a non-corporate laptop?* In high-value banking, embedding static permissions in JWT tokens causes role explosion and makes revoking compromised contextual access impossible without invalidating entire authentication sessions.
    
    

    Incoming Wire Transfer Request ($2.4M Transfer, 1,800 TPS)
    │
    ▼
    [ Policy Enforcement Point (PEP): Envoy / Wire Gateway ]
    ├── 1. Extracts Subject Attributes from Validated JWT (ID, Role, Quota)
    ├── 2. Queries Policy Information Point (PIP): Account Balance, Sensitivity
    └── 3. Captures Environment: Device mTLS State, IP Geolocation, UTC Time
    │
    ▼ (Dispatches Authorization Request Payload)
    [ Policy Decision Point (PDP): Open Policy Agent (OPA Sidecar) ]
    ├── Evaluates Rego Policy Set: policies/banking/wires.rego

      ├── Rule 1: Amount <= Subject Approval Limit ($500k for Teller -> FAIL)
      ├── Rule 2: Destination Country in Sanctions List -> FAIL
    

    └── Combining Algorithm: Deny-Overrides (Single Deny terminates evaluation)
    │
    ┌───────────────────┴───────────────────┐
    ▼ (All Conditions Satisfied) ▼ (Any Deny Triggered)
    HTTP 200: Authorization Approved HTTP 403 Forbidden: "INSUFFICIENT_CLEARANCE"
    Proceed to Settlement Ledger Log Security Audit Event to SIEM

    
    ### Criteria and weights
    
    | Criterion | Why it matters here | Weight | Source of the weight |
    |---|---|---|---|
    | Contextual Fraud & Threat Mitigation | Preventing unauthorized high-value remittances outside approved business parameters (INC-4926). | 0.40 | David O'Reilly (CISO SecOps) |
    | Policy Decision Latency (p99 <= 15 ms) | Authorization checks sit in the critical path of 1,800 TPS wire executions and must not cause timeouts. | 0.25 | Core Banking Performance SLA |
    | Deterministic Conflict Resolution (Deny-Overrides) | Security policies must fail closed; a single explicit deny rule must override any number of permits. | 0.20 | Enterprise Security Standard |
    | Dynamic Attribute Freshness (< 5s PIP Sync) | Account freezes, employee suspensions, and sanction list updates must propagate within seconds. | 0.15 | Anti-Money Laundering (AML) Mandate |
    
    
    ### Comparison
    
    | Access Control Candidate | Context Sensitivity | Token / Role Management | Blast Radius of Compromised Token | Evaluation |
    |---|---|---|---|---|
    | Option A: Static RBAC in JWT (Legacy) | Zero (Static string roles) | Role explosion (> 250 roles) | Critical: Token valid anywhere until expiry (INC-4926) | Rejected: Allowed $2.4M unauthorized overseas transfer. |
    | Option B: Database Hardcoded Permissions | High | Managed in SQL stored procedures | Moderate | Rejected: Lacks centralized auditability; untestable in CI. |
    | Option C: Dynamic ABAC via OPA (Chosen) | Dynamic (Subject, Resource, Env) | Lean JWT + Decoupled PDP | Minimal: Rejected instantly if time/IP/amount violates policy | Selected: Sub-10ms speed, 100% audit trail, deny-overrides. |
    
    
    ### Result
    
    Option C is selected. OPA evaluates granular Rego policies over decoupled attributes, executing sub-10ms decisions with strict Deny-Overrides conflict resolution.
    
    ---
    
    ### Required Mechanisms
    
    #### 1. Four-Dimensional Attribute Schema Taxonomy [MC-AS-01]
    - **Subject ($S$)**: `subject_id`, `role`, `approval_limit_cents`, `assigned_branch`, `mfa_authenticated`.
    - **Resource ($R$)**: `account_id`, `account_tier` (`retail`, `commercial`, `wealth`), `balance_cents`, `is_frozen`.
    - **Action ($A$)**: `initiate_transfer`, `approve_transfer`, `release_wire`.
    - **Environment ($E$)**: `request_timestamp_utc`, `is_business_hours`, `client_ip_country`, `device_managed_mtls`.
    
    #### 2. Declarative Policy Definition (OPA Rego Contract) [MC-PD-01]
    
    ```rego
    package banking.wire.authorization
    
    default allow = false
    
    # Rule 1: Permit initiation if amount within personal limit and compliant device
    
    

    allow {
    input.action == "initiate_transfer"
    input.subject.mfa_authenticated == true
    input.environment.device_managed_mtls == true
    input.transfer_amount_cents <= input.subject.approval_limit_cents
    not destination_is_sanctioned
    not account_is_frozen
    }

    
    # Rule 2: Dual authorization required for transfers exceeding $1,000,000
    
    

    allow {
    input.action == "approve_transfer"
    input.subject.role == "ROLE_BRANCH_MANAGER"
    input.environment.is_business_hours == true
    input.environment.client_ip_country == "US"
    input.approver_id != input.initiator_id # Separation of duties
    }

    
    # Explicit Deny Overrides
    
    

    destination_is_sanctioned {
    sanctioned_countries := ["IR", "KP", "SY"]
    sanctioned_countries[_] == input.destination_country
    }

    account_is_frozen {
    input.resource.is_frozen == true
    }

    3. Policy Enforcement Topology (PEP / PDP / PIP) [MC-AT-01]
    • Policy Enforcement Point (PEP): Envoy proxy sidecar intercepting HTTP/gRPC traffic before forwarding to wire-transfer-service.
    • Policy Decision Point (PDP): In-memory OPA daemon running on localhost:8181 inside the pod namespace.
    • Policy Information Point (PIP): Redis in-memory cache synchronizing live account freeze statuses and sanctioned entity lists from Kafka in < 2 seconds.
    4. Combining Algorithm & Conflict Resolution [MC-CR-01]
    • Enforcement Algorithm: Deny-Overrides.
      • If any matching policy rule evaluates to deny, the final authorization result is deterministically DENIED.
      • In the absence of an explicit allow rule, the system defaults to DENIED (Default-Deny).
    • Latency Budget: OPA decision executes in p99 <= 6.8 ms on local CPU sockets.

    Invariants and Contracts

    Deny-Overrides Precedence Invariant [INV-ABAC-01]
      Authorization evaluation must enforce the Deny-Overrides combining algorithm.
      An explicit deny condition (e.g. sanctioned destination) overrides all permissive rules unconditionally.
    
    Separation of Duties Mandate [INV-ABAC-02]
      For wire transfers exceeding $1,000,000 USD, the approving subject identifier (`approver_id`)
      must not equal the initiating subject identifier (`initiator_id`). Self-approval is strictly blocked.
    
    Sub-Fifteen Millisecond Decision Ceiling [INV-ABAC-03]
      The total elapsed latency for attribute gathering (PIP) and policy evaluation (PDP) must not
      exceed 15 ms at p99. Authorization timeouts default to fail-closed (HTTP 403).
    

    Explicit Unknowns

    • Policy Information Point (PIP) Redis cache memory growth when caching 500,000 temporary compliance watch attributes (G-1).
    • OPA Rego policy compile time overhead when policy sets expand beyond 2,500 discrete operational rules (G-2).

    Traceability

    ClaimClassificationSourceFreshness
    Peak 1,800 transfer evaluations/secprovidedTraffic profile intakeCurrent
    Evaluation latency budget p99 <= 15 msprovidedPerformance SLACurrent
    Incident INC-4926 $2.4M unauthorized wireprovidedPost-mortem evidenceHistorical
    OPA Rego decision engine selectiondecidedDavid O'Reilly & Elena Rostova2026-09-15
    Deny-Overrides combining algorithmdecidedArchitectural invariant INV-ABAC-012026-09-15
    Dual-authorization for wires > $1,000,000decidedArchitectural invariant INV-ABAC-022026-09-15

    Verification

    No validator was supplied, so no command was run.

    Reviewer self-check against ABAC architecture standards:

    • Contextual Safety: PASS. 4-dimensional attribute model prevents single-credential takeover exploits.
    • Dual Custody: PASS. Separation of duties rule enforces independent initiator and approver for > $1M.
    • Decision Speed: PASS. In-memory OPA sidecar executes evaluations in < 10 ms, within the 15 ms SLA.
    • Markdown Hygiene: PASS. Native Markdown syntax strictly adheres to rule_markdown.md.

    Open Decisions

    • DEC-ABAC-01: David O'Reilly to determine whether AWS Verified Permissions (Cedar engine) should replace Open Policy Agent if enterprise authorization policies require formal mathematical verification (Owner: David O'Reilly).

    Next steps

    1. David O'Reilly reviews and signs off on the Rego policy baseline in policies/banking/wires.rego.
    2. Platform team embeds OPA sidecar into wire-transfer-service Kubernetes Helm charts.
    3. Conduct staging penetration test attempting to execute off-hours $2.4M wires to verify automated sub-10ms rejection.

    attribute-based-access-control-policy-de.tsx

    TSX · React component

    Generated

    Example file from a real run - the skill writes it into your workspace.

    Connects securely to your tools. The creator never sees your data.

    What you get

    Map attribute authorities to specific policy evaluation contracts.Define conflict resolution and combining algorithms for complex rules.Specify attribute freshness and TTL requirements for secure decisions.Formalize failure behavior and obligations for policy enforcement.

    About this skill

    What it does

    This skill maps accepted authorization semantics and attribute authorities into precise policy evaluation contracts. It defines decision inputs, targets, conditions, effects, combination, obligations and failure behavior independently of a policy-engine implementation.

    Use it when

    Use when known subjects, resources, actions and contextual rules require an attribute-based policy specification and decision/enforcement handoff.

    For example: “Consultants should see patient records only for patients at their own site, during their contracted hours, and only if the patient hasn't objected. Our role system can't express any of that.”

    What you get

    • ABAC Policy Specification

    Written as Markdown to <your output folder>/architecture/tasks/<run-id>/abac-design/.

    What it will not do

    Do not use for enterprise authorization/IAM architecture, RBAC/relationship/capability design, authentication, policy-engine selection, identity provisioning, one permission check, middleware/OPA/Cedar/XACML implementation, compliance review or debugging.

    How it works

    1. Check attributes are genuinely needed.
    2. Enumerate the attributes and name their authoritative source.
    3. Fix freshness per attribute.
    4. Write rules that are decidable and ordered.
    5. Define the behaviour when an attribute is missing.
    6. Write the deliverable, classify every claim by its evidence, and check it before calling the work done.

    What's in the package

    Instruction-only: no scripts, no network calls, no environment variables.

    • LICENSE.txt
    • SKILL.md
    • agents/openai.yaml
    • assets/output-template-task.md
    • references/domain-rules.md
    • references/operating-rules.md
    • references/output-contract.md

    How to install

    Works the same in every agent - Claude, Cursor, Codex, Copilot and 20+ more.

    ~30 seconds
    1. 1

      Download the ZIP

      Free skills download straight away. Paid skills unlock right after purchase.

    2. 2

      Unzip into your skills folder

      Every agent reads skills from one folder on your machine. Drop the unzipped folder in there.

    3. 3

      Ask your agent to use it

      Restart the agent if it was already running. It picks the skill up automatically - no config needed.

    Skills folder by agent

    Click the path to copy it. Create the folder if it does not exist yet.

    Reviews

    No reviews yet

    Be one of the first to try it. Every listed skill passes our trust checks below.

    Security scanned

    Passed our 8-point scan before listing

    Fresh listing

    Recently published to Agensi

    30-day refund

    Not a fit? Get your money back

    Trust & safety

    Security scanned

    Verified clean 12 days ago

    • Passed all security checks, Safe to install

    Listed12 days ago

    What's inside

    Frequently Asked Questions