# What is JSON Web Signature?

> JSON Web Signature (JWS) is the IETF standard for signing a piece of data so a receiver can check it was not changed and which key signed it. Signed JSON Web Tokens use it.

Explainer by Boston Identity, 2026-10-17. 6 min read. https://insights.bostonidentity.com/glossary/jws

- What it is: standard
- Defined by: IETF, RFC 7515 (2015)
- Who it's for: Teams that issue or check signed tokens

## What is JSON Web Signature?

RFC 7515 defines it as content protected by a digital signature or a Message Authentication Code (MAC), a checksum made with a shared secret key [S1 §1]. The protection covers integrity: any change to the signed bytes makes the check fail [S1 §1].

A JWS has three parts. A header names the algorithm and, often, the key [S1 §4]. The payload is the content being protected, and it can be any bytes, not only JSON [S1 §2]. The signature covers the protected header and the payload [S1 §2]. The JSON form also allows an unprotected header, which the signature does not cover [S1 §2].

The standard gives two ways to write a JWS down. The compact form is a short string that fits in an HTTP header or a URL [S1 §1]. The JSON form is a JSON object that can carry several signatures over the same content [S1 §1].

Think of it like this: A JWS works like a sealed envelope with a tamper-evident strip and a note on the outside saying which stamp was used. The strip shows whether anyone opened it, but you still need your own trusted copy of the stamp to know who sealed it.

Not the same as: Not the same as a JWT (JSON Web Token). A JWT is a set of claims about a user or client, and JWS is one way to sign it. JWS also does not encrypt anything; encryption is a separate standard, JSON Web Encryption (JWE) [S1 §1].

## How does JSON Web Signature work?

Two parties take part: a signer, such as an authorization server issuing a token, and a receiver, such as an API that must decide whether to trust it. The steps below follow the standard's own lists for producing and checking a JWS.

[Figure: A signer builds and signs a JWS; a receiver splits it, finds the key and checks the signature.]

1. **The signer writes the header and payload.** The signer creates the payload, the content to protect. It then writes a header, a small JSON object of settings [S1 §5.1]. The header must carry "alg", the algorithm used, and may carry "kid", a hint saying which key signed it [S1 §4.1.1, §4.1.4].
2. **The signer encodes both parts and signs them.** The signer encodes the header and the payload in base64url, a text encoding safe for URLs. It joins them with a period to form the signing input [S1 §2]. It then computes the signature over that input with the algorithm the header names [S1 §5.1].
3. **The signer packs the result.** In the compact form, the encoded header, payload and signature are joined with periods into one string [S1 §7.1]. The JSON form puts them in named members instead. It can hold a list of signatures, each with its own header [S1 §7.2.1].
4. **The receiver splits and checks the header.** The receiver splits the JWS into its parts and decodes the header [S1 §5.2]. The header must be valid JSON with no repeated names [S1 §5.2]. Any extension listed in "crit", the critical list, must be one the receiver understands, or the JWS is invalid [S1 §4.1.11].
5. **The receiver finds the key.** The receiver works out which key made the signature [S1 §6]. Header fields such as "kid", "jwk" or "jku" can point to it, or the application can use its own method [S1 §6]. If no key can be found, the check fails [S1 §6].
6. **The receiver checks the signature and the algorithm.** The receiver checks the signature against the same signing input, using the algorithm in "alg" [S1 §5.2]. If it does not match, the JWS is invalid [S1 §5.2]. Even a JWS that checks out should be treated as invalid if the application does not accept its algorithm [S1 §5.2].

## Why does JSON Web Signature matter now?

The A2A protocol lets one agent publish an Agent Card that says what it is and how to call it. The specification says cards may be signed with JWS, and a client should check a signature only when one is present [BI-FIND-2026-0762](https://insights.bostonidentity.com/ref/BI-FIND-2026-0762). In our reading, the specification does not say which key may sign for a given domain [BI-FIND-2026-0762](https://insights.bostonidentity.com/ref/BI-FIND-2026-0762). Another draft for the same card expired at revision 02. In the meantime, the current A2A text signs an Agent Card as a JWS over a canonical JSON form [BI-FIND-2026-0457](https://insights.bostonidentity.com/ref/BI-FIND-2026-0457).

One paper tested an agent protocol called ACP in a simulation its authors wrote. They set it to check JWS on manifests and artifacts only in part, which they say mirrors common deployments where signing is optional [BI-FIND-2025-0188](https://insights.bostonidentity.com/ref/BI-FIND-2025-0188). Under that setting, tampered and replayed messages went undetected [BI-FIND-2025-0188](https://insights.bostonidentity.com/ref/BI-FIND-2025-0188). The authors call the authentication failures a misconfiguration risk rather than a fundamental design flaw [BI-FIND-2025-0188](https://insights.bostonidentity.com/ref/BI-FIND-2025-0188).

An IETF draft that updates the JSON Web Token best practices makes two new fixes mandatory. Libraries must let a verifier tell a signed token from an encrypted one, and they must reject tokens that contain characters a compact token never uses [BI-FIND-2026-1063](https://insights.bostonidentity.com/ref/BI-FIND-2026-1063).

## Where does it fit?

- Compared with JWT: A JWT is a set of claims, such as who the user is and when the token expires. JWS is the signature format a signed JWT uses.
- Compared with JSON Web Key (JWK): JWK is the format for writing the key itself as JSON. A JWS header can carry a JWK, or point to a set of them, so the receiver can find the key [S1 §4.1.2, §4.1.3].
- Compared with JSON Web Token Best Current Practices: An IETF draft adds fixes for attacks found since RFC 8725, and two of them are MUSTs, one being that libraries must let a verifier tell a signed JWT from an encrypted one [BI-FIND-2026-1063](https://insights.bostonidentity.com/ref/BI-FIND-2026-1063).

## What goes wrong?

- A valid signature is not proof of who signed. The way a receiver gets a public key must confirm where the key came from; otherwise it is unknown what party signed the message [S1 §10.3]. A delegation-receipt draft shows the same gap: the key inside the receipt is self-asserted, so verifiers must get the person's key through a trusted channel and compare [BI-FIND-2026-0721](https://insights.bostonidentity.com/ref/BI-FIND-2026-0721).
- Not every header value is signed. In the JSON form, values in the unprotected header are not integrity protected [S1 §7.2.1]. Key fields such as "kid", "jku" and "jwk" must be integrity protected if what they say is used in a trust decision [S1 §6].
- A MAC proves less than a signature. Everyone who checks a MAC holds the same key, so a MAC only shows that one of those key holders made the message [S1 §10.5]. It cannot prove origin to a third party [S1 §10.5].
- The algorithm can be attacked. A verifier that accepts several algorithms can face algorithm substitution, where an old signature is reused under a different algorithm [S1 §10.7]. Carrying "alg" in the protected header is one defence the standard lists [S1 §10.7]. The "none" value means an unsecured JWS with no protection at all [S1 §2]. The IETF draft on JWT practice says libraries should use allowlists so a name like "noNE" cannot slip past a blocklist [BI-FIND-2026-1063](https://insights.bostonidentity.com/ref/BI-FIND-2026-1063).
- A JWS can be replayed. The standard leaves replay out of scope, but an application can add a unique message ID to the payload and refuse one it has seen before [S1 §10.10].
- Loose JSON parsing is a risk. The standard requires strict JSON and rejects input with extra characters after the object [S1 §10.12].

## What should a security leader ask?

1. Which algorithms do our token checks accept, and is that list an allowlist?
2. Where do our services get the public keys they trust, and how do they confirm who owns each key?
3. Do any of our agent integrations accept unsigned Agent Cards or skip the signature check when it is optional?
4. Which of our tokens use a shared MAC key, and how many systems hold that key?
5. Do the APIs that accept our tokens reject a token they have already seen?

## Sources

- [S1] [RFC 7515: JSON Web Signature (JWS)](https://www.rfc-editor.org/rfc/rfc7515) (IETF, Standards Track RFC, May 2015)

## Evidence

- [BI-FIND-2026-0762](https://insights.bostonidentity.com/ref/BI-FIND-2026-0762): An Agent Card is how one agent learns what another is and how to call it, and signing one is optional: cards 'MAY be digitally signed' with JSON Web Signature, and a client 'SHOULD verify at least one signature' only when a signature is present. The specification does not say how a client decides which key is entitled to sign for a given domain, so in our reading HTTPS, not the signature, does most of the work of showing where a card came from. Its security section covers webhook abuse, task access and leaked extended cards, and names neither a spoofed card nor prompt injection arriving in another agent's messages. (from "A2A 1.0 connects agents across companies and leaves out the person they act for")
- [BI-FIND-2026-0457](https://insights.bostonidentity.com/ref/BI-FIND-2026-0457): The draft expired on 1 September 2026 at revision 02 with no working group, no implementation and no list discussion we could find. The A2A specification it extends chose a different answer in the meantime: the current A2A text signs an Agent Card as a JWS over a canonical JSON form (AgentCardSignature) and does not mention selective disclosure. On the datatracker, agent self-description now has at least five individual drafts and no working group: this one, a framework-neutral AgentCard (April 2026), an OpenA2A Agent Identity Protocol at revision 04 (October 2026), an A2A trust model at revision 03 (September) and a WebFinger profile for naming agents (August). Each describes a registry or an authority; none says who runs it. (from "Cisco's SD-Card puts an A2A Agent Card in a selective-disclosure token, and leaves its registry out of scope")
- [BI-FIND-2025-0188](https://insights.bostonidentity.com/ref/BI-FIND-2025-0188): The paper's ACP results come from a FastAPI simulation the authors wrote and set to check JSON Web Signatures (JWS) on manifests and artifacts only in part, which they say mirrors common deployments where signing is optional. Under that setting, tampered and replayed messages went undetected, synthetic passport identifiers leaked out of a booking workflow, and adversarial prompts generated by GPT-4 set off tool calls nobody intended. The authors call the authentication failures misconfiguration risk rather than a fundamental design flaw, and from the literature they rate ACP's manifest-based role checks as sound when JWS is strictly enforced; their discussion still says ACP has architectural limits that correct implementation cannot fully resolve. We read the test as evidence of what optional message signing allows in a set-up like theirs; ACP's own code and real deployments went untested. (from "CORAL's public agent server rejected forged messages but let a wrong key open the session stream")
- [BI-FIND-2026-1063](https://insights.bostonidentity.com/ref/BI-FIND-2026-1063): Two of the fixes the draft adds for attacks found since RFC 8725 are MUSTs. Libraries must let the verifier tell a signed JWT from an encrypted one; the draft cites CVE-2023-51774 for libraries that do not distinguish a successful decryption from a successful signature validation. And any token with characters other than letters, numbers, dash, underscore and period "is not a JWT and MUST be rejected", the draft's answer to tokens verified in JSON form but read as compact ones. A third fix is softer: against an algorithm name like "noNE" slipping past a blocklist, libraries SHOULD use allowlists. (from "The draft replacing RFC 8725 requires rejecting malformed JWTs but only recommends denial-of-service limits")
- [BI-FIND-2026-0721](https://insights.bostonidentity.com/ref/BI-FIND-2026-0721): A receipt in Ryan Nelson's draft proves that a key signed off on a scope, a time window and a hash of the instructions the operator gave the agent. Revision -14 now says so itself: the public key in the receipt is self-asserted, and "A receipt whose signer key is not anchored to the claimed User proves nothing about that User's authorization." Verifiers must get the person's key through a trusted channel outside the receipt and check that the two match. The draft gives a pinned key directory, an account-bound key ceremony and a key commitment in the append-only log as examples, and defines none of them. Key generation, storage and custody stay with the deployer, the agentId field is an optional string bound to no key, and receipts are still bearer instruments. The draft says it does not stop a malicious operator; it is an audit record of what was authorized, set against what the agent was told to do. (from "A signed delegation receipt for AI agents proves a key said yes; revision 14 makes tying it to a person the verifier's job")

---

© 2026 Boston Identity LLC. All rights reserved. Published by Boston Identity LLC.
Quote up to 100 words with the credit "Boston Identity, IAM Insights" and a link to https://insights.bostonidentity.com/glossary/jws as the source. Claim numbers may be cited freely. Training, fine-tuning and text-and-data-mining use of this page is permitted.
Terms: https://insights.bostonidentity.com/terms · How to cite: https://insights.bostonidentity.com/cite
