Case study 1 / Anonymous access · payment boundaries
Lumen Gift
A retailer is replacing its legacy gift-card balance page with a stateless service. Your team must decide whether the proposed launch controls adequately protect cardholders and the payment platform.
150 minutes · Teams of 2–4 · Start here
All organizations, identifiers, incidents and implementation details here are synthetic. This is a design-review exercise, not a running vulnerable application. Evidence describes the proposed release; distinguish documented behavior, inference and unanswered questions.
Your assignment
Review the proposed launch
Lumen operates 1,200 stores in two markets. The balance page receives 180,000 daily inquiries and holiday peaks of 900 requests per second. Users do not need an account. Card numbers and PINs are entered in the browser; only the payment processor may decrypt them. Balance lookup cannot move funds, but the same processor also handles redemption for other applications.
Business requirements
- A cardholder can check a balance without registering. A successful response includes balance, currency, masked number, and a processor account reference.
- Each market has distinct merchant configuration. Store-specific promotional cards can use an alternate merchant.
- The browser retrieves an RSA-OAEP-256 public key and creates compact JWE values using A256GCM. TLS protects every network hop.
- Invalid number, wrong PIN, and frozen-card responses share HTTP 422 and the same body. Origin access is restricted to the gateway through mutual TLS.
Review scope
Include public and assisted ingress, service identities, state stores, downstream effects, failure recovery and telemetry. Assess confidentiality, integrity, availability and business misuse. No source code or live system is available. Do not assume a missing statement proves a missing control.
Decision to deliver
Recommend launch, launch with conditions, or defer. Support that decision with a system model, prioritized threat scenarios, and an architecture review tied to evidence.
Packet A / system understanding
Architecture and operating model
- F1 · token, JWE, selectors
- F2 · validated edge context
- F3 · JWE + corporate token
- F4 · token cache + routing
- F5 · bot verification
Deployment overview supplied by engineering. Supporting identity, telemetry and financial systems are described in the inventory. Derive and redraw trust boundaries yourself.
Component and data inventory
| Component / owner | Data | Responsibility and context |
|---|
| Browser / digital team | Card number, PIN, public key | Public device; encrypts locally; sends market and store selectors |
| Anonymous identity / identity team | JWT: iss, aud, exp, jti | Public token issuance; 15-minute lifetime; no card or market claims |
| Edge and gateway / platform | JWT and network metadata | Validates signature, issuer, audience and expiry; strips inbound X-Edge-* headers |
| Balance service / wallet team | Opaque JWE, selectors, account reference | Resolves merchant; validates bot response; maps processor errors |
| Redis / platform | Corporate bearer token, cached bot decision | Private subnet; TLS and ACL; shared by wallet workloads |
| Payment Hub / payments team | Plaintext card/PIN, ledger, merchant rules | Owns private keys and authoritative card validation |
| Telemetry / operations | Traces, exception attachments | Separate gateway and application collectors; 14-day retention |
Nominal execution
- Browser fetches /wallet/key and obtains an anonymous JWT from the identity service.
- Browser sends POST /gift/balance with two JWE fields, Authorization, X-Client-ID, X-Location-ID, X-Bot-Token and X-Tracking-ID.
- Edge validates JWT. Gateway applies 60 requests/minute per source IP and forwards an edge principal.
- Service resolves the client/store mapping, asks the bot adapter for a decision, and obtains a corporate token.
- Payment Hub decrypts and validates card details under the selected merchant; service maps its response and adds Cache-Control: no-store.
Packet B / implementation evidence
Evidence room
Open this packet after your first decomposition. These extracts come from different teams. Reconcile their meaning across components; none is an endorsed security conclusion. Evidence identifiers belong in your final analysis.
G1 · Gateway deployment excerpt
route: POST /gift/balance
jwt: issuer=anon.lumen.example audience=wallet-public
rateKey: connection.sourceIP
limit: 60/minute; burst: 20
origin: mTLS gateway identity only
requestBodyLimit: 16 KiB
# Anonymous JWT issuance: 120/minute/sourceIP
# Public key endpoint: cached 10 minutes; private key never leaves Hub
The gateway owns network limits. Wallet owns application abuse policy. Neither team operates the processor card-attempt counters.
G2 · Merchant resolution ADR
allowedClientIds = [web-us, web-ca, kiosk-us]
resolve(client, location):
base = clientMappings[client]
if location is present:
return storeMappings[location] ?? base
return base
web-us -> merchant US-RETAIL / USD
web-ca -> merchant CA-RETAIL / CAD
store 1487 -> merchant US-PROMO / USDClient IDs are public identifiers embedded in frontend bundles. Store mappings are maintained by retail operations. The anonymous JWT has audience wallet-public and no client or store claim. Hub accepts the selected merchant if the corporate credential permits it.
G3 · Bot adapter release note
decisionCacheKey = "bot:" + anonymousJwt.jti
positiveDecisionTTL = 600 seconds
verification: provider.success == true
providerTimeout = 800ms
onTimeout = useCachedPositiveElseReject
if X-Bot-Token is absent and client == kiosk-us:
return ACCEPT_COMPAT
Kiosk rollout uses the same public route and JWT audience as web. Provider responses include hostname and challenge timestamp, retained in debug traces; the adapter returns only the success field. A cached positive applies to the JWT rather than the request payload.
G4 · Hub integration contract
oauth scope: gift.balance gift.redeem
credential merchants: US-RETAIL, CA-RETAIL, US-PROMO
redis key: hub:corporate:wallet
refresh: expires_in - 30s
balance request: {merchantId, cardJwe, pinJwe}
JWE checks: alg=RSA-OAEP-256, enc=A256GCM, known kid
card retry counter: merchantId + cardNumber; 8 failures / hour
ciphertext age limit: not configured
response: {balance,currency,maskedNumber,paymentAccountId}The balance service checks the envelope size and ENC_ wrapper; Hub performs authenticated decryption. The service contains no redemption route. Corporate credentials are stored in the secret manager; Redis contains the short-lived access token.
G5 · Observability handoff
application logger: redact cardJwe, pinJwe, Authorization
response headers: Cache-Control: no-store
APM exception attachment: original HTTP request, max 16 KiB
APM capture: downstream timeout or unhandled exception
APM body filter: cardNumber, securityCode
APM header filter: Authorization, Cookie
Support can search APM attachments by caller-supplied tracking ID. Wallet application logs contain no JWE. Security has not yet sampled the collector output; platform considers collector filtering a separate deployment.
G6 · Capacity and error observations
Test cohort IPs JWTs Requests Bot verifications
Office NAT 1 40 120 40
Distributed client 80 80 3200 80
Kiosk compatibility 4 12 160 0
Processor failures: all invalid card/PIN/frozen cases -> 422
p50 invalid-number: 95ms; wrong-PIN: 98ms (small sample)
Synthetic preproduction data. No evidence of actual card compromise. The sample does not establish a reliable timing oracle. A product proposal to remove paymentAccountId from the public response is awaiting a consumer inventory.
Cumulative workshop
Model first. Review second.
Stage 1 · System decomposition / 30 minutes
Use Packet A. Produce a level-one data-flow diagram and a component register. Identify external entities, processes, stores, data classifications, owners and candidate trust boundaries. Annotate every flow with identity, transport, payload and destination authority. Mark what you need to ask.
Stage 2 · Threat modeling / 50 minutes
Open Packet B. Revise your diagram before listing threats. Identify assets and security invariants. For each threat, record actor capability, entry point, boundary crossed, preconditions, sequence, impact and current controls. STRIDE can prompt coverage; include business logic and failure paths. Produce at least six scenarios and select the three that most affect the launch decision.
- Which components can see plaintext, and which can exercise payment authority? Distinguish possession of a token from proof of card ownership.
- Model one distributed abuse path and one path crossing merchant context. State what each actor can control and which downstream constraint might stop them.
- Review whether each bot, encryption, routing and logging control protects the asset claimed. Identify two effective controls that should remain.
Stage 3 · Security architecture review / 55 minutes
For each selected scenario, evaluate whether controls are in the right place and whether their identities, scopes, timing and failure behavior support the claimed protection. Write a finding with evidence, confidence, business impact and severity rationale. Propose a specific change, owning team, acceptance test and residual risk. Separate confirmed design gaps from hypotheses needing validation.
Peer challenge / 15 minutes
Exchange reviews. Ask which evidence would disprove each finding. Find one effective control and one uncertainty that should not become a vulnerability claim. Defend your launch recommendation against the strongest counterargument.
Assessment rubric / 100 points
- Decomposition (25): complete flows and stores (10), authority and ownership (10), explicit assumptions (5).
- Threat model (30): realistic actor and preconditions (10), end-to-end scenarios (10), invariants and prioritization (10).
- Architecture review (35): evidence and confidence (10), control effectiveness (10), actionable mitigation and acceptance test (10), residual risk (5).
- Decision (10): clear launch conditions, owners and treatment of uncertainty. More findings alone do not earn more points.
Your review workspace
Keep an evidence trail
Notes stay in this browser when storage is available. Export before switching devices. No notes are submitted to a server. Avoid entering real customer data.
All case studies · Harbor Membership