Embedded Analytics ArchitectureBy SumboardAugust 24, 2026(Updated November 20, 2026)

What is JWT Authentication? Claims, Signatures and Row Scope

A JWT proves where a claim set came from, not that the claims are true. In an embedded dashboard the harder question is where the row scope sits, whether it travels inside the signature, and what happens when it disagrees with the row policy.

5 min read
What is JWT Authentication? Claims, Signatures and Row Scope

Most explanations of JWT authentication stop at the anatomy: header, payload, signature, and how to verify one. That part is well covered and this page does not repeat it.

The part that decides whether an embedded dashboard is safe sits one step later. In a customer-facing dashboard the token is not only a description of who the viewer is. It travels alongside the instruction that decides which rows the viewer gets, and whether one signature covers both is a question worth answering before launch.

What Does a JWT Signature Prove?

A JSON Web Token is a set of claims plus a signature over them. Verifying the signature establishes that the token was issued by a party holding the key and has not been altered since. It establishes nothing about whether the claims still describe the person presenting the token.

That gap is why RFC 7519 gives timing its own claims. The specification defines that "the 'exp' (expiration time) claim identifies the expiration time on or after which the JWT MUST NOT be accepted for processing", and that "the 'nbf' (not before) claim identifies the time before which the JWT MUST NOT be accepted for processing". (RFC 7519, read 24 August 2026.)

The other three registered claims worth naming here are equally plain. "The 'iss' (issuer) claim identifies the principal that issued the JWT", "the 'sub' (subject) claim identifies the principal that is the subject of the JWT", and "the 'aud' (audience) claim identifies the recipients that the JWT is intended for".

Read that list again and notice what is missing. None of the five says anything about which data the holder may see.

Scope Claim Naming and Collision Risks

Because scope has no registered claim, the fields that carry it are either public claim names or private ones. RFC 7519 describes public names as collision-resistant and registered, and it addresses the private case directly: "A producer and consumer of a JWT MAY agree to use Claim Names that are Private Names: names that are not Registered Claim Names or Public Claim Names. Unlike Public Claim Names, Private Claim Names are subject to collision and should be used with caution."

That sentence is usually read as naming advice. In an embedded dashboard it is more than that, because the colliding name is the one that decides a tenant boundary.

Two components that decide which rows a viewer sees, drawn converging on the query where they meet. On the left, the signed token issued by your backend, carrying three questions rather than a field list: what is signed, what carries the scope, and how long the token lives. On the right, the row policy set at the data layer, carrying its own three: which tenant column the policy compares against, what context the policy reads, and what happens when that context is missing. Both run into a single node marked the query. Below them a third box is drawn for the browser, and it is deliberately empty, with its arrow up to the query crossed out by a solid bar, because the browser is the party being scoped rather than a party that sets the scope. A scope value arriving from it is not evidence of anything.
The two things that decide which rows a viewer sees, where each one is set, and the party that sets neither.

The figure separates the two halves on purpose. A token can be perfectly formed and a row policy perfectly written while neither one is reading the other.

Documented Example: Dashboard and Scope Signed Together

Concrete beats abstract here, so this section uses our own documentation rather than a generalisation about vendors.

Sumboard's back-end setup page instructs you to "create an endpoint on your backend that uses the company secret key and dashboard shared token to generate and return the token". (Sumboard docs, Back-end setup, read 24 August 2026.) The signing step is sign({ st, params }, companySecretKey), where st is the dashboard shared token and params carries the viewer's scope.

So the customer's scope is set on your backend and signed into the token together with the dashboard. The browser receives the token and cannot change the scope without breaking the signature. The static token page documents the parameters. (Sumboard docs, Embed with static token parameter, read 24 August 2026.)

That is the point to settle first in any stack: a field that decides scope should travel inside the signature.

Scope on the Backend: Documentation Guidance and Its Reason

The static token page states the guidance with its own qualifiers: "Token type filters are typically initialized on the backend as parameters and should not be transmitted from the frontend."

The reasoning underneath it is ours rather than the documentation's, and it is worth saying out loud. A value the viewer can edit is not evidence about that viewer, so a tenant identifier that arrives from the browser proves only that the browser sent it.

The documentation frames the goal the same way, describing the method as the one used "when you need to offer the same dashboard to multiple users within your application while ensuring each user accesses only their personalized data". One dashboard, many viewers, and the parameters are what separate them.

Resolve Conflicts Between Claim Set and Row Policy

This is the failure that generic JWT material has no reason to discuss, because it only appears when a token is a scope rather than an identity.

Take a stack where the token says the viewer belongs to tenant B while a row policy at the data layer reads a pooled service connection and sees no viewer at all. Both components are working as written, and the query returns whatever the weaker of the two allows. This scenario is our engineering reading rather than a documented behaviour of any particular database.

The design question is therefore not "do we use JWTs" but which layer is authoritative and how the other one learns about it. A row-level security policy scoped to viewer context cannot read a viewer out of a connection identity, so the token's claims have to reach the policy as context the policy evaluates.

An Expiry You Cannot Name Is an Expiry You Cannot Test

RFC 7519 gives you exp and nbf, and the whole value of those claims is that somebody picks the numbers.

A token's validity window is worth asking any vendor to state in writing before launch.

The reason it matters in a dashboard specifically is the session shape. A token that expires mid-session produces a panel that fails after a viewer has already started reading, which is a different user experience problem from a login page that asks you to sign in again.

Three Questions for a Working Token Design

Ask which layer is authoritative for scope. A good answer names one layer and explains how the other receives the same context, rather than describing both as secure.

Ask what a missing claim does. The safe behaviour is to fail closed and return nothing, because a scope claim that silently defaults to everything is the failure that looks like success.

Ask where the claim is set. If any part of the scope can be supplied by the browser, the answer to "which rows can this viewer reach" is decided by whoever holds the browser.

Ready to launch customer-facing analytics?

Let your customers build their own dashboards inside your product. They see only their own data, and every number comes from a query you approved.

Frequently asked questions

What is JWT authentication?

▾
A JSON Web Token carries a set of claims and a signature. Verifying the signature shows the token was issued by a party holding the signing key and has not been altered since. It does not show that the claims describe the person now holding the token, which is why expiry and audience are checked separately.

What claims does a JWT need for embedded analytics?

▾
The registered claims in RFC 7519 cover issuer, subject, audience and timing. Scope is not among them, so the fields that decide which rows a viewer sees use either public or private claim names agreed between the issuer and the consumer. RFC 7519 notes that private claim names are subject to collision and should be used with caution.

Can the front end set the tenant in a JWT?

▾
It should not, because the browser is the party being scoped. Sumboard's own documentation states that token type filters are typically initialized on the backend as parameters and should not be transmitted from the frontend. A value the viewer can edit is not evidence about that viewer.

Is a JWT enough for multi-tenant isolation?

▾
It is one half. The scope has to travel with the request and something at the data layer has to enforce it, and a row policy is one way to do that. A stack where the token is correct and the policy reads a pooled connection identity has two correct halves that never meet.

How long should an embedded analytics token live?

▾
Short enough that a leaked token stops working before it is useful, and long enough that a dashboard does not expire mid-session. Ask your vendor to state the number in writing.