Separate Production and Development

Published
Length
3 min read

Luis Felipe Dias

All posts

You separate production and development by putting them in different cloud accounts and networks. You also assign distinct roles and login keys to each setup. Many teams start with one shared database and network to save time. When permissions stay too broad, a bad test script can wipe live customer data. How to separate production and development in your architecture First, create two distinct cloud accounts for your team. One account holds live apps and real user data. The other account hol

Customer Support Access to Production + Security Program Development: the complete guide

Architecture patterns, implementation strategies, and security best practices. Delivered to your inbox.

Free white paper. No spam. Unsubscribe anytime.

You separate production and development by putting them in different cloud accounts and networks. You also assign distinct roles and login keys to each setup. Many teams start with one shared database and network to save time. When permissions stay too broad, a bad test script can wipe live customer data.

How to separate production and development in your architecture

First, create two distinct cloud accounts for your team. One account holds live apps and real user data. The other account holds test apps and fake data. This split stops a test bug from taking down live services.

Next, set up distinct private networks for each account. Block all direct network traffic between the test system and the live system. An app in the test network must not talk to a live database. Give each network its own DNS rules and firewall checks.

Then, split your identity and role setup across the two accounts. Map your team directory to distinct roles for test and live tasks. Developers get broad write roles in the test account to build features fast. In the live account, most developers get no default role at all.

Finally, use separate secret stores and deployment pipelines for each system. Keep test keys in the test store and live keys in the live store. Your build pipeline should push code to the test system first. Only approved code moves to the live system through a separate role.

What native separation solves and what it misses

Account and network splits stop accidental cross-talk between test code and live data. A broken test app cannot reach over the network to drop a live table. Stolen test keys will not let an attacker log in to live servers. Auditors also want to see this clear boundary between systems.

Still, engineers still need to fix live bugs and check data issues. Native account splits only decide who can log in to a network or server. Once an engineer logs in to fix a bug, they hold full role rights. The native setup does not check each command or query in flight.

Customer Support Access to Production + Security Program Development: architecture patterns and best practices

Continue reading? Get the full guide.

Free. No spam. Unsubscribe anytime.

Shared admin roles in live systems also leave a wide gap. If ten people use one database role, the audit log shows one generic name. You cannot tell who ran a bad write command during an outage. Also, query results return raw emails, phone numbers, and card numbers to the screen.

How to manage safe data and admin tasks across systems

Never copy raw live databases into your test account for testing. If you need real shapes of data, scrub sensitive fields before moving them. Replace emails, phone numbers, and national IDs with fake values in the test copy. This step keeps test accounts safe even when many developers have full access.

For live systems, remove standing write roles from human users. Let your deployment tools push changes through automated checks instead. When a human must run a live command, require a peer to approve that task. Keep the scope of that task small and log every single command.

Add runtime guardrails and masking beside your databases and APIs

Login rules, role grants, and CI checks govern who connects to your stack. Yet any allowed script, engineer, or AI agent still runs commands with the full scope of its role. For workloads on Postgres, MySQL, SQL Server, MongoDB, ClickHouse, Kubernetes, SSH, or internal HTTP services, hoop.dev sits beside the service as an open-source proxy, a sidecar for your database or API.

Before a query runs, hoop.dev guardrails check the statement against your rules. An AI Analyzer you configure can score intent or hold risky calls for human review. Next, hoop.dev data masking rewrites sensitive fields in responses, and each verdict is logged per listener. Explore the MIT-licensed project on GitHub.

Frequently asked questions

Can we use one Kubernetes cluster to separate production and development?

Using namespaces in one cluster is risky for strict isolation. A noisy test pod or a cluster admin bug can break live apps. Use separate clusters in distinct cloud accounts for true isolation.

Should developers use the same login keys for test and live systems?

No, never reuse SSH keys, API tokens, or database passwords across systems. If a test key leaks in a code repo, live data stays safe. Issue unique keys per system and rotate them often.

How do we test database migrations if live data stays locked down?

Run your schema changes against a test database filled with fake data first. You can generate fake emails and card numbers that match your live table shapes. This tests performance and rules without risking real user records.

Save the open-source gateway.

hoop is MIT-licensed infrastructure for controlling how AI agents reach production data. Star hoophq/hoop so you can inspect it, deploy it, or share it when your team starts governing agent access.