Script¶
JMeter load test script for Shibboleth IdP v5 (Unsolicited SSO)¶
The JMeter script previously published on the Shibboleth wiki (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.
Script: shibboleth-unsolicited-sso-v5.jmx
What it does¶
Each iteration is one complete password login, using IdP-initiated (unsolicited) SSO so that no SP is needed:
| # | Request | Check |
|---|---|---|
| 01 | GET /idp/profile/SAML2/Unsolicited/SSO?providerId=... (follows the redirect to ?execution=e1sN) |
login form returned; the execution value is extracted |
| 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 |
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.
Changes from the original script¶
- Removed the unused "NoSilver" thread group, the SP steps, and the Module Controller / Test Fragment structure.
- Session cookie assertion updated for v5 (
__Host-shib_idp_session,Path=/). executionis extracted from the login form instead of being hard-coded toe1s1.- New assertion that decodes the SAMLResponse and checks the SAML status.
- All settings are JMeter properties (
-J), so the file does not need editing. - Fixed the startup delay variable (it was defined as
startupDelayand used asStartupDelay).
Requirements¶
- The SP entityID passed as
providerIdmust be in the IdP metadata (any SP entityID works, the SP itself is not contacted). - A CSV file with test accounts, one
user,passwordper line, no header. Accounts are shared by all threads and recycled. - Password authentication (
idp.authn.Password) with the default login form field names.
Parameters¶
| Property | Default | Description |
|---|---|---|
host |
idp.example.org | IdP host name |
port |
443 | |
providerId |
https://sp.example.org/shibboleth | SP entityID |
users |
users.csv | CSV file with accounts |
threads |
1 | concurrent users |
rampup |
10 | seconds to start all threads |
duration |
60 | test duration in seconds |
delay |
0 | seconds before start |
Running¶
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.
2. Run in non-GUI mode, writing results to a new file each time (JMeter appends to an existing .jtl):
jmeter -n -t shibboleth-unsolicited-sso-v5.jmx \ -Jhost=idp.example.org -JproviderId=https://sp.example.org/shibboleth \ -Jusers=users.csv -Jthreads=25 -Jduration=300 \ -l result25.jtl -e -o report25/
-e -o generates the JMeter HTML dashboard (throughput, percentiles, errors).
Notes¶
- 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.
- 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=falseto reuse connections. - Restart the IdP and discard the first minute (or do a short warm-up run): the first minute is JIT warm-up.
- Run several short tests with increasing thread counts (e.g. 10, 25, 50) rather than a single one, to find where throughput stops growing.
- Monitor the IdP host during the test, e.g.
nmon -f -s 5 -c 720.