Skip to main content

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

MicroSkills Reference

Validate JWT

security.validate_jwt

ProductionBounded custom (Class B)Deterministicstrictfastv1.0.0
No network

Overview

You pass a JWT; we enforce compact JWS structure, reject alg=none and disallowed algorithms, reject unprocessed crit headers fail-closed, validate exp/nbf/iat with configurable clock skew, check issuer and audience, and verify the signature (via Nimbus JOSE+JWT) when you supply JWK/PEM/HMAC key material — refusing asymmetric/HMAC key confusion. trusted=true only when the signature is verified AND required claims pass. We never fetch remote keys (jku/x5u). Do not use this for inspection-only decoding — use security.decode_jwt.

JWTs are easy to decode but dangerous to trust incorrectly — you need a skill that separates parsing, validation, and trust explicitly and fails closed.

Reliability

STRICT and deterministic for a given token, key material, and reference time. trusted=true only when signature verification succeeds and required claims pass. Input validation (not retryable): missing jwt; jwt too long; invalid verificationKey; disallowed algorithm including none; clockSkewSeconds out of range.

Context footprint

Returns compact structured defects instead of prose. A successful call costs 1 execution credit.

When to use it

When you must decide whether a JWT is valid and trusted for auth.

For inspection only — use security.decode_jwt. Do not trust a token without supplying verification key material.

Scope

Note
Validates JWT structure, algorithm, temporal claims, issuer/audience, and signature.

Non-goals

  • Does not fetch remote keys (jku/x5u/JWKS URLs)
  • Does not accept alg=none
  • Does not process 'crit' critical headers — any 'crit' is rejected fail-closed
  • Does not auto-select key type from the token header

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 input32 KB

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 may contain submitted or transformed 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
jwtstringYesJWT compact serialization to validate.
expectedIssuerstringNoRequired issuer (iss) to match; omit it to skip the issuer check.
expectedAudienceobjectNoExpected audience as one string or an array of strings; omit it to skip the audience check. The token passes when aud matches any listed value.
allowedAlgorithmsarrayNoJWS algorithms you accept, 1 to 12 names; omit it for the twelve signed defaults. none is rejected.
verificationKeyobjectNoClosed signature key with type, serialized value and optional kid; omit it to validate claims with trusted remaining false.
clockSkewSecondsintegerNoAllowed clock skew from 0 through 600 seconds; omit it for 60.
requireExpirationbooleanNoWhether a missing exp claim fails; omit it for true.
nowEpochSecondsintegerNoReference time in epoch seconds for exp/nbf/iat; omit it to use the current time.

Output schema

FieldTypeRequiredDescription
validbooleanYesTrue when structure, algorithm, timing claims and any issuer or audience you asked for all pass.
trustedbooleanYesTrue only when valid is true and the signature was verified with the key you supplied.
signatureVerifiedbooleanYesTrue only when the signature check ran against your verificationKey and matched.
headerobjectYesPurpose-bound JSON object copied from one JWT segment, with at most 10000 properties — unconstrained RFC 8259 JSON items.
claimsobjectYesPurpose-bound JSON object copied from one JWT segment, with at most 10000 properties — unconstrained RFC 8259 JSON items.
defectsarrayYesEverything noticed, each a closed {code, severity, message} object; empty only when nothing was noted.

API contract

POST /v1/execute
curl
curl -sS -X POST "$BASE/v1/execute" -H "Authorization: Bearer $KEY" -H 'Content-Type: application/json' -d '{"skillKey":"security.validate_jwt","input":{"jwt":"eyJhbGciOiJIUzI1NiJ9..."}}'
Integrations
TypeScript SDK
import { Squillify } from "@squillify/sdk";

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

const { output } = await sq.execute("security.validate_jwt", {"jwt":"eyJhbGciOiJub25lIn0.eyJzdWIiOiIxIn0."});

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

  • Does not fetch remote keys (jku/x5u/JWKS URLs)
  • Does not accept alg=none
  • Does not process 'crit' critical headers — any 'crit' is rejected fail-closed
  • Does not auto-select key type from the token header
  • Discovering keys from the token itself
  • Trusting a token without providing verification key material

How to call

POST /v1/execute (requires authentication)

Request bodyjson
{
  "skillKey": "security.validate_jwt",
  "input": {
    "jwt": "eyJhbGciOiJub25lIn0.eyJzdWIiOiIxIn0."
  }
}

Examples

Reject alg=none

Inputjson
{
  "jwt": "eyJhbGciOiJub25lIn0.eyJzdWIiOiIxIn0."
}
Expected outputjson
{
  "trusted": false,
  "claims": {
    "sub": "1"
  },
  "valid": false,
  "header": {
    "alg": "none"
  },
  "defects": [
    {
      "code": "ALG_NONE",
      "severity": "error",
      "message": "Unsecured JWT (alg=none) is rejected. Signed tokens only."
    },
    {
      "code": "MISSING_EXP",
      "severity": "error",
      "message": "Required 'exp' claim is missing."
    },
    {
      "code": "SIGNATURE_NOT_CHECKED",
      "severity": "info",
      "message": "No verification key provided; signature was not checked. trusted=false."
    }
  ],
  "signatureVerified": false
}

Parse without verification key

Inputjson
{
  "jwt": "eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiIxMjM0In0.abc",
  "requireExpiration": false
}
Expected outputjson
{
  "trusted": false,
  "claims": {
    "sub": "1234"
  },
  "valid": true,
  "header": {
    "alg": "HS256"
  },
  "defects": [
    {
      "code": "SIGNATURE_NOT_CHECKED",
      "severity": "info",
      "message": "No verification key provided; signature was not checked. trusted=false."
    }
  ],
  "signatureVerified": false
}
  • Verify a JWT against a known public key or HMAC secret
  • Check token expiry, audience, and issuer in an auth flow

Avoid for

  • Discovering keys from the token itself
  • Trusting a token without providing verification key material

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

securityvalidationjwt