Agents

Key pairs

Let an agent sign JWTs or raw bytes with a key whose private half never leaves Scute, and publish the public key as a JWKS.

A key-pair property holds a private key Scute generates and never shows. An agent's tool asks Scute to sign with it, using its task token. Anyone can verify the signature with the property's public JWKS. The same rules as for secrets apply: the agent must be listed, the task live, and the property's permission allowed. See Properties.

Create a key pair#

POST/v1/apps/:app_id/propertiesApp key
namestringrequired
As for a secret.
kindstringrequired
keypair
algorithmstring
RS256 (RSA 2048), ES256 (P-256) or EdDSA (Ed25519). Default ES256.
agentsstring[]
Agents that may sign with it.
permissionstring
A permission the task must be allowed at the moment of signing.
descriptionstring
What it is for.
expires_atstring
ISO 8601 time after which it can no longer sign.
curl -X POST https://api.scute.io/v1/apps/$SCUTE_APP_ID/properties \  -H "Authorization: Bearer $SCUTE_APP_SECRET" \  -H "Content-Type: application/json" \  -d '{ "name": "partner-signing", "kind": "keypair", "algorithm": "EdDSA", "agents": ["billing-assistant"] }'

The answer has algorithm, key_id (prop_...) and public_key (PEM). The private key is never returned.

Sign#

POST/v1/auth/:app_id/agent/properties/:name/signTask token

Send one of:

claimsobject
Claims to sign as a compact JWS. Scute adds iat (now) and iss (<app public id>/properties/<name>). The header has alg, typ: "JWT" and kid.
datastring
Raw bytes to sign, base64url encoded.

Proofs for a permission that needs verification or approval go in challenge, approval (or approval_id) and session_id, as on a secret read.

curl -X POST https://api.scute.io/v1/auth/$SCUTE_APP_ID/agent/properties/partner-signing/sign \  -H "Authorization: Bearer $TASK_TOKEN" \  -H "Content-Type: application/json" \  -d '{ "claims": { "sub": "order-1182", "aud": "partner.example" } }'
{ "jws": "eyJhbGciOiJFZERTQSIs...", "alg": "EdDSA", "kid": "prop_..." }

With data, the answer is { "signature": "<base64url>", "alg": "...", "kid": "..." }. ES256 signatures are the 64-byte r || s form JWS uses, not DER.

Statuserror_codeWhen
422invalidNeither claims nor data, or data is not base64url
422wrong_kindIt is a secret, not a key pair

The other errors are the same as for a secret read.

Publish the public key#

GET/v1/auth/:app_id/properties/:name/jwks.jsonNone

Public, cached for 5 minutes. Returns the current key and any previous keys still in their grace period, as JWKs with kid, alg and use: "sig". A disabled property, or a name that is not a key pair, is a 404.

curl https://api.scute.io/v1/auth/$SCUTE_APP_ID/properties/partner-signing/jwks.json
{ "keys": [ { "kid": "prop_...", "alg": "EdDSA", "use": "sig", "kty": "OKP", "crv": "Ed25519", "x": "..." } ] }

Point the party that verifies at this URL and pick the key by kid.

Rotation#

POST/v1/apps/:app_id/properties/:name/rotateApp key

For a key pair, rotating generates a new key with a new key_id, in the same algorithm. The old public key stays in the JWKS for 7 days, so signatures made shortly before still verify. The property's previous_keys lists each old key with kid, public_key and until.