How to add a self cert certificate for an action

ssl

(Jimmy0628) #1

Hi There

I am trying to use the jenkins pack to integrate with my jenkins server to trigger tasks, however, I always receive the ssl certification verification failure.

I tried this method, but no luck
echo -n | openssl s_client -connect alm-jenkins1.systems:443 | sed -ne ‘/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p’ >> /etc/ssl/st2/st2.crt

Could you share with me what is the correct method ?

Thank you


(Eugen C.) #2

For production use, I would suggest to get a real SSL certificates when possible. Will save from many issues.

Talking about the workaround.
Jenkins pack (GitHub - StackStorm-Exchange/stackstorm-jenkins: Jenkins CI Integration Pack) uses python-jenkins library under the hood. Quick google gave me the following: https://bugs.launchpad.net/python-jenkins/+bug/1677041 and python-jenkins code.

So you need to pass PYTHONHTTPSVERIFY=0 via additional env param to the action, see: Actions — StackStorm 3.0dev documentation.
That should disable SSL verification when communicating with Jenkins server from st2 inegration pack.