Bench

Select an operation.

Setup

Sign a payload

Protocol

X.509 / mTLSIN PIPELINE

Case

A well-formed payload, signed with a key that is in date and published.

Sign with

billing-api · bill-02ES256 · published JWKS

or generate a test key

Loading the keys this bench can use…

Input

Claims

application/json
{
"sub": "acct_8812",
"scope": "billing.read",
"iss": "https://billing.acme.test",
"exp": ${now+15m}
}
Templates:${now+15m}${uuid}${faker.email}

Worked example

Signed token

2026-08-09 22:14:07Z

SIGNED

Token signed

Signed with bill-02. Any verifier resolving your JWKS URL accepts it until 2026-08-09 22:29:07Z, with no code change: bill-02 is already published there.
header 42Bpayload 124Bsignature 86B

eyJhbGciOiJFUzI1NiIsImtpZCI6ImJpbGwtMDIifQ.eyJzdWIiOiJhY2N0Xzg4MTIiLCJzY29wZSI6ImJpbGxpbmcucmVhZCIsImlzcyI6Imh0dHBzOi8vYmlsbGluZy5hY21lLnRlc3QiLCJleHAiOjE3ODYzMTQ1NDd9.LwDM__PastYxNtToFWjh1aIbbpf-tuebJEKAcI5XVfgP-bXFYMf5H0gca0cpS3BcZobYppD_fFWnSE9xx2a6f5

What happened

  1. Read the claims and resolved the template values.
  2. ${now+15m} became 2026-08-09 22:29:07Z, 15 minutes after this run.
  3. Chose ES256 from the keyset. Its private half never leaves storage.
  4. Signed header and payload together, so neither can be edited alone.
  5. Named the key as kid bill-02 in the header, so a verifier knows which one to fetch.

Reference

URL or embedded key?

Your app needs the public key to check a token. It can fetch it from a URL at runtime, or carry it as a file. Both are normal. The trade is always the same one: who controls rotation.

Fetch from the URLEmbed the key
RotationAutomatic on next fetchNeeds a redeploy
NetworkDepends on the URLNone
TrustWhatever the endpoint servesPinned to one key
SuitsA signer that rotates keysOffline, air-gapped, or pinned

Use the URL when the signer rotates its keys, which is what every identity provider does. That is why it became the norm, and it is usually a one-line config change.

Embed the key when you cannot make a network call while checking a token, or when you want your app pinned to one key so a compromised endpoint could not introduce another. Export the PEM from the Keysets tab.

One catch worth knowing: Spring Boot's public-key-location only loads RSA keys. An ES256 or EdDSA key needs a custom decoder, or the URL.