Chapter 15Lesson 05~240 minutes

Checkpoint Lab — Web Services, SOAP, Authentication, Tokens, and Session Workflows

The checkpoint tests identity modeling rather than raw traffic volume. Two concurrent virtual users must receive different fake credentials, different session IDs, different token fingerprints, survive one deliberate access-token expiry through refresh, execute a namespace-aware SOAP operation, and logout without leaking token/password values into retained evidence.

CheckpointSession isolationSOAP/XMLExpected 401Redaction

Learning objectives

  • Assign two synthetic credentials to two concurrent JMeter threads.
  • Prove per-thread cookie, access token, refresh token, and session ownership.
  • Validate public/authenticated SOAP/XML operations.
  • Trigger one access-token expiry per thread and preserve the 401 evidence.
  • Refresh and prove protected access succeeds again.
  • Logout, verify zero active sessions, and scan retained artifacts for raw credentials/tokens.

1. Exact assumptions and hard ceilings

Item Checkpoint baseline
JMeter Apache JMeter 5.6.3.
Java Java 17 JDK; JMeter 5.6.3 requires Java 8+.
Plugins None.
Fixture prompt15-auth-soap-fixture-v1, Python standard library.
Target http://127.0.0.1:8000 only.
Credentials Exactly two fake rows.
Threads 2.
Loops 1 journey per thread.
Access-token budget 2 protected operations before expiry.
Expected failure 1 failed 401 token_expired per thread.
Refresh Exactly 1 per thread; no retry loop.
Cleanup Logout per thread; final active_sessions=0.
Retention No raw headers/body/token/password values in retained evidence.
Abort: non-loopback host, >2 threads, repeated login/refresh beyond prediction, >2 active sessions, cross-user session mapping, raw token/password in retained artifacts, or unsafe generator pressure.

2. Setup and preflight

python fixtures/auth_soap_fixture.py --host 127.0.0.1 --port 8000 --log results/auth-events.jsonl
curl --fail --silent http://127.0.0.1:8000/health
curl --fail --silent http://127.0.0.1:8000/stats

Require zero active sessions before starting.

3. Fake credential source

username,password
user01,fake-pass-01
user02,fake-pass-02

CSV Data Set Config: All threads, Recycle=false, Stop Thread=true. Two rows exactly match two users × one login.

4. Checkpoint tree

Test Plan
├── HTTP Request Defaults -> 127.0.0.1:8000
├── CSV Data Set Config -> fake credentials
└── Thread Group — 2 threads × 1 journey
    Action after Sampler error: Continue
    ├── HTTP Cookie Manager
    ├── SOAP Ping -> XML + XPath2 checks
    ├── Login -> extract ACCESS_TOKEN / REFRESH_TOKEN / SESSION_ID
    ├── Profile Before Expiry       # use 1
    ├── SOAP Account Before Expiry  # use 2
    ├── Expired Token Probe         # expected failed 401
    ├── Refresh Token               # rotate tokens
    ├── Profile After Refresh       # verify recovery
    └── Logout                      # invalidate session

5. Predictions before execution

A — isolation: two login events create two different Session IDs; each maps to one username and its own token fingerprints.

B — expiry: Profile + SOAP consume both token uses; the next Profile is one 401/token_expired per thread.

C — refresh: one refresh per thread changes token fingerprints but keeps Session ID/username; post-refresh Profile succeeds.

D — cleanup/security: two logouts leave active_sessions=0; retained JTL/log/events contain no raw token/password/unredacted Authorization value.

6. SOAP/XML contract

SOAP Ping must be well-formed and return Pong=Hello JMeter. Account Summary must be well-formed and XPath2 must verify User=${username}, SessionId=${SESSION_ID}, and AuthState=valid.

7. Preserve expected 401 evidence

Expired Token Probe remains a failed HTTP 401 sample and JSON assertion confirms status=token_expired. Exactly two such failures are expected in this checkpoint; any additional 401 is unexpected.

8. CLI execution with leak-resistant settings

jmeter.bat -n `
  -t plans\checkpoint-auth-soap.jmx `
  -l results\checkpoint\results.jtl `
  -j results\checkpoint\jmeter.log `
  -Jjmeter.save.saveservice.requestHeaders=false `
  -Jjmeter.save.saveservice.responseHeaders=false `
  -Jjmeter.save.saveservice.samplerData=false `
  -Jjmeter.save.saveservice.response_data=false `
  -Jjmeter.save.saveservice.response_data.on_error=false `
  -Jjmeter.save.saveservice.url=false `
  -Jjmeter.save.saveservice.assertion_results_failure_message=true

Record generator CPU/memory. This tiny run must have headroom before target latency is interpreted.

9. Verify session/token evidence

python tools/analyze_auth_events.py results/auth-events.jsonl
curl --fail --silent http://127.0.0.1:8000/stats

Require two session IDs, one username per session, empty cross_user_sessions, two token-expired events, two refreshes, two logouts, zero raw Authorization values, and zero active sessions.

10. Scan retained artifacts

python tools/scan_auth_artifacts.py   results/checkpoint/results.jtl   results/checkpoint/jmeter.log   results/auth-events.jsonl

PASS is mandatory. Do not weaken the scanner to make the checkpoint green.

11. Expected measured operation counts

Operation Count across 2 threads Status
SOAP Ping 2 200
Login 2 200
Profile Before Expiry 2 200
SOAP Account Before Expiry 2 200
Expired Token Probe 2 401 / failed
Refresh 2 200
Profile After Refresh 2 200
Logout 2 204

12. Performance interpretation

Report login, protected JSON, SOAP, refresh, and logout labels separately. SOAP XML parsing/assertions add injector work; login/refresh are identity operations; protected calls are business operations. Aggregate p95 across unlike labels is not an endpoint metric.

State configured load (2×1), achieved valid operation counts, exactly two expected auth failures, generator utilization, and target service timing. Do not extrapolate the tiny loopback result to production capacity.

13. Required evidence packet

Artifact Required content
Fake credential schema Two synthetic rows; no real credentials.
Request sequence SOAP ping → login → JSON → SOAP → expiry → refresh → JSON → logout.
Session evidence Two Session IDs, one user per session, rotated token fingerprints.
Auth failures Exactly two failed 401/token_expired samples.
SOAP evidence XML Assertion + namespace-aware XPath2 results.
Redaction Authorization= target events + artifact scanner PASS.
Results Raw JTL + matching jmeter.log + generator state.
Cleanup Two logout events + final active_sessions=0.

14. Verification checklist

  • Target exactly 127.0.0.1:8000.
  • Two fake rows consumed without recycle.
  • No token stored in JMeter properties.
  • Cookie Manager owns per-thread LABSESSION.
  • SOAP checks stay scoped to SOAP samples.
  • Authorization header uses ${ACCESS_TOKEN}, never literal token.
  • Exactly two expected 401s, then refresh succeeds.
  • Each session maps to one fake username.
  • Artifact scan passes; active_sessions=0.

15. Validity statement

Example: “Using Apache JMeter 5.6.3 and Java 17 against the Python-standard-library prompt15-auth-soap-fixture-v1 on 127.0.0.1:8000, two JMeter threads consumed two synthetic credential rows and established distinct Cookie Manager sessions. Login produced thread-local access/refresh/session variables; protected JSON and namespace-aware SOAP/XML operations succeeded for matching bearer+cookie state. After exactly two protected uses, each access token produced one preserved HTTP 401/token_expired sample; one refresh per thread rotated token fingerprints while retaining session ownership, and protected access succeeded again. Logout left zero active sessions. Retained JTL, jmeter.log, and target events contained no raw access/refresh/password values. This validates identity/session isolation, SOAP/XML checks, expiry/refresh behavior, and evidence hygiene on a tiny local fixture—not production IdP capacity, SSO behavior, HTTPS trust configuration, or large-scale service capacity.”

16. Cleanup / rollback

  1. Verify active_sessions=0.
  2. Stop the local fixture.
  3. Retain redacted JTL/log/event evidence until review completes.
  4. Delete disposable fake credential/result files according to policy.
  5. No real credential/token, public IdP/SOAP service, recorder CA, truststore, RMI engine, database, container, paid service, or system-wide JVM/OS configuration was changed.

17. What Chapter 15 adds to the operating model

The performance-testing operating model now has an identity/session contract: credential source/authorization, per-user session ownership, Cookie Manager scope, access/refresh token stores, auth-header scope, expiry/refresh policy, login frequency, SOAP/XML namespace/assertion contract, TLS/trust boundary, result redaction, auth-failure taxonomy, and logout/session cleanup are reviewed before results become release evidence.

Chapter 16 moves to JDBC Database Load Testing and Connection-Pool Considerations, adding drivers, connection configuration, query/update workloads, transaction/pool contention, database credentials, and datastore telemetry while retaining the same bounded/synthetic/causal-evidence discipline.

Knowledge check

What proves the two JMeter users did not share a session?

Why do the two 401 samples remain failed?

What does successful Refresh prove beyond 200?

Why is artifact scanning part of operational correctness?

What is the Chapter 16 bridge?

Next chapter

JDBC Database Load Testing and Connection-Pool Considerations

Chapter 16 introduces JDBC drivers, connection configuration, queries/updates, transactions, pool sizing/contention, database credentials, and target-side database telemetry.

Official references and version notes

  • Component Reference — HTTP Request, HTTP Cookie Manager, HTTP Authorization Manager, Header Manager, JSON JMESPath Extractor/Assertion, XML Assertion, XPath2 Extractor/Assertion, and result-scope semantics.
  • Elements of a Test Plan — execution/scope and thread-local variable behavior.
  • Getting Started — Java requirements, TLS/runtime basics, and GUI-versus-CLI guidance.
  • Properties Reference — CSV result defaults, request/response header/body retention, TLS defaults, and HTTP client settings.
  • Generating Dashboard Report — required result fields and dashboard interpretation.
  • Best Practices — non-GUI load execution, listener restraint, and injector validity.
  • Apache JMeter downloads — current stable release and Java requirement.
Version and compatibility note

Version-sensitive statements were rechecked against current Apache JMeter primary documentation on 2026-09-05. The course baseline remains Apache JMeter 5.6.3 with a Java 17 JDK for labs and no third-party plugins; JMeter 5.6.3 requires Java 8+. HTTP Cookie Manager keeps a separate server-cookie storage area for each JMeter thread. HTTP Authorization Manager is intended for server authentication such as Basic/Digest/Kerberos challenge workflows; it is not the same thing as an application JSON login that issues bearer/refresh tokens. Passwords entered directly into Authorization Manager are stored unencrypted in the test plan, so this chapter uses synthetic CSV credentials and never embeds real secrets in JMX. XML Assertion checks only that response data is a formally correct XML document. Namespace-aware business checks use XPath2 Assertion/Extractor. The default HTTP sampler is HttpClient4, and JMeter's HTTPS protocol default is TLS; do not weaken JVM certificate algorithm constraints or trust verification to make an authorized environment pass. CSV result defaults keep sampler data, request headers, response headers, and response bodies out of the retained result file, while assertion failure messages remain enabled.

Keep the academy open

Support free, practical DevOps education.

Every lesson is designed to remain readable in a browser, downloadable from GitHub, and usable without a paid learning platform. Contributions help expand and maintain the curriculum.

Ethereum / ERC-20
0x716c4Ab160C4B66F31a28AE2448BfF68fc3a2ef0 Send only Ethereum/ERC-20 compatible assets to this address.