scravy / waitfor-maven-plugin

Wait for a URL to become available
BSD 2-Clause "Simplified" License
7 stars 4 forks source link

Add an option to accept insecure URLs #8

Closed toschder closed 2 years ago

toschder commented 3 years ago

The service I´m currently testing is using a certificate which is not globally trusted. That´s why I´m getting: [INFO] >>> Checking https://localhost:8181/myservice/actuator/health... [INFO] [WARNING] https://localhost:8181/myservice/actuator/health failed (javax.net.ssl.SSLHandshakeException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target) [INFO] [INFO] >>> Not all checks passed. Trying again...

With curl it would be just a "-k" or "--insecure" option.

Can you add this option here, too, so https URL will be accepted (with a warning in the output) - instead of failing ?

Thx!

scravy commented 3 years ago

I believe you should be able to accomplish this by using various command line arguments to the JVM, see https://stackoverflow.com/questions/4663147/is-there-a-java-setting-for-disabling-certificate-validation

That thread also mentions how to do it programmatically, you are more than welcome to send a pull request for this :-)

dadoonet commented 2 years ago

I created #10 which I hope could help.