Security overview
Last updated 2026-11-23
This page describes how Mercive: Activity Log is built and run so that a merchant, a reviewer, or a security team can judge it. It lists what we do, not badges. We hold no SOC 2 or ISO certification and do not describe the service as "bank-grade"; if that changes it will be stated here with the report available on request.
1. Architecture in one paragraph
The app runs on a DigitalOcean server in Frankfurt, Germany (EU), which we deploy and manage with Coolify Cloud. On the server, in separate containers, run the app service (the embedded admin UI, the history API for the admin blocks, the MCP endpoint, and these pages), a background worker (diffing, attribution, retention, deletion, exports, billing usage), and one Postgres database. The database is reachable only from the app's own containers on the server. Shopify sends webhooks to a receiver on Cloudflare Workers, which checks the signature, places each webhook in Cloudflare Queues in the EU jurisdiction (webhooks over 120 KB in Cloudflare R2 in the EU jurisdiction), and answers Shopify; the worker collects them from the queue. Error reports go to Sentry's EU region with request bodies, headers, cookies, query strings, tokens, and IP addresses excluded by configuration.
2. Authentication inside the Shopify admin
- The app is embedded and uses Shopify App Bridge session tokens on every admin request. There are no third-party cookies and the app works in browsers that block them.
- Installation uses Shopify managed installation, and we hold one expiring offline access token per store, which the app refreshes before it expires. The production app requests read scopes only and no write scope: products, inventory, themes, discounts, locations, locales, markets, and
read_content, which Shopify requires for the metafield definition webhooks. The app reads no pages, blog posts, or metaobjects. - The webhook receiver only accepts webhook deliveries. Every admin page, the history API used by the admin blocks, and the MCP endpoint exist only on the app service.
3. Webhooks
- Every webhook's HMAC signature is verified with the app secret before anything is queued or stored, at the receiver and again by the worker. An invalid signature is rejected.
- The receiver checks the signature, places the webhook in the queue, and answers Shopify. No business logic runs on that path, which keeps it fast under load and keeps a processing bug from turning into a delivery failure: webhooks wait in the queue until the worker is healthy, for up to 14 days. Webhooks over 120 KB are stored in Cloudflare R2 and deleted after 15 days.
- The worker stores each webhook as one receipt before it removes it from the queue. Redeliveries are deduplicated on the Shopify delivery id (or a content hash when the id is missing). Receipts are kept for 7 days and then deleted.
- Webhooks for a store that has uninstalled are acknowledged and dropped; a late webhook can never resurrect a store or defeat the deletion after uninstall.
4. Assistant access (MCP)
The MCP endpoint at /mcp on the app host is how an assistant the merchant connects reads the log. Its properties:
- Per-store tokens. A merchant creates a token in Settings. The token is generated from 24 random bytes (prefix
mal_), shown exactly once, and only its SHA-256 hash is stored. A token resolves to one store and nothing else; there is no way to address another store with it. - Read-only. The server exposes five tools: search_activity, get_resource_history, who_changed, get_diff, get_usage. None of them writes, and the production app holds no Shopify write scope to begin with, so nothing reachable through MCP can change a store.
- 401 on a bad token. A missing, malformed, revoked, expired, or unknown token gets HTTP 401 with a JSON-RPC error and no further processing. Tokens can carry an expiry date; the merchant can revoke any token at any time in Settings and the revocation is effective on the next request.
- Rate limits. Two token buckets are applied before any database work: per token, 60 requests burst refilling at 1 per second; per client address, 120 requests burst refilling at 2 per second. Over the limit the endpoint answers HTTP 429 with a Retry-After header. The limit exists to blunt a leaked token, not to meter normal use.
- Transport. Streamable HTTP, POST only, JSON-RPC 2.0, over TLS. The last use time of each token is visible in Settings so a merchant can spot a token being used unexpectedly.
5. Encryption in transit
All public endpoints (the app host and the webhook receiver) are served over TLS. The app host uses certificates from Let's Encrypt that Coolify issues and renews; the receiver uses Cloudflare's certificates. Calls to Shopify's Admin API, Shopify's webhook deliveries to the receiver, and the worker's reads from the queue are TLS. Connections from our services to the database stay on the server's internal container network. Error reports to Sentry are TLS.
6. Access policy
- Production access (Coolify, the DigitalOcean server, the database, GitHub, the Shopify Dev Dashboard, Cloudflare, Sentry, UptimeRobot) is held only by Mercive staff who need it.
- There is no customer-facing support tooling that exposes store data. The internal operator view (pipeline health per store: lag, queue depth, failed deliveries, plan, usage) is protected by a separate operator token, is never linked from merchant pages, and shows counts and timestamps rather than log contents.
- Secrets (Shopify app secret, operator token, Sentry DSN, database credentials, Cloudflare API tokens) live only in each service's environment configuration in Coolify or Cloudflare and in a local file that is excluded from version control. We keep a rotation runbook with the order of operations for each.
- Code reaches a running environment only through a pull request; GitHub blocks direct pushes to the staging and main branches and requires a secret scan to pass. The other checks (type check, lint, formatting, architectural boundary check, copy check, tests, build) run on every pull request, and a pull request is merged only when they are green. Coolify deploys the merged branch; nobody deploys by hand.
7. Data handling guarantees enforced in code
- Exactly one code path makes a change durable and counts it for billing, in one transaction; an automated check fails the build if any other module writes those tables.
- Attribution never guesses: when Shopify does not report the actor, the entry is stored and shown as "Actor unknown".
- Compliance reads (price history) use dedicated projections rather than the retention managed log table, so deletion and retention cannot produce an inconsistent answer.
- Deletion on uninstall runs twice over: on Shopify's shop/redact webhook and through a daily sweep of stores uninstalled more than 48 hours earlier.
8. Monitoring
Every process reports errors to Sentry with store payloads excluded. The worker checks in every minute with a Sentry cron monitor (a missed check-in is the dead-worker alert) and reports ingest lag, queue lag, failed deliveries awaiting replay, stores lagging on their own, access tokens that could not be refreshed, and active stores that went silent. UptimeRobot calls the app's health endpoint /healthz from outside every 5 minutes; the check carries no store data. Alerts go to the operating team by email from Sentry and UptimeRobot.
9. Backups and recovery
The database is backed up every hour, and each backup is kept for 7 days on the same server as the database. There is no copy outside that server yet, so a loss of the server would also lose its backups. A restore returns the database to the most recent hourly backup, so changes recorded after that backup can be missing from the log. A restore from backup has been tested on staging. We maintain written runbooks for incident triage, replaying failed deliveries, rolling back a deploy, and restoring the database from a backup.
10. Incident response summary
- Detect. Sentry and UptimeRobot alerts, the operator view, or a merchant report to support@mercive.com.
- Contain. Depending on the incident: pause the affected service, roll back the last deploy, rotate the affected secret, or revoke tokens. The webhook receiver keeps answering so Shopify keeps delivering; webhooks wait in the queue and are processed once the worker is healthy, and failed receipts are replayed.
- Assess. Work out which stores and what data were affected, from the receipts and the operator view, never from guesswork.
- Notify. If personal data held for a merchant was exposed or lost, we notify the installing user's email address without undue delay after becoming aware of it, with what happened, what data, and what we did. Service incidents that caused gaps in the log are announced on the changelog.
- Learn. A short written post-incident note with the cause and the change that prevents recurrence; the change lands through the normal gated pipeline.
11. Reporting a vulnerability
Email support@mercive.com with "Security" in the subject (the operator is Mercive ApS, Copenhagen, Denmark). We keep you informed about your report and credit you if you wish. Please do not test against stores you do not own. We do not run a paid bounty program at this time.