Article · Solution Architect – role and craft · Microservices
Security and operations in the design: STRIDE, OAuth2, SLOs and runbooks
How a Solution Architect designs security and operability before any code exists: STRIDE threat modeling on a data flow diagram, OIDC and OAuth2, encryption and secrets, golden signals, SLI/SLO and error budgets, alerts, logs, DR with RTO/RPO, and a runbook with a Prometheus alert rule – using a marketplace order system as the example.
An HLD review of OrderFlow – the new order system at Bazario, a marketplace where several thousand sellers list their offers. The team presents a polished component diagram, and the security representative asks a single question: "Where are the trust boundaries on this diagram?". A minute later the SRE engineer adds another: "How will we know order placement is misbehaving before a customer calls?". Reviewers read the Security and Deployment and operations chapters first – and authors usually write them last, in a hurry.
In this step of the path, Ola, Bazario's Solution Architect, designs both parts for the system from the previous articles: 10,000 orders a day (several times more on Black Friday), order confirmation in under 2 seconds, a full audit trail of status changes, plus GDPR and PCI DSS requirements at the boundary with the payment operator.
- 6
- STRIDE categories – Microsoft's threat model (1999, Loren Kohnfelder and Praerit Garg)
- 43.2 min
- monthly error budget – for a 99.9% SLO over a 30-day window
- 4
- golden signals – latency, traffic, errors and saturation – from Google's SRE book
Who reads these chapters and what they look for
Security and operations have four audiences in an HLD, and each looks for something different:
- The security office – data classification, the threat model, how authentication and encryption work.
- Infrastructure and SRE – SLOs, alerts, the disaster recovery (DR) plan and who is on call.
- Legal and compliance – regulatory compliance. At Bazario that means GDPR (including notifying the supervisory authority of a personal data breach within 72 hours) and PCI DSS – the card data security standard. From the start, Ola designs things so that card data never reaches Bazario's systems at all: the payment form is provided by the payment operator, and only a token and the result come back to the shop.
- Development teams – concrete backlog items: what to implement, which metrics to expose, which libraries to use.
A good chapter answers these people's questions before anyone asks them in a meeting.
Threat modeling in an hour
Threat modeling sounds heavyweight, but in practice it's a 60–90-minute workshop for one key flow. The architect, the tech lead, someone from security (or a security champion from the team) and someone from operations take part. Adam Shostack boils the whole method down to four questions:
- What are we working on? – we draw a Data Flow Diagram (DFD).
- What can go wrong? – we walk the diagram's elements through the STRIDE categories.
- What are we going to do about it? – a control, risk acceptance or a design change.
- Did we do a good job? – verification: tests, review, a pentest.
The most important elements of the diagram are the trust boundaries: places where data moves between zones with different levels of trust. Every arrow that crosses a boundary is a candidate for analysis.
STRIDE is an acronym for six threat categories. Each one violates a single security property, which makes it easy to pick the type of control:
| Category | Property violated | Bazario example | Control |
|---|---|---|---|
| Spoofing | authentication | taking over a customer account with passwords from other breaches (credential stuffing); a fake "payment succeeded" webhook | OIDC with MFA, login attempt limits, webhook signatures verified server-side |
| Tampering | integrity | changing the price in a cart request or the amount in a Kafka message | prices always calculated server-side, ACLs on Kafka topics, checksums on critical events |
| Repudiation | non-repudiation | a support agent claims they never issued a refund, and the logs show nothing | a "who, what, when, from where" audit log in WORM storage, time synchronisation |
| Information disclosure | confidentiality | addresses in logs; GET /orders/1043 returns someone else's order (IDOR) | log masking, encryption, object-level authorization |
| Denial of service | availability | bots buy up a Black Friday promotion and clog the checkout | WAF and bot protection, per-client limits, a queue in front of reservations, timeouts |
| Elevation of privilege | authorization | a seller sees another seller's orders; an agent approves a refund they created themselves | seller (tenant) data isolation, RBAC/ABAC, the four-eyes principle |
The workshop produces a list of threats with a risk rating (likelihood × impact), an owner and a decision. Controls go into the backlog as stories with acceptance criteria, and accepted risks are signed off by the business owner – ideally in an ADR. Also check the OWASP API Security Top 10: since its first edition in 2019, number one has been Broken Object Level Authorization (BOLA) – exactly the GET /orders/1043 case.
Who is who and who may do what: OIDC and OAuth2
Two standards that are often confused:
- OAuth 2.0 (RFC 6749, 2012) is about authorization. The application receives an access token with a scope of permissions, e.g.
orders:write. - OpenID Connect (2014) is an identity layer built on OAuth 2.0. It adds an ID token that says who signed in.
The rest of this article is for members
Create a free account or sign in to read it all. Still ahead:
- Encryption and secrets
- Operational design: how do we know the system works
- Golden signals
- SLI, SLO, SLA and the error budget
- Alerts, logs and traces
- DR: RTO and RPO
- The runbook and the alert rule
- Trade-offs
- Check yourself
- Related topics