Bug 46237 - add skeleton-key http authentication to AccessLogSampler
Summary: add skeleton-key http authentication to AccessLogSampler
Status: NEW
Alias: None
Product: JMeter
Classification: Unclassified
Component: HTTP (show other bugs)
Version: 2.3.2
Hardware: All All
: P4 enhancement (vote)
Target Milestone: ---
Assignee: JMeter issues mailing list
Depends on:
Reported: 2008-11-18 18:48 UTC by Eric Jensen
Modified: 2019-05-15 11:42 UTC (History)
1 user (show)

SkeletonAuthManager.java, SkeletonAuthorizationFilter.java, and FilterChain.java (20.00 KB, patch)
2008-11-18 18:48 UTC, Eric Jensen
Details | Diff
updated version that grabs the username regexp from a property (4.01 KB, patch)
2008-12-18 09:56 UTC, Eric Jensen
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Eric Jensen 2008-11-18 18:48:26 UTC
Created attachment 22889 [details]
SkeletonAuthManager.java, SkeletonAuthorizationFilter.java, and FilterChain.java

The attached source files add a SkeletonAuthorizationFilter for the AccessLogSampler that reads the HTTP basic auth field of the log file and uses it plus a pre-configured skeleton key password via the "skeleton.password" property to authenticate the corresponding request.  This is useful for load testing sites whose logs include behaviors that would differ across users.  The test environment can be updated such that everyone's password is "skeleton" and authentication will be performed appropriately.  

This is achieved without patching any existing jmeter source.  

Also included is a FilterChain which allows specifying multiple filters as properties and calls them all (in no particular order), i.e.

# use cookies per ip (session) and basic auth

PS:  someone should add the ability for the log parsers to stop the test when they hit the end of the file

PPS: i had to implement TestCloneable on these Filters otherwise they would be silently ignored by AccessLogSampler  This is bad behavior and potentially a bug, as LogFilter does not implement it.
Comment 1 Eric Jensen 2008-12-18 09:56:06 UTC
Created attachment 23037 [details]
updated version that grabs the username regexp from a property