Skip to main content

Squillify development is paused indefinitely. Read why, and discover what this experiment achieved. Read the story

MicroSkills Reference

Evaluate ABAC

identity.evaluate_abac

ProductionBounded custom (Class B)Deterministicstrictinstantv1.0.0
No network

Overview

You pass subject, action, resource, environment, and a constrained attribute-based access policy; we evaluate it deterministically and return allow or deny, matched rule ids, and a per-rule trace. Expressions use eq/neq/in/contains/comparisons with and/or/not — no code execution or reflection. We fail closed: unknown operators, excessive depth, or missing attributes deny. Do not use this as a full XACML/Rego engine or for storing policies.

An attribute policy that lives inside your application code is impossible to audit and easy to get subtly wrong. Here the grammar is small enough to read, the evaluation is the same every time, and you get back the rule-by-rule trace that explains the verdict.

Reliability

Same attributes and same policy, same decision — we execute no code, follow no reference outside the objects you send, and touch no clock or network. We fail closed, and that always arrives as a normal success carrying decision "deny", an empty matchedRules, and a one-entry evaluationTrace under ruleId "__policy__" whose effect text says why. That happens when a rule has an effect other than allow or deny, when a condition is not an object or has no string op, when the operator is unknown, when and or or has an empty conditions array, when in or not_in gets a non-array value, when a numeric comparison gets a non-number, when nesting passes 20 levels, when there are more than 1,000 rules, or when a referenced attribute is absent and the comparison did not set allowMissing. So a single typo in one rule denies the whole request rather than half-applying your policy: read the "__policy__" trace entry, fix the rule it names, and call again. A policy with no rules array at all also denies, using deny_overrides and a deny default. Bad top-level input — a missing or non-object subject, resource, environment or policy, a missing or non-string action, or a combiningAlgorithm or defaultDecision outside the accepted values — is rejected as invalid input instead, and retrying the same payload will not help.

Context footprint

Returns decision, matchedRules, and evaluationTrace in one auditable pass. A successful call costs 1 execution credit.

When to use it

When access depends on attributes of the caller, the resource or the request, and you can express the rules with the supported operators.

When a plain role check would do, or when you need obligations, functions or the rest of a full policy language.

Scope

Note
Evaluates a constrained ABAC policy and returns a traceable allow/deny decision.

Non-goals

  • No arbitrary code execution or reflection
  • No dynamic traversal outside the objects you provide
  • No obligations or advice beyond allow/deny
  • Not a full XACML, Rego, or CEL engine

Properties

IdempotentRetry safeStreaming supportedFile input supportedRequires external service

Capabilities

analysisvalidation

Cost & billing

Flat rate per invocation

MetercallsBillable onsuccessCost per call1 credit

File handling

Accepts file_refProduces file_refMax input512 KB

How we handle your data

Sensitive input, safe output
What this means

This skill may receive sensitive content, but it does not target sensitive data and returns only a structured non-sensitive result.

Squillify guarantees
  • Runs inside Squillify
  • This skill runs inside Squillify.
  • Payloads are not sent to an external service by this skill.
  • Squillify does not permanently store submitted payloads.
  • Telemetry records metadata only, not submitted content.
  • Submitted payloads are not used for training.
  • Submitted payloads are not reviewed by humans.
  • This skill does not target sensitive data.
  • The response does not contain submitted content.
Your responsibility

Squillify does not determine whether submitted content is sensitive. Your application is responsible for deciding what data it is allowed to submit. Your application is responsible for securing the response.

Read the Microskill Data Handling Policy

Input schema

FieldTypeRequiredDescription
subjectobjectYesPurpose-bound JSON object of caller, resource, or environment attributes reached by dotted paths; extra keys are the attributes and values are scalars, nested objects, or arrays — unconstrained RFC 8259 JSON items.
actionstringYesOperation being attempted, referenced from conditions as the bare path action.
resourceobjectYesPurpose-bound JSON object of caller, resource, or environment attributes reached by dotted paths; extra keys are the attributes and values are scalars, nested objects, or arrays — unconstrained RFC 8259 JSON items.
environmentobjectYesPurpose-bound JSON object of caller, resource, or environment attributes reached by dotted paths; extra keys are the attributes and values are scalars, nested objects, or arrays — unconstrained RFC 8259 JSON items.
policyobjectYesClosed ABAC policy with up to 1,000 rules, a combining algorithm, and a default decision used when nothing matches.

Output schema

FieldTypeRequiredDescription
decisionstringYesFail-closed verdict, always exactly allow or deny.
matchedRulesarrayYesIds of rules whose condition came out true, in policy order, empty when nothing matched or the policy fell closed.
evaluationTracearrayYesOne object per evaluated rule in policy order, or a single __policy__ row when evaluation fell closed.

API contract

POST /v1/execute
curl
curl -sS -X POST "$BASE/v1/execute" -H "Authorization: Bearer $KEY" -H 'Content-Type: application/json' -d '{"skillKey":"identity.evaluate_abac","input":{"subject":{"id":"u1"},"action":"read","resource":{"ownerId":"u1"},"environment":{},"policy":{"rules":[{"id":"own","effect":"allow","condition":{"op":"eq","attribute":"resource.ownerId","value":"u1"}}]}}}'
Integrations
TypeScript SDK
import { Squillify } from "@squillify/sdk";

const sq = new Squillify({ apiKey: process.env.SQUILLIFY_API_KEY });

const { output } = await sq.execute("identity.evaluate_abac", {"resource":{"ownerId":"u1"},"policy":{"rules":[{"effect":"allow","id":"own","condition":{"attribute":"resource.ownerId","op":"eq","value":"u1"}}]},"subject":{"id":"u1"},"action":"read","environment":{}});

Errors

CodeHTTPRetryableDescription
VALIDATION_ERROR400NoThe request payload failed schema validation.
UNAUTHORIZED401NoMissing or invalid API key.
SKILL_NOT_ACCESSIBLE403NoThe API key is not granted access to this skill.
SKILL_NOT_AVAILABLE_FOR_PLAN403NoThis skill is not included in your current plan.
PLAN_ELIGIBILITY_UNAVAILABLE503YesPlan eligibility could not be decided. Retry after backoff.
SKILL_NOT_FOUND404NoThe requested skill or version does not exist.
TENANT_RATE_LIMITED429YesRequest rate limit exceeded. Retry after backoff.
QUOTA_EXCEEDED429YesPlan quota exhausted. Retryable once the quota period resets.
EXECUTION_TIMEOUT504YesExecution exceeded the allowed time budget.

Other limits

LimitValue
Recommended inline bytes32 KiB

Limitations

  • No arbitrary code execution or reflection
  • No dynamic traversal outside the objects you provide
  • No obligations or advice beyond allow/deny
  • Not a full XACML, Rego, or CEL engine
  • Simple role-only checks (use identity.evaluate_rbac)
  • Storing or versioning policies
  • Executing unrestricted expression languages

How to call

POST /v1/execute (requires authentication)

Request bodyjson
{
  "skillKey": "identity.evaluate_abac",
  "input": {
    "resource": {
      "ownerId": "u1"
    },
    "policy": {
      "rules": [
        {
          "effect": "allow",
          "id": "own",
          "condition": {
            "attribute": "resource.ownerId",
            "op": "eq",
            "value": "u1"
          }
        }
      ]
    },
    "subject": {
      "id": "u1"
    },
    "action": "read",
    "environment": {}
  }
}

Examples

Owner may read their own resource

Inputjson
{
  "resource": {
    "ownerId": "u1"
  },
  "policy": {
    "rules": [
      {
        "effect": "allow",
        "id": "own",
        "condition": {
          "attribute": "resource.ownerId",
          "op": "eq",
          "value": "u1"
        }
      }
    ]
  },
  "subject": {
    "id": "u1"
  },
  "action": "read",
  "environment": {}
}
Expected outputjson
{
  "decision": "allow",
  "matchedRules": [
    "own"
  ],
  "evaluationTrace": [
    {
      "ruleId": "own",
      "applicable": true,
      "effect": "allow"
    }
  ]
}

deny_overrides beats a matching allow rule

Inputjson
{
  "resource": {
    "ownerId": "u1"
  },
  "policy": {
    "combiningAlgorithm": "deny_overrides",
    "rules": [
      {
        "effect": "allow",
        "id": "allow-owner",
        "condition": {
          "attribute": "resource.ownerId",
          "op": "eq",
          "value": "u1"
        }
      },
      {
        "effect": "deny",
        "id": "deny-read",
        "condition": {
          "attribute": "action",
          "op": "eq",
          "value": "read"
        }
      }
    ]
  },
  "subject": {
    "id": "u1"
  },
  "action": "read",
  "environment": {}
}
Expected outputjson
{
  "decision": "deny",
  "matchedRules": [
    "allow-owner",
    "deny-read"
  ],
  "evaluationTrace": [
    {
      "ruleId": "allow-owner",
      "applicable": true,
      "effect": "allow"
    },
    {
      "ruleId": "deny-read",
      "applicable": true,
      "effect": "deny"
    }
  ]
}
  • Attribute-based access checks with an auditable trace
  • Preview policy outcomes before enforcing them in your app
  • Combine allow and deny rules with explicit combining algorithms

Avoid for

  • Simple role-only checks (use identity.evaluate_rbac)
  • Storing or versioning policies
  • Executing unrestricted expression languages

Composable with

Safety & privacy

  • Runs without calling any external service.
  • Your payloads are never stored permanently.
  • Telemetry captures metadata only — never your payload contents.
  • We never train models on your payloads.
  • No human reviews your payloads.

Tags

securityvalidationidentity