DashForDevsDocs
DocsNewsAPI v1
dashfordevs.comSign in

© 2026 DashForDevs

DocsNewsdashfordevs.comLegalStatus
DocsPlatform SecurityThe key hierarchy
Introduction
Getting Started
Authentication
Products
Categories
Cart
Checkout
Blog
Reviews
Webhooks
Customers
Orders
Inventory
Shipping
Discounts
Affiliates
Email
Media & Files
Analytics & Tracking
Locations
Tax
Global Data
SEO
Error Handling
Geography
Finance
Automations
Page Types
Surveys
Billing & Subscriptions
Storefront Payments
SDK Reference
REST API
Storefront Architecture
Notifications
Security
Team & Permissions
Migrations & Import
Calendar & Appointments
Contact Forms
AI Bots
Dashboard API
Deployment
Changelog
Troubleshooting
Recipes
CLI & Deployment
Image Pipeline
White-label Platforms
Records Engine
Platform Modules
Platform Security
The key hierarchyOrigin allowlistsThe encryption modelRequest loggingThe audit trailMFA & staff authHoneypots & rate limiting
Site Keys & Client Sites
Use Cases
Operations

The key hierarchy

pk_/sk_, dfd-platform-*, dfd-site-* — three namespaces, one philosophy.

Updated July 26, 2026

On this page
  • Three namespaces
  • Kinds and environments
  • Shown once, stored hashed
  • Revocation and blast radius

Three namespaces

NamespaceBelongs toReaches
pk_… / sk_…A storefront organizationThe storefront API
dfd-platform-<kind>-key-<env>-…A platform's own dashboard/portal/api/platform/*, gated by module grants
dfd-site-<kind>-key-<env>-…One client website/api/site/* only — never the platform API

The namespaces are deliberately disjoint so a leaked value is instantly identifiable as what it is. A platform key in a website is a configuration bug the format makes visible at a glance.

Kinds and environments

  • secret — server-side only, full access to the granted surface. Constructing a browser client with one throws immediately, and so does putting one in a NEXT_PUBLIC_* variable.
  • public — browser-safe: read-only (site public keys additionally may submit leads and forms — visitor input by nature), and useless without a matching allowed origin.
  • live / test — test-environment keys skip origin/TLS checks for local development; nothing else is relaxed.

Shown once, stored hashed

Key values are minted with 32 bytes of entropy and shown exactly once. Storage is a SHA-256 hash (every lookup goes through it — the plaintext is never used in a query) plus an encrypted copy that superadmins can re-reveal only behind a verified sensitive-operation check, with the reveal landing in the audit log. Dashboards display keys masked to their last four characters.

Revocation and blast radius

  • Revoking a key deactivates it on its next request.
  • Site keys hang off their website record — deleting the site deletes its keys; revoking one client site touches nothing else.
  • Suspending the platform kills every key at once. Data stays put.
  • Keys track last_used_at and a request counter (updated atomically), so a dead key is visibly dead before you revoke it.
PreviousCustomers, portal & teamNextOrigin allowlists

On this page

  • Three namespaces
  • Kinds and environments
  • Shown once, stored hashed
  • Revocation and blast radius