How Drumee Isolates Tenant Data: Multi-Tenant Isolation and Encryption
Multi-tenant data isolation means one customer's data can never be read through another customer's account, even though both run on shared infrastructure. In Drumee, every document carries the ID of the tenant that owns it, every query filters by ...

Drumee tenant isolation: every document carries its tenant ID, every query filters by it, and the server derives the tenant from the resource accessed
Multi-tenant data isolation means one customer's data can never be read through another customer's account, even though both run on shared infrastructure. In Drumee, every document carries the ID of the tenant that owns it, every query filters by it, a build-time check rejects code that does not, and the tenant is always derived on the server from the resource.
This post explains how that works on the hosted service at app.drumee.com, then covers the layers around it: encryption in transit, hashing versus encryption at rest, server-side sessions, retention, and the end-to-end encryption now in development. Facts come from the Data Storage & Encryption and Directory Schema docs.
The short answer
Drumee separates organizations by construction. Tenant data sits in collections where every document carries a tenant_id, every data-access function must filter by it (a static check on every build enforces this), and automated tests attempt cross-tenant reads that must fail. The request never names its tenant: the server derives it from the resource being accessed.
Around that core: TLS on every external connection, passwords and tokens stored only as hashes, server-read secrets sealed with AES-256-GCM, content encrypted at rest at the storage layer, and end-to-end encryption in development, to be released in stages.

How a request finds its tenant: session, membership, tenant, then a tenant-filtered query.
The tenant is the unit of ownership
A tenant owns data. Every person has a personal tenant, created at sign-up with a personal workspace, and an organization is a tenant shared by its members. A tenant contains workspaces, and a workspace holds a file tree, a conversation, a task board, a calendar and members with roles. Storage quota, seats and features are counted per tenant.
Subscribing to a team plan turns a personal tenant into an organization in place, without moving data. That small detail shows the model's intent: ownership is a property of the data, not of where it happens to be stored.
Three stores, and servers that hold nothing
Drumee keeps data in three places:
- Document database (MongoDB, replica set): accounts, organizations, memberships, workspaces, the file tree, messages, tasks, meetings and the audit log. The source of truth.
- Object storage (any S3-compatible store): file content, previews, video renditions, document edit history and exports, under keys that start with
t/<tenant_id>/and contain no file names. - Cache and queues (Redis): role cache, rate limits, sign-in challenges, realtime fan-out and job queues. Nothing here is durable; it can be rebuilt or expires.
Application servers hold no data at all: no files on disk, no sessions in memory. The modular monolith post explains why that keeps servers replaceable, and the file storage post covers the object keys.
Global directory versus tenant data
Drumee splits the database in two:
- The global database (the directory) says who exists, which organizations exist and who belongs to what: accounts, sessions, tenants, memberships, invitations, direct conversations, notifications and billing.
- Tenant data is everything that belongs to one tenant: workspaces, files, workspace chat, tasks, meetings, share links and the audit log.
Memberships live in the directory on purpose. A person can belong to several organizations, and can hold a role in an external workspace of an organization they are not part of. Neither fact could be recorded inside one tenant's data. A workspace_members row names the tenant that owns the workspace, not the member's own tenant, which is what makes outside collaboration possible without merging anyone's data.
Tenant data can sit in a shared pool (every document carries tenant_id) or in a dedicated database for one tenant. The storage layer resolves a tenant ID to its database; code never chooses a database itself, and filters by tenant_id in every query regardless of where it lands. Dedicated placement adds separation; it never replaces the filter.
Isolation by construction: four mechanisms
"We filter by tenant" is a promise many multi-tenant systems make. The difference is whether a single forgotten filter can break it. Drumee enforces the rule mechanically, a property the Technology Overview calls tenant isolation by construction:
- Explicit tenant argument. Every data-access function takes the tenant as an argument and must use it in the query.
- A build-time check. A static check that runs on every build rejects code that does not.
- Prefixed object keys. Object storage keys begin with
t/<tenant_id>/, and content is never deduplicated across tenants. - Adversarial tests. Automated tests attempt cross-tenant reads, and those reads must fail.
Indexes on tenant collections start with tenant_id too, so the filter that protects the data is also the one that makes queries fast.
Why the tenant comes from the resource, not the client
The most important line in Drumee's tenancy design is short: the request never names its tenant. It carries a session and a resource ID, nothing more. The server resolves the rest:
session token -> sessions -> user who is calling?
resource ID -> workspace_members row role + owning tenant
tenant -> tenants (pool | dedicated) where is the data?
query -> filtered by tenant_id every time

Four lookups, none of which trusts a tenant value sent by the client.
Why go to that trouble? If a client could send a tenant ID or header, every endpoint would have to verify that the caller belongs to it, and one missed check would expose another organization's data. Deriving the tenant from the resource removes that class of mistake: there is no client value to tamper with. The service resolves the caller's role in the workspace that owns the resource and passes the tenant explicitly to every query, which the RBAC post describes in detail.
The cost is a membership lookup on each request; Drumee keeps a role cache in Redis for exactly this kind of short-lived state. Something that does not exist and something the caller cannot see both return 404, so probing IDs does not confirm what exists.
Administration and content are separate too. Organization levels govern members, teams, policies and billing, not content: an administrator who is not a member of a workspace cannot open its files or conversations, and nobody but its owner can open a Personal workspace. The organizations and admin post covers that side.
Encryption in transit
Every external connection is encrypted:
- Browser or app to Drumee (API, web app): TLS with HSTS.
- Realtime: TLS (
wss://). - Browser to object storage: TLS, through short-lived URLs presigned for one object.
- Meetings and calls: WebRTC media encrypted in transit (DTLS-SRTP) between each participant and the media server, with signalling over TLS.
Internal links between the server and the database, cache and bundled object storage run as authenticated connections on a private network. The docs are explicit that transport encryption on those internal links depends on the deployment and is not imposed by the application.
Hashing versus encryption at rest

Four layers are in place today; end-to-end encryption of content is in development.
Drumee sorts sensitive values by one question: does the server ever need to read this back?

Hash what you only verify; encrypt what you must use again.
Values nobody reads back are hashed. Account passwords and share-link or meeting-link passwords use Argon2id with 64 MiB of memory and a per-password random salt. Session tokens are stored as the SHA-256 of a random 256-bit token. Verification, reset and invitation codes are SHA-256; one-time email codes and two-factor recovery codes are keyed digests (HMAC-SHA256) bound to the account. A copy of the database therefore contains no password, no usable session and no usable code.
Secrets the server must use later are encrypted. Authenticator (TOTP) seeds, refresh tokens of linked sign-in providers, linked Google Drive tokens and app webhook signing secrets are sealed with AES-256-GCM before they are written:
- One server secret, held outside the database, is the root. A separate key is derived for each purpose with HKDF-SHA256, so the key protecting authenticator seeds is not the key protecting Drive tokens.
- Each value gets a fresh random nonce and is bound to its record, so a sealed value copied onto another account does not decrypt there.
- The server refuses to start in production without this secret, or with a placeholder.
Whoever obtains the database or a backup without the server secret cannot recover these values.
Content at rest, and what end-to-end encryption adds
Files, messages, tasks and documents are the data Drumee exists to serve, search, preview and co-edit. Today they are protected three ways: encrypted in transit, encrypted at rest at the storage layer (volume encryption and bucket-level server-side encryption by the infrastructure), and authorized and tenant-filtered on every read.
End-to-end encryption is in development and will be released in stages; it is not available yet. In the documented model, keys are generated and kept on members' devices, and the server, database, object storage and backups hold ciphertext only. It is adopted by degrees:
- Standard: transport encryption, access control, storage-level encryption at rest.
- Protected space: one conversation, folder, document or meeting is end-to-end encrypted.
- Protected workspace: everything in a workspace.
- Organization policy: an organization requires protection for its workspaces, with managed key recovery.
The design is explicit about the trade-off: the server cannot search, preview, convert or deduplicate what it cannot read; losing every device together with the recovery key means losing the data; and metadata (membership, timing, size) stays visible to the server. Our explainer on end-to-end encrypted workspaces covers the concept more broadly.
Server-side sessions: why a lost device is a non-event
Sessions are opaque tokens stored server-side, not self-contained tokens. Every request looks the session up and checks that it is neither revoked nor expired and that the account is active. A session expires after 30 days without use and after 90 days in any case.
The payoff is revocation. Removing a device from your account ends its session immediately, including any open realtime connection, as the Drumee FAQ notes, and changing a password ends the affected sessions at once. Sign-in uses Argon2id, limits attempts per account and address, and takes the same time whether or not the email exists. Two-factor authentication can be enabled by a user or required by an organization.
Retention and deletion
Nothing is destroyed by a single click, and nothing is kept forever by accident:
- Files, folders and workspaces: 30 days in the trash, then purged; content leaves object storage once nothing references it.
- File versions: kept per the plan's history length, up to 200 per file.
- Accounts: closed at once on deletion; personal data removed after 30 days.
- Notifications: 90 days. Audit log: 1 year. Data exports: the archive is kept for 7 days.
A person can export their data at any time, which requires a recent re-authentication. For EU teams these controls map onto everyday GDPR work: access and portability through export, erasure through account deletion, accountability through the audit log. They support compliance; they do not replace your own processes, as our guide to data sovereignty explains.
FAQ
Can one organization see another organization's data in Drumee?
No. Every stored document names its owning tenant, every query filters by it, and this is enforced by a static check on every build and by automated tests that attempt cross-tenant reads. The tenant is derived on the server from the resource, never taken from the client.
Can an organization administrator read every workspace?
No. Organization levels govern administration (members, teams, policies, billing), not content. An administrator who is not a member of a workspace cannot open its files or conversations, and only its owner can open a Personal workspace.
Is Drumee data encrypted?
Yes, at every layer available today. Traffic uses TLS, passwords and tokens are stored only as hashes, stored secrets are sealed with AES-256-GCM, and content at rest is encrypted at the storage layer. End-to-end encryption is in development and will be released in stages.
What is the difference between hashing and encrypting a secret?
A hash is one-way, so Drumee uses it for values it only needs to verify, such as passwords (Argon2id) and session tokens (SHA-256). Encryption is reversible with a key, so it is used for secrets the server must use later, such as authenticator seeds, sealed with AES-256-GCM under per-purpose keys.
How do I sign out a lost device?
Remove the device from your account. Sessions are stored on the server, so this ends that session immediately and closes any open realtime connection.
Can I run Drumee on my own servers?
Not yet. Drumee runs today as a hosted service at app.drumee.com; the self-hosted edition is coming soon, and moving data from the hosted service to your own deployment is in its final stage on the roadmap.
Conclusion
Drumee's isolation does not rest on remembering to add a filter. It rests on structure: tenant IDs on every document, a build that refuses unfiltered queries, tests that try to break the boundary, and a tenant the client never gets to name. Read how roles decide what happens inside that boundary in the RBAC post, or try Drumee at app.drumee.com.
Try Drumee with your team: your first month is $1. Start your team for $1
Keep reading

Role-Based Access Control for Collaboration Apps: Drumee's RBAC Model
Role-based access control (RBAC) for a collaboration app means permissions follow from a person's role, not from per-file settings. In Drumee, each person holds exactly one role per workspace, on a ladder from Viewer to Owner, and the server check...

Why Drumee Is a Modular Monolith: One Go Binary, Many Modules
A modular monolith is one deployable program split into self-contained modules with explicit boundaries. Drumee is built this way: a single Go binary runs as an API server, a background worker or a migration job, and each domain (files, chat, task...

How Drumee Stores Files: Resumable Uploads to S3-Compatible Storage
Drumee stores every file in two places. What the file is (name, folder, owner, current version) is a node in MongoDB. What the file contains is an object in S3-compatible storage. Browsers upload bytes directly to that storage in resumable par...