18 January 2026:
Sahi Pro is an enterprise grade test automation platform which can automate web, mobile, API, windows and java based applications and SAP.
This forum is now archived and is in read-only mode. Please continue discussions on our improved new Sahi Pro Community forum.
Sahi Pro is an enterprise grade test automation platform which can automate web, mobile, API, windows and java based applications and SAP.
SSL client certificate authentication
Hi, the website that I would like to test requires a client ssl certificate for authentication, how do I get sahi to support this?
thanks
Guy
thanks
Guy
This discussion has been closed.
Comments
http://sahi.co.in/forums/viewtopic.php?id=275
Having said that ... there is a work around :-)
What I did to overcome this obstacle is to download 'Web Scarab' (an open source proxy which can handle the client certificate authentication) and then setup Sahi to use Web Scarab as the external proxy
Because Web Scarab runs on localhost:8008 by default, the relevant settings in sahi\config\sahi.properties should be:
# Use external proxy server
ext.proxy.enable=true
ext.proxy.host=localhost
ext.proxy.port=8008
ext.proxy.auth.enable=false
Note that the proxy settings in the browser do not need to change.
Thanks, man!
we tried sahi and webscarab chained and it works fine until we have only a single sahi test with a client certificate request in our suite. In order to execute a second script without ssl error we have to reboot webscarab.
It's really annoying because we have to declare our certificate "by hand" in webscarab, it DOES NOT remember the certificates when we close the applicaztion.
Did you ever been in a situation like this ? Any suggestions will be VVVVVEEEERRRYYYYY appreciated.
TIA
Ciao
Massimo
I did indeed come across this situation and as you say, webscarab does not remember the certificates :-(
We have a test server which is running all the time, so it is not such a big problem for us but it certainly is not ideal.
Looking forward to your solution Narayan ;-)
always using sahi-webscarab chain , i noticed another strange situation: if I run several times the same test, also in parallel mode, and this test requires a client certificate , all goes fine but if I try a mixed suite, it's sufficient two different tests, and all tests require the same certificate, you can think a portal access to different applications for example, the second test goes wrong. I can't dig very much the problem but it seems a "session recognition" mistake , I suppose webscarab tries to recognize the session from the used certificate and so it answers with bad data; the result is a ssl bad connection or an handshake error. Do you have any tip to suggest me before I send all webscarab sources to our development team in order to generate a custom version of the sw ( I don't like this solution but I have to resolve quickly this situation ) ?
TIA
Ciao
Massimo
a couple of additional informations regarding last post. I configured and used squid as my IE proxy , all my sites request with and without client certificates work fine.
The question is very simple ....... Is there any chance to by-pass entirely sahi certificate mechanism and use only it like a transaparent proxy?
My idea is, maybe totally wrong but I'm beat my head against all walls since a couple of weeks to resolve these problems,
1- I configure IE to use sahi as proxy ( fully )
2- I configure Sahi to use squid as proxy ( fully )
3- I want to by-pass completly sahi for certification activities in order to use directly squid .
Is a foulish idea or not ?
TIA
Ciao
Massimo
Sorry that you are having trouble with this.
You will not be able to bypass Sahi's certificate mechanism because Sahi needs to read the contents of the web page and inject its javascript. This means intercepting the https call and then signing the responses with its own certificates. So you will need to accept Sahi's certificate on the browser.
But I think, it is possible to specify the certificate to Sahi itself so that you need not use an external proxy.
I will be continuing this discussion off line via email with you.
Regards,
Narayan