简体   繁体   中英

Apache JMeter recording issue 403 Apache Tomcat

My application is accessible via Safari browser but while I am recording it using JMeter, after the SSO authentication I am getting a 403 access denied.

It appears to be a certificate related issue, as while recording, the browser prompts that the certificate is not trusted and I hit continue.

The server is Apache Tomcat.

Ia m using JMeter 2.11 and while recording, I am using the HTTPS proxy which is generating the CA certificate in the bin directory.

I also tried installing the certificate in Firefox and tried that too but no luck.

Here is the method I use to test SSL sites with Jmeter:

  1. I recommend using Java 1.7.0_xx
  2. Clone this project and run Jmeter from it: https://github.com/djangofan/run-jmeter-with-plugins-via-build-tools
  3. Open browser, hit the https (SSL) site that you want to test.
  4. If site is https then then the browser will show a “LOCK” icon that specifies its secure.
  5. Open the “Certificate Information” and export the certificate as a .pem or .der file.
  6. In the 'jre/lib/security' folder of the JDK that you started Jmeter with, edit the security.policy file. Comment out the line that says: #jdk.certpath.disabledAlgorithms=MD2, RSA keySize < 1024
  7. Now using java keytool.exe convert exported file to .jks keytool -importcert -alias mycert -file exportedFile.der -keystore jmeterTrustedKeystore.jks -storepass changeit
  8. Restart or re-open Jmeter and use the Options → SSL Manager menu to load the .jks keystore. It should prompt you for the “changeit” password and then Jmeter will remember it.
  9. Create a new SSL request and it should now succeed.

Try the following recommendations from Recording HTTPS Traffic with JMeter's Proxy Server guide, to wit:

  1. Configure your browser to user JMeter's proxy for all protocols
  2. Clear your browser's history, cache, cookies, etc.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM