The Simplest Way to Make Cloud SQL and Oracle Work Like They Should
Teams pair cloud sql and oracle to move data between older core systems and new cloud apps. This setup lets apps read fast cloud tables while core records stay in the primary database. Many groups keep core finance data in their legacy database. At the same time, they build new customer apps on managed cloud databases. A clean link between the two systems keeps data fresh for every team. How roles and data work across cloud sql and oracle Data flows between these two databases through change
Your coding agents run with your access.
Claude Code reaches prod with a developer's credentials, and approval prompts get clicked through. hoop.dev checks every query, masks sensitive data, and holds risky changes for a human.
Teams pair cloud sql and oracle to move data between older core systems and new cloud apps. This setup lets apps read fast cloud tables while core records stay in the primary database.
Many groups keep core finance data in their legacy database. At the same time, they build new customer apps on managed cloud databases. A clean link between the two systems keeps data fresh for every team.
How roles and data work across cloud sql and oracle
Data flows between these two databases through change data capture tools or scheduled batch jobs. A sync service reads updates from the source system and writes them to the cloud database. Each side uses a different model for user roles and permissions.
Cloud SQL for PostgreSQL is a managed service, so you cannot make true superuser accounts. Instead, admins use a special cloud superuser role that grants high-level rights. That role lets you set up extensions, event triggers, and replication users.
The default admin user starts without a password, so you must set one before you log in. This default user can create roles and databases, and it belongs to the cloud superuser group. Still, it does not hold raw superuser or replication attributes.
A vendor system user holds the true superuser rights on the cloud instance. Customers cannot change or delete those built-in system roles. On the other side, your legacy database admins manage schema owners and fine-grained table roles.
Common failure modes and how to scope permissions
Problems start when teams use one shared admin account for every sync job and engineer. Shared keys make it impossible to see who ran a bad query or changed a table. If a shared password leaks, an attacker gains wide permissions across your data.
Broad tokens also create big risks during daily work. Engineers often ask for admin roles just to check a single row during an outage. If they keep those high rights, a simple typo can drop a production table.
End-to-End Encryption + SQL Query Filtering: architecture patterns and best practices
Continue reading? Get the full guide.
Free. No spam. Unsubscribe anytime.
Unlogged queries cause headaches during security reviews. When ten people share one database user, audit logs only show the shared account name. Security teams cannot tie a query back to a real person on the team.
You can fix this by giving each sync tool its own narrow database role. Grant read rights only on the exact tables that need to move across systems. On the cloud side, create a dedicated replication user instead of using the default admin account.
Lock down network paths between the two environments as well. Use private network routes and strict firewall rules so only the sync worker can reach both databases. Keep human users off the service accounts, and mask sensitive fields like emails, phone numbers, or card numbers in query results.
Keeping daily operations safe for engineers
Engineers still need to run checks and fix data issues across both databases. Give each person an individual identity tied to your central login provider. Map those identities to read-only database roles for daily checks.
When someone needs to write data or change a schema, require a quick peer review. Log every query with the person's real name and a timestamp. Set up data masking rules so queries rewrite national IDs and card numbers in results before they reach the screen.
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 I create a full superuser account in Cloud SQL for PostgreSQL?
No, the managed service does not let customers create or use true superuser accounts. You use the cloud superuser role instead to set up extensions, event triggers, and replication.
How should we set up the default postgres admin user?
The default admin user starts with no password, so you must set one before logging in. Use it to create narrower roles, and avoid using it for daily app traffic or sync jobs.
How do we stop shared account abuse between both databases?
Give every sync job a single-purpose role with permissions on specific tables only. Require individual logins for engineers so every query links to a real person in your logs.
Related guides
In this post