Skip to main content

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

MicroSkills Reference

Agent Action Authorization Check

agent.action_authorization_check

ProductionBounded custom (Class B)Deterministicstrictfastv1.0.0
No network

Overview

You send subject attributes, an action, resource attributes, optional context and up to 1,000 statements with effect ALLOW or DENY, actions, resources and conditions. Operators are EQUALS, IN, MATCHES_GLOB and numeric or time comparisons. Combining is DENY_OVERRIDES. Missing attributes and type mismatches mean that statement does not match. The explanation never echoes unrelated policy values. This does not enforce the decision or look up a directory.

An agent that proposes a tool call needs a typed allow/deny answer without a live directory.

Reliability

Deterministic DENY_OVERRIDES; missing attributes fail closed for that statement. AUTHZ_POLICY_INVALID — trigger: an unknown operator, empty actions or an unknown property; retryable: no; next: send the published statement shape. AUTHZ_LIMIT_EXCEEDED — trigger: more than 1,000 statements or 32 conditions; retryable: no; next: split the policy.

Context footprint

Decision, ids and a redacted explanation only. A successful call costs 1 execution credit.

When to use it

When a closed policy must be evaluated against one action, resource and subject.

When you need to enforce the decision, expand roles, or run Rego or XACML.

Scope

Note
Evaluates a bounded allow/deny policy against one proposed action using DENY_OVERRIDES.

Non-goals

  • Does not enforce the decision
  • Does not look up a directory
  • Does not execute arbitrary policy languages

Properties

IdempotentRetry safeStreaming supportedFile input supportedRequires external service

Capabilities

validation

Cost & billing

Flat rate per invocation

MetercallsBillable onsuccessCost per call1 credit

File handling

Accepts file_refProduces file_refMax input2 MB

How we handle your data

Sensitive processing
What this means

This skill is designed to detect, mask, redact, validate, or otherwise process sensitive data.

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.
  • Targets 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
subjectobjectYesOpen map of scalar subject attributes reached as subject.<name>; extra keys are the attributes.
actionstringYesProposed action name compared to statement actions.
resourceobjectYesPurpose-bound resource attributes; id is matched against statement resource patterns.
contextobjectNoOpen map of scalar context attributes reached as context.<name>; omit it when unused.
statementsarrayYesBounded array of 0 through 10001 statements; runtime accepts at most 1000.

Output schema

FieldTypeRequiredDescription
decisionstringYesALLOW, DENY or NOT_APPLICABLE.
combiningstringYesFixed combining algorithm for v1.
matchedStatementIdsarrayYesMatching statement ids as a bounded array of 0 through 1000 strings, DENY ids first then ALLOW ids.
explanationstringYesRedacted reason that never echoes unrelated policy values.

API contract

POST /v1/execute
curl
curl -sS -X POST "$BASE/v1/execute" -H "Authorization: Bearer $KEY" -H 'Content-Type: application/json' -d '{"skillKey":"agent.action_authorization_check","input":{"subject":{},"action":"read","resource":{"id":"x"},"statements":[{"id":"s1","effect":"ALLOW","actions":["read"],"resources":["x"]}]}}'
Integrations
TypeScript SDK
import { Squillify } from "@squillify/sdk";

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

const { output } = await sq.execute("agent.action_authorization_check", {"subject":{"role":"analyst"},"statements":[{"actions":["files.read"],"resources":["doc-1"],"effect":"ALLOW","id":"allow-read"},{"actions":["files.*"],"resources":["doc-*"],"effect":"DENY","id":"deny-read"}],"action":"files.read","resource":{"id":"doc-1"}});

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.
AUTHZ_POLICY_INVALID400NoThe request payload failed this skill's input validation.
AUTHZ_LIMIT_EXCEEDED429NoA size, quota, rate, or time limit was exceeded.

Other limits

LimitValue
Recommended inline bytes32 KiB

Limitations

  • Does not enforce the decision
  • Does not look up a directory
  • Does not execute arbitrary policy languages
  • Enforcing the decision at a gateway
  • Expanding roles from a directory

How to call

POST /v1/execute (requires authentication)

Request bodyjson
{
  "skillKey": "agent.action_authorization_check",
  "input": {
    "subject": {
      "role": "analyst"
    },
    "statements": [
      {
        "actions": [
          "files.read"
        ],
        "resources": [
          "doc-1"
        ],
        "effect": "ALLOW",
        "id": "allow-read"
      },
      {
        "actions": [
          "files.*"
        ],
        "resources": [
          "doc-*"
        ],
        "effect": "DENY",
        "id": "deny-read"
      }
    ],
    "action": "files.read",
    "resource": {
      "id": "doc-1"
    }
  }
}

Examples

A matching DENY wins over a matching ALLOW

Inputjson
{
  "subject": {
    "role": "analyst"
  },
  "statements": [
    {
      "actions": [
        "files.read"
      ],
      "resources": [
        "doc-1"
      ],
      "effect": "ALLOW",
      "id": "allow-read"
    },
    {
      "actions": [
        "files.*"
      ],
      "resources": [
        "doc-*"
      ],
      "effect": "DENY",
      "id": "deny-read"
    }
  ],
  "action": "files.read",
  "resource": {
    "id": "doc-1"
  }
}
Expected outputjson
{
  "decision": "DENY",
  "combining": "DENY_OVERRIDES",
  "matchedStatementIds": [
    "deny-read",
    "allow-read"
  ],
  "explanation": "DENY_OVERRIDES: a matching DENY statement won."
}
Tip
DENY_OVERRIDES returns DENY and lists the deny statement first.

No matching statement yields NOT_APPLICABLE

Inputjson
{
  "subject": {
    "role": "guest"
  },
  "statements": [
    {
      "actions": [
        "files.read"
      ],
      "resources": [
        "doc-1"
      ],
      "effect": "ALLOW",
      "id": "allow-read"
    }
  ],
  "action": "files.delete",
  "resource": {
    "id": "doc-1"
  }
}
Expected outputjson
{
  "decision": "NOT_APPLICABLE",
  "combining": "DENY_OVERRIDES",
  "matchedStatementIds": [],
  "explanation": "DENY_OVERRIDES: no statement matched the proposed action."
}
Tip
files.delete matches no statement, so the decision is NOT_APPLICABLE.
  • Let an explicit DENY beat a matching ALLOW
  • Treat a missing subject attribute as a non-match rather than an allow

Avoid for

  • Enforcing the decision at a gateway
  • Expanding roles from a directory

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

securityagentvalidation