Script
Versión 1 (Emilio Penna, Jueves, 29 de Octubre de 2026 00:11:55 -0300)
| 1 | 1 | h1. Script |
|
|---|---|---|---|
| 2 | 1 | ||
| 3 | 1 | h1. JMeter load test script for Shibboleth IdP v5 (Unsolicited SSO) |
|
| 4 | 1 | ||
| 5 | 1 | The JMeter script previously published on the Shibboleth wiki ("Load Testing Contributed Results":https://shibboleth.atlassian.net/wiki/spaces/IDP30/pages/2494726900/Load+Testing+Contributed+Results, IdP v3) is no longer available and does not work as-is with IdP v4/v5. This is an updated and simplified version, tested with IdP 5.2.3 and JMeter 5.6.3. |
|
| 6 | 1 | ||
| 7 | 1 | Script: attachment:shibboleth-unsolicited-sso-v5.jmx |
|
| 8 | 1 | ||
| 9 | 1 | h2. What it does |
|
| 10 | 1 | ||
| 11 | 1 | Each iteration is one complete password login, using IdP-initiated (unsolicited) SSO so that no SP is needed: |
|
| 12 | 1 | ||
| 13 | 1 | |_. # |_. Request |_. Check | |
|
| 14 | 1 | | 01 | @GET /idp/profile/SAML2/Unsolicited/SSO?providerId=...@ (follows the redirect to @?execution=e1sN@) | login form returned; the @execution@ value is extracted | |
|
| 15 | 1 | | 02 | @POST /idp/profile/SAML2/Unsolicited/SSO?execution=...@ with @j_username@, @j_password@, @_eventId_proceed@ | @__Host-shib_idp_session@ cookie set, and the decoded SAMLResponse has @StatusCode@ Success | |
|
| 16 | 1 | ||
| 17 | 1 | The SAMLResponse is *not* posted to the SP: the test measures the IdP only. Cookies are cleared on every iteration, so each login is a new user without a session. |
|
| 18 | 1 | ||
| 19 | 1 | h2. Changes from the original script |
|
| 20 | 1 | ||
| 21 | 1 | * Removed the unused "NoSilver" thread group, the SP steps, and the Module Controller / Test Fragment structure. |
|
| 22 | 1 | * Session cookie assertion updated for v5 (@__Host-shib_idp_session@, @Path=/@). |
|
| 23 | 1 | * @execution@ is extracted from the login form instead of being hard-coded to @e1s1@. |
|
| 24 | 1 | * New assertion that decodes the SAMLResponse and checks the SAML status. |
|
| 25 | 1 | * All settings are JMeter properties (@-J@), so the file does not need editing. |
|
| 26 | 1 | * Fixed the startup delay variable (it was defined as @startupDelay@ and used as @StartupDelay@). |
|
| 27 | 1 | ||
| 28 | 1 | h2. Requirements |
|
| 29 | 1 | ||
| 30 | 1 | * The SP entityID passed as @providerId@ must be in the IdP metadata (any SP entityID works, the SP itself is not contacted). |
|
| 31 | 1 | * A CSV file with test accounts, one @user,password@ per line, no header. Accounts are shared by all threads and recycled. |
|
| 32 | 1 | * Password authentication (@idp.authn.Password@) with the default login form field names. |
|
| 33 | 1 | ||
| 34 | 1 | h2. Parameters |
|
| 35 | 1 | ||
| 36 | 1 | |_. Property |_. Default |_. Description | |
|
| 37 | 1 | | @host@ | idp.example.org | IdP host name | |
|
| 38 | 1 | | @port@ | 443 | | |
|
| 39 | 1 | | @providerId@ | https://sp.example.org/shibboleth | SP entityID | |
|
| 40 | 1 | | @users@ | users.csv | CSV file with accounts | |
|
| 41 | 1 | | @threads@ | 1 | concurrent users | |
|
| 42 | 1 | | @rampup@ | 10 | seconds to start all threads | |
|
| 43 | 1 | | @duration@ | 60 | test duration in seconds | |
|
| 44 | 1 | | @delay@ | 0 | seconds before start | |
|
| 45 | 1 | ||
| 46 | 1 | h2. Running |
|
| 47 | 1 | ||
| 48 | 1 | 1. Smoke test with one thread in the GUI, adding a *View Results Tree* listener, and check there are no errors. Remove the listener afterwards. |
|
| 49 | 1 | ||
| 50 | 1 | 2. Run in non-GUI mode, writing results to a new file each time (JMeter appends to an existing @.jtl@): |
|
| 51 | 1 | ||
| 52 | 1 | <pre> |
|
| 53 | 1 | jmeter -n -t shibboleth-unsolicited-sso-v5.jmx \ |
|
| 54 | 1 | -Jhost=idp.example.org -JproviderId=https://sp.example.org/shibboleth \ |
|
| 55 | 1 | -Jusers=users.csv -Jthreads=25 -Jduration=300 \ |
|
| 56 | 1 | -l result25.jtl -e -o report25/ |
|
| 57 | 1 | </pre> |
|
| 58 | 1 | ||
| 59 | 1 | @-e -o@ generates the JMeter HTML dashboard (throughput, percentiles, errors). |
|
| 60 | 1 | ||
| 61 | 1 | h2. Notes |
|
| 62 | 1 | ||
| 63 | 1 | * One login = 2 samples (01 and 02). JMeter's console summary and the TOTAL row count samples, so use the count of sampler *02* as the number of logins. |
|
| 64 | 1 | * JMeter closes HTTP connections between iterations by default, so every login includes a new TLS handshake (as a new browser would). Add @-Jhttpclient4.reset_state_on_thread_group_iteration=false@ to reuse connections. |
|
| 65 | 1 | * Restart the IdP and discard the first minute (or do a short warm-up run): the first minute is JIT warm-up. |
|
| 66 | 1 | * Run several short tests with increasing thread counts (e.g. 10, 25, 50) rather than a single one, to find where throughput stops growing. |
|
| 67 | 1 | * Monitor the IdP host during the test, e.g. @nmon -f -s 5 -c 720@. |