Using JWT claims to set Jitsi features and roles per user
JWT claims let your application decide, for each user and each meeting, which features and roles that user receives in a self-hosted Jitsi Meet. The application signs a token containing those claims, and Jitsi reads them when the participant joins, so a user who needs recording, file upload or SIP calling can receive it while colleagues who do not need it are left without. The Jitsi handbook recommends JWT token authentication over the deprecated secure domain method for new installations, so claims-based control is the path the project itself points to. Treat the claim structure as a design decision: the claims you need depend on which features your deployment actually runs.
The claims ride inside a token that your application or identity layer signs with a secret or key that the Jitsi side trusts, which is why the token authentication setup and the feature claims cannot be planned separately. Start from the token authentication page of the handbook, which documents the token structure, the claim names and the configuration keys that connect the token to config.js and the Prosody side. Exact claim names, nested object paths and the configuration keys for enabling features or roles change between releases, so confirm each one against the current handbook before you write any token generator. Testing matters here: issue tokens with different claim sets to test accounts and confirm, meeting by meeting, that the toolbar and permissions match what each token grants.
Before you build, list the features that need to be restricted and the people who need them, then decide which of those controls live in the token and which stay in global configuration. Recording depends on Jibri being deployed and sized, and SIP calling depends on Jigasi, so a claim that switches on a feature without its backing component will produce a control that looks correct but does nothing. Write down who owns the claim logic in your application, who can change it, and how a change is reviewed and tested before it reaches production. For regulated organizations, that record is also the evidence a reviewer will ask for when they check how access to recording and dial-in is controlled.
Which token claims control features and roles
A Jitsi JWT carries a few distinct claim groups, and each one changes what a participant sees or can do in the meeting. Plan the claims in your identity layer before you write the token issuer, because the same values shape both the user experience and the moderator rights you grant.
User context block
The context object carries the user's name, email and avatar so Jitsi can show who is in the room. These values are display data set by your application, not verified by Jitsi, so only put in what your identity provider has already confirmed. Check how your team maps directory attributes to these fields, and confirm the exact key names against the handbook version you deploy.
Features block toggles
The features object switches capabilities such as recording, livestreaming, file upload, transcription and SIP calling on or off for each user. Treat each flag as a permission decision, and map it to a policy your team has approved. Confirm the flag names and their defaults against your deployed handbook version, since those names are the reference and can change between releases.
Moderator flag and roles
The moderator flag in the token sets whether a participant starts as a moderator. Without it, anyone who joins may gain host rights on an open instance, so this claim is the main control for who manages the room. Decide which groups in your directory map to moderators, and test that a non-moderator token cannot change room settings.
Feature enablement must match the server
A feature flag in the token only helps if the deployment provides the component behind it. Recording and livestreaming need a Jibri setup, and SIP calling needs Jigasi, so a token that enables these on a server without those parts gives users a control that does nothing. Inventory the optional components first, then issue only the flags that match them.
Config.js role settings
Role behavior also depends on configuration in config.js, which the handbook describes for enabling user roles from the token. Keep the token claims and the config settings in one reviewed document so a change in one does not silently override the other. Test each role on a staging instance with sample tokens before rollout.
Version checks before rollout
Claim names, feature flags and role handling are the parts most likely to change between Jitsi releases. Pin the Jitsi version your team tests, compare its handbook page with the deployed build, and retest the token matrix after each upgrade. Record which claims each role receives so auditors and operators can trace a permission back to its source.
Feature and role options and when each fits
This table compares the ways to grant features and roles in a self-hosted Jitsi Meet: per-user JWT feature flags, a moderator claim, roles enabled from the token in config.js, and instance-wide settings. Read each row for the situation it suits and the engineering work it leaves with your team. The main takeaway is that per-user control is only as strong as the token logic that issues it.
| Option | When it fits | What it costs to run |
|---|---|---|
| Per-user JWT feature flags | A small set of hosts who need recording, file upload or SIP calling while everyone else does not | Token issuance logic in your application that decides each flag, plus tests for every combination you grant |
| JWT moderator claim | Staff who run meetings for guests or students and must control the room from the start | A clear rule for who receives the claim, and a review when roles change in your identity system |
| Roles enabled from the token in config.js | Several user types, such as hosts, staff and external users, that need different toolbars or behavior | Configuration changes in config.js and a test for each role, since a misconfigured role can silently widen access |
| Fixed instance-wide settings in config.js | Defaults that apply to every meeting, such as privacy defaults or disabled features for the whole deployment | Low per-user effort, but any change affects all users and needs a rollout and a restart of the web configuration |
| Settings in the .env file | Deployment-wide switches set once during installation, such as the authentication method | Changes need a container restart, so they suit stable choices rather than per-user decisions |
| Feature and role checks in testing | Any deployment that grants features from tokens, so each claim combination is verified before release | Test effort grows with each role, and a test plan must be kept current when claims or roles change |
How config.js enables roles from the token
A role claim in a Jitsi token has no effect until the web app is told to honor it. The Jitsi web app reads the token after the user joins, and the settings in config.js decide which role information it acts on. If the matching configuration is missing, a claim such as a moderator flag or a feature permission is parsed, ignored and silently dropped, so the meeting behaves as though the token said nothing. Before you rely on any claim, confirm the exact key names and the expected structure against the Jitsi handbook token authentication guide, and check the config.js file shipped with your installed release, since key names change between builds.
The core decision is how much authority to hand to the token and how much to keep in instance-wide defaults. Putting roles in the token lets your identity layer decide per user, per meeting, which features are on. The cost is that every token issuer becomes part of your permission model, and a bug in the issuing code can grant more than intended. Instance-wide defaults in config.js are easier to review and audit, but they apply to everyone equally. A common middle path is to keep conservative defaults in config.js and let tokens grant only narrow, well-understood exceptions. Write this split down before development starts, because it determines who must sign off when a permission changes.
Token validation happens on the server side, not in the browser. Prosody, the XMPP server, checks the token signature, audience, issuer and expiry, and Jicofo, the conference focus component, enforces room membership for the conference. The browser only interprets the claims that survive those checks. This means a deployment can pass a browser test and still fail in production if the signing secret, the aud or iss values, or the room name pattern differ between the issuer and the Prosody configuration. Test each claim end to end: issue a token with a known role, join from two browsers, and confirm on each side that the feature appears or stays hidden as designed, and that a token with a wrong signature or expired timestamp is rejected.
Setting up JWT feature and role claims
This sequence moves from a working JWT login to per-user feature and moderator control, confirming at each stage that the token, the server and the client agree. The result is a deployment where moderator rights and restricted features follow the claims your application issues.
Confirm basic JWT authentication works first
Before adding any feature or role claims, confirm that a plain token opens a room on your self-hosted instance. Your application or a test script signs a token with the shared secret, sets the audience, issuer, subject and room claims, and the tester opens the room URL with the token attached. Check that the user lands in the meeting without a login prompt and that an unsigned or wrongly signed token is rejected. If basic authentication fails, fix that first, because feature claims add no value on top of a broken token path.
Decode a test token to verify the claim structure
Add the feature and moderator claims in the signing code, under the context and user structures your deployment expects. Generate a test token and decode its payload with a JWT inspection tool or a short script, without sending it to any third-party site. Confirm that the moderator flag, the feature flags and the room scope appear exactly as named in your configuration, with correct booleans rather than strings. The check is a decoded payload that matches your design for one moderator and one non-moderator user.
Set matching options in config.js
Update the web configuration so the front end reads the same feature settings that the token carries. Work in the
config.jsfile in the web container or package, and confirm the option names against the Jitsi handbook entries for token authentication and for the feature in question, because option names change between releases. Keep the change limited to the features you intend to control, and record which release you are running. The check is a diff of the file that you can reproduce in your configuration management tool.Restart or redeploy the web and Prosody services
Apply the changes by restarting or redeploying the web and Prosody containers, or the matching services on a package install. Prosody handles the token validation and must see the same secret and claim settings as the signing application, so restart it alongside the web layer rather than only one of them. For Docker, make the change through the
.envfile and redeploy the affected containers, so the state matches what your automation will rebuild later. The check is that both services start cleanly and their logs show no token configuration errors.Test a moderator token against the room
Join a fresh test room with a token that carries the moderator claim. Confirm that the participant sees moderator controls, such as the ability to mute others or manage the lobby if your setup uses it. Then confirm that the features you chose to enable for this user are visible and usable. Record the result with the release number and the token version so you can repeat the test after an upgrade.
Test a non-moderator token and a restricted feature
Join the same room with a token that omits the moderator claim and carries the restricted feature flags set to off. Confirm that this user cannot perform moderator actions, and that the restricted feature, such as file upload or recording, stays hidden from the toolbar and menus. Also check that a direct attempt to use the feature does not succeed through the browser console. The check is a written result for each user type, showing what was visible and what was blocked.
Repeat the tests across each user type and document results
Run the same tests for every user type you plan to support, including a guest path if your design uses the anonymous domain, and for any mobile client your users depend on. Compare each result against the design you signed off before the work started. Store the token claim specification, the config.js diff and the test results together, so that an upgrade or a change to the signing code can be checked against a known baseline. The output is a repeatable test record that a reviewer can read without access to your signing code.
How a token carries features from your app to the meeting
The flow starts when a user signs in to your application, which signs a JWT carrying feature and moderator claims. The browser presents that token when joining the room, and Prosody validates its signature and claims before the conference starts. The web app then reads config.js to apply the features the token grants. Check the trust boundary: only your application holds the signing secret, and the Jitsi components only verify tokens, never issue them.
A signed token moves from your application through the browser to Prosody, which checks it before features apply.
Security points to settle before granting recording or SIP
Recording and SIP dial-in are the most sensitive rights a Jitsi token can switch on, because they capture meeting content or open a phone path into the room. Settle the key, token and guest decisions below before any claim that grants these features reaches production.
Signing key handling and rotation
The application signs JWTs with a shared secret or key that Prosody uses to verify them, so anyone who holds that key can mint a token with any claim they like. Store the key in your secrets manager, restrict which services can read it, and define how it is rotated, including how Prosody and the token issuer pick up the new value without a window where valid users are locked out. Confirm the rotation procedure in a staging environment before relying on it.
Token authentication docsToken lifetime for feature rights
A token that carries recording or SIP rights should expire soon after the meeting it was issued for, not remain valid for days. Short lifetimes limit the damage from a leaked token, but they also cause failures if a user joins late or reconnects after a network drop. Test the expiry you choose against your longest expected meeting and reconnect behavior, and decide whether reissuing the token on rejoin is acceptable.
Wrong claims set by the application
Moderator and recording rights are only as reliable as the code that writes them into the token. A mapping that treats a missing role, an empty group or a default value as moderator will grant rights to everyone who signs in. Build the mapping from an explicit allow list tied to your identity provider groups, deny by default, and write tests that prove a standard user token cannot set recording or moderator claims.
Logging who started a recording
A recording switched on by a token claim should leave a trail that names the participant and the moment it began. Confirm which events Jitsi and Jibri write to logs in your version, where those logs are stored, and how long they are kept. Without a record linking the recording to an authenticated user, a dispute about who captured a meeting has no evidence to answer it.
Keeping the anonymous guest domain separate
The anonymous domain lets people join without a token, so any room name reachable under it can be entered by strangers. Keep token-gated rooms under the authenticated domain, and confirm that feature claims on a token do not carry over to guest sessions. Check that a guest cannot reach a room that holds recording or SIP rights by guessing its name.
Separate sizing and access for Jibri and Jigasi
Recording runs through Jibri, which launches Chrome in a virtual framebuffer and encodes with ffmpeg, and the Jibri README states that one recording at a time is supported per Jibri, which should run on its own machine or VM. SIP dial-in runs through Jigasi, a separate component. Each needs its own capacity planning, network placement and access review, and the claims that enable them do not size or secure them for you.
Jibri repositoryQuestions teams ask about JWT features and roles
Can our own team set up JWT feature and role claims in Jitsi?
Yes, if your team already runs Linux servers, can read Jitsi configuration files and can write the code that signs tokens in your application. The work sits in three places: the token payload your application issues, the Prosody and web configuration that reads it, and the config.js settings that turn features and roles on or off. Most teams need someone comfortable with JSON Web Tokens, shared signing secrets and browser-side configuration. Confirm the exact claim names and their behavior against the Jitsi handbook token authentication guide for the release you run, since the handbook is the reference for what each claim does.
What makes the effort for per-user features and roles grow?
The main drivers are the number of distinct roles, whether recording or SIP dial-in is part of the design, and how your application already handles identity. Each additional role needs a clear rule for who receives it and a test that proves the right people get the right features. Recording and SIP calling add their own components and permissions, so they widen the scope. An application that already issues signed tokens for other services is usually simpler to extend than one where identity lives in several systems, such as a directory, a CRM and a spreadsheet. Ask for the role matrix and the identity sources to be written down before any configuration work starts.
How long does testing of token claims usually take?
Testing time depends on the scope you agree in writing, not on a fixed number of days. A narrow scope covers one role model, a few features and a single application login path. A broader scope adds recording, SIP, more roles, guest handling and each client platform you support, and each adds test cases. Testing should cover valid tokens, expired tokens, tokens with missing or altered claims, and users who try features outside their role. Ask any provider for the test cases they will run, the environments they will use and the evidence they will return, then compare the timeline to that list.
What do we need to provide before the work starts?
You need a test environment that matches production closely enough to prove the design, including a Jitsi instance, a test application that issues tokens and test accounts for each role. You also need to decide the signing approach, such as which algorithm and where the signing secret is stored, and who holds that key. Identity owners must confirm which users get which roles and what happens when someone leaves or changes teams. Access to the application code that creates tokens and to the Jitsi configuration files is also required. Missing any of these usually delays the work more than the configuration itself.
How should we protect the signing secret used for tokens?
Treat the signing secret as a credential with an owner, a storage location outside source control and a rotation procedure. Anyone who holds it can mint a token that grants a role, so access should be limited to the systems that issue tokens. Rotation requires a plan for overlapping keys or a maintenance window, because tokens signed with an old secret will fail once the change takes effect. Confirm how your chosen Jitsi release reads the secret and which claims it validates before you write the rotation runbook. Record who approved the design, since auditors and security reviewers often ask for that trail.
What recurring work follows once roles are live?
Recurring work includes changes to token logic when roles or features change, review of the role model when staff or products change, and upgrades to Jitsi releases. Each Jitsi upgrade can alter configuration behavior, so token claims and config.js settings should be retested afterward. Your application may also change its login flow, which affects how tokens are issued. Plan a short regression set covering each role and feature, run it after every upgrade and keep the results. Ask any provider whether this is a one-time delivery, a support arrangement or a retainer, and what each covers.
Does DeployOpen handle this work, and what does a quote depend on?
DeployOpen implements and customizes self-hosted Jitsi inside your own infrastructure, so token claims, role configuration and testing can be part of a fixed-scope engagement. A quote follows from the written scope, which should list the roles, features, identity sources, client platforms and test cases involved, along with deliverables and timelines. DeployOpen does not publish a price list. Ask for the scope to state what is one-time, such as design and testing, and what recurs, such as retesting after upgrades or a retainer for ongoing support.
How DeployOpen scopes and delivers JWT role work
DeployOpen plans and implements self-hosted Jitsi Meet inside the client's own infrastructure, including token claim design for features and roles. The work starts with a written scope that maps each claim to a feature, a role and a tested behavior in config.js and the token issuer, so the client knows what changes before anything is switched on.
How we scope
- Engagements are fixed-scope, with the claims, roles and features to be covered agreed in writing before work starts.
- The scope lists which identity source issues tokens and which user groups map to moderator, recorder or feature-enabled roles.
- We confirm the Jitsi version and deployment method, Debian packages or Docker, because claim handling depends on the setup.
How we build
- We configure the token issuer so each claim for file upload, recording or SIP calling is set from your identity data.
- We adjust the Prosody and config.js settings that read role claims, and document every key changed in the environment.
- We test each role with real tokens, including guest and expired-token cases, before the change reaches users.
How we hand over
- You receive the written claim map, the token issuer logic and the config.js changes as versioned, reviewable files.
- Test cases and results are documented so your security or compliance team can repeat the checks independently.
- Operators receive a short runbook covering how to add a role, rotate signing keys and roll back a claim change.
How we support
- Ongoing support, upgrades and continuous testing are available as retainers, covering claim changes after a Jitsi upgrade.
- Retesting follows any change to the identity provider, the token issuer or the Jitsi release in use.
- Ask any quote to name what is one-time (scope, build, handover) and what recurs (retainer, retesting, upgrades).

