International-Data-Spaces-Association / metadata-broker-open-core

This is the repository of the open-core reference implementation of the IDS Metadata Broker.
Apache License 2.0
10 stars 17 forks source link

Broker and DAPS interaction #117

Closed AnaCarolinaChaves closed 2 years ago

AnaCarolinaChaves commented 2 years ago

I have two virtual machines:

I was able to make the machine 2 connectors interact with the DAPS without error. However, when I changed the broker to use the local DAPS, the connectors logs is: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

To change the Broker DAPS server I executed the following on the Broker directory:

  1. Remove volumes (docker-compose down -v)
  2. Change the daps.crtfile from docker/broker-core/ to the one created with the local DAPS
  3. Update the files from directory certfrom the docker-compose
  1. Run the following commands:
    mvn clean package
    cp broker-core/target/broker-core-5.0.0-SNAPSHOT.jar docker/broker-core
    cd docker/broker-core
    docker build -t registry.gitlab.cc-asp.fraunhofer.de/eis-ids/broker-open/core .
    cd ../../docker/composefiles/broker-localhost/
    docker-compose up
AnaCarolinaChaves commented 2 years ago

I was able to fix this issue on the connector side. However, now when I try to communicate with the Dataspace connector (which is using the local DAPS correctly) the response is shown in the following picture. There are no more details in the logs (connector or broker). So I'm not sure which component, or why, is returning the error.

respostaConnectorAoBrokerComDAPS
SebastianOpriel commented 2 years ago

Have you tried to set log level to debug here? https://github.com/International-Data-Spaces-Association/metadata-broker-open-core/blob/master/broker-core/src/main/resources/log4j2.xml Is the log level in your instance of DSC also set to debug? https://github.com/International-Data-Spaces-Association/DataspaceConnector/blob/b361395067691e6602c2e2a34e8595c5431773db/src/main/resources/log4j2.xml#L28

AnaCarolinaChaves commented 2 years ago

The DSC is set to debug. The broker was not. However, I was able to fix the problem while resolving the error another component was generating. The problem was that the URL the broker was trying to connect was the old URL. Updating the DAPS proxy fixed this.

SebastianOpriel commented 2 years ago

It would be great, if you could give the broker developers a hint, which line was wrong and what the correct value is. Thus, I expect the issue as "not resolved" yet.

AnaCarolinaChaves commented 2 years ago

The developers added the line to redirect to the correct URL a couple of days ago. I was just using the older one.