APPSECENGINEER / ARCHITECTURE LAB
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

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

Lumen Gift deployment overviewF1 links client to ingress, F2 ingress to application, F3 application to core system, F4 application to state and F5 application to external integration. Boundaries shown are deployment ownership; trainees must derive trust boundaries.Company-operated servicesBrowserEdge + gatewayBalance servicePayment HubRedis / configBot providerF1F2F3F4F5

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 / ownerDataResponsibility and context
Browser / digital teamCard number, PIN, public keyPublic device; encrypts locally; sends market and store selectors
Anonymous identity / identity teamJWT: iss, aud, exp, jtiPublic token issuance; 15-minute lifetime; no card or market claims
Edge and gateway / platformJWT and network metadataValidates signature, issuer, audience and expiry; strips inbound X-Edge-* headers
Balance service / wallet teamOpaque JWE, selectors, account referenceResolves merchant; validates bot response; maps processor errors
Redis / platformCorporate bearer token, cached bot decisionPrivate subnet; TLS and ACL; shared by wallet workloads
Payment Hub / payments teamPlaintext card/PIN, ledger, merchant rulesOwns private keys and authoritative card validation
Telemetry / operationsTraces, exception attachmentsSeparate gateway and application collectors; 14-day retention

Nominal execution

  1. Browser fetches /wallet/key and obtains an anonymous JWT from the identity service.
  2. Browser sends POST /gift/balance with two JWE fields, Authorization, X-Client-ID, X-Location-ID, X-Bot-Token and X-Tracking-ID.
  3. Edge validates JWT. Gateway applies 60 requests/minute per source IP and forwards an edge principal.
  4. Service resolves the client/store mapping, asks the bot adapter for a decision, and obtains a corporate token.
  5. 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 / USD

Client 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.

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

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