One Star

set disableCNCheck = true in ESBConsumer

Hi,
I connect to a https service endpoint and use SetKeystore for definition of the truststore.
The ESBConsumer creates the following error:
Caused by: java.io.IOException: The https URL hostname does not match the Common Name (CN) on the server certificate in the client's truststore. Make sure server certificate is correct, or to disable this check (NOT recommended for production) set the CXF client TLS configuration property "disableCNCheck" to true.
Where can i define disableCNCheck = true to switch off the CN check?
BR, Jürgen
8 REPLIES
Employee zbe
Employee

Re: set disableCNCheck = true in ESBConsumer

Jürgen,
you have to define a cxf conduits configuration for your endpoint, similar to the configuration in ${TESB_Container}/etc/org.apache.cxf.http.conduits-common.cfg. The prefix of the conduits configuration file must be org.apache.cxf.http.conduits-. The rest of the file name is up to you. Chapter 10 of the Talend ESB Container Administration Guide provides detailed information of all the properties you can set. To disable the CN check you have to include
tlsClientParameters.disableCNCheck = true

Regards,
Zsolt
Highlighted
One Star

Re: set disableCNCheck = true in ESBConsumer

Hi,
Thank you for your fast response.
Do i have to store this configuration file in a specific folder in my workspace/PROJECT directory?
BR, Jürgen
Employee zbe
Employee

Re: set disableCNCheck = true in ESBConsumer

Ooh, are trying to run the client from within the studio?
Zsolt
One Star

Re: set disableCNCheck = true in ESBConsumer

Yes.
Now i have uploaded a image of the project.
Finally it should run as exported, standalone java project.
Employee zbe
Employee

Re: set disableCNCheck = true in ESBConsumer

My suggestion to use a cxf conduit selector configuration file only works if you run your job in the TESB container. Unfortunately you cannot define a cxf conduit selector configuration within the studion
If you run your job stand alone with the help of the job server using a tSetKeystore component is the right choice.
Zsolt
One Star

Re: set disableCNCheck = true in ESBConsumer

I will try.
I never worked with ESB container.
Employee zbe
Employee

Re: set disableCNCheck = true in ESBConsumer

It's fun Smiley Happy In case you run into problems this forum is a good place to get them solved.
Zsolt
One Star

Re: set disableCNCheck = true in ESBConsumer

Does anybody know what the property "Checking server identity" at tKeyStore element mean and which function is switched with this property?