Book 9 · Volume VI — Production Architecture & Reliability Engineering · Topic 1.4
Security
Security readiness for launching and operating production services
11 min readStage 4 · Production & architecture10 interview questions
Written byMaheshFounder · Senior Technical Architect
Chapter
Chapter 1 — Production Readiness
Prerequisites
Volume V Chapter 6; Topic 1.1
You will be able to
Assess security readiness for a service launch, run threat modelling, verify identity, data, network and secret controls, confirm vulnerability and detection coverage, prepare incident response, map compliance obligations and document residual risk
Security readiness confirms, before and after launch, that a service's design, code, dependencies, data handling, identity, network exposure and monitoring meet security requirements for its risk level — and that the organisation can detect and respond if something goes wrong. It turns DevSecOps pipeline controls and architecture decisions into launch evidence.
Figure 1 — Security readiness checklist
Figure 2 — Security review in the launch path
Vocabulary
Meaning
Threat model
Structured analysis of threats and mitigations
STRIDE
Spoofing, Tampering, Repudiation, Information disclosure, DoS, Elevation
Residual risk
Risk remaining after controls, formally accepted
Security use case
Detection rule for a specific attack
Table 1 — Terms
2Why It Exists
Launch security gap
Real consequence
Missing object-level authorisation
Customers read others' orders
PII in logs
Data protection breach
No rate limiting
Credential stuffing, scraping
No detection rules
Breach unnoticed for months
Table 2 — Why
Figure 3 — Findings caught before launch (last 12 launches)
3Core Concepts — Security Readiness
Area
Evidence for tier-0/1
Threat model
STRIDE per data flow, reviewed by AppSec
Identity
OIDC for users; mTLS + authorisation policies between services; least-privilege IAM
The order-history API checked authentication but not ownership. The two-user DAST test in the PRR found it; the ownership helper and a SAST rule now prevent recurrence.
6.2 Credential stuffing on launch day
A new login API saw 40k attempts/min from botnets hours after launch. WAF rate rules and bot control, prepared during readiness review, blocked 98% automatically.
6.3 PII in logs
Readiness review sampled logs and found full addresses in debug logs. Log masking for annotated fields was added to the golden-path logging library.
6.4 Worked example — STRIDE table
Threat
Flow
Mitigation
Spoofing
Webhook to merchant
HMAC signature + timestamp
Tampering
Merchant URL input
Allowlist + validation
DoS
Slow merchant endpoint
Timeouts, bulkhead
Table 9 — Structured threats
6.5 Worked example — pen test scope
In scope
Out of scope
APIs, auth flows, business logic
DoS, social engineering
Table 10 — Clear scope
6.6 Worked example — egress control
Control
Detail
Egress via proxy with domain allowlist
Blocks exfiltration and SSRF targets
Table 11 — Outbound matters too
6.7 Worked example — interview whiteboard
Prompt
Answer outline
"What security evidence do you require before launch?"
"Threat model (STRIDE per data flow) with verified mitigations; identity (OIDC, mTLS, least-privilege IAM) and authorisation tests including object-level; data classification with encryption, masking, retention and privacy obligations; secrets in a manager with rotation; network exposure controls (WAF, rate limits, private subnets, egress allowlist, network policies); clean SAST/SCA/container/DAST and pen test for tier-0; SIEM logging and service-specific detection use cases; incident playbooks; compliance mapping; documented residual risk accepted by owners."
Table 12 — Structured answer
6.8 Worked example — PayGrid CDE launch
Extra requirement
Evidence
Segmentation test
Pen tester confirms CDE isolation
Key management
HSM-backed keys, dual control
Table 13 — PCI readiness
6.9 Worked example — anti-patterns
Anti-pattern
Effect
Security review after launch
Expensive fixes
Relying only on scanners
Logic flaws missed
No detection rules
Blind to attacks
Unowned residual risk
Surprises
Table 14 — Common mistakes
6.10 Worked example — security headers
Header
Source
HSTS, CSP, X-Content-Type-Options
CloudFront response headers policy
Table 15 — Central configuration
6.11 Worked example — IAM least privilege
Tool
Use
IAM Access Analyzer policy generation
Tighten role permissions from activity
Table 16 — Evidence-based permissions
6.12 Worked example — security logging content
Event
Fields
Auth success/failure, admin actions, data exports
User, IP, resource, result, trace ID
Table 17 — Useful for investigation
6.13 Worked example — incident response readiness
Item
Detail
Playbooks for credential leak, data exposure
Tested
Forensics: snapshot and log retention
Ready
Table 18 — Prepared to respond
6.14 Worked example — third-party risk
Dependency
Check
SMS provider
Data handling, breach notification terms
Table 19 — Vendors extend the attack surface
6.15 Worked example — privacy by design
Practice
Detail
Collect only needed fields
Minimisation
Deletion API
DPDP rights
Table 20 — Privacy requirements at launch
6.16 Worked example — interview follow-ups
Follow-up
Answer
"Who accepts residual risk?"
Service/product owner with security advice
"Pen test for every launch?"
Tier-0 and major changes; DAST for others
Table 21 — Common probes
6.17 Worked example — checklist
Item
✔
Threat model
✔
Identity + authorisation tests
✔
Data protection
✔
Network exposure controls
✔
Vulnerabilities clean
✔
Detection + response
✔
Table 22 — Security readiness baseline
6.18 Worked example — bot management
Control
Use
AWS WAF Bot Control
Scraping and credential stuffing
Table 23 — Automated abuse
6.19 Worked example — rate limiting in services
Limit
Scope
Per user, per endpoint
Istio local rate limit / Bucket4j
Table 24 — Protect business logic
6.20 Worked example — security SLOs
Metric
Target
Critical vulns open > 7 days
0
Mean time to contain security incidents
< 1 h
Table 25 — Measurable security
6.21 Worked example — interview scenario
Question
Answer
"Launch in 2 days, pen test found high issue"
Fix or mitigate (WAF, flag off feature), else no-go; document
Table 26 — Security is part of go/no-go
6.22 Worked example — secrets readiness
Check
Evidence
No static cloud keys
IAM analysis
Rotation configured
Secrets Manager status
Table 27 — Proven, not assumed
7Common Problems & Mistakes
Mistake
Fix
Late security
Threat model at design
Scanner-only view
Logic tests, pen tests
No monitoring
Use cases
Implicit risk
Documented acceptance
Table 28 — Mistakes and fixes
The most damaging security readiness gaps are usually not missing tools but missing context. Scanners run clean while the service has a broken object-level authorisation check, because no scanner knows that customer A must not read customer B's order. Threat models are written once at design time and never updated, so a later feature such as merchant-supplied webhook URLs introduces SSRF without review. Logging is enabled, but nobody has written a detection rule for the service's own abuse cases, so credential stuffing or bulk exports go unnoticed. Secrets move into Secrets Manager but rotation is never tested, and the first rotation breaks production. Residual risk is accepted implicitly by launching anyway, with no named owner or review date. A readiness review should therefore sample real evidence, such as a two-user test result, a masked log line and a fired test alert, rather than accept a ticked checklist.
8Performance & Production Considerations
Consideration
Practice
WAF latency and false positives
Count mode first
mTLS overhead
Acceptable; monitor
Log volume
Security-relevant events
Table 29 — Operating security controls
Security controls run in the production path, so they need the same operational care as any other component. Deploy new WAF rules in count mode first, review sampled requests for false positives against real traffic for a few days, then switch to block, and keep a fast way to disable a single rule if it starts rejecting customers. Istio mTLS adds a small CPU cost and around a millisecond per hop, which is acceptable for most services but should be measured on latency-sensitive paths such as checkout. Security logging can become expensive, so log security-relevant events in full, such as authentication, authorisation failures, admin actions and data exports, and sample the rest. Route GuardDuty, Security Hub and service-specific alerts to an owned on-call rotation with response targets, and review alert quality monthly so noisy rules are tuned before people start ignoring them.
9Architecture & Design Considerations
Guideline
Detail
Security by design
Threat models
Defence in depth
Layers
Detect and respond
Assume breach
Table 30 — Design guidance
10Interview Questions & Answers
Q1L1 · BasicConcept
What does security readiness cover?
Security readiness covers everything that determines whether a service can be attacked successfully and whether you would notice. That means the design, verified through a threat model; code and dependencies, checked with SAST, SCA, container scanning and DAST, plus a pen test for tier-0; identity and authorisation, including object-level checks and service-to-service mTLS; data protection through classification, encryption, masking and retention; secrets management and rotation; network exposure through WAF, rate limits, private subnets and egress control; and detection and incident response, with SIEM use cases and tested playbooks. It ends with compliance mapping and documented residual risk accepted by the service owner, all backed by evidence.
Q2L1 · BasicConcept
What is STRIDE?
STRIDE is a threat modelling taxonomy from Microsoft that helps you ask structured questions about each data flow and trust boundary. Spoofing is pretending to be another user or system, countered by authentication. Tampering is modifying data or code, countered by integrity controls. Repudiation is denying an action, countered by audit logs. Information disclosure is exposing data, countered by encryption and authorisation. Denial of service is exhausting resources, countered by rate limits and timeouts. Elevation of privilege is gaining rights you should not have, countered by least privilege. For ShopNow's merchant webhooks it surfaced SSRF, replay attacks and slow-endpoint DoS, each with a mitigation.
Q3L2 · IntermediateDesign
How do you test authorisation?
Test authorisation explicitly, because most scanners cannot know your access rules. Start with a role matrix listing which roles may perform which operations, and generate tests that call every endpoint as each role, expecting allow or deny. Then add object-level tests, often called two-user tests: create a resource as user A and try to read, update or delete it as user B, expecting a 404 or 403. Do the same across tenants. Run these in the acceptance stage and as DAST in staging, and add SAST rules that flag controller methods without an ownership check. ShopNow's two-user test caught a broken object-level authorisation flaw in order history before launch.
Q4L2 · IntermediateInternals
How is service-to-service access controlled?
Service-to-service access needs both authentication of the caller and an authorisation decision. In a mesh such as Istio, every workload gets a cryptographic identity, a SPIFFE ID tied to its Kubernetes service account, and sidecars or ambient proxies establish mutual TLS automatically, so the receiver knows exactly which service is calling and traffic is encrypted. AuthorizationPolicy resources then allow only specific principals, methods and paths, such as only checkout may POST to payments. Network policies add a layer-3 and layer-4 boundary underneath, and IAM roles for service accounts control access to AWS APIs. Where there is no mesh, OAuth2 client-credentials tokens with audience checks are the alternative.
Q5L3 · Senior EngineerDesign
How do you prevent PII leaks in logs?
Prevent PII leaks in logs by design rather than by policing. First classify data, so developers know which fields are personal, such as names, phone numbers and addresses. Then build masking into the shared logging library, for example annotations on DTO fields or a Logback converter that masks known patterns, so services get it by default. Log identifiers and trace IDs instead of payloads, keep debug logging off in production, and never log request bodies or credentials. Verify it during readiness reviews by sampling real logs, and add automated scanning of log streams for PII patterns. ShopNow found full addresses in debug logs this way and fixed the golden-path library.
Q6L3 · Senior EngineerDesign
What detection should a new service have?
A new service should send its security-relevant events, such as authentication outcomes, authorisation failures, admin actions and data exports, to the SIEM with user, IP, resource, result and trace ID, alongside platform signals such as CloudTrail, GuardDuty and WAF logs. Generic coverage is not enough, so define service-specific use cases from the threat model. For a login API that means alerting on failure spikes per IP or ASN for credential stuffing; for an export endpoint, unusual export volumes per user. Each use case needs a signal, a threshold, an owner and a response playbook, and should be tested by firing a synthetic event before launch to prove the alert reaches on-call.
Q7L4 · Technical ArchitectTrade-off
When is a pen test required?
Require a pen test where the risk justifies the cost and lead time: tier-0 services handling money, credentials or sensitive personal data, new externally exposed attack surfaces such as a public API or authentication flow, and major architectural changes. Regulation can make it mandatory, as PCI DSS does with annual and post-change penetration tests and segmentation testing for PayGrid's cardholder data environment. Define the scope clearly, usually APIs, authentication and business logic, excluding denial of service and social engineering. For lower-tier services, automated DAST in the pipeline and two-user authorisation tests give continuous coverage. Pen test findings must be fixed or formally accepted before go-live.
Q8L4 · Technical ArchitectScenario
How do WAF rules support readiness?
WAF rules give a service protection at the edge from launch day, before attackers find it. Rate-based rules limit requests per IP on sensitive paths such as login, password reset and OTP, blunting credential stuffing and brute force. AWS WAF Bot Control identifies automated clients for scraping and abuse, managed rule groups block common exploit patterns, and geo or IP reputation rules cut known-bad sources. In readiness review you confirm rules exist for the service's endpoints, were tested in count mode, and alert when they fire. ShopNow's new login API saw 40,000 attempts per minute hours after launch, and prepared rules blocked 98% automatically.
Q9L5 · Solution ArchitectBehavioural
Who owns residual risk?
Residual risk is owned by the accountable business owner of the service, typically the product or service owner, not by the security team. Security advises: it explains the threat, likelihood, impact and available mitigations, and may recommend against launch. But the person accountable for the outcome decides whether the business accepts the remaining risk, and that decision is documented with the risk description, compensating controls, an expiry or review date and the approver's name. For high risks the approval may need to escalate, for example to a CISO or risk committee. Unowned, implicit risk is a common failure, because nobody revisits it when circumstances change.
Q10L5 · Solution ArchitectConcept
How does readiness support compliance?
Readiness evidence and compliance evidence are largely the same artefacts, so collect them once and map them to each obligation. A threat model, encryption configuration, access tests, scan results and pen tests show the controls exist; SIEM use cases and incident playbooks show detection and response. For PayGrid that maps to PCI DSS 4.0 requirements such as segmentation, encryption, logging and testing; for NovaBank to the RBI cyber security framework, including six-hour incident reporting; and for all services to DPDP Act 2023 obligations such as minimisation, consent and breach notification. Storing evidence per launch makes audits a retrieval exercise rather than a scramble to reconstruct.