Qdrant JWT access control per collection: when a shared API key stops being enough
When several services or teams share one self-hosted Qdrant, a single admin key gives every caller full rights to every collection, including the ability to delete data and change collection settings. Per-collection JWT access control is the point where that stops being acceptable. Qdrant added JWT-based granular access control with read or write permissions per collection in v1.9.0, so each service can hold a token that only reaches the collections it needs. Admin and read-only API keys remain the simpler choice when there is one trust boundary, for example one application that reads and writes everything, or a single query-only service that needs read access to all collections.
Choose JWTs when callers with different duties must be separated on the same cluster: an ingestion pipeline that writes to one collection, a search service that only reads it, and an internal tool that must not touch a third. Also consider them when auditors ask who can read a given collection. The Qdrant security docs describe the mechanism, and the exact claim format and signing options should be confirmed against the version you run, starting with the Qdrant security documentation. Before you commit, write down each service, the collections it touches, and whether it needs read, write or both. That table becomes the input for token issuance and for testing.
Two decisions shape the rest of the work. First, who signs the tokens: a JWT is only as trustworthy as the key that signs it, so the signing material should stay in the identity layer your organization already operates, not in each application. Second, how you will handle expiry and revocation, since a token that lives too long cannot be withdrawn simply by stopping its issuance. Confirm with your security team how long service tokens may live and how a compromised token would be replaced before you enable enforcement on a shared cluster. Plan a test with one non-production collection so that the first 403 responses are expected rather than a surprise to a production service.
Which JWT settings fit which access pattern
This table compares the JWT settings that shape per-collection access: enabling jwt_rbac, the access claim, token lifetime and clock skew tolerance. Read each row against the access pattern you need, then confirm the defaults and exact option names in the Qdrant security docs before you write configuration.
| Setting | What it controls | When it fits | Trade-off to plan for |
|---|---|---|---|
| jwt_rbac enabled | Turns on role and claim checks so a token can be limited to specific collections and permissions | Any shared cluster where more than one service or team writes to it | Every client must send a token with the right claims, so existing key-only clients will fail with 403s until updated |
| Read-only access claim | Grants search and read operations on the listed collections only | Query-only services such as a search API or a retrieval step in an AI application | Any write, snapshot or admin call returns 403, so confirm each service's real call list before issuing the token |
| Read-write access claim | Grants reads and writes on the listed collections | Ingestion pipelines and indexing jobs that load or update points | A leaked token can change data in its collections, so keep these tokens short-lived and scoped to one collection set |
| Per-collection scopes | Limits each token to named collections rather than the whole cluster | Multi-team clusters where one team must not read another team's vectors | Each new collection needs its own claim update, so the token issuer must track collection ownership |
| Expiry lifetime | How long a token stays valid after issue | Short lifetimes for batch jobs and interactive tools; longer ones for stable internal services | Short lifetimes add refresh traffic and more dependence on the identity layer; long lifetimes widen the window for misuse |
| Clock skew tolerance | How far the node clock and the token issuer's clock may differ before a valid token is rejected | Clusters running on hosts with time synchronization across several sites or hypervisors | Generous tolerance accepts tokens slightly outside their window; tight tolerance rejects valid tokens when clocks drift |
Setting up jwt_rbac for one collection
This sequence turns on JWT-based access control in a self-hosted Qdrant instance, creates a collection per team, and proves with a test token that a scoped credential reads its own collection and is refused everywhere else.
Confirm the Qdrant version supports jwt_rbac
Check the running Qdrant version before changing any configuration. JWT-based granular access control with per-collection read or write permissions arrived in v1.9.0, so any release at or above that version qualifies, and the current latest release, v1.19.2, is listed on the Qdrant releases page. Run the instance's version endpoint or check the image tag in your deployment manifest, and record the result in your change ticket. This step is done when the recorded version is 1.9.0 or later and the team has confirmed the same version runs on every node in a distributed cluster.
Set the signing configuration and keep the admin key
Enable jwt_rbac in the Qdrant configuration and set the signing secret that Qdrant uses to verify tokens. Store the secret in your secrets manager, not in the configuration file in version control, and mount it into the container or pod at runtime. Keep the admin API key available only to the platform team, because it remains the credential for creating collections and managing access. Restart the node and confirm that an unauthenticated request to a protected endpoint is refused while the admin key still succeeds. This step is done when both outcomes are observed and the signing secret is recorded in the secrets inventory with an owner.
Create the collection layout per team
Create one collection for each team or service that needs isolated access, using the admin key. Name collections on a stable pattern, such as the team and the data domain, so access claims in tokens map cleanly to them. Keep the collection schema, vector size and distance metric identical to what the client applications expect. Do not share a collection between two teams merely to simplify tokens, because the scope of a token is defined per collection. This step is done when the list of collections matches the access design document and each collection returns its expected point count of zero or the migrated count.
Issue a test token with one collection scope
Generate a test JWT in your own identity layer, signed with the secret configured in the previous step. The payload should carry the access claim that lists one collection with read permission, along with an expiry that is short enough for a test. Keep the token's signing algorithm and claim structure consistent with what Qdrant verifies, and confirm the exact claim format in the Qdrant security documentation before wiring your identity layer to it. Decode the token to check the claim and expiry values. This step is done when the token decodes to the intended scope and a request to the granted collection returns a successful response.
Confirm requests to other collections return 403
Send the same test token to a collection that is not in its access claim, using both a read operation and a write operation. Qdrant should refuse these requests with a 403 Forbidden response. Also send a write request using the token scoped to read only, to confirm that write permission is enforced separately from read permission. Log each request, its status code and the collection name. This step is done when every out-of-scope request returns 403, and the team has noted any request that unexpectedly succeeded as a defect to resolve before production use.
Check expiry and clock skew before rollout
Test the token lifecycle before any service depends on it. Issue a token with a very short expiry, wait until it lapses, and confirm Qdrant rejects it. Then check that the clocks on the Qdrant nodes and the identity layer are synchronized, because a mismatch can cause valid tokens to fail or expired tokens to pass. Confirm the clock skew tolerance in the Qdrant security documentation and set your own token lifetimes with that limit in mind. This step is done when an expired token is refused and the time sources on all hosts are confirmed to be synchronized.
Request flow from identity layer to Qdrant collection
The flow starts with the client service, which asks your identity layer for a token scoped to the collections it needs. The identity layer signs the token with the key Qdrant trusts, so the trust boundary sits between your identity layer and the Qdrant instance. Qdrant then checks the signature, expiry and the access claim on each request. Check that a read-only service gets 403 on writes, and that a token for one collection gets 403 on another.
Scoped tokens are issued outside Qdrant and checked on every request.
Expiry and clock skew: the failures that look like access bugs
Most JWT access problems on Qdrant are not permission mistakes. They come from tokens that expired, clocks that disagree, or signing secrets that changed underneath a running service. The cards below cover the checks that separate those failures from a genuine scope error before you change any collection permissions.
Token expiry as the first suspect
A token carries an expiry time set by the issuer, and Qdrant rejects it once that time passes. A service that worked yesterday and fails today with a 403 may simply be holding an expired token. Check the exp claim of the failing token against the current time, and confirm in the Qdrant security docs how expired tokens are reported and whether your client surfaces that as a permission error. Set lifetimes with your refresh process in mind, not just the convenience of long-lived tokens.
Clock drift between issuer and nodes
Expiry and not-before checks compare the issuer's clock with the clock of each Qdrant node. If an issuer runs ahead, freshly minted tokens may look not yet valid to a lagging node, and if it runs behind, tokens may linger past intended expiry. Compare the system time on the issuer and every Qdrant node, including each cluster member. Ask Qdrant's docs whether a clock skew tolerance is configurable before you rely on one.
Time sync as a platform requirement
Running NTP or an equivalent time service on every host in the path is an operational prerequisite, not an optional tuning step. Containers inherit the host clock, so syncing the host usually covers the Qdrant container as well. Add time offset alerts to your monitoring so drift is caught before users report intermittent 403s. Confirm your hypervisor and Kubernetes nodes sync their clocks as part of the platform build.
Rotating the signing secret
JWTs are verified with the secret configured on Qdrant, so changing that secret invalidates every token signed with the old one at once. Treat secret rotation as a planned event with a window for re-issuing tokens to each service. Store the secret in your secrets manager, record which services hold tokens, and confirm in the Qdrant docs how a rotated key interacts with the running API key before you change either in production.
Qdrant security docsHow a stale token surfaces
A stale or expired token usually shows up as a 403 on requests that previously succeeded, often only for some services or some nodes. That pattern points to time or token age rather than collection scope, which tends to fail consistently for one service from the start. Log the token's expiry and the request time next to each 403 in your audit trail so the two causes can be told apart quickly. Confirm the exact status codes Qdrant returns for each case.
Generating tokens in your own identity layer, with Keycloak or another provider
DeployOpen recommends issuing the JWTs that Qdrant accepts from an identity layer your organization already runs, rather than building a token service inside each application. Keycloak is one option: it is an open source identity and access management server that supports OpenID Connect and OAuth 2.0 according to keycloak.org, so a service can request a token from a realm, and an operator can control which clients exist and who administers them. Another identity provider can serve the same role if it can issue signed tokens that you can configure to match Qdrant's claim format. Confirm that the provider can add the custom access claim that Qdrant reads, and that its token lifetime settings meet your expiry plan. Do not assume a given integration is supported until you have checked it against the Qdrant security documentation and tested it in your environment.
Map each service account or workload to the collections it needs, and encode that map as one client per service with the collection scopes it may hold. A query-only recommendation service should never receive a write grant on the product catalog collection, and an ingestion job should not carry read rights it does not use. Keep the signing key inside the identity layer or a secrets manager that the token issuer controls, never in application code, container images or CI logs. Applications should fetch short-lived tokens at runtime and hold them in memory. Also decide who may change client definitions, since a single edit to a client's collection list changes what every holder of its tokens can reach.
Qdrant only accepts tokens whose signature and claims match the configuration you set on the cluster, so the claim format, the signing secret or key, and the algorithm must agree between the issuer and Qdrant. Before rollout, issue a test token from the identity layer, send it to a non-production cluster, and confirm both an allowed request and a denied one. Record which claim names your provider emits and how they map to the access structure Qdrant expects, because a mismatch usually appears as a 403 that looks like a permissions problem but is actually a token shape problem. Ask your identity team to document the token lifetime, the rotation procedure for the signing key, and who receives alerts when issuance fails.
Security and operational considerations for scoped tokens
Scoped JWTs only protect collections if the signing material, the admin path, and the token lifecycle are controlled. The cards below cover the decisions that connect token issuance to day-two operation, from where the signing key lives to how you prove later who did what.
Store the signing secret like a root credential
Qdrant validates each JWT against the API key configured on the cluster, so whoever holds that key can mint tokens with any collection access they like. Keep the key in your secrets manager, inject it at startup, and keep it out of container images, Helm values files in Git, and CI logs. Check who can read the secret object in Kubernetes and who can view the deployment's environment variables.
Qdrant security docsSeparate admin keys from application tokens
An admin key can reach every collection and the management endpoints, so it should never be handed to an application. Give services scoped JWTs with read or write access only to the collections they use, and reserve the admin key for operators and automation that manage the cluster. Confirm with your own test that a service token returns 403 on collections outside its claim.
- JWT per-collection access
- v1.9.0
Plan for token leakage and revocation
A JWT stays valid until its expiry, so a leaked token keeps working for that window. Keep expiry short, scope each token narrowly, and watch for tokens appearing outside their intended services. For revoking one token without rotating the cluster key, the value_exists claim tied to a control collection is the mechanism to plan around, covered in its own sibling page.
Log authenticated operations for review
Audit logging of authenticated API operations is available from Qdrant v1.17.0, so run a cluster on that version or later if you need to attribute reads and writes to a caller. Decide where logs go, how long they are kept, and who reviews them, and confirm that log entries let you tie an operation to a specific token or service. Ship logs to your SIEM so they survive node loss.
Keep a key and token rotation runbook
Signing key changes affect every JWT issued under the old key, so rotation needs a documented sequence covering clients, secrets stores and restarts. Write the runbook before you need it: who approves a rotation, how the new key reaches each service, how old tokens are expired, and how you confirm that no client still sends the old credential. Rehearse it on a non-production cluster first.
Issue tokens from your identity layer
Generate scoped tokens in the identity system your organization already operates, such as an OIDC provider, rather than by hand or in ad hoc scripts. This gives you one place to record which team owns which collection claim, to remove access when a team changes, and to match token lifetimes to your access policy. Confirm your provider can emit the claim structure Qdrant expects before you depend on it.
Which 403 errors to expect and what each one means
Why does my JWT get a 403 on a collection outside its scope?
A 403 on a collection outside the token's scope usually means the token is valid but its access claim does not grant that collection. Qdrant checks the signature first, then checks the collections the claim lists against the collection in the request path. Decode the token payload and confirm the collection name matches exactly, including case and any prefix. Then send the same request with a token that lists the collection to confirm the rule is the cause. Confirm the exact status code and error body for your Qdrant version in the Qdrant security documentation before you write alerts against them.
What causes a 403 when a read-only token tries to write?
A 403 on a write from a read-only token means the claim grants read permission only, and the write request is correctly refused. The cause is usually a service that uses one token for both query and upsert paths, or a client library that calls a write endpoint during a retrieval flow. Check the permission field in the claim for the collection, then list the endpoints your service calls. Separate the query service and the ingestion job into different tokens with the permissions each one needs. Confirm the exact error body in your version before building retry logic that must not loop on this error.
Why does a JWT return 403 after it expires or when clocks drift?
An expired token is refused, and clock skew between the issuer and Qdrant can make a fresh token look expired or not yet valid. Compare the exp and nbf values in the payload with the current UTC time on the Qdrant node. Check the time sources on the issuing service and on each Qdrant node, and confirm both are synchronized with NTP. If the failure appears only on some nodes, compare their clocks first. Clock skew allowance and the exact rejection behavior should be confirmed in the version you run, and expiry should be set in your identity layer so tokens are renewed before they lapse.
Why do all JWTs suddenly fail with 403 after a signing key change?
Every token signed with the old key fails once the signing key changes on the Qdrant side, because the signature no longer verifies. Confirm that the key value in the Qdrant configuration matches the key your identity layer uses for signing, and check whether the change was made on every node. Do not assume a restart picked up the new value on all nodes. Check the node logs for signature errors, and compare a freshly issued token against the configured key. Plan key changes as a runbook step that reissues tokens to all clients, since the old tokens will be refused.
What does a 403 from a misconfigured access claim look like?
A misconfigured claim produces a 403 for requests that should succeed, usually because the claim has a wrong field name, wrong structure, a collection name typo, or a permission value Qdrant does not recognize. Decode the token and compare it line by line with the claim format in the security documentation for your version. Test with a minimal claim that grants one collection and one permission, then add fields back one at a time. Validate tokens in a staging cluster before issuing them to production services, and keep the claim template in version control.
Why does a token work on one node but return 403 on another?
Different results across nodes usually point to configuration drift, not to the token itself. One node may run an older or different key, a different claim setting, or a different clock than the others. Send the same request to each node directly, record the status and body, and compare the Qdrant configuration files and versions across the cluster. Make sure every node receives the same configuration through your deployment tooling, and confirm the version of each node before concluding the fault is in the token.
Who should run these checks, and can our own team handle them?
Your own platform or security team can run these checks if they control the identity layer, the Qdrant configuration and the client services. The work is mostly log reading, token decoding and comparing configuration across nodes, so the effort depends on how many services and collections you run and how consistently your deployment is managed. A partner adds value when the scope covers several teams or when the design of claims needs review. Ask any provider to confirm the exact status codes and error bodies for the Qdrant version in your environment, and to include retest steps in the written scope.
Limits to confirm in your Qdrant version and environment
Scoped JWT access depends on details that vary by release and deployment, from claim syntax to how tokens reach the server. The cards below list what to confirm in a test environment before any service receives a token, so the access model you design matches what your Qdrant version actually enforces.
Exact claim syntax for your version
Confirm the precise structure of the access claim your Qdrant version expects, including how collection names, read and write permissions, and any payload restrictions are written. Test each form with a token you sign yourself. Do not copy an example from a blog or forum post without checking it against the security documentation for the release you run. A small syntax error can silently produce a token with broader or narrower rights than you intended.
Qdrant security docsInteraction with admin and read-only keys
Confirm how jwt_rbac behaves alongside the admin and read-only API keys on the same instance. Check whether a request carrying the admin key bypasses collection scoping, and whether a read-only key still limits writes when JWT access control is on. Write one test per key type and record the result. This determines whether the static keys remain a backdoor around your per-collection rules or a fallback you can safely keep.
Endpoints covered by each scope
Map which REST and gRPC endpoints each read or write permission actually governs. Snapshot, cluster, collection management and audit endpoints may fall under different rules than search and point operations. Build a table of every endpoint your services call, then test each one with a read-scoped and a write-scoped token. Any endpoint that is not covered by your scope model is a gap to close with network controls or admin-only keys.
REST and gRPC behavior
Test the same token against both the REST and gRPC interfaces, since clients often use gRPC for bulk writes and REST for simple reads. Confirm that the token is accepted, rejected and scoped identically on both ports, and that a 403 on one transport matches the other. Mismatches can leave a path open that your security review did not examine. Repeat the test after any client library upgrade, because the metadata used to send the token can change.
Cluster-wide propagation of the setting
In a distributed deployment, confirm that the JWT setting and the signing key are applied on every node before relying on it. Restart one node, send a token that should be rejected, and check the response on each node. A node that has not picked up the change can accept requests that the rest of the cluster refuses. Plan this check into each configuration change and into any rolling restart.
Client SDK support for passing tokens
Confirm that the Qdrant client libraries your teams use can send a bearer token on both REST and gRPC calls, and check how each library sets the header or metadata. Some SDK versions may not expose the option, or may require a specific constructor argument. Ask each application team to show a working call with a scoped token and a rejected call on an out-of-scope collection before the service goes live.
What does per-collection JWT access control cost and take to implement?
What drives the cost of per-collection JWT access control?
The main drivers are how many services and collections need separate access, whether an identity layer already issues tokens, and how deeply the setup is tested. Each service needs its own claim design, each collection needs an access entry, and each token path needs verification. Costs have two parts: the internal time your team spends on identity and platform work, and any external engagement you buy for design, build and testing. Qdrant's open-source engine is free to self-host under Apache-2.0, so the spend is labor and infrastructure, not a license. Ask any quote to break out design, build, test and handover as separate line items, tied to a written scope.
Does a team need an existing identity layer before starting?
It helps, but it is not strictly required. If you already run an identity provider that can issue tokens with custom claims, the work is mostly mapping claims to collections and wiring services to request tokens. If you do not, the identity layer becomes part of the project, and that adds design, hosting and administration work. Keycloak is one open-source option for that layer, and it is licensed under Apache 2.0. Confirm with your identity team which token issuer will sign the Qdrant tokens and who owns its signing keys before estimating effort.
Can our own team implement JWT access control without a partner?
Often yes, if your team already runs Qdrant and an identity provider and has engineers who can write token-issuing code. The work is well bounded: enable jwt_rbac, define the access claim, issue tokens from your identity layer, and test each service against its collections. The risk is in the details, such as expiry handling, clock skew and the 403 responses that appear when a claim is wrong. Teams without recent identity or Qdrant experience usually spend more time finding those edge cases. Compare an internal estimate against a fixed-scope quote, and check whether your team has time to run the test cluster through several release cycles.
What do we need to provide before the work starts?
Three inputs make the scope accurate. First, administrative access to the identity layer, so the token issuer, its signing keys and client registrations can be configured and reviewed. Second, a test Qdrant cluster that matches production settings, where enabling jwt_rbac and changing claims cannot affect live services. Third, a collection inventory listing each collection, its owning team, the services that read it, and which of those services write to it. Without the inventory, the least-privilege map is guesswork and the test plan grows. Confirm who approves production changes and how service owners will be contacted during cutover.
What makes the timeline longer or shorter?
Timing depends on the same drivers as cost, plus the speed of your approval and change processes. Timelines shorten when the collection inventory is complete, the identity layer already issues custom claims, and a test cluster is ready on day one. They lengthen when services share collections, when teams need to agree on read and write roles, or when security review of the token design is required. Ask any proposal for milestones with named dependencies, and ask how many change windows are assumed for production rollout. Do not accept a duration that is not tied to a written scope.
Which parts of the work recur after the first rollout?
The initial build is one-time, but several tasks recur. Each new service or collection needs a claim entry and a test. Token expiry and clock skew settings need checking when identity infrastructure changes. Signing key rotation and the handling of tokens issued under older keys need a documented runbook. Qdrant upgrades can change behavior, so access tests should be rerun after each version change. Ask whether a quote includes handover documentation and whether ongoing support is a separate retainer, since DeployOpen offers ongoing support, upgrades and continuous testing as retainers.
Can DeployOpen review our existing JWT setup instead of building it?
Yes. DeployOpen can review an existing per-collection setup by testing it, checking token claims, expiry settings and the mapping between services and collections, and then delivering findings with fixes and a retest. This is scoped the same way as a build: the written scope lists which services, collections and identity components are covered. A review is useful when a team inherited a setup, when a new service is being added, or before a security review. It does not produce an audit report or certification, since independent auditors issue those. Ask the quote to state what the retest covers.
What should a quote for this work include?
A useful quote lists the scope in writing, including the number of services and collections, the identity layer in use and the test environment. It should separate design, build, testing, cutover support and handover, and state which items are one-time versus recurring. Ask for the assumptions behind any effort figure, what the client must provide, what is excluded, and how changes to scope are priced. Request the acceptance criteria for the 403 and token tests, and confirm who owns the resulting configuration after the engagement ends.
How DeployOpen scopes and delivers Qdrant access control
DeployOpen scopes Qdrant access control as a fixed-scope engagement in which the scope, deliverables and timelines are agreed in writing before any work starts. The written scope lists the collections each service or team must reach, the read or write permission each one needs, the Qdrant settings to change on your cluster, and the identity-layer work that issues the tokens. Because the scope is fixed, the decisions about which services get which collections are made once, with your security and platform owners, rather than being reopened during configuration.
The work covers three areas. First, the Qdrant configuration: enabling jwt_rbac, mapping the access claim to collection-level read or write permissions, and setting how the API key and any read-only key coexist with the JWT path. Second, the token issuing design inside your own identity layer, where DeployOpen documents the claims, expiry and clock skew allowances that your identity provider must produce and that your clients must send. Third, testing of both allowed and denied paths, so every service is shown to reach its own collections and receive a 403 on everything else. The handover package contains the configuration, the token design, the test results and the runbook your team operates.
DeployOpen does not publish a price list. A quote follows from the written scope, so the inputs that move it are the number of services and collections, how many identity sources and clients are involved, and whether your team wants testing repeated after changes. Ongoing support, upgrades and continuous testing are available as retainers, which cover work after handover rather than the initial build. Ask any provider, DeployOpen included, to state in writing who issues tokens, who holds signing keys and who owns the retest after a Qdrant upgrade.

