0

我正在尝试测试 KnoxToken 服务背后的应用程序,并且用户需要使用智能卡和他的 PIN。使用 JMeter 测试没有安全功能的应用程序按预期工作。

在这种情况下,我收到一个错误:javax.net.ssl.SSLHandshakeException: Remote host closed connection during handshake

从 Jmeter-> Options -> SSL Manager ,我正在导入在我的机器中找到的证书。当我运行时,系统会提示我输入密码。输入智能卡密码(每个 JMeter 会话一次)后,它似乎继续,但随后又中断了……我认为这解决了智能卡身份验证问题,并且在与 knox 通信时中断了……

从日志文件:

2019-10-25 17:09:42,768 WARN o.a.j.c.KeystoreConfig: https.use.cached.ssl.context property must be set to false to ensure Multiple Certificates are used
2019-10-25 17:09:42,768 INFO o.a.j.c.KeystoreConfig: Configuring Keystore with (preload: 'True', startIndex: 0, endIndex: -1, clientCertAliasVarName: 'certAlias')
2019-10-25 17:09:42,768 INFO o.a.j.u.SSLManager: JmeterKeyStore Location: C:\Users\MI\Desktop\FFFRootCA21.crt type JKS
2019-10-25 17:09:42,768 INFO o.a.j.u.SSLManager: KeyStore created OK
2019-10-25 17:09:47,648 ERROR o.a.j.u.SSLManager: Problem loading keystore: Invalid keystore format
java.io.IOException: Invalid keystore format
    at sun.security.provider.JavaKeyStore.engineLoad(Unknown Source) ~[?:1.8.0_171]
    at sun.security.provider.JavaKeyStore$JKS.engineLoad(Unknown Source) ~[?:1.8.0_171]
    at sun.security.provider.KeyStoreDelegator.engineLoad(Unknown Source) ~[?:1.8.0_171]
    at sun.security.provider.JavaKeyStore$DualFormatJKS.engineLoad(Unknown Source) ~[?:1.8.0_171]
    at java.security.KeyStore.load(Unknown Source) ~[?:1.8.0_171]
    at org.apache.jmeter.util.keystore.JmeterKeyStore.load(JmeterKeyStore.java:117) ~[ApacheJMeter_core.jar:5.1.1 r1855137]
    at org.apache.jmeter.util.SSLManager.getKeyStore(SSLManager.java:132) [ApacheJMeter_core.jar:5.1.1 r1855137]
    at org.apache.jmeter.util.SSLManager.configureKeystore(SSLManager.java:290) [ApacheJMeter_core.jar:5.1.1 r1855137]
    at org.apache.jmeter.config.KeystoreConfig.testStarted(KeystoreConfig.java:99) [ApacheJMeter_components.jar:5.1.1 r1855137]
    at org.apache.jmeter.config.KeystoreConfig.testStarted(KeystoreConfig.java:63) [ApacheJMeter_components.jar:5.1.1 r1855137]
    at org.apache.jmeter.engine.StandardJMeterEngine.notifyTestListenersOfStart(StandardJMeterEngine.java:206) [ApacheJMeter_core.jar:5.1.1 r1855137]
    at org.apache.jmeter.engine.StandardJMeterEngine.run(StandardJMeterEngine.java:381) [ApacheJMeter_core.jar:5.1.1 r1855137]
    at java.lang.Thread.run(Unknown Source) [?:1.8.0_171]

2019-10-25 17:09:47,857 WARN o.a.j.p.h.s.HTTPSamplerBase: Existing CookieManager HTTP Cookie Manager superseded by HTTP Cookie Manager

2019-10-25 17:09:47,862 WARN o.a.j.p.h.c.KerberosManager: Could not log in user 
javax.security.auth.login.LoginException: No LoginModules configured for JMeter
    at javax.security.auth.login.LoginContext.init(Unknown Source) ~[?:1.8.0_171]
    at javax.security.auth.login.LoginContext.<init>(Unknown Source) ~[?:1.8.0_171]
    at org.apache.jmeter.protocol.http.control.KerberosManager.lambda$getSubjectForUser$0(KerberosManager.java:68) ~[ApacheJMeter_http.jar:5.1.1 r1855137]
    at java.util.concurrent.FutureTask.run(Unknown Source) [?:1.8.0_171]
    at org.apache.jmeter.protocol.http.control.KerberosManager.getSubjectForUser(KerberosManager.java:83) [ApacheJMeter_http.jar:5.1.1 r1855137]
    at org.apache.jmeter.protocol.http.control.AuthManager.getSubjectForUrl(AuthManager.java:294) [ApacheJMeter_http.jar:5.1.1 r1855137]
    at org.apache.jmeter.protocol.http.sampler.HTTPHC4Impl.executeRequest(HTTPHC4Impl.java:831) [ApacheJMeter_http.jar:5.1.1 r1855137]
    at org.apache.jmeter.protocol.http.sampler.HTTPHC4Impl.sample(HTTPHC4Impl.java:574) [ApacheJMeter_http.jar:5.1.1 r1855137]
    at org.apache.jmeter.protocol.http.sampler.HTTPSamplerProxy.sample(HTTPSamplerProxy.java:67) [ApacheJMeter_http.jar:5.1.1 r1855137]
    at org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase.sample(HTTPSamplerBase.java:1231) [ApacheJMeter_http.jar:5.1.1 r1855137]
    at org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase.sample(HTTPSamplerBase.java:1220) [ApacheJMeter_http.jar:5.1.1 r1855137]
    at org.apache.jmeter.threads.JMeterThread.doSampling(JMeterThread.java:622) [ApacheJMeter_core.jar:5.1.1 r1855137]
    at org.apache.jmeter.threads.JMeterThread.executeSamplePackage(JMeterThread.java:546) [ApacheJMeter_core.jar:5.1.1 r1855137]
    at org.apache.jmeter.threads.JMeterThread.processSampler(JMeterThread.java:486) [ApacheJMeter_core.jar:5.1.1 r1855137]
    at org.apache.jmeter.threads.JMeterThread.run(JMeterThread.java:253) [ApacheJMeter_core.jar:5.1.1 r1855137]
    at java.lang.Thread.run(Unknown Source) [?:1.8.0_171]

thank you
4

1 回答 1

1

查看No LoginModules configured for JMeter部分日志,您似乎正在尝试测试使用Kerberos的应用程序

所以我的期望是您应该在jaas.confkrb5.conf文件中执行正确的配置(都位于 JMeter 安装的“bin”文件夹中),配置必须与您的应用程序 Kerberos 详细信息相匹配。

查看使用 Apache JMeter 的 Windows 身份验证文章,了解如何设置 JMeter 以绕过 Kerberos 登录挑战。

于 2019-10-28T13:45:52.477 回答