{}DSA Atlas

Security at Scale

Security as a system-design concern — threat modelling (STRIDE), defence in depth, zero trust and service identity, encryption in transit and at rest with envelope encryption and KMS, secrets management, DDoS protection, bot and abuse prevention, fraud signals, multi-tenancy isolation, data privacy (PII, GDPR deletion, data residency), audit logging and supply-chain security.

Advanced6 interview questions

Defence in depth

edge: anycast DDoS scrubbing · CDN · WAF · bot management · TLS gateway: authN (OIDC/JWT) · rate limits · quotas · schema validation services: mTLS identity · authZ (RBAC/ABAC/ReBAC) · input validation data: encryption at rest · KMS · RLS · least-privilege DB users detection & responseaudit logs · SIEM · anomaly alerts · incident runbooks
Assume any single layer can fail; each layer limits the damage of a breach in the one outside it.

Threat modelling with STRIDE

ThreatProperty violatedTypical mitigations
SpoofingauthenticationMFA, mTLS, signed tokens, passkeys
TamperingintegrityTLS, HMAC/signatures, checksums, immutable logs
Repudiationnon-repudiationtamper-evident audit logs, signed requests
Information disclosureconfidentialityencryption, authorization, data minimisation
Denial of serviceavailabilityrate limiting, autoscaling, CDN, quotas
Elevation of privilegeauthorizationleast privilege, sandboxing, patching

Encryption

serviceplaintext KMS / HSMKEK never leaves AES-GCM with DEK(local, fast) stored objectciphertext+ wrapped DEK+ key ID GenerateDataKey wrapped DEK
Envelope encryption: data keys encrypt data, the KMS master key encrypts data keys.
WhereHow
In transit (external)TLS 1.3, HSTS, modern ciphers, certificate automation
In transit (internal)mTLS via mesh
At restdisk/volume encryption + application-level envelope encryption for sensitive fields
In useconfidential computing (enclaves) for the highly sensitive
PasswordsArgon2id/bcrypt — hashing, not encryption
Tokenisationreplace card numbers/PII with tokens; vault holds the mapping (shrinks PCI scope)

Secrets management

Never in code, images or plain env files in repos. Use a secrets manager (Vault, AWS Secrets Manager, GCP Secret Manager) with fine-grained access policies and audit logs; prefer dynamic, short-lived credentials (Vault DB secrets engine, IAM roles via workload identity) over static keys; rotate automatically; scan repos and images for leaked secrets (pre-commit hooks, GitHub secret scanning).

Abuse, bots and fraud

AbuseControls
Credential stuffing / account takeoverrate limits per account and IP, breached-password checks, MFA/passkeys, risk-based auth (new device/location → step-up)
Scrapingrate limits, bot detection, behavioural fingerprinting, honeypot fields, legal/ToS
Spam / fake accountsphone/email verification, reputation scores, ML classifiers, friction for new accounts
Payment fraudrisk scoring (velocity, device, geography, card BIN), 3-D Secure, manual review queues
Promo / referral abusedevice fingerprint, idempotency and per-user limits, graph analysis of linked accounts

Architecture: an async risk/abuse pipeline consumes events (logins, signups, payments), computes features in streaming (counts per IP/device over windows), scores with rules + ML, and feeds decisions back (block, challenge, review) via a low-latency decision API at the edge.

Multi-tenancy isolation

SQL
-- PostgreSQL row-level security: the database itself enforces tenant isolation
ALTER TABLE invoices ENABLE ROW LEVEL SECURITY;
CREATE POLICY tenant_isolation ON invoices
  USING (tenant_id = current_setting('app.tenant_id')::uuid);

-- per request, in the same transaction/connection:
SET LOCAL app.tenant_id = '6f1c…';   -- derived from the verified token, never from input
SELECT * FROM invoices;               -- only this tenant's rows

Privacy and compliance

TopicDesign implication
Data minimisationcollect only what's needed; TTLs on raw data
PII classificationtag fields; restrict access; mask in logs and non-prod
Right to erasure (GDPR)data inventory + deletion events + crypto-shredding
Data residencyregion-pinned storage and processing (cells per region)
PCI DSStokenise cards via a PSP; keep card data out of your systems
HIPAA / SOC 2access controls, audit logs, encryption, vendor agreements
Audit loggingappend-only, tamper-evident (hash-chained or WORM storage), who did what when

Supply chain security

Pin and verify dependencies (lockfiles, checksums), scan for vulnerabilities (SCA), generate SBOMs, sign build artifacts and images (Sigstore/cosign), enforce provenance (SLSA levels), build in isolated ephemeral CI runners with least-privilege tokens, and admit only signed images into clusters (admission policies).

Interview questions

0 / 6 marked confident

Answer out loud first, then open the model answer. Mark a question confident only when you could explain it to an interviewer without notes.