Quick revision
The short answer
I would run it as a programme with four parts: an inventory of every data store, replica, backup and data flow, including analytics copies; one written standard (verified TLS for all client and replication connections, encrypted volumes and backups with managed keys); enforcement through configuration as code and continuous compliance checks that reject non-TLS connections; and evidence collected automatically from configuration reports, connection statistics and key management logs. Exceptions are tracked with owners and deadlines, so the regulator sees both the state and the plan.
What to remember
In this answer, we treated the regulator's request as a problem of completeness and evidence. We built an inventory from cloud APIs and pipeline definitions that includes replicas, backups and analytics copies, wrote a short testable standard for verified TLS and encrypted storage with managed keys, enforced it with configuration as code such as hostssl rules and require_secure_transport, collected evidence automatically from configuration reports, pg_stat_ssl and KMS logs, and tracked exceptions with owners and deadlines.
Your turn
Answer it aloud as you would in the interview, or type your answer below. Then show one part at a time and compare.
I would run it as a programme with four parts: an inventory of every data store, replica, backup and data flow, including analytics copies; one written standard (verified TLS for all client and replication connections, encrypted volumes and backups with managed keys); enforcement through configuration as code and continuous compliance checks that reject non-TLS connections; and evidence collected automatically from configuration reports, connection statistics and key management logs. Exceptions are tracked with owners and deadlines, so the regulator sees both the state and the plan.
Background to this question
A regulator asking for proof is different from a security team asking for improvement. It is not enough that encryption is mostly on; we have to show, for every copy of customer data, that it is encrypted, how we know, and how we would notice if it stopped being true. With 80 databases plus their replicas, backups and analytics copies, the real difficulty is completeness and evidence, not the encryption settings. In this answer, we will walk through scoping the inventory, writing the standard, enforcing it continuously, producing evidence automatically, and handling the exceptions that every real estate has.
1A Quick Recap of What Must Be Encrypted
Encryption in transit means every network connection that carries customer data uses TLS: application to database, database to replica, backup agent to storage, ETL job to warehouse. Encryption at rest means every place the bytes are stored is encrypted: the database volumes, snapshots, backup files, replica disks and exported files in object storage. The word all in the requirement is what makes it hard, because copies of data appear in places nobody lists, such as a CSV export someone made for an analysis two years ago.
2Inventory Every Copy and Flow
We cannot prove encryption for stores we do not know about, so the inventory comes first and it must be built from evidence, not from asking teams. We pull the list of database instances from each cloud account's API and from configuration management, add replicas and backup locations from each instance's configuration, and add data flows from the ETL and streaming pipeline definitions. Then we ask each owning team to confirm and fill gaps, such as on-premises servers and analytics sandboxes.
The result is a register where each entry has an owner, the data classification, its connections in and out, and its storage locations. The 80 databases usually turn into a few hundred entries once replicas, backups and copies are counted, and that number is itself a useful finding for leadership.
- Inventory from cloud APIs and pipelinesdatabases, replicas, backups, flows
- Write one standardverified TLS, encrypted storage, managed keys
- Enforce as codetemplates, pg_hba, require_secure_transport
- Continuous compliance checksdrift raises an alert and a ticket
- Collect evidence automaticallyconfig reports, TLS stats, KMS logs
- Track exceptionsowner, compensating control, deadline
6 steps in order. Play them, or step through them one at a time.
3One Standard for Everyone
The standard is short and testable. In transit: TLS 1.2 or newer for all client connections, with clients verifying the server certificate (sslmode=verify-full for PostgreSQL drivers, or the equivalent server identity check for MySQL), and the same for replication connections between primary and replicas. At rest: encrypted storage for volumes, snapshots and backups using keys in the company KMS, with key rotation enabled and key access limited to the storage service. Copies in warehouses and object storage follow the same rules.
The reason for keeping it short is that every rule must become an automatic check later. A rule we cannot check, such as encryption must be strong, produces arguments instead of evidence.
4Enforce With Configuration as Code
We make the compliant configuration the default and the non-compliant one impossible or loud. Database templates in the infrastructure code create encrypted storage and server TLS settings, and the server rejects plain connections.
Notice that server-side enforcement matters more than client settings, because the server is the one place where a single setting covers every client. On managed services we use the provider's equivalent parameter, such as a force-SSL option, set through the same infrastructure code. A continuous compliance check then reads the live configuration of every instance daily and opens a ticket when something drifts, such as a manually created database without encrypted storage.
5Collect Evidence Automatically
Evidence is what turns we have configured it into we can prove it. We want three kinds, all generated by jobs rather than screenshots. Configuration reports show, for each inventoried store, the storage encryption flag, the key it uses and the TLS settings. Connection statistics show TLS in actual use: in PostgreSQL the pg_stat_ssl view lists each connection with whether it uses TLS and which version, and in MySQL the session status variable Ssl_version per connection gives the same picture (check your version for the exact tables). A job samples these and reports the share of TLS connections per instance, which should be 100 percent. Key management logs show that keys exist, are rotated and are accessed only by the expected services.
| Control | Automatic evidence |
|---|---|
| Client TLS with verification | share of TLS connections from pg_stat_ssl or MySQL status |
| Plain connections refused | pg_hba and require_secure_transport reports |
| Replication over TLS | replica connection settings and replication TLS status |
| Encrypted volumes and snapshots | cloud API report per instance and snapshot |
| Encrypted backups and copies | backup tool and object storage encryption report |
| Managed keys and rotation | KMS key inventory, rotation and access logs |
The evidence goes into a store that the database teams cannot edit, dated and signed by the job, so an auditor can see the history, not only today's state.
6Track Exceptions Openly
In 80 databases there will be exceptions: a legacy server whose client library cannot verify certificates, a vendor appliance, a replica on old hardware. Hiding them is the worst option, because a regulator who finds one undisclosed gap stops trusting the rest of the evidence. Each exception gets an entry in the register with an owner, the reason, a compensating control such as network isolation, and a deadline, and leadership reviews the list monthly. The report to the regulator then shows coverage, the exceptions and the plan, which is a much stronger position than a claim of perfection.
7Follow-up questions
How do you find data copies that are not in any inventory?
We scan cloud accounts for storage resources and database snapshots, use data discovery tools that sample object storage for personal data patterns, and look at network flow logs for connections to database ports from unexpected sources. Anything found is added to the register with an owner, or deleted if nobody claims it.
Is cloud default encryption at rest enough as evidence?
It covers the storage layer of managed services, and the provider's reports are good evidence for it, but we still need to show which key is used, who can access it and that every instance and snapshot actually has it. Copies outside the managed service, such as exports and on-premises backups, need their own evidence.
What would you report in the first month?
The inventory with its counts, the standard, the current coverage per control from the first automatic reports, and the exception list with deadlines. That shows the regulator the scope is understood and the remaining work is measured.
8Conclusion
In this answer, we treated the regulator's request as a problem of completeness and evidence. We built an inventory from cloud APIs and pipeline definitions that includes replicas, backups and analytics copies, wrote a short testable standard for verified TLS and encrypted storage with managed keys, enforced it with configuration as code such as hostssl rules and require_secure_transport, collected evidence automatically from configuration reports, pg_stat_ssl and KMS logs, and tracked exceptions with owners and deadlines.
Open with
I would treat this as completeness plus evidence. First, an inventory built from the cloud APIs, configuration management and pipeline definitions, not from questionnaires, covering every database, replica, backup location and data flow including ETL jobs and analytics copies; 80 databases usually become a few hundred entries.
Then, if they want more
Second, one short, testable standard: TLS 1.2 or newer with server verification for all client and replication connections, and encrypted volumes, snapshots and backups with keys in our KMS with rotation.
Third, enforcement as code: templates that create compliant instances, server-side rules that refuse plain connections, like hostssl and a hostnossl reject line in pg_hba or require_secure_transport in MySQL, replication configured with verified TLS, and a daily compliance check that opens a ticket on drift.
Fourth, automatic evidence: configuration reports per store, connection statistics from pg_stat_ssl or MySQL's SSL status showing 100 percent TLS, and KMS logs for keys and rotation, stored where database teams cannot change them, with history.
Finally, exceptions such as legacy clients get an owner, a compensating control and a deadline, reviewed monthly, and they are disclosed in the report, because a hidden gap destroys trust in all the other evidence.
About this answer
- Last updated
- 12 November 2026
- Versions it names
- MySQL 8.4
- Checked
- Its structure and format are checked automatically. Use it as a carefully prepared study note: where a detail matters, confirm it against the documentation below. What the checks cover
- Where the question comes from
- Written by Scrivio for practice. It is not taken from an interview.
- Official documentation
- PostgreSQL documentation, MySQL reference manual
Report an issue with this answer
Copy the line below and send it to the author with what you found. It carries the address of this page.
Issue with "Regulators require proof that all customer data is encrypted in transit and at rest...": https://scrivio-interview-library.netlify.app/databases/database-security/3a5d13de27/