Fraunhofer-AISEC / trusted-connector

IoT edge platform "Trusted Connector" of the International Data Spaces. Based on Spring Boot, includes Camel message routing, a Camel component for IDSCP2 (including remote attestation with other connectors) and a management web UI.
https://industrial-data-space.github.io/trusted-connector-documentation
Apache License 2.0
44 stars 45 forks source link

IDSCPv2 examples failing to establish provider-consumer connection #24

Closed rizktouma closed 3 years ago

rizktouma commented 3 years ago

Describe the bug When trying to run the new IDSCPv2 examples available here, we're not able to establish the connection and send data between the provider and consumer.

When running the provider before the consumer, we're getting the following exception:

org.apache.camel.FailedToCreateProducerException: Failed to create Producer for endpoint: idscp2client://consumer-core:29292?connectionShareId=pingPongConnection&sslContextParameters=%23clientSslContext.
Reason: de.fhg.aisec.ids.idscp2.error.Idscp2Exception: Connecting TLS client to server failed

When running the consumer before the provider, there seems to be a problem with the DAPS certification and the connection is being immediately closed before any data is sent after throwing the following exception:

javax.net.ssl.SSLPeerUnverifiedException: Hostname verification failed. Peer certificate does not belong to peer host

We pulled the last version of the repository this morning and rebuilt all docker images using the buildx/docker-buildx.sh script.

To Reproduce Steps to reproduce the behavior:

  1. Clone this repository
  2. Go to examples/example-idscp and run the ttp docker container.
  3. Go to examples/example-idscp2 and run the consumer and provider docker containers.

Expected behavior The provider and consumer should be sending alternating "ping" and "pong" messages every 10 seconds, which does not happen.

Screenshots and logs

  1. Log file when running provider before consumer (stack trace at line 1242): karaf.log
  2. Log file when running consumer before provider (stack trace at line 1307): karaf.log

Environment (please complete the following information):

Additional context N/A

milux commented 3 years ago

I checked this today, and it's working flawlessly. But there has indeed been an issue with the hostname verification in IDSCP2 which caused the example to fail, maybe you missed my patch for just some hours or days. Could you please re-check with the latest develop and report back if it works?

rizktouma commented 3 years ago

Thanks for looking into it. Indeed I tried pulling again from develop and now the consumer and provider are able to connect without a problem. I will close this issue.

milux commented 3 years ago

Glad to hear that! Today I realized that my latest IDSCP2 protocol/example adaptations contained an error that causes an indefinite loop, patch goes to develop in a few minutes.