How store context and permissions work together EN
Follow a store request through identity, application checks and data access, including the limits of a conceptual security model.
A store selector is useful only if the selected store also constrains the work behind the screen. Kaduno uses identity, application-level context and data-access controls together. This article explains that model for a technical buyer; it is not a penetration-test report or confirmation of a particular production release.
Source review date: 13 November 2026. Production deployment verification and technical-owner sign-off remain separate. No performance measurements are claimed.
A logical request path
Person or authorised client
|
v
Identity + permitted organisation/store
|
v
Application checks: role / scope / operation
|
v
Store-scoped repository and database context
|
v
Allowed records or a refused / empty resultRead this diagram from top to bottom. It describes responsibilities, not server locations or the exact call order of every API. Browser sessions, REST keys and MCP connections enter through different authentication paths. Background jobs and platform operations need their own context and are not fully represented here.
Store and organisation are different scopes
A company can operate multiple stores. Store-owned records and organisation-level records therefore need different ownership rules. A user who can open one store must not be treated as entitled to every store merely because a company exists.
For normal staff work, the selected store is the intended boundary. The shared scope helper returns that store, and record checks can reject a different store with a not-found result. A not-found response is not proof that a record does not exist somewhere else; it can avoid disclosing records outside the caller's scope.
When ordinary staff have no selected store, the scope helper uses a no-match context rather than interpreting the omission as permission to list all stores. This does not mean every store-less process in the platform is equivalent to an ordinary staff request. Do not generalise a helper's behaviour into a guarantee about every transaction, job or integration.
Several controls, different responsibilities
| Control | What it contributes | What it does not establish alone |
|---|---|---|
| Admin routing | Directs staff to a store workspace and distinguishes platform administration | A hidden page or redirect does not prove API authorisation |
| Request and record checks | Apply actor, role and selected-store rules to supported operations | One protected endpoint does not verify every operation |
| Repository/query scoping | Filters store-owned records and handles organisation, shared and related records according to their policy | A custom query or new model still needs correct integration and tests |
| Database row-security context | Adds database-level controls using the context set for a transaction | The existence of row security is not proof that every caller/context is constrained identically |
The reviewed source contains special platform paths and context-propagation requirements. Coverage and enforcement must be assessed for the deployed release, including background processing and custom integrations. It would be inaccurate to describe the architecture as impossible to bypass or universally fail-closed.
Deliberate exceptions need deliberate review
Platform administration has a separate controlled scope for platform work. It is not the same as opening a normal store with a more powerful role. A client should not gain it merely by naming another store or sending an arbitrary header. Verify the server-side authentication and operation contract rather than relying on UI labels.
Group reporting is a specific cross-company feature. Its model combines scoped reads from eligible stores the viewer can access; the existence of a group does not grant membership or general cross-store write permission. Module activation, organisation role and applicable access requirements constrain the included stores. Do not use a group report as a precedent for unrestricted cross-store queries in a new integration.
Organisation-level data and expressly permitted cross-store administration have their own contracts. Determine the owner and authorised target of each operation. Do not assume every record should be copied into every storefront, or that a shared organisation removes store-specific restrictions.
A practical verification matrix
Use synthetic data in an agreed test environment. The following are test cases to run, not results already obtained for your installation:
| Scenario | What to verify |
|---|---|
| Staff member in store A | Only permitted store-A records and organisation-level data are available |
| A record belonging to store B | The ordinary store-A operation does not disclose or modify it |
| Ordinary staff with no selected store | No unrestricted store-data result; follow the supported store-selection flow |
| A lower-privilege role | Direct API access is refused where the role is insufficient, even if a URL is known |
| An eligible group report | Included stores and exclusions match the viewer's access and configured feature |
| A background job or integration | Explicit identity, store context and permitted operation are verified separately |
A failed isolation test is not an invitation to inspect another customer's data. Stop, preserve minimal redacted evidence and report privately through the agreed security channel. Do not repeat a write after an uncertain result without checking whether it already occurred.
Evidence to request before acceptance
Ask for the tested release, environment, relevant configuration, identities/roles, synthetic fixtures, observed allowed and denied outcomes, and a named reviewer. Separate implemented mechanisms from tested deployment behaviour. Benchmarking row-security overhead additionally needs a reproducible workload and measurement method; this article provides neither a benchmark nor a performance promise.
Continue with modules and integration boundaries, read-only API access and security and its review status.