Storybook static build exposure limits without external authentication
0 reputation · 22 Mar 2023, 15:57 UTC
0 reputation · 22 Mar 2023, 15:57 UTC
Determine the practical exposure boundary when deploying a Storybook static build to a hosting platform that lacks built-in access control, and whether the dev server's host binding behavior can be relied on for consistent network isolation.
Storybook core does not ship authentication middleware, IP allowlisting, or a centralized iframe sandbox policy. The dev server's host binding is delegated to the underlying bundler and environment variables, producing inconsistent defaults across Vite, Webpack, and other setups. Static builds emit a self-contained site that inherits the hosting platform's visibility; without a reverse proxy, VPN, or private bucket policy, every story, source snippet, and design token becomes reachable by anyone with the URL. The preview iframe sandbox attributes are configurable but not centrally enforced, leaving isolation guarantees dependent on project-specific configuration.
With no external authentication, a Storybook static build is public by default. No mainstream static host provides zero-configuration private access for an arbitrary static site without a configuration step, and dev server host binding cannot be relied on for consistent network isolation across bundlers without per-project overrides. The minimal preview iframe sandbox that keeps core addon communication working is allow-scripts and allow-same-origin, which limits cross-origin leakage prevention.
One missing diagnostic detail that changes the recommendation: the Storybook version and dev server manager type in your project. Host binding environment variables and default values are version-sensitive and bundler-specific, so the exact variable names and safe values depend on that.
Use comments to ask for clarification. Post a solution as an answer.
No question comments on this page.