Skip to Main Content
Back to blog

// GUIDE · SECURITY & PRIVACY · BEFORE DEVELOPMENT

Which security and privacy decisions should you make before you start building a product?

Security added at the end is a patch. Security defined at the start is a set of decisions about data, permissions and providers — and they are yours, not the developer's.

  • 11 min read
  • By The OneZero team

// THE SHORT ANSWER

In one paragraph

Before development starts, the product owner defines six groups of decisions. Which data the product collects, why each item is needed, and who is responsible for it. Which roles exist and what each role may see and do. What is encrypted in transit and at rest, and who holds the keys. What is backed up, how often, and who has verified that it can be restored. What goes into logs and who gets alerted. And who the third-party providers receiving data are, and what is agreed with them. All of this fits in a page or two without technical knowledge, and it enters the development agreement as requirements. Specific regulatory claims — what the law requires in your field — are not settled here but with legal counsel or an official source.

// TL;DR

The short version — six decisions before the code

DecisionWhat is definedWhat happens without it
DataWhich data is collected, why, and who is responsible for itData is collected "just in case", and then must be kept and protected although it was never needed
PermissionsRoles, and what each role sees and doesEveryone sees everything, and separation between customers is built after the fact
EncryptionWhat is encrypted in transit and at rest, and who holds the keysEncryption exists only where someone remembered, and keys sit in the code
Backups and logsWhat is backed up, who tested a restore, what is recorded and who is alertedA backup nobody has restored, and an incident discovered from the customer
ProvidersWho receives data, which, and under what contractual termsData flows to services nobody has listed
AgreementWhat is required of the supplier, what is handed to the client and who holds accessThe requirements are unwritten, so there is nothing to check at acceptance

Someone commissioning a digital product usually receives a proposal about screens, features and integrations. The security and privacy questions arrive late — typically when a large customer sends a questionnaire, or when something goes wrong. This guide is for the product owner, not the developer: it lists the business decisions to settle before a line of code is written, so the developer builds to them rather than guessing.

Which data you collect, and why — a data inventory

Protecting a piece of data starts with asking whether you need it at all. Data that is not collected cannot leak, cannot be the subject of a deletion request and needs no backup. So the first decision is a data inventory: a table, one row per type of information the product collects, filled in before the detailed specification.

ColumnThe questionWhy it matters
What the data isName, phone, location, payment, content the user creates, usage dataDifferent types need different levels of protection; separate ordinary data from sensitive data
Why it is neededWhich action in the product would not work without itIf there is no answer — do not collect it
Who sees itThe user, the support team, an administrator, an external providerThis is the basis for the permissions defined in the next section
How long it is kept and how it is deletedA period of ___ and a deletion process: manual, automatic, on requestDeletion that was not designed is hard to build later, especially when the data is copied into backups and providers
Who is responsibleA person in the organisation who answers questions about the dataWithout an owner, nobody decides when to delete or who gets access
Fill in the table before the specification. Take the "why it is needed" column to someone who knows the business process — not the developer.
DataWhy neededWho sees itRetention
Name and phoneConfirming and reminding about a bookingThe user, the studio staff___ after the last booking, then deletion
Booking historyShowing past bookings and rebookingThe user; the administrator — in aggregate form only___
Card detailsPaymentNot stored in the product — handled by the payment providerNot applicable to the product
Precise locationNo action needs itNot collectedNot applicable
Note the last two rows: the important decision in the example is what is not collected and not stored. It is the cheapest security there is.

Roles and permissions — who sees and who acts

Permissions are not a setting added at the end; they shape the database structure and the logic of every screen. Changing the permission model after a system is built is among the costlier changes in software. So they are written up front, as a simple table:

QuestionWhat it determines
Which roles exist? (user, administrator, support, external provider)Each role is a separate path of screens and actions to build and test
What does each role see, and what may it change or delete?The difference between "see" and "change" is often the difference between a mistake and damage
Can one customer see another customer's data?In systems that serve several customers or organisations, tenant separation is an architectural decision, not a feature
Who grants a permission, and who removes it when an employee leaves?A permission that is not closed stays open; this needs a process, not just a screen
Which actions need additional verification?Password change, data export, bulk deletion — actions where a mistake or a compromised account costs the most
This table goes into the specification like any screen. If the product is SaaS for multiple customers, the third question is the first to discuss.

For a product that serves several customers in parallel — what changes in scope and architecture when moving from an internal product to SaaS, and which questions to map before starting — there is a separate guide. SaaS development — how to define scope

Encryption — what is encrypted, where, and who holds the keys

A product owner does not need to choose an algorithm. They need to make sure the structural decisions were made and are written down. Encryption lives in three places, each with a business question:

WhereWhat it meansWhat to ask the supplier
In transitInformation moving between the app or browser and the server, and between the server and other services, cannot be read on the wayDoes it cover every connection — including test environments and links between internal services — and not just the public address?
At restInformation stored in the database, files and backups is encrypted, so a stolen copy is unreadable without a keyWhich data, and at what level: the whole disk, sensitive fields separately, or both? And are backups included?
Keys and secretsThe passwords and access keys the system uses — for the database, for providers — are managed in a dedicated place, not in the codeWho holds them, how they are rotated, and what happens when one leaks?
User passwords are not simply encrypted — they are stored in a form from which the password cannot be recovered. If a supplier proposes keeping them "encrypted" so they can be read back, that is a reason to stop and ask.

Backups, recovery and logs

A backup is not what is saved but what can be restored. So the business decision is not "is there a backup" but three questions you answer and pass to the supplier:

  • How much data can you afford to lose? This sets how often backups run. The answer, ___, is a business decision — not a technical one.
  • How long can you afford the system to be down? This sets how fast a restore has to be. Here too — a ___ you define.
  • Who has verified that a restore works? A backup that has never been restored is a hypothesis. Ask for a documented restore exercise before launch and periodically afterwards.
  • Where are backups kept? A copy in the same place the system runs will not help if that place fails, and a copy must be protected to the same level as the data itself.

Logs are the other side: the record of what happened in the system, without which you cannot know whether you were breached, who touched a record and what went wrong. Define which events are recorded (sign-ins, failed sign-ins, permission changes, data exports, administrator actions), how long they are kept and who may read them. And define what does not go into the log: passwords, keys and full personal content are not written in clear text, otherwise the log itself becomes a store of sensitive information. Finally: who is alerted when something suspicious happens, and what they do — without an answer, logs are read only after the damage.

How these pieces fit with the rest of the system — the database, the API, the environments and monitoring — is set out in the anatomy section of the software development page. Custom software development — the anatomy of a system

Third-party providers — where the data goes

A digital product almost never stands alone: payments, messaging, analytics, file storage, maps, sign-in with Google or Apple, and in newer products AI models too. Each such provider is a place data flows to. The decision: a list of every provider, and three answers for each.

QuestionWhat is checkedWhere to find it
Which information is sent to it?Only what the action needs — not a whole customer record when an identifier is enoughIn the data inventory and the integration specification
What may the provider do with the information?Use for the service only, or for other purposes too — including model trainingIn the provider's terms of use and data processing agreement; not in its marketing
What happens if the provider is breached or stops?Can it be replaced, and what happens to the data already with itIn the discussion with the provider before choosing it, not after
If the list includes an AI provider, the boundaries — which data goes to it and under which permission — are part of the pilot plan, covered in the guide on AI pilots.

When the product includes an AI capability, the decision on which data may be sent to the model provider, and under which contractual terms, is closed before the pilot and not after it. An AI pilot for your product — test data and boundaries

What to require in the development agreement

The decisions above are worth something only when they are written as requirements that can be checked at acceptance. A checklist for the conversation with any development supplier, including us:

TopicWhat goes into the agreement or appendix
Data inventory and permissionsThe tables from this guide as an appendix to the specification, with the system checked against them at acceptance
Access and ownershipAccounts, environments, access keys and code in the client's name, and a list of who holds access at any moment
Environments and test dataDevelopment and test environments do not use real customer data without explicit approval
Backup and recoveryThe targets you defined (how much loss, how much downtime) and a documented restore exercise before launch
Security incidentWho reports to whom, over which channel and in what order when a suspected leak is found — without committing to a time that cannot be met
End of engagementHandover of code, keys and documentation, and deletion of data remaining with the supplier
Legal obligationsWhat applies to your product is established with legal counsel, and the requirements it returns enter the specification as requirements
A supplier with no answer to one of the rows has given you useful information: either the topic was not considered, or it is not part of the proposal. Better to find that out before signing.

What we do at this stage

At the specification stage we go through the data inventory, permissions and providers with you, and translate them into requirements that enter the scope. The security service page sets out what we offer beyond that: security reviews, API and cloud security, secrets management, user identity, encryption and monitoring. The page also shows what the process looks like — and exactly what is included and what is not. Information security services

// FAQ

Frequently asked questions

  • What should be defined about security before starting to build an app?+
    Six groups of decisions: which data is collected and why, roles and permissions, what is encrypted and who holds the keys, what is backed up and who verified a restore, what goes into logs, and which third-party providers receive data. They can be written in a page or two and passed on as requirements for the agreement. These decisions shape the structure of the system, so they are easier to make before development than to change after it.
  • Why not add security at the end, before launch?+
    Some security can be added at the end, such as testing for and fixing known vulnerabilities. But decisions such as which data is collected, how customers are separated and whether permissions are defined by role determine the database and screen structure, and changing them after the build is substantial work. So you do both: define the structure at the start and test at the end.
  • Which data is better not collected at all?+
    Any data for which no action in the product would fail without it. Data that is not collected cannot leak, need not be deleted and does not need backup and protection. Payment details, for example, can usually be left with the payment provider and not stored in the product. If data is needed "maybe in the future" — postpone collecting it until it has a use.
  • Is encryption enough to protect the information?+
    No. Encryption protects information moving over a network or a stolen copy, but it does not protect against a user holding a permission they should not have, a leaked password or a key sitting in the code. So encryption is only one of the groups: permissions, secrets management, logs and backups matter equally.
  • Which privacy laws apply to my product?+
    It depends on who the product's users are, which country they are in and what type of data is collected — and the answer also changes over time. So it is not right to take it from a general guide or from the technical supplier. Turn to legal counsel or an official source, and pass us the requirements you receive so we can translate them into the specification.
  • What should I ask a development supplier about security before signing?+
    Ask that accounts, environments and keys be in your name; that real customer data not be used in test environments; that there be a documented restore exercise before launch; that it be clear who reports to whom on a suspected leak; and that at the end of the engagement code and access be handed over and data remaining with the supplier be deleted. A supplier with no answer to one of the items gives you important information before you sign.

Last reviewed:

By The OneZero team

// LET'S TALK

Building an MVP, SaaS, marketplace or AI-mobile product?

Make the architecture decision before you pick a framework by hype — it affects hiring, speed, burn, maintenance, scalability and future rewrites.