https://issues.apache.org/bugzilla/show_bug.cgi?id=54977
Bug ID: 54977
Summary: As a Jmeter user, I want to choose the client alias
for the cert key in JsseSslManager such that Mutual
SSL auth testing can be made more flexible
Product: JMeter
Version: 2.9
Hardware: Macintosh
Status: NEW
Severity: enhancement
Priority: P2
Component: Main
Assignee: [email protected]
Reporter: [email protected]
Classification: Unclassified
Currently, in JsseSSLManager the alias selection is managed soley by the
incrementing key index value. The user cannot override the selection of a
specific client alias for a thread in ThreadGroup. This makes testing Mutual
SSL auth impossible to do if each thread must be assigned a specific client
alias. One potential approach is to handle this is to allow the user to define
a hint variable in the thread and parse that in
WrappedX509KeyManager.chooseClientAlias() as such:
> diff JsseSSLManager.java JsseSSLManager.java.proposed
42a43
> import org.apache.jmeter.threads.JMeterContextService;
397c398,407
< String alias = this.store.getAlias();
---
>
> // Give the user a choice to select the alias by reading an alias
> hint from
> // a thread local variable
> String aliasHint =
> JMeterContextService.getContext().getVariables().
> get("jmeter.keystore.alias.hint");
> String alias = aliasHint;
> if (alias == null) {
> alias = this.store.getAlias();
> }
A better, long term approach is to improve KeyStoreConfiguration to allow a
thread local variable to specify the alias for the cert key but this requires
the SSLManager to not be a singleton or to process thread local variables as
above.
Note that chooseClientAlias() has a comment currently that suggests allowing
the user to choose the client alias is already on the TODO list:
TODO? - does not actually allow the user to choose an alias at present
--
You are receiving this mail because:
You are the assignee for the bug.