Skip to Content
🎉 BSH Engine v0.0.7 is out with new features and improvements. See what's new →

Signing Keys API

The Signing Keys API lets BSH_ADMIN users list the JWT signing keys, force a rotation and expire a leaked key.

For how keys are generated, rotated and expired, see the Signing Keys documentation.

Base Endpoint

/api/auth/signing-keys

Endpoints

MethodEndpointDescription
POST/api/auth/signing-keys/rotateRotate the active key now
POST/api/auth/signing-keys/{kid}/expireExpire a retired key
GET/api/auth/signing-keys?queryList and filter by URI parametersSimilar to Entities API
POST/api/auth/signing-keys/searchSearch keys by POSTSimilar to Entities API
GET/.well-known/jwks.jsonPublic keys that verify access tokens (JWKS)Public

Signing key object

{ "kid": "a82791af-3c4d-4e5f-8a9b-0c1d2e3f4a5b", "status": "Retired", "activatedAt": { "$date": 1794045600000 }, "retiredAt": { "$date": 1794047160000 }, "verifyUntil": { "$date": 1794655560000 }, "rotation": "Manual", "reason": "Routine rotation", "updatedBy": "571eb380-bd72-4286-98b7-95505a98dc38", "current": true }
FieldDescription
kidKey ID, also sent in the kid header of every token it signs
statusActive, Retired or Expired. See Lifecycle.
activatedAtWhen the key started signing tokens (UTC)
rotatesAtwhen it will be rotated, activatedAt + secretTtl
retiredAtWhen a newer key took over.
verifyUntiluntil when it still verifies tokens, retiredAt + refreshTtl + 1h
expiredAtWhen the key was expired
rotationHow the key became active: Scheduled or Manual
reasonThe reason given by the admin who rotated or expired it
updatedByuser who rotated or expired it.
currenttrue when this key signed the token of the request.
Last updated on