TLS audit-repository-transport

29 views
Skip to first unread message

Andrea Caloni

unread,
Jun 8, 2021, 6:27:10 AM6/8/21
to ipf-dev
Hello,

I am writing an application with IPF Framework / Apache Camel / Springboot, and I need to configure the atna audit-repository-transport to TLS.
When I start my application, I get the following exception:

org.openehealth.ipf.commons.audit.AuditException: Could not establish TLS connection to ...
...
Caused by: javax.net.ssl.SSLHandshakeException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

Do you have any example about how to configure the TLS transport with IPF ?

Thank you in advance.

With best regards 

Andrea Caloni

Andrea Caloni

unread,
Jun 8, 2021, 8:59:08 AM6/8/21
to ipf-dev
What I did now is to import the certificate (.der file) in the java keystore, in this way:

"C:\Program Files\Java\jdk1.8.0_281\bin\keytool.exe" -import -alias serverkey -keystore myKeyStore.ts -file myCertificate.der

and during the application startup:

File trustStore = new File(MyClass.class.getClassLoader().getResource("cert/ myKeyStore.ts").getFile());
System.setProperty("javax.net.ssl.trustStore", trustStore.getAbsolutePath());
System.setProperty("javax.net.ssl.trustStorePassword", "myPassword");

The exception I get is:
org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'auditContext' defined in class path resource [org/openehealth/ipf/boot/atna/IpfAtnaAutoConfiguration.class]: Unsatisfied dependency expressed through method 'auditContext' parameter 1; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'auditTransmissionProtocol' defined in class path resource [org/openehealth/ipf/boot/atna/IpfAtnaAutoConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.openehealth.ipf.commons.audit.protocol.AuditTransmissionProtocol]: Factory method 'auditTransmissionProtocol' threw exception; nested exception is org.openehealth.ipf.commons.audit.AuditException: java.lang.reflect.InvocationTargetException


Anybody has a suggestion ?

Thanks

Andrea Caloni

Andrea Caloni

unread,
Jun 10, 2021, 11:40:17 AM6/10/21
to ipf-dev
Hello,
I still am not able to establish a TLS connection for audit.
Is it possible to disable the SSL verification, in order to do not validate certificate chains ?

Reply all
Reply to author
Forward
0 new messages