Mark DeLeap King · markdeleapking.com/writing/security-you-can-keep/ · linkedin.com/in/markdeleap
Security
Security a growing company can keep up
Most security programs fail because nobody has time to maintain the controls they already have. A growing company can keep six: identity, tested tenant isolation, closed admin surfaces, clean secrets, money computed by rules and evidence read from live systems. A first-month and first-year plan follows, along with the questions a board should ask.
Choose controls you can maintain
Most security programs I've seen fail the same way. They begin with a long list, produce a thick document and slowly stop being true. The firewall rule from last spring is still there. The access list nobody reviewed has former contractors on it. The policy says one thing and the system does another.
A short list of controls that machines check on every release stays true without anyone remembering. I prefer a control that fails a build to one that lives in a wiki, so where a control matters I write a test for it.
The six areas below are the ones I put first, in roughly this order. I run them across the live products at CloudVerg.
Identity first
Most breaches involve a credential somewhere, so I begin where people and systems prove who they are.
- Use a standard identity provider with OpenID Connect and OAuth 2.0 and skip writing a sign-in for each product. One identity across many sites keeps the sign-in code in one place, where it can be reviewed and fixed once.
- Offer passkeys. They resist phishing, they're easier for people than passwords, and they cut support load.
- Require two-step sign-in for anything with privilege. Hand out recovery codes at enrollment so a lost phone can be recovered from.
- Enforce a password policy for the accounts that still use passwords, checking length and variety when the password is set.
- Give access tokens a narrow scope and a short life. When an assistant or an integration acts for a person, exchange its token for one scoped to the single site it's calling.
- Make revocation work everywhere. If a person removes an app's access, the next call fails, including on code paths written before the revoke feature existed. Fail closed.
Review who has access on a calendar, quarterly at first. Remove people who changed roles, and check service accounts too, because nobody remembers them.
Tenant isolation, tested on every release
If you run software for more than one customer, the most damaging bug is one customer seeing another's data. It's also an easy bug to write. One query without a workspace filter will do it, or a cached response keyed too loosely, or an export job that never asked who was calling.
Reviewers will miss it sometimes, so build a gate.
- Scope every query to the signed-in workspace by construction. A data layer that takes the workspace from the session leaves little room to forget.
- Write a test that fails any query not scoped to the signed-in workspace, and put it in the standard suite so new code is covered the day it's written.
- Run isolation checks against production after every deploy, with two test workspaces. Request the other workspace's record by its id and expect a 404. A 200 with an empty body is wrong, and so is a 403 that confirms the record exists.
- Check the less obvious paths: exports, webhooks, background jobs, search, caches, file downloads and emailed links.
- Treat a failure as a stop. A deploy that breaks isolation rolls back.
One caution. Any change to how pages stream or cache can alter what a wrong request returns, so re-run the isolation checks after framework upgrades and edge cache changes as well as after feature work.
Zero-trust access to admin surfaces
Admin pages have the most power and the least polish in your product. They're often protected by an obscure address and a shared password, and that isn't protection. Automated scanners find addresses, and shared passwords leak.
- Put admin surfaces behind an access layer that checks identity and device before a request reaches the application. Keep a short list of named people and require two-step sign-in.
- Have the application verify the access token itself. If the layer in front is misconfigured, the application still refuses.
- Keep machines off the public internet where you can. A private mesh network between servers and administrators means internal services don't need public addresses.
- Use time-limited grants for privileged access. Access that expires on its own can't be forgotten.
- Keep a break-glass path in case the identity provider is down, tested and documented. Store it offline and use it rarely.
Start new policies in watch mode, where they log what they would block, and enforce once the log is quiet. That avoids the afternoon where you lock out your own team.
Secrets, and money from rules
Secrets leak through four doors: source code, logs, client bundles and chat. Close each one.
- Keep secrets in the environment or a secrets store and out of the repository. Scan for them in the pipeline and fail the build when one appears.
- Seal stored third-party credentials at rest, so a database copy doesn't hand out access to customers' systems.
- Strip tokens and personal data from logs, error reports and analytics at the point of logging.
- Check what ships to the browser. Anything in a client bundle is public.
- Rotate keys on a schedule, and know how to rotate every one of them before you have to.
Money gets its own rule. At ERPSav, every amount comes from rule engines that do no I/O and are unit tested, and a model only drafts wording that a person approves. When several rules fire on the same line, the expected recovery is the single highest recoverable amount rather than the sum, and hard stops such as late submissions always win. Models draft the wording, and the arithmetic stays in code that can be tested.
Payments follow the same approach. Use the provider's hosted flows, verify webhook signatures, make handlers idempotent and keep a test mode that exercises the same code as production.
Evidence from live state
SOC 2 and ISO 27001 readiness is mostly the work of proving that the controls you describe are operating. Teams collect screenshots in the month before the audit, and the screenshots begin to age the day they're taken.
Collect evidence from live systems on a schedule. Good sources are the identity provider's list of users and their second factors, the cloud account's list of admin holders, the deploy log with each change, its tests and its approver, the tenant isolation check output, and each server's patch state. Each is a query, so it can run weekly and carry a date.
Map each piece of evidence to the control it supports once, and keep the mapping. Customer questionnaires then become lookups, and access reviews finish with an evidence pack showing who had what, who confirmed it and what was removed. I built this into the Verg console as a product, because I wanted the same facts to answer the auditor and the customer's security team.
A framework is a useful checklist. Whether a company needs the full certificate depends on what its customers ask for. The evidence habit pays off either way.
The first month, the first year, and what a board should ask
First month
- Inventory systems, admin accounts and where secrets live.
- Turn on two-step sign-in for every privileged account.
- Put admin surfaces behind an access layer.
- Add the tenant isolation test and the production isolation check to the deploy path.
- Add secret scanning, and remove tokens from logs.
- Write the rollback command and practice it.
First year
- Move sign-in to a single identity provider, with passkeys offered.
- Automate evidence collection and map it to the framework you'll face first.
- Run a quarterly access review, and a tabletop exercise for one realistic incident.
- Build the incident process: who is paged, who decides, who tells customers.
- Have an outside party test the application, and track the findings to closure.
What a board should ask
- Can one customer ever see another's data, and how do you know on this week's release?
- Who can reach production and customer data, and when did someone last review that list?
- How fast can we undo a bad release, and when was it last practiced?
- Where do our secrets live, and how would we rotate them after a leak?
- Is evidence of our controls collected automatically, or assembled before an audit?
- What is our plan if the identity provider or a main vendor is unavailable?
Good answers are short and specific, and they point to a test or a report. If the answer is a long explanation of intent, ask for the evidence. Identity and the isolation test cover the most ground for the least upkeep, so a growing company with a thin security team should start there.